diff options
author | Jacques Lucke <jacques@blender.org> | 2022-06-28 14:12:44 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-06-28 14:13:41 +0300 |
commit | c96f2778f05070d1ea153da0473c51a79a8fe53b (patch) | |
tree | ba4ce662592e6da001baab5c6c15b733104ced8d /source/blender | |
parent | dfea5e24ad437db6807196c986c6eb9ed33b52c6 (diff) |
Fix: sampling points on mesh surface generates too many points
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_sample.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh_sample.cc b/source/blender/blenkernel/intern/mesh_sample.cc index 106c4c610ba..b792c5c98b9 100644 --- a/source/blender/blenkernel/intern/mesh_sample.cc +++ b/source/blender/blenkernel/intern/mesh_sample.cc @@ -322,7 +322,7 @@ int sample_surface_points_spherical(RandomNumberGenerator &rng, std::min(1.0f, proj_distance_sq / sample_radius_sq); const float radius_proj_sq = sample_radius_sq * sample_radius_factor_sq; const float radius_proj = std::sqrt(radius_proj_sq); - const float circle_area = M_PI * radius_proj; + const float circle_area = M_PI * radius_proj_sq; const int amount = rng.round_probabilistic(approximate_density * circle_area); |