Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/atmospheric_engine/shaders/cloud.vert @ 3825

Last change on this file since 3825 was 3825, checked in by hdavid, 19 years ago

cloud shaders

File size: 669 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.5;
24    gl_Position     = ftransform();
25}
Note: See TracBrowser for help on using the repository browser.