Merge pull request #37163 from madmiraal/fix-csg-normal
Fix CSG vertex normal calculation.
This commit is contained in:
commit
39f7a40925
1 changed files with 9 additions and 11 deletions
|
@ -296,7 +296,6 @@ void CSGShape3D::_update_shape() {
|
|||
int mat = n->faces[i].material;
|
||||
ERR_CONTINUE(mat < -1 || mat >= face_count.size());
|
||||
int idx = mat == -1 ? face_count.size() - 1 : mat;
|
||||
if (n->faces[i].smooth) {
|
||||
|
||||
Plane p(n->faces[i].vertices[0], n->faces[i].vertices[1], n->faces[i].vertices[2]);
|
||||
|
||||
|
@ -310,7 +309,6 @@ void CSGShape3D::_update_shape() {
|
|||
}
|
||||
vec_map.set(v, add);
|
||||
}
|
||||
}
|
||||
|
||||
face_count.write[idx]++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue