summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authoromnisci3nce <17525998+omnisci3nce@users.noreply.github.com>2024-03-26 22:30:26 +1100
committeromnisci3nce <17525998+omnisci3nce@users.noreply.github.com>2024-03-26 22:30:26 +1100
commit90248a622203da205916ac89a1ac144d363cf37d (patch)
tree517ac2d58eb9e24c56ffb8a7fc229bdb437e780c /assets
parent9e120a48438c793e8f23fab000189d4af1068eee (diff)
compile shader to spirv in build. start adding shader module code
Diffstat (limited to 'assets')
-rw-r--r--assets/shaders/blinn_phong.vert11
1 files changed, 7 insertions, 4 deletions
diff --git a/assets/shaders/blinn_phong.vert b/assets/shaders/blinn_phong.vert
index 6028178..041c3d1 100644
--- a/assets/shaders/blinn_phong.vert
+++ b/assets/shaders/blinn_phong.vert
@@ -4,10 +4,13 @@ layout (location = 0) in vec3 inPos;
layout (location = 1) in vec3 inNormal;
layout (location = 2) in vec2 inTexCoords;
-uniform mat4 model;
-uniform mat4 view;
-uniform mat4 projection;
-uniform mat4 lightSpaceMatrix;
+// Uniform block
+layout (std140, binding = 0) uniform MatrixBlock {
+ mat4 model;
+ mat4 view;
+ mat4 projection;
+ mat4 lightSpaceMatrix;
+};
// Output
out VS_OUT {