Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

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

File size: 655 bytes
RevLine 
[3876]1//
[3825]2// Vertex shader for producing animated clouds (mostly cloudy)
[3876]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//
[3825]10
11varying float LightIntensity;
12varying vec3  MCposition;
13
[3876]14uniform vec3  LightPos;
[3825]15uniform float Scale;
16
17void main(void)
18{
[3876]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.