Last change
on this file since 4497 was
3939,
checked in by bensch, 18 years ago
|
data/trunk: merged the data from the atmos branche back
|
File size:
655 bytes
|
Line | |
---|
1 | // |
---|
2 | // Vertex shader for producing animated clouds (mostly cloudy) |
---|
3 | // |
---|
4 | // Authors: John Kessenich, Randi Rost |
---|
5 | // |
---|
6 | // Copyright (c) 2002-2004 3Dlabs Inc. Ltd. |
---|
7 | // |
---|
8 | // See 3Dlabs-License.txt for license information |
---|
9 | // |
---|
10 | |
---|
11 | varying float LightIntensity; |
---|
12 | varying vec3 MCposition; |
---|
13 | |
---|
14 | uniform vec3 LightPos; |
---|
15 | uniform float Scale; |
---|
16 | |
---|
17 | void main(void) |
---|
18 | { |
---|
19 | vec3 ECposition = vec3 (gl_ModelViewMatrix * gl_Vertex); |
---|
20 | MCposition = vec3 (gl_Vertex) * Scale; |
---|
21 | vec3 tnorm = normalize(vec3 (gl_NormalMatrix * gl_Normal)); |
---|
22 | LightIntensity = dot(normalize(LightPos - ECposition), tnorm); |
---|
23 | LightIntensity = 1.0; |
---|
24 | gl_Position = ftransform(); |
---|
25 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.