stk-code_catmod/data/shaders/normalmap.vert
Vincent Lejeune 7da65c15f0 Enable tangents on every lod instance and fix normalmap
This will increase the memory footprint of lod object,
however this is the only way I found to make meshbuffer using
GE_NORMAL_MAP to provide the necessary info to this shader.

Now the pedestal in overlord looks perfectly normal mapped.
2014-01-17 21:55:25 +01:00

17 lines
403 B
GLSL

#version 130
uniform mat4 ModelViewProjectionMatrix;
uniform mat4 TransposeInverseModelView;
noperspective out vec3 tangent;
noperspective out vec3 bitangent;
out vec2 uv;
void main()
{
uv = gl_MultiTexCoord0.st;
tangent = (TransposeInverseModelView * gl_MultiTexCoord1).xyz;
bitangent = (TransposeInverseModelView * gl_MultiTexCoord2).xyz;
gl_Position = ModelViewProjectionMatrix * gl_Vertex;
}