Normal map support

This commit is contained in:
Tleety
2016-01-27 13:52:27 +01:00
parent 8102f3a2ea
commit a954cbbf50
6 changed files with 30 additions and 21 deletions
+4
View File
@@ -16,6 +16,8 @@ layout(location = 6) in vec4 BoneWeights;
out VertexData{
vec3 Position;
vec3 Normal;
vec3 Tangent;
vec3 BiTangent;
vec2 TextureCoordinate;
vec4 ExplosionColor;
}Output;
@@ -37,5 +39,7 @@ void main()
Output.Position = (boneTransform * vec4(Position, 1.0)).xyz;
Output.TextureCoordinate = TextureCoords;
Output.Normal = vec3(M * vec4(Normal, 0.0));
Output.Tangent = vec3(M * vec4(Tangent, 0.0));
Output.BiTangent = vec3(M * vec4(BiTangent, 0.0));
Output.ExplosionColor = vec4(0.0);
}