Fix #118096: Compositor Displace node produce NaN pixels
The GPU compositor Displace node produces NaN pixels if connected to the Image node. That's because the Displace node access the MIP levels of the texture produces by the Image node, but those levels were never initialized, so fix this by completing the levels.
This commit is contained in:
parent
a159654ab2
commit
50d7f5a30f
|
@ -229,6 +229,7 @@ CachedImage::CachedImage(Context &context,
|
|||
ImBuf *image_buffer = BKE_image_acquire_ibuf(image, &image_user_for_pass, nullptr);
|
||||
const bool is_premultiplied = BKE_image_has_gpu_texture_premultiplied_alpha(image, image_buffer);
|
||||
texture_ = IMB_create_gpu_texture("Image Texture", image_buffer, true, is_premultiplied);
|
||||
GPU_texture_update_mipmap_chain(texture_);
|
||||
|
||||
const eGPUTextureFormat original_format = GPU_texture_format(texture_);
|
||||
const eGPUTextureFormat target_format = get_compatible_texture_format(original_format);
|
||||
|
|
Loading…
Reference in New Issue