diff options
author | 风青山 <idleman@yeah.net> | 2023-09-13 15:59:28 +0800 |
---|---|---|
committer | 风青山 <idleman@yeah.net> | 2023-09-13 16:02:10 +0800 |
commit | 59d0fdbacc03da223666e16014285f6818894d0b (patch) | |
tree | d703e5d47f0a7e299417df5c425469c123c021cf | |
parent | 3ed4497113fa10611b90290ce22a751fb9d26e2e (diff) | |
download | redot-engine-59d0fdbacc03da223666e16014285f6818894d0b.tar.gz |
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.
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/material_storage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/material_storage.cpp b/servers/rendering/renderer_rd/storage_rd/material_storage.cpp index 5c4fa1a47c..7f79435619 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 HashMap<StringName, Va roughness_detect_texture = tex; roughness_channel = RS::TextureDetectRoughnessChannel(p_texture_uniforms[i].hint - ShaderLanguage::ShaderNode::Uniform::HINT_ROUGHNESS_R); } +#endif // TOOLS_ENABLED if (tex->render_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); |