tavli
view 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 |
line source
1 varying vec3 vdir, ldir, normal;
3 void main()
4 {
5 gl_Position = ftransform();
7 vec3 vpos = (gl_ModelViewMatrix * gl_Vertex).xyz;
8 normal = gl_NormalMatrix * gl_Normal;
9 vdir = -vpos;
10 ldir = gl_LightSource[0].position.xyz - vpos;
11 gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
12 }