diff options
author | Leonard <leonardmeagher2@gmail.com> | 2019-03-25 21:27:55 -0700 |
---|---|---|
committer | Leonard <leonardmeagher2@gmail.com> | 2019-03-25 21:27:55 -0700 |
commit | 209c2d2c80184a86bfc4aa92b4a00236a302fd28 (patch) | |
tree | 6adad88a7165b6519f802ad893af7b78dffc0442 /modules | |
parent | 81292665d5dcc991d3c9341245b269193329ee22 (diff) |
Apply proper offset to CSGMesh material and smooth group
Diffstat (limited to 'modules')
-rw-r--r-- | modules/csg/csg_shape.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index f274fff3f3..775ec67ba6 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -806,8 +806,8 @@ CSGBrush *CSGMesh::_build_brush() { uvw[as + j + 1] = uv[1]; uvw[as + j + 2] = uv[2]; - sw[j / 3] = !flat; - mw[j / 3] = mat; + sw[(as + j) / 3] = !flat; + mw[(as + j) / 3] = mat; } } else { int as = vertices.size(); @@ -849,8 +849,8 @@ CSGBrush *CSGMesh::_build_brush() { uvw[as + j + 1] = uv[1]; uvw[as + j + 2] = uv[2]; - sw[j / 3] = !flat; - mw[j / 3] = mat; + sw[(as + j) / 3] = !flat; + mw[(as + j) / 3] = mat; } } } |