summaryrefslogtreecommitdiff
path: root/servers/rendering/renderer_rd
diff options
context:
space:
mode:
authorYuri Roubinsky <chaosus89@gmail.com>2021-10-29 23:11:52 +0300
committerYuri Roubinsky <chaosus89@gmail.com>2021-10-29 23:24:01 +0300
commit4da0de00859f980f6b57bfde622d4b04c999efd9 (patch)
tree5a1f0afdcd27df1877ebb488277062089a20b207 /servers/rendering/renderer_rd
parentd046817536a21358f9c51bf5b932d0a6615ee76a (diff)
Fix error spammed to output if `FogVolume` is setted to scene
Diffstat (limited to 'servers/rendering/renderer_rd')
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index 3d8ae4c944..517a9b93c3 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -4167,7 +4167,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
u.uniform_type = RD::UNIFORM_TYPE_TEXTURE;
u.binding = 19;
RID radiance_texture = storage->texture_rd_get_default(is_using_radiance_cubemap_array() ? RendererStorageRD::DEFAULT_RD_TEXTURE_CUBEMAP_ARRAY_BLACK : RendererStorageRD::DEFAULT_RD_TEXTURE_CUBEMAP_BLACK);
- RID sky_texture = sky.sky_get_radiance_texture_rd(env->sky);
+ RID sky_texture = env->sky.is_valid() ? sky.sky_get_radiance_texture_rd(env->sky) : RID();
u.ids.push_back(sky_texture.is_valid() ? sky_texture : radiance_texture);
uniforms.push_back(u);
}