From 7c3ac4d170069fde59dc730310c4ac87f31d9928 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. (cherry picked from commit 59d0fdbacc03da223666e16014285f6818894d0b) --- 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 8d1eb87e3cf..b7576e1fe65 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);