dbf-halloween2015

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/sdr/default.v.glsl	Sun Nov 01 00:09:12 2015 +0200
     1.3 @@ -0,0 +1,16 @@
     1.4 +uniform mat4 world_matrix;
     1.5 +
     1.6 +varying vec3 lpos, wpos, vpos, norm, ldir;
     1.7 +
     1.8 +void main()
     1.9 +{
    1.10 +	lpos = gl_Vertex.xyz;
    1.11 +	gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
    1.12 +
    1.13 +	vpos = (gl_ModelViewMatrix * gl_Vertex).xyz;
    1.14 +	wpos = (world_matrix * gl_Vertex).xyz;
    1.15 +	norm = gl_NormalMatrix * gl_Normal;
    1.16 +	gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
    1.17 +
    1.18 +	ldir = gl_LightSource[0].position.xyz - vpos;
    1.19 +}