summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-14 13:49:20 +0100
committerGitHub <noreply@github.com>2020-02-14 13:49:20 +0100
commit79d42069a95e3129e804790a6cd28460d0142b35 (patch)
tree4a9d9446f4c7bbe670ae170c686e8977f56b7a49 /scene
parenta9c85e79add171ddb57e46df24376102893299b7 (diff)
parentd2537407efffde15372962ffca864b7400ade345 (diff)
Merge pull request #36208 from akien-mga/warnings
Fix various GCC compilation warnings after Vulkan merge
Diffstat (limited to 'scene')
-rw-r--r--scene/3d/voxelizer.cpp2
-rw-r--r--scene/resources/material.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/scene/3d/voxelizer.cpp b/scene/3d/voxelizer.cpp
index 4d7054726d..7cf26ab974 100644
--- a/scene/3d/voxelizer.cpp
+++ b/scene/3d/voxelizer.cpp
@@ -1087,7 +1087,7 @@ PoolVector<uint8_t> Voxelizer::get_sdf_3d_image() const {
if (d == 0) {
w[i] = 0;
} else {
- w[i] = CLAMP(d, 0, 254) + 1;
+ w[i] = MIN(d, 254) + 1;
}
}
}
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index 01e3c4c930..6e2fe01834 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -423,6 +423,7 @@ void BaseMaterial3D::_update_shader() {
case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS: texfilter_str = "filter_linear_mipmap"; break;
case TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC: texfilter_str = "filter_nearest_mipmap_aniso"; break;
case TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: texfilter_str = "filter_linear_mipmap_aniso"; break;
+ case TEXTURE_FILTER_MAX: break; // Internal value, skip.
}
if (flags[FLAG_USE_TEXTURE_REPEAT]) {