Shadows for animated models and removed spam in console

This commit is contained in:
viktorljung
2016-03-09 22:43:04 +01:00
parent d393f9ade1
commit 4e6ff16e58
4 changed files with 88 additions and 6 deletions
+29
View File
@@ -0,0 +1,29 @@
#version 430
uniform mat4 M;
uniform mat4 V;
uniform mat4 P;
uniform mat4 Bones[100];
layout (location = 0) in vec3 Position;
layout (location = 4) in vec2 TextureCoords;
layout(location = 5) in vec4 BoneIndices;
layout(location = 6) in vec4 BoneWeights;
out VertexData{
vec2 TextureCoordinate;
}Output;
void main()
{
mat4 boneTransform = mat4(1);
if(BoneWeights[0] > 0.0f){
boneTransform = BoneWeights[0] * Bones[int(BoneIndices[0])]
+ BoneWeights[1] * Bones[int(BoneIndices[1])]
+ BoneWeights[2] * Bones[int(BoneIndices[2])]
+ BoneWeights[3] * Bones[int(BoneIndices[3])];
}
gl_Position = P * V * M * boneTransform * vec4(Position, 1.0);
Output.TextureCoordinate = TextureCoords;
}