1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-05 19:31:35 +00:00

Merge pull request #106079 from clayjohn/rb-crash

Avoid crash when allocating specular and normal-roughness buffers when render buffers aren't available
This commit is contained in:
Thaddeus Crews
2025-05-05 11:24:16 -05:00

View File

@@ -1903,11 +1903,11 @@ void RenderForwardClustered::_render_scene(RenderDataRD *p_render_data, const Co
}
// Ensure this is allocated so we don't get a stutter the first time an object with SSS appears on screen.
if (global_surface_data.sss_used) {
if (global_surface_data.sss_used && !is_reflection_probe) {
rb_data->ensure_specular();
}
if (global_surface_data.normal_texture_used) {
if (global_surface_data.normal_texture_used && !is_reflection_probe) {
rb_data->ensure_normal_roughness_texture();
}