tavli
view sdr/phong.v.glsl @ 17:16a420432aa3
pieces on the board
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 28 Jun 2015 23:04:37 +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 }