tavli
annotate sdr/phong.v.glsl @ 21:c3fbf9616dbd
slot bounds, and ray testing
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 02 Jul 2015 00:01:39 +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 } |