source:
data/branches/Shader_HS18/programs/Example/GLSL/DepthShadowmapCasterVp.glsl
@
12083
Last change on this file since 12083 was 12083, checked in by wiesep, 6 years ago | |
---|---|
File size: 306 bytes |
Rev | Line | |
---|---|---|
[12083] | 1 | #version 120 |
2 | ||
3 | uniform mat4 worldViewProj; | |
4 | uniform vec4 texelOffsets; | |
5 | ||
6 | attribute vec4 vertex; | |
7 | ||
8 | varying vec2 depth; | |
9 | ||
10 | void main() | |
11 | { | |
12 | vec4 outPos = worldViewProj * vertex; | |
13 | outPos.xy += texelOffsets.zw * outPos.w; | |
14 | // fix pixel / texel alignment | |
15 | depth = outPos.zw; | |
16 | gl_Position = outPos; | |
17 | } | |
18 |
Note: See TracBrowser
for help on using the repository browser.