Shader requests

From FlightGear wiki
Jump to navigation Jump to search

Please post your shader requests here, so that other people can more easily track what's going on, hopefully avoiding duplicate efforts.

Currently work in progress

Water shader by gral (11/2010)

Please see:

Open shader requests

Spinning propeller

Since a spinning propeller is not, in fact, a flat quad with a texture, I'm going to request a spinning propeller shader. See War Thunder:,OAwik2K,C3AUAzy

Prop sideways view

When you see a spinning from the side, there is a definite effect of it becoming more opaque.


is it possible to simulate the fluttering of flags in the wind using a shader? I'd like to place some flags in the scenery for our FSWeekend presentation showing the logo of our sponsor. But attaching a flat surface to a a flagpole looks just to cheap.


Contaminated runways and taxiways (10/2010)

Ok I have no idea if this is possible, but this idea just came up in my mind: wouldn't it be very cool to apply this shader (actually a similar version of it) to runways and taxiways when it's raining? I know there's not much sunshine when it's raining, but I mean just the light-reflecting idea.

And you could get the visual effect of a wet runway or snow based on weather settings. (

To clearify the aspect/feature override part mentioned above here's a different use case I have in mind. 
In a scene where it is raining you typically would want to show all material as being wet. 
This can be implemented at several levels of realism. For a quick start I would increase specular reflection 
and maybe darken diffuse in the top level StateSet. The darkening of materials could be made different for 
several materials in the scene simply by setting a different uniform darkening value. Some objects in the scene 
might implement wetness with a specular cubemap. In case of a road it might even contain puddles and use a planar
reflection of the scene. All these shader pieces implement the aspect "wetness" in different ways, where higher 
fidelity implementations lower in the scene tree override the default implementation in the top level stateset. 
And in case you want to disable "wetness" for the whole scene it should be possible to do so at the top level 
stateset similar to how we are used to disable texturing, lighting etc. [1]


Runway skid marks

It would be interesting to see if and how this mechanism could possibly be used to dynamically place skid marks on runways at runtime, so that landing aircraft can cause their own, new skid marks during touchdown.


Precipitation effects for cockpit windows

Something like this could be very useful for my idea to get a decent rain / snow / ice effect to the cockpit glass with working wipers by simply changing the textures of an overlaying model.


Lens distortion shader for Oculus Rift

Probably already on someone's list; but the shader from [2] to correct for lens distortion in Oculus Rift would be helpful.

I'm (slowly) working on that one Gijs (talk) 15:09, 11 March 2014 (UTC)


Engine wake

Used to be available for a very alpha version of the 777-200 back in 2008, Although it was no longer supported by the sim. Perhaps someone who created it could enlighten us on what was the basis behind it and how we can create a new shader for engine wake.

sky / atmosphere scattering

has implication on other shaders, and as far as I know, the sky dome can't have effects for the moment [3] Ralf Stokholm Nielsen has implemented something similar in his thesis: [4]

other material types

not all the world should have the "plastic" look of the OpenGL default shading equation ). Crops should have a fur-like lighting response. A first step has already occurred in the reflection shader that should have a metallic look. Research Cook-Torrance (should tell something to blender users) and Fresnel if you want references. First step here : . Oren-Nayar should be perfect for seat fabric. [5]

geometry shader for transforming to billboarded trees

geometry shader to transform points into huge number of billboarded trees (a la Outerra). The code should be modified to generate the set of points following the terrain in the first place, but something similar already exists to create night point lights. [6]

procedural runway markings

set on top a dumb concrete/asphalt/whatever texture/material

post-processing effects

(glow, motion blur, depth of field ) We already have redout/blackout, but could be enhanced by having a circular fading shape (you know when your field of view begins to shrink and you are not able to see on your sides) instead of a constant one [7]

animation of roads (ground traffic)

Especially during night, cars on roads and motorways can usually be seen very well. Wouldn't it be a great feature if cars could be simulated with shaders? That means, that during days, differently colored cars move on streets, and during night some lights are visible? Is that doable with shaders? Stanisak 21:43, 4 December 2010 (UTC)

osm2city uses a nice traffic shader with 2D Images of moving cars. For trains I'd wish a similar effect, just with trains instead of cars which move slower and appear less frequently. Laserman (talk)

Cquote1.png A more promising/better-performing approach would involve using shaders, as per a number of "traffic shader" discussions we've had (especially affected by OSM2City)
— Hooray (Sat Nov 15). Re: How to creat moving traffic.
(powered by Instant-Cquotes)
Cquote1.png If we have linear features like roads mapped in the proper direction and classified into left and right lanes, we could add overlay textures and normalmaps with the shader (think urban effect) and translate them with time, creating the semblance of traffic (like the urban effect, this would break at low altitude, but from reasonably high up might look credible)
— Thorsten (Mon Apr 01). What effects are we missing?.
(powered by Instant-Cquotes)
Cquote1.png Note that there are two road effects, and fgdata/Effects/road*eff is Emilian's traffic shader. Though the correct way of using it would be to set TRAFFIC_SHADER_ENABLE = True and then run
— radi (Mon Oct 20). Re: development.
(powered by Instant-Cquotes)
Cquote1.png all credit goes to Emilian. He is improving the shader side, I will continue on the model side. So this is very much work in progress.

The shader requires the default renderer. No ALS/Rembrandt yet.

— radi (Fri Jun 13). Re: development.
(powered by Instant-Cquotes)
Cquote1.png (see the linked image)

Thanks Emilian!

— radi (Wed Jun 11). Re: development.
(powered by Instant-Cquotes)

motion blur, bloom & HDR

See forum post:

Tessellation via geometry shaders (or fractals)

Something like a LOD animation in which we subdivide the triangles in more little ones, so we always get detailed terrain when camera is near. (Textures included too). That wouldn't be very hard to implement with geometry shaders. Another way could be with fractals and OSG code, but geometry shaders would be more viable I think.