Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL150/DepthShadowmapCasterVp.glsl @ 12181

Last change on this file since 12181 was 12115, checked in by wiesep, 6 years ago

Changed folder structure, deletet some unused files and cleaned up code

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