summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-04-01 17:15:30 +0200
committerGitHub <noreply@github.com>2019-04-01 17:15:30 +0200
commit18ee888541de80307da68808f3996ae2b0a807ab (patch)
tree57ba700f0eb986a37a7616dc0623cfc936484ecb /modules
parent9b691718f54e72854d137c9f7cb91b47d1e0d381 (diff)
parent209c2d2c80184a86bfc4aa92b4a00236a302fd28 (diff)
downloadredot-engine-18ee888541de80307da68808f3996ae2b0a807ab.tar.gz
Merge pull request #27430 from LeonardMeagher2/csg_get_mesh_data
Apply proper offset to CSGMesh brush materials and smooth flags
Diffstat (limited to 'modules')
-rw-r--r--modules/csg/csg_shape.cpp8
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;
}
}
}