From 59d0fdbacc03da223666e16014285f6818894d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=9D=92=E5=B1=B1?= Date: Wed, 13 Sep 2023 15:59:28 +0800 Subject: [PATCH] Fix `SubViewport` with `UPDATE_WHEN_VISIBLE` not working properly in exported project The issue is primarily due to `RSG::texture_storage->render_target_was_used()` returning inconsistent results in the editor and exported projects. --- servers/rendering/renderer_rd/storage_rd/material_storage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp index 5c4fa1a47c3..7f794356198 100644 --- a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp @@ -931,11 +931,11 @@ void MaterialStorage::MaterialData::update_textures(const HashMaprender_target) { tex->render_target->was_used = true; render_target_cache.push_back(tex->render_target); } -#endif } if (rd_texture.is_null()) { rd_texture = texture_storage->texture_rd_get_default(TextureStorage::DEFAULT_RD_TEXTURE_WHITE);