Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Matthews <johnny.matthews@gmail.com>2022-06-14 20:53:50 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-06-22 12:31:34 +0300
commit09501c1215403d5983d182c2d016b33f27078264 (patch)
tree90638246d2ef826eb4b3eb95a86ba56df623a165
parent455d227831c620873de394817a2153b0f6c6ff9d (diff)
Fix T98718: Face Is Planar Node Not handling Certain Conditions
The comparison between dot products of each point of the poly were not taking into consideration negative values. FLT_MIN was used rather than -FLT_MAX due to a misunderstanding of the FLT_MIN definition. Maniphest Tasks: T98718 Differential Revision: https://developer.blender.org/D15161
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
index 62af0476057..63890c1515a 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
@@ -65,7 +65,7 @@ class PlanarFieldInput final : public GeometryFieldInput {
float3 reference_normal = poly_normals[i_poly];
float min = FLT_MAX;
- float max = FLT_MIN;
+ float max = -FLT_MAX;
for (const int i_loop : poly_loops.index_range()) {
const float3 vert = mesh->mvert[poly_loops[i_loop].v].co;