tavli

annotate sdr/phong.v.glsl @ 15:b1a195c3ee16

added shaders
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 28 Jun 2015 08:34:24 +0300
parents
children
rev   line source
nuclear@15 1 varying vec3 vdir, ldir, normal;
nuclear@15 2
nuclear@15 3 void main()
nuclear@15 4 {
nuclear@15 5 gl_Position = ftransform();
nuclear@15 6
nuclear@15 7 vec3 vpos = (gl_ModelViewMatrix * gl_Vertex).xyz;
nuclear@15 8 normal = gl_NormalMatrix * gl_Normal;
nuclear@15 9 vdir = -vpos;
nuclear@15 10 ldir = gl_LightSource[0].position.xyz - vpos;
nuclear@15 11 gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
nuclear@15 12 }