Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/shaders/sky.vert @ 4212

Last change on this file since 4212 was 3939, checked in by bensch, 18 years ago

data/trunk: merged the data from the atmos branche back

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.