summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2021-07-06 13:00:33 +1000
committerBastiaan Olij <mux213@gmail.com>2021-07-06 13:00:33 +1000
commitb3612351a82660c5e6b6bd715dc52cf369c52601 (patch)
treec3e47acc285acf52ed05c16de2f8f2230b8a72ce /servers
parent8cd1b59ea78f5145eae1762e2b1311c1a1b92cbc (diff)
Fix indexing of multiple reflection probes
Diffstat (limited to 'servers')
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index 46057bddab..a70514e9e5 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -709,6 +709,10 @@ bool RendererSceneRenderRD::reflection_probe_instance_begin_render(RID p_instanc
}
}
+ if (rpi->atlas_index != -1) { // should we fail if this is still -1 ?
+ atlas->reflections.write[rpi->atlas_index].owner = p_instance;
+ }
+
rpi->atlas = p_reflection_atlas;
rpi->rendering = true;
rpi->dirty = false;