1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-27 15:57:02 +00:00

Avoid crash when allocating specular and normal-roughness buffers when render buffers aren't available

This commit is contained in:
clayjohn
2025-05-04 13:54:11 -07:00
parent 1cf573f44d
commit 07ef21c87a

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. // 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(); 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(); rb_data->ensure_normal_roughness_texture();
} }