dbf-halloween2015

view sdr/default.v.glsl @ 0:50683c78264e

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 01 Nov 2015 00:09:12 +0200
parents
children
line source
1 uniform mat4 world_matrix;
3 varying vec3 lpos, wpos, vpos, norm, ldir;
5 void main()
6 {
7 lpos = gl_Vertex.xyz;
8 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
10 vpos = (gl_ModelViewMatrix * gl_Vertex).xyz;
11 wpos = (world_matrix * gl_Vertex).xyz;
12 norm = gl_NormalMatrix * gl_Normal;
13 gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
15 ldir = gl_LightSource[0].position.xyz - vpos;
16 }