Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/trunk/shaders/cloud.vert @ 3939

Last change on this file since 3939 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
11varying float LightIntensity;
12varying vec3  MCposition;
13
14uniform vec3  LightPos;
15uniform float Scale;
16
17void 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.