From 90248a622203da205916ac89a1ac144d363cf37d Mon Sep 17 00:00:00 2001 From: omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> Date: Tue, 26 Mar 2024 22:30:26 +1100 Subject: compile shader to spirv in build. start adding shader module code --- assets/shaders/blinn_phong.vert | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'assets/shaders') 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 { -- cgit v1.2.3-70-g09d2