Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/data_extern/programs/GLSL150/GrassCasterVp.glsl @ 12302

Last change on this file since 12302 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
3uniform mat4 worldViewProj;
4uniform vec4 offset;
5uniform vec4 texelOffsets;
6
7in vec4 position;
8in vec4 uv0;
9
10out vec4 oUv0;
11out vec2 oDepth;
12
13//////////////////////// GRASS SHADOW CASTER
14// Shadow caster vertex program.
15void 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.