Skip to content

Commit

Permalink
Merge pull request #86555 from RandomShaper/fix_warn
Browse files Browse the repository at this point in the history
Fix LightmapperRD division warning in MSVC
  • Loading branch information
akien-mga committed Jan 4, 2024
2 parents 18e9133 + fe8c217 commit 2a4eaa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/lightmapper_rd/lightmapper_rd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void LightmapperRD::_create_acceleration_structures(RenderingDevice *rd, Size2i

for (int m_i = 0; m_i < mesh_instances.size(); m_i++) {
if (p_step_function) {
float p = float(m_i + 1) / mesh_instances.size() * 0.1;
float p = float(m_i + 1) / MAX(1, mesh_instances.size()) * 0.1;
p_step_function(0.3 + p, vformat(RTR("Plotting mesh into acceleration structure %d/%d"), m_i + 1, mesh_instances.size()), p_bake_userdata, false);
}

Expand Down

0 comments on commit 2a4eaa4

Please sign in to comment.