Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/archive/skybox/Media/materials/programs/DepthShadowmapCasterVp.glsl @ 11183

Last change on this file since 11183 was 390, checked in by landauf, 17 years ago

added materials

File size: 432 bytes
Line 
1uniform mat4 worldViewProj;
2uniform vec4 texelOffsets;
3uniform vec4 depthRange;
4
5varying vec2 depth;
6
7void main()
8{
9        gl_Position = ftransform();
10
11        // fix pixel / texel alignment
12        gl_Position.xy += texelOffsets.zw * gl_Position.w;
13        // linear depth storage
14        // offset / scale range output
15#if LINEAR_RANGE
16        depth.x = (gl_Position.z - depthRange.x) * depthRange.w;
17#else
18        depth.x = gl_Position.z;
19#endif
20        depth.y = gl_Position.w;
21
22
23}
24
Note: See TracBrowser for help on using the repository browser.