Doing without Cg shaders
|Home||Keeping it running on ancient hardware.|
Racer these days is all about shading (or in more realistic terms: lighting). Shading is highly programmable these days on modern graphics cards. However, a lot of hardware still exists (often on laptops) that only support basic OpenGL operations. Racer aims for high-end graphics cards, but I try to keep lower end graphics cards working for the next few years.
This tutorial thus describes how to create non-Cg content for Racer. Cg is a GPU shading language; little programs running on the graphics card to modify vertices and fragments (pixels) more programmatically than just the default OpenGL rendering pipeline can do.
The minimum version for this tutorial to work is v0.8.10.
The big picture
Racer has an executable: racer.exe. Getting rid of Cg for older cards really means a lot of things change, so a separate exe is available for non-Cg content: racer_nocg.exe.
The non-Cg version of Racer skips all Cg things altogether. This does mean that a lot of effects are not available (such as nice looking rain) but it keeps the wagon rolling and lets people create content that still runs on older machines, and also uses the latest physics. Hopefully most users will upgrade to better graphics cards to make use of the graphical flexibility that Racer has to offer.
For tracks, instead of track.shd, now track_nocg.shd is loaded. Similarly for cars, car_nocg.shd is loaded instead of car.shd. This allows you to create simple shaders for older cars.
(last updated November 13, 2012 )