summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-02 14:16:42 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-02 14:16:42 +0100
commit31473a68ef5d6ef3317ae205dc035a9dc2483e66 (patch)
tree413a6738ab31bb5e833e3c5ed87d1108d3af8e0e
parent7c0e46f1c1dd9dd9f9efb2cf5ffee61f38f13a2a (diff)
parent1fa8b3dd420301dd5c2ad99b6bead6cffe1d4995 (diff)
Merge pull request #68115 from dzil123/fix_image_resize_crash
Fix Image::bump_map_to_normal_map incorrectly keeping mipmap flag
-rw-r--r--core/io/image.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp
index 16dd66fc98..6a049014bc 100644
--- a/core/io/image.cpp
+++ b/core/io/image.cpp
@@ -3524,6 +3524,7 @@ Ref<Image> Image::get_image_from_mipmap(int p_mipamp) const {
void Image::bump_map_to_normal_map(float bump_scale) {
ERR_FAIL_COND(!_can_modify(format));
+ clear_mipmaps();
convert(Image::FORMAT_RF);
Vector<uint8_t> result_image; //rgba output