Shader Experiments
From X-PluginsIntroEarly in 2006 I did some experiments and research into custom GL shaders with X-Plane, this document describes and shows some of the results with videos and screen caps. Here are some x-plane.org forum threads where a little more information can be found. Sorry the image links are all dead. http://forums.x-plane.org/index.php?showtopic=17391 http://forums.x-plane.org/index.php?showtopic=17338
I have C++ classes for both basic OBJ8 support (no animation or other advanced features) and Shader loading. The OBJ8 class uses the shader class as an class member so that a shader can be easily associated on a per custom object basis. Shaders take care of enable and disabling themselves when the draw call for the object is made. I also have the prototype shader harness code that injects shaders into various parts of x-planes rendering loop, this code is not as useful as that described above.
VideosHere's a couple of videos showing vertex and fragment shaders at work in v7.6. Custom shaders also worked in early versions of v8. I haven't done any testing in the later versions of 8 and early versions of 9.
Demonstrating the issues in injecting shaders into X-Planes engine where it doesn't expect them. The ground/wave wave effect produced by the shader has no effect on the models in the scene as the height changes are done on the GPU post physics analysis.
Videos below were generated in v8.4 I think.
Chrome at Dusk - Demonstrating lighting conditions changing the shader output, we don't want super bright chrome at dusk.
RuBY - Demonstrating a nice attention grabbing use of the shader, pretty much the same as Chrome, using a different input texture. I just like the way it looks. I include it for eye candy. Enjoy. PluginsI need to look through my backups to find these. |
|
|
|
|
