tavli
annotate sdr/phong.v.glsl @ 24:0aadb519b5ee
correct highlighting
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 08 Jul 2015 15:11:58 +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 } |