summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-08-22 21:30:58 +1000
committerBastiaan Olij <mux213@gmail.com>2021-08-22 21:30:58 +1000
commit74a647bddd99f50bfc21794795ca3374a89499e5 (patch)
tree43b6645daa7b16b6746ff49c105f69efb3234670 /servers/rendering/renderer_rd
parent51800eebc6b4f5905bcb97934c8af58cc5e5cf51 (diff)
Fix multiview defines in tonemap shader
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/shaders/tonemap.glsl8
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_rd/shaders/tonemap.glsl b/servers/rendering/renderer_rd/shaders/tonemap.glsl
index 3c685c25b9..766b29ded7 100644
--- a/servers/rendering/renderer_rd/shaders/tonemap.glsl
+++ b/servers/rendering/renderer_rd/shaders/tonemap.glsl
@@ -37,15 +37,15 @@ layout(location = 0) in vec2 uv_interp;
#ifdef SUBPASS
layout(input_attachment_index = 0, set = 0, binding = 0) uniform subpassInput input_color;
-#else
-#if MULTIVIEW
+#elif defined(MULTIVIEW)
layout(set = 0, binding = 0) uniform sampler2DArray source_color;
#else
layout(set = 0, binding = 0) uniform sampler2D source_color;
#endif
-#endif
+
layout(set = 1, binding = 0) uniform sampler2D source_auto_exposure;
layout(set = 2, binding = 0) uniform sampler2D source_glow;
+
#ifdef USE_1D_LUT
layout(set = 3, binding = 0) uniform sampler2D source_color_correction;
#else
@@ -365,7 +365,7 @@ void main() {
#ifdef SUBPASS
// SUBPASS and MULTIVIEW can be combined but in that case we're already reading from the correct layer
vec3 color = subpassLoad(input_color).rgb;
-#elif MULTIVIEW
+#elif defined(MULTIVIEW)
vec3 color = textureLod(source_color, vec3(uv_interp, ViewIndex), 0.0f).rgb;
#else
vec3 color = textureLod(source_color, uv_interp, 0.0f).rgb;