1
0
mirror of https://github.com/godotengine/godot synced 2024-07-03 07:08:35 +00:00

Do overflow check in when gererating NoiseTexture3D

This commit is contained in:
jsjtxietian 2024-02-26 00:38:49 +08:00
parent ae51db75e7
commit 3d17aaca71

View File

@ -142,6 +142,8 @@ TypedArray<Image> NoiseTexture3D::_generate_texture() {
return TypedArray<Image>();
}
ERR_FAIL_COND_V_MSG((int64_t)width * height * depth > Image::MAX_PIXELS, TypedArray<Image>(), "The NoiseTexture3D is too big, consider lowering its width, height, or depth.");
Vector<Ref<Image>> images;
if (seamless) {