summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/shaders
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-17 12:22:03 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-17 12:22:03 +0100
commit2b2c372dbcf2facb3d47477150b54823ebfff4da (patch)
tree9ecdefd7aa9897ec9b2db79e7dac960322809e46 /servers/rendering/renderer_rd/shaders
parent13593d8644286278004242dd6c2bd27a15ab9162 (diff)
parent5e90b90a97dafa83c7cd6a4df7eb298eea5a326a (diff)
Merge pull request #70122 from clayjohn/VRS-r8uint
Don't attempt to create or use an R8_UINT texture as storage if VRS is not supported
Diffstat (limited to 'servers/rendering/renderer_rd/shaders')
-rw-r--r--servers/rendering/renderer_rd/shaders/environment/gi.glsl6
1 files changed, 6 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/shaders/environment/gi.glsl b/servers/rendering/renderer_rd/shaders/environment/gi.glsl
index ab927df678..459c4dcb1d 100644
--- a/servers/rendering/renderer_rd/shaders/environment/gi.glsl
+++ b/servers/rendering/renderer_rd/shaders/environment/gi.glsl
@@ -108,7 +108,9 @@ layout(set = 0, binding = 18, std140) uniform SceneData {
}
scene_data;
+#ifdef USE_VRS
layout(r8ui, set = 0, binding = 19) uniform restrict readonly uimage2D vrs_buffer;
+#endif
layout(push_constant, std430) uniform Params {
uint max_voxel_gi_instances;
@@ -661,6 +663,7 @@ void main() {
ivec2 pos = ivec2(gl_GlobalInvocationID.xy);
uint vrs_x, vrs_y;
+#ifdef USE_VRS
if (sc_use_vrs) {
ivec2 vrs_pos;
@@ -684,6 +687,7 @@ void main() {
return;
}
}
+#endif
if (sc_half_res) {
pos <<= 1;
@@ -708,6 +712,7 @@ void main() {
imageStore(ambient_buffer, pos, ambient_light);
imageStore(reflection_buffer, pos, reflection_light);
+#ifdef USE_VRS
if (sc_use_vrs) {
if (vrs_x > 1) {
imageStore(ambient_buffer, pos + ivec2(1, 0), ambient_light);
@@ -766,4 +771,5 @@ void main() {
imageStore(reflection_buffer, pos + ivec2(3, 3), reflection_light);
}
}
+#endif
}