From e709eceb7596e51e0657446c79edeb9001faddc0 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 22 Jan 2023 17:30:25 +0900 Subject: [PATCH] [vulkan] Use matrices header in geometry shaders I had missed them earlier as I had forgotten about them (looked only at vertex shaders). --- libs/video/renderer/Makemodule.am | 6 +++--- libs/video/renderer/vulkan/shader/bsp_gbuf.geom | 10 ++++------ libs/video/renderer/vulkan/shader/particle.geom | 10 ++++------ 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/libs/video/renderer/Makemodule.am b/libs/video/renderer/Makemodule.am index d21ecf882..ec158eaf2 100644 --- a/libs/video/renderer/Makemodule.am +++ b/libs/video/renderer/Makemodule.am @@ -366,7 +366,7 @@ pushcolor_c = $(vkshaderpath)/pushcolor.frag.spvc waterwarp_src = $(vkshaderpath)/waterwarp.frag waterwarp_c = $(vkshaderpath)/waterwarp.frag.spvc -$(slice_vert_c): $(slice_vert_src) $(matrices_h) +$(slice_c): $(slice_src) $(matrices_h) $(linev_c): $(linev_src) $(matrices_h) $(linef_c): $(linef_src) @@ -374,7 +374,7 @@ $(linef_c): $(linef_src) $(partphysicsc_c): $(partphysicsc_src) $(partupdatec_c): $(partupdatec_src) $(particlev_c): $(particlev_src) $(matrices_h) -$(particleg_c): $(particleg_src) +$(particleg_c): $(particleg_src) $(matrices_h) $(particlef_c): $(particlef_src) $(oit_store) $(oit_h) $(sprite_gbufv_c): $(sprite_gbufv_src) $(matrices_h) @@ -399,7 +399,7 @@ $(bsp_depth_c): $(bsp_depth_src) $(entity_h) $(matrices_h) $(bsp_gbufv_c): $(bsp_gbufv_src) $(entity_h) $(matrices_h) -$(bsp_gbufg_c): $(bsp_gbufg_src) +$(bsp_gbufg_c): $(bsp_gbufg_src) $(matrices_h) $(bsp_gbuff_c): $(bsp_gbuff_src) diff --git a/libs/video/renderer/vulkan/shader/bsp_gbuf.geom b/libs/video/renderer/vulkan/shader/bsp_gbuf.geom index 15cb5a537..38bba91fa 100644 --- a/libs/video/renderer/vulkan/shader/bsp_gbuf.geom +++ b/libs/video/renderer/vulkan/shader/bsp_gbuf.geom @@ -1,11 +1,9 @@ #version 450 +#extension GL_GOOGLE_include_directive : enable -layout (set = 0, binding = 0) uniform Matrices { - mat4 Projection3d; - mat4 View; - mat4 Sky; - mat4 Projection2d; -}; +layout (set = 0, binding = 0) uniform +#include "matrices.h" +; layout (triangles) in; layout (triangle_strip, max_vertices = 3) out; diff --git a/libs/video/renderer/vulkan/shader/particle.geom b/libs/video/renderer/vulkan/shader/particle.geom index 4669408ab..3027f0908 100644 --- a/libs/video/renderer/vulkan/shader/particle.geom +++ b/libs/video/renderer/vulkan/shader/particle.geom @@ -1,11 +1,9 @@ #version 450 +#extension GL_GOOGLE_include_directive : enable -layout (set = 0, binding = 0) uniform Matrices { - mat4 Projection3d; - mat4 View; - mat4 Sky; - mat4 Projection2d; -}; +layout (set = 0, binding = 0) uniform +#include "matrices.h" +; layout (points) in; layout (triangle_strip, max_vertices = 4) out;