Fix T102942: Cycles wrong alpha for multi-layer PSD files

This commit is contained in:
Brecht Van Lommel 2023-01-09 18:13:36 +01:00
parent 3b476d020a
commit b314d92e7d
Notes: blender-bot 2023-05-03 10:14:48 +02:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
Referenced by issue #102942, Regression: some Alpha Representation types of some images in Cycles appears to only unmultiple, and not re-multiple
1 changed files with 5 additions and 0 deletions

View File

@ -211,6 +211,11 @@ bool OIIOImageLoader::load_pixels(const ImageMetaData &metadata,
if (strcmp(in->format_name(), "dds") == 0) {
do_associate_alpha = true;
}
/* Workaround OIIO bug that sets oiio:UnassociatedAlpha on the last layer
* but not composite image that we read. */
if (strcmp(in->format_name(), "psd") == 0) {
do_associate_alpha = true;
}
}
}