From 394edf8288b431bae148e7c5cfe92e7d23f2d49d Mon Sep 17 00:00:00 2001 From: clayjohn Date: Fri, 1 Dec 2023 16:52:50 -0700 Subject: [PATCH] Set ReflectionProbe frame before mapping id in mobile renderer --- servers/rendering/renderer_rd/storage_rd/light_storage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/rendering/renderer_rd/storage_rd/light_storage.cpp b/servers/rendering/renderer_rd/storage_rd/light_storage.cpp index 1f6d1021f49..5f4bf6c8ed4 100644 --- a/servers/rendering/renderer_rd/storage_rd/light_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/light_storage.cpp @@ -1669,6 +1669,8 @@ void LightStorage::update_reflection_probe_buffer(RenderDataRD *p_render_data, c for (uint32_t i = 0; i < reflection_count; i++) { ReflectionProbeInstance *rpi = reflection_sort[i].probe_instance; + rpi->last_pass = RSG::rasterizer->get_frame_number(); + if (using_forward_ids) { forward_id_storage->map_forward_id(FORWARD_ID_TYPE_REFLECTION_PROBE, rpi->forward_id, i, rpi->last_pass); } @@ -1717,8 +1719,6 @@ void LightStorage::update_reflection_probe_buffer(RenderDataRD *p_render_data, c // hook for subclass to do further processing. RendererSceneRenderRD::get_singleton()->setup_added_reflection_probe(transform, extents); - - rpi->last_pass = RSG::rasterizer->get_frame_number(); } if (reflection_count) {