dungeon_crawler
diff 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 |
line diff
1.1 --- a/prototype/sdr/mrt.v.glsl Tue Aug 28 03:34:56 2012 +0300 1.2 +++ b/prototype/sdr/mrt.v.glsl Tue Aug 28 06:28:22 2012 +0300 1.3 @@ -1,4 +1,6 @@ 1.4 -varying vec3 pos, norm; 1.5 +attribute vec3 attr_tangent; 1.6 + 1.7 +varying vec3 pos, norm, tang; 1.8 1.9 void main() 1.10 { 1.11 @@ -6,6 +8,7 @@ 1.12 1.13 pos = (gl_ModelViewMatrix * gl_Vertex).xyz; 1.14 norm = gl_NormalMatrix * gl_Normal; 1.15 + tang = gl_NormalMatrix * attr_tangent; 1.16 1.17 gl_TexCoord[0] = gl_MultiTexCoord0; 1.18 }