Implemented rotations
This commit is contained in:
parent
7a634d53b5
commit
defdf051ec
6 changed files with 29 additions and 13 deletions
|
|
@ -15,6 +15,7 @@ layout (binding = 1) uniform ViewUniform {
|
|||
layout (binding = 4) uniform TransformUniform {
|
||||
mat4 translation;
|
||||
mat4 scale;
|
||||
mat4 rotation;
|
||||
} transform;
|
||||
|
||||
layout(location = 2) out vec3 Normal;
|
||||
|
|
@ -22,7 +23,7 @@ layout(location = 3) out vec3 FragPos;
|
|||
layout(location = 4) out vec2 TexCoords;
|
||||
|
||||
void main() {
|
||||
mat4 transformation = transform.translation * transform.scale;
|
||||
mat4 transformation = transform.translation * transform.scale * transform.rotation;
|
||||
vec4 out_vec = proj.proj * view.view * transformation * vec4(vertPos, 1.0);
|
||||
FragPos = vec3(vec4(vertPos, 1.0));
|
||||
Normal = normal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue