Merge pull request #51980 from BastiaanOlij/fix_multiview_tonemap

Fix multiview defines in tonemap shader
This commit is contained in:
Bastiaan Olij 2021-08-23 12:02:18 +10:00 committed by GitHub
commit 2d446771d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;