Howto:Shader programming in FlightGear: Difference between revisions

Jump to navigation Jump to search
Line 154: Line 154:


=== Fragment shaders ===
=== Fragment shaders ===
{{FGCquote
  |the fragment shader basically knows only the pixel it is about to render and whatever information is passed from the vertex shader. Based on 'where' the vertex shader says the pixel is, the rasterizer stage determines what the texture for the pixel should be.
But there are techniques to do this in a different way, for instance the water depth map uses world coordinates to look up a world texture, and the gardens would have to be drawn in a similar way.
  |{{cite web |url=http://sourceforge.net/p/flightgear/mailman/message/32326487/
    |title=<nowiki>Re: [Flightgear-devel] cities in FG & how to move forward</nowiki>
    |author=<nowiki>Renk Thorsten</nowiki>
    |date=<nowiki>2014-05-11</nowiki>
  }}
}}
{| class="wikitable"
{| class="wikitable"
! Input
! Input

Navigation menu