Last change
on this file since 4294 was
3939,
checked in by bensch, 18 years ago
|
data/trunk: merged the data from the atmos branche back
|
File size:
540 bytes
|
Line | |
---|
1 | varying float intensity_sq, intensity; |
---|
2 | |
---|
3 | uniform vec4 bbox; |
---|
4 | uniform float time; |
---|
5 | |
---|
6 | void 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.