tavli
view sdr/phong.v.glsl @ 23:3e6430028d54
slot highlghting
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 08 Jul 2015 02:31:36 +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 }