DepthShadowmapCasterVp.glsl
资源名称:3dwind2.0.rar [点击查看]
上传用户:xhbjoy
上传日期:2014-10-07
资源大小:38068k
文件大小:0k
源码类别:
游戏引擎
开发平台:
Visual C++
- uniform mat4 worldViewProj;
- uniform vec4 texelOffsets;
- uniform vec4 depthRange;
- varying vec2 depth;
- void main()
- {
- gl_Position = ftransform();
- // fix pixel / texel alignment
- gl_Position.xy += texelOffsets.zw * gl_Position.w;
- // linear depth storage
- // offset / scale range output
- #if LINEAR_RANGE
- depth.x = (gl_Position.z - depthRange.x) * depthRange.w;
- #else
- depth.x = gl_Position.z;
- #endif
- depth.y = gl_Position.w;
- }