source:
GTP/trunk/Lib/Illum/GPUObscurancesGT/src/projection.frag
@
930
Revision 930, 372 bytes checked in by igarcia, 18 years ago (diff) |
---|
Rev | Line | |
---|---|---|
[930] | 1 | uniform float res; |
2 | uniform float first; | |
3 | uniform sampler2D ztex; | |
4 | ||
5 | varying float cosine; | |
6 | varying vec2 texCoord; | |
7 | ||
8 | void 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.