oculus1
diff 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 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/sdr/phong.v.glsl Sat Sep 21 05:22:48 2013 +0300 1.3 @@ -0,0 +1,11 @@ 1.4 +varying vec3 vpos, norm, ldir; 1.5 + 1.6 +void main() 1.7 +{ 1.8 + gl_Position = ftransform(); 1.9 + 1.10 + vpos = (gl_ModelViewMatrix * gl_Vertex).xyz; 1.11 + norm = gl_NormalMatrix * gl_Normal; 1.12 + 1.13 + ldir = gl_LightSource[0].position.xyz - vpos; 1.14 +}