tavli
view sdr/phong.v.glsl @ 15:b1a195c3ee16
added shaders
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 28 Jun 2015 08:34:24 +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 }