source: GTP/trunk/Lib/Illum/GPUObscurancesGT/src/projection.frag @ 930

Revision 930, 372 bytes checked in by igarcia, 18 years ago (diff)
RevLine 
[930]1uniform float res;
2uniform float first;
3uniform sampler2D ztex;
4
5varying float cosine;
6varying vec2 texCoord;
7
8void main()
9{
10        if( first == 0.0)
11        {
12                float depth = tex2D(ztex,gl_FragCoord.xy/res).a;
13                if (gl_FragCoord.z < (depth + 0.000001)) discard;
14        }
15        gl_FragColor.rg = texCoord+0.5/512.0;
16        gl_FragColor.b = cosine;
17        gl_FragColor.a = gl_FragCoord.z;
18}
Note: See TracBrowser for help on using the repository browser.