Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G

Talk:Shader

From FlightGear wiki
Jump to: navigation, search

Related

(should probably become a new page titled Howto: Create Shaders - along with corresponding tutorials

Also see: Programming_Resources#OpenGL_Shaders

Source code links

I have just added a link to the FGData directory, but where do the C++ code live?

Johan G (Talk | contribs) 15:31, 6 October 2015 (EDT)

Most shaders are added through Effects, so there are not many hard-coded file names - the main exception being Rembrandt, which does have a few hard-coded shaders in the C++ code. But otherwise, shaders are mainly used in conjunction with effects and materials, so that is how they are controlled, which also means that the main shader logic lives in SimGear:
cd $SG_SRC && grep -nr "addShader" *
scene/material/Effect.cxx:959:            program->addShader(sitr->second.get());
scene/material/Effect.cxx:964:                program->addShader(shader.get());

--Hooray (talk) 06:09, 7 October 2015 (EDT)