Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 22, 2006, 4:09:40 PM (18 years ago)
Author:
hdavid
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • data/branches/atmospheric_engine/shaders/cloud.vert

    r3875 r3876  
     1//
    12// 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//
    210
    311varying float LightIntensity;
    412varying vec3  MCposition;
    513
     14uniform vec3  LightPos;
    615uniform float Scale;
    716
    817void main(void)
    918{
    10     vec3 ECposition = vec3 (gl_ModelViewMatrix * gl_Vertex);
    11     MCposition      = vec3 (gl_Vertex) * Scale;
    12     vec3 tnorm      = normalize(vec3 (gl_NormalMatrix * gl_Normal));
    13     LightIntensity = 1;
    14     gl_Position     = ftransform();
     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();
    1525}
Note: See TracChangeset for help on using the changeset viewer.