Shadows

From FlightGear wiki
Revision as of 21:01, 28 October 2011 by Icecode (talk | contribs) (Added Shadows with shaders)
Jump to navigation Jump to search
This article is a stub. You can help the wiki by expanding it.

Shadows were available in FlightGear 1.0, although the feature became deprecated with the OSG based FlightGear 1.9.0. However, the shift to OSG opens up the possibility for re-implementing shadows and many other new graphical features in future FG versions (such as happened with 3D Clouds)

Using shaders as the road to shadows

Shaders opened a big door in FlightGear. It allowed the water shader, skydome effect, urban shader, lightmaps, reflections etc., as well as shadows. With a method denominated shadow volumes, shadowing is possible. Basically, this method extrudes the object's vertexs which are not illuminated in light's direction, via a vertex shader. Then, we fill the ground with the object's shape via stencil. The technique is similar to the one used in light-cones.

The main disadvantage of using shaders, and the main reason of why none had time to implement them, is the compability with the rest of shaders, such as urban effect and water shader.

Related