Model is now transformable

This commit is contained in:
Robert 2021-01-30 04:23:10 +01:00
parent 8c62929e3c
commit 9a40f89fe8
3 changed files with 12 additions and 5 deletions

View file

@ -8,14 +8,16 @@ out vec3 oNormal;
out vec2 oUV;
out vec3 oFragPos;
uniform mat3 normal;
uniform mat4 model;
uniform mat4 view;
uniform mat4 projection;
void main()
{
oNormal = aNormal;
oNormal = normal * aNormal;
oUV = aUV;
gl_Position = projection * view * vec4(aPos, 1.0);
oFragPos = aPos;
gl_Position = projection * view * model * vec4(aPos, 1.0);
oFragPos = vec3(model * vec4(aPos, 1.0));
}