summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd/environment
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/environment
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/environment')
-rw-r--r--servers/rendering/renderer_rd/environment/gi.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/environment/gi.cpp b/servers/rendering/renderer_rd/environment/gi.cpp
index 550fe27e4c..61b7dd4504 100644
--- a/servers/rendering/renderer_rd/environment/gi.cpp
+++ b/servers/rendering/renderer_rd/environment/gi.cpp
@@ -3496,6 +3496,10 @@ void GI::init(SkyRD *p_sky) {
{
//calculate tables
String defines = "\n#define SDFGI_OCT_SIZE " + itos(SDFGI::LIGHTPROBE_OCT_SIZE) + "\n";
+ if (RendererSceneRenderRD::get_singleton()->is_vrs_supported()) {
+ defines += "\n#define USE_VRS\n";
+ }
+
Vector<String> gi_modes;
gi_modes.push_back("\n#define USE_VOXEL_GI_INSTANCES\n"); // MODE_VOXEL_GI
@@ -4011,7 +4015,7 @@ void GI::process_gi(Ref<RenderSceneBuffersRD> p_render_buffers, const RID *p_nor
u.append_id(rbgi->scene_data_ubo);
uniforms.push_back(u);
}
- {
+ if (RendererSceneRenderRD::get_singleton()->is_vrs_supported()) {
RD::Uniform u;
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
u.binding = 19;