Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/atmospheric_engine/shaders/sky.vert @ 3895

Last change on this file since 3895 was 3798, checked in by amaechler, 18 years ago
File size: 540 bytes
Line 
1varying float intensity_sq, intensity;
2
3uniform vec4 bbox;
4uniform float time;
5
6void main()
7{
8   gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
9
10   gl_TexCoord[0] = vec4(gl_Vertex.x / 2.0 + time,       gl_Vertex.z / 2.0, 0.0, 0.0);
11   gl_TexCoord[1] = vec4(gl_Vertex.x       + time / 2.0, gl_Vertex.z,       0.0, 0.0);
12
13// Get the vertex height and scale it to 0 - 1 range.
14   intensity    = gl_Vertex.y / bbox.y;
15   intensity    = exp(clamp(intensity, 0.0, 1.0)) / 1.8;
16   intensity_sq = intensity * intensity;
17}
Note: See TracBrowser for help on using the repository browser.