dungeon_crawler

annotate prototype/sdr/mrt.v.glsl @ 35:d0e93b4d9ec9

normal mapping
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 28 Aug 2012 06:28:22 +0300
parents 48cfd351a9be
children
rev   line source
nuclear@35 1 attribute vec3 attr_tangent;
nuclear@35 2
nuclear@35 3 varying vec3 pos, norm, tang;
nuclear@20 4
nuclear@18 5 void main()
nuclear@18 6 {
nuclear@18 7 gl_Position = ftransform();
nuclear@20 8
nuclear@20 9 pos = (gl_ModelViewMatrix * gl_Vertex).xyz;
nuclear@20 10 norm = gl_NormalMatrix * gl_Normal;
nuclear@35 11 tang = gl_NormalMatrix * attr_tangent;
nuclear@20 12
nuclear@18 13 gl_TexCoord[0] = gl_MultiTexCoord0;
nuclear@18 14 }