aboutsummaryrefslogtreecommitdiff
path: root/shaders/earth.vp
blob: 31fc84b3122a78e514926d9c01124cfff030be09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* Light position of Sun */
uniform vec3 lightPos ;

/* Position of the -x axis */
uniform vec3 cameraPos ;
uniform float time ;

varying vec3 fragmentNormal;
varying vec3 lightVector;
varying vec3 cameraVector ;

void main() {
    /* Set the vectors and get the normal */
    fragmentNormal = gl_Normal;
    lightVector = lightPos - gl_Vertex.xyz;
    cameraVector = cameraPos - gl_Vertex.xyz;
    
    /* Texture */
    gl_TexCoord[0] = gl_MultiTexCoord0;
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}