Last change
on this file since 12206 was
12115,
checked in by wiesep, 6 years ago
|
Changed folder structure, deletet some unused files and cleaned up code
|
File size:
560 bytes
|
Line | |
---|
1 | #version 150 |
---|
2 | |
---|
3 | uniform mat4 worldViewProj; |
---|
4 | uniform vec4 offset; |
---|
5 | uniform vec4 texelOffsets; |
---|
6 | |
---|
7 | in vec4 position; |
---|
8 | in vec4 uv0; |
---|
9 | |
---|
10 | out vec4 oUv0; |
---|
11 | out vec2 oDepth; |
---|
12 | |
---|
13 | //////////////////////// GRASS SHADOW CASTER |
---|
14 | // Shadow caster vertex program. |
---|
15 | void main() |
---|
16 | { |
---|
17 | vec4 mypos = position; |
---|
18 | vec4 factor = vec4(1.0, 1.0, 1.0, 1.0) - uv0.yyyy; |
---|
19 | mypos = mypos + offset * factor; |
---|
20 | gl_Position = worldViewProj * mypos; |
---|
21 | |
---|
22 | // fix pixel / texel alignment |
---|
23 | gl_Position.xy += texelOffsets.zw * gl_Position.w; |
---|
24 | |
---|
25 | oDepth.x = gl_Position.z; |
---|
26 | oDepth.y = gl_Position.w; |
---|
27 | |
---|
28 | oUv0 = uv0; |
---|
29 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.