Page MenuHome

Fix pink Texture on Images with more than 4 channels for Cycles
ClosedPublic

Authored by Valdemar Lindberg (Voldie) on Dec 10 2020, 7:07 PM.

Details

Summary

An attempt to resolve T83586

Cycles currently only allows 1 to 4 channel image to be loaded, if greater like with a exr image with rgba and z it will generate a pink texture instead.
Simply changing to a max 5 channel is not a long term solution. However, some functions afterward the condition will trim of the excess channels anyway.

Currently it seems that only BlenderImageLoader::load_pixels might be affected by it since it uses the computed size based on the channels variable.

Diff Detail

Repository
rB Blender

Event Timeline

Valdemar Lindberg (Voldie) requested review of this revision.Dec 10 2020, 7:07 PM
Valdemar Lindberg (Voldie) created this revision.

Thanks for the patch, I think this is ok for now. I'll tweak the check to also keep 6, 7, 8, .. channel images.

This revision is now accepted and ready to land.Dec 11 2020, 7:33 PM