20,741
edits
m (http://forum.flightgear.org/viewtopic.php?f=47&t=11229&p=215303&hilit=README.effects#p215303) |
m (http://forum.flightgear.org/viewtopic.php?f=47&t=24226&p=228095&hilit=README.effects#p228095) |
||
Line 2: | Line 2: | ||
{{Main article|shaders}} | {{Main article|shaders}} | ||
Typically, shaders will be made acccessible through "effects", for that, see $FG_ROOT/Docs/README.effects | |||
In FlightGear, many shaders are used through the so called "effects" framework, to learn more about that, see $FG_ROOT/Docs/README.effects | In FlightGear, many shaders are used through the so called "effects" framework, to learn more about that, see $FG_ROOT/Docs/README.effects | ||
Line 7: | Line 9: | ||
effects can be used, edited and customized even without understanding GLSL - those are just XML files, see README.effects in $FG_ROOT/Docs | effects can be used, edited and customized even without understanding GLSL - those are just XML files, see README.effects in $FG_ROOT/Docs | ||
GLSL is a different thing obviously. But the syntax is mostly ANSI C - so the main challenge is not knowing the language, but the way GPUs work, and how different types of shaders work in terms of having a dynamic/configurable "pipeline". Even that is not necessarily rocket science - as Thorsten has shown over and over again: shader development is primarily about understanding fairly involved maths and physics, not about the language itself, or even about the run-time environment. | GLSL is a different thing obviously. But the syntax is mostly ANSI C - so the main challenge is not knowing the language, but the way GPUs work, and how different types of shaders work in terms of having a dynamic/configurable "pipeline". Even that is not necessarily rocket science - as Thorsten has shown over and over again: shader development is primarily about understanding fairly involved maths and physics, not about the language itself, or even about the run-time environment. | ||
To learn more about effects, and shaders, I'd suggest these resources: | |||
$FG_ROOT/Docs/README.effects | |||
$FG_ROOT/Docs/README.materials | |||
http://wiki.flightgear.org/Shaders | |||
http://wiki.flightgear.org/Howto:Shader ... FlightGear | |||
http://wiki.flightgear.org/GLSL_Shader_ ... _Resources | |||
Once you've read these, you should have a better understanding of how effects and shaders hang together, and what *.frag/*.vert files are doing, and how they're generally structured. | |||
Note that these articles will usually contain additional pointers - while familiarity with programming (especially in C/C++) will come in handy, GLSL is primarily about 3D math - so you need a strong background in math to understand more sophisticated coding examples/snippets. | |||
When it comes to shader programming, people with a strong background in maths and physics will find it much easier to make working modifications than people who "just" have a strong programming background. but lacking the math skills | When it comes to shader programming, people with a strong background in maths and physics will find it much easier to make working modifications than people who "just" have a strong programming background. but lacking the math skills |