oculus1
annotate sdr/phong.v.glsl @ 16:f3672317e5c2
made teapots many sizes and more colorful, added phong shader
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 21 Sep 2013 05:22:48 +0300 |
parents | |
children |
rev | line source |
---|---|
nuclear@16 | 1 varying vec3 vpos, norm, ldir; |
nuclear@16 | 2 |
nuclear@16 | 3 void main() |
nuclear@16 | 4 { |
nuclear@16 | 5 gl_Position = ftransform(); |
nuclear@16 | 6 |
nuclear@16 | 7 vpos = (gl_ModelViewMatrix * gl_Vertex).xyz; |
nuclear@16 | 8 norm = gl_NormalMatrix * gl_Normal; |
nuclear@16 | 9 |
nuclear@16 | 10 ldir = gl_LightSource[0].position.xyz - vpos; |
nuclear@16 | 11 } |