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

Difference between revisions of "Shader Coding - Best Practices"

From FlightGear wiki
Jump to: navigation, search
(http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg35934.html)
 
m
Line 1: Line 1:
 
{{WIP|Will be based on: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg35934.html}}
 
{{WIP|Will be based on: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg35934.html}}
 +
 +
== Fragment Shaders ==
 +
 +
{{Note|To check if your shader is working, add this as the last line, it should turn all pixels black:
 +
<syntaxhighlight lang="glsl">
 +
gl_FragColor = vec4 (0.0,0.0,0.0,1.0);
 +
</syntaxhighlight>
 +
}}

Revision as of 08:06, 22 February 2014

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
Note: Will be based on: http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg35934.html
See history for the latest developments.

Fragment Shaders

Note  To check if your shader is working, add this as the last line, it should turn all pixels black:
gl_FragColor = vec4 (0.0,0.0,0.0,1.0);