Open qarmin opened 4 years ago
I guess we should just check for when sas is (0,0) and then not do the division.
if (Math::is_equal_approx(sas.x, 0.0) || Math::is_equal_approx(sas.y, 0.0) {
scene_state.ubo.shadow_atlas_pixel_size[0] = 1.0;
scene_state.ubo.shadow_atlas_pixel_size[1] = 1.0;
} else {
scene_state.ubo.shadow_atlas_pixel_size[0] = 1.0 / sas.x;
scene_state.ubo.shadow_atlas_pixel_size[1] = 1.0 / sas.y;
}
@qarmin Is still still relevant? I couldn't find scene_state.ubo.shadow_atlas_pixel_size
anywhere in the current master
codebase.
Godot version: 4.0.dev.custom_build. 69c81309c
OS/device including version:
Issue description: When I open project then dividing by float 0 happens:
https://github.com/godotengine/godot/blob/e0ee38b128fa84b8e7db499ead66264ca4ec9c60/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp#L1134-L1137
Steps to reproduce:
Minimal reproduction project: https://github.com/qarmin/RegressionTestProject/archive/3.2.zip