summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-10 15:08:32 +0200
committerGitHub <noreply@github.com>2022-05-10 15:08:32 +0200
commitedf61c077c1b1f5e928a653909bf30d6cbea48aa (patch)
treeda0bba3ef520cb11c4080e192c0121b13e8cc0f6 /scene/3d
parentb6983eeccf8bc01e2a5ca973e14ce46a2e14df87 (diff)
parentf07021fbeb7d91011c1534702042697d246551ac (diff)
Merge pull request #60917 from akien-mga/ci-emscripten-3.1.10
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/lightmap_gi.cpp5
-rw-r--r--scene/3d/voxelizer.cpp3
2 files changed, 2 insertions, 6 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp
index 88d2c1ad69..5c63bdcf1d 100644
--- a/scene/3d/lightmap_gi.cpp
+++ b/scene/3d/lightmap_gi.cpp
@@ -318,12 +318,11 @@ void LightmapGI::_find_meshes_and_lights(Node *p_at_node, Vector<MeshesFound> &m
int LightmapGI::_bsp_get_simplex_side(const Vector<Vector3> &p_points, const LocalVector<BSPSimplex> &p_simplices, const Plane &p_plane, uint32_t p_simplex) const {
int over = 0;
int under = 0;
- int coplanar = 0;
const BSPSimplex &s = p_simplices[p_simplex];
for (int i = 0; i < 4; i++) {
const Vector3 v = p_points[s.vertices[i]];
- if (p_plane.has_point(v)) { //coplanar
- coplanar++;
+ if (p_plane.has_point(v)) {
+ // Coplanar.
} else if (p_plane.is_point_over(v)) {
over++;
} else {
diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp
index d6ac5ccf30..42a2a68e2d 100644
--- a/scene/3d/voxelizer.cpp
+++ b/scene/3d/voxelizer.cpp
@@ -592,7 +592,6 @@ void Voxelizer::_fixup_plot(int p_idx, int p_level) {
bake_cells.write[p_idx].albedo[2] = 0;
float alpha_average = 0;
- int children_found = 0;
for (int i = 0; i < 8; i++) {
uint32_t child = bake_cells[p_idx].children[i];
@@ -603,8 +602,6 @@ void Voxelizer::_fixup_plot(int p_idx, int p_level) {
_fixup_plot(child, p_level + 1);
alpha_average += bake_cells[child].alpha;
-
- children_found++;
}
bake_cells.write[p_idx].alpha = alpha_average / 8.0;