Browse Source

Merge pull request #68115 from dzil123/fix_image_resize_crash

Fix Image::bump_map_to_normal_map incorrectly keeping mipmap flag
Rémi Verschelde 2 years ago
parent
commit
31473a68ef
1 changed files with 1 additions and 0 deletions
  1. 1 0
      core/io/image.cpp

+ 1 - 0
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