Apply proper offset to CSGMesh material and smooth group
(cherry picked from commit 209c2d2c80
)
This commit is contained in:
parent
dc928e6174
commit
929e3595c8
|
@ -806,8 +806,8 @@ CSGBrush *CSGMesh::_build_brush() {
|
||||||
uvw[as + j + 1] = uv[1];
|
uvw[as + j + 1] = uv[1];
|
||||||
uvw[as + j + 2] = uv[2];
|
uvw[as + j + 2] = uv[2];
|
||||||
|
|
||||||
sw[j / 3] = !flat;
|
sw[(as + j) / 3] = !flat;
|
||||||
mw[j / 3] = mat;
|
mw[(as + j) / 3] = mat;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int as = vertices.size();
|
int as = vertices.size();
|
||||||
|
@ -849,8 +849,8 @@ CSGBrush *CSGMesh::_build_brush() {
|
||||||
uvw[as + j + 1] = uv[1];
|
uvw[as + j + 1] = uv[1];
|
||||||
uvw[as + j + 2] = uv[2];
|
uvw[as + j + 2] = uv[2];
|
||||||
|
|
||||||
sw[j / 3] = !flat;
|
sw[(as + j) / 3] = !flat;
|
||||||
mw[j / 3] = mat;
|
mw[(as + j) / 3] = mat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue