diff options
Diffstat (limited to 'glsl/shader_3d.vert.glsl')
-rw-r--r-- | glsl/shader_3d.vert.glsl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/glsl/shader_3d.vert.glsl b/glsl/shader_3d.vert.glsl index 8fd9167..fe78dc7 100644 --- a/glsl/shader_3d.vert.glsl +++ b/glsl/shader_3d.vert.glsl @@ -1,5 +1,5 @@ /* - * Copyright 2022 Frederico de Oliveira Linhares + * Copyright 2022-2023 Frederico de Oliveira Linhares * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ layout(location = 0) in vec3 in_position; layout(location = 1) in vec3 in_normal; layout(location = 2) in vec2 in_texture_coord; - layout(location = 0) out DataTransferObject { vec4 frag_color; @@ -40,18 +39,18 @@ layout(set = 1, binding = 0) uniform UBOView mat4 proj; } ubo_view; -layout(push_constant) uniform UBOModelInstance +layout(set = 2, binding = 0) uniform UBOStaticModel { - mat4 matrix; -} ubo_model_instance; + mat4 base_matrix; +} ubo_static_model; void main() { gl_Position = ubo_view.proj * ubo_view.view * - ubo_model_instance.matrix * vec4(in_position, 1.0); + ubo_static_model.base_matrix * vec4(in_position, 1.0); out_dto.frag_color = ubo_world.ambient_light_color; out_dto.frag_texture_coord = in_texture_coord; - out_dto.normal = mat3(ubo_model_instance.matrix) * in_normal; + out_dto.normal = mat3(ubo_static_model.base_matrix) * in_normal; } |