Shader Experiments

From X-Plugins

Jump to: navigation, search

Intro

Early 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


During my research into shaders I created a couple of plugins as well as some C++ classes to make dealing with them easier.

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.


Source code is not publicly available.

Videos

Here'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.


Ocean Waves Test - Uses vertex and fragment shaders.


"Land Waves" - Just the vertex shader this time.

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 - Custom OBJ8 loader/renderer + shader loader. Load and render whatever you like however you like.

Chrome at Dusk - Demonstrating lighting conditions changing the shader output, we don't want super bright chrome at dusk.


Reflective Windows Pt 1 - Demonstrating reflective windows on a nice Aircraft model. (Thanks to Tom Kyler for use of his Mu2)

Reflective Windows Pt 2


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.

Plugins

I need to look through my backups to find these.


Personal tools