Model is now transformable
This commit is contained in:
parent
8c62929e3c
commit
9a40f89fe8
3 changed files with 12 additions and 5 deletions
|
@ -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));
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue