when the image object has a ColorSpace value we pass it on, else we leave it at the default value. fix for #1106 (#1110)
This commit is contained in:
parent
eb5d0bea2a
commit
8f3feb8012
@ -143,7 +143,8 @@ public class TextureBlenderAWT extends AbstractTextureBlender {
|
||||
dataArray.add(newData);
|
||||
}
|
||||
|
||||
Image result = depth > 1 ? new Image(Format.RGBA8, width, height, depth, dataArray, ColorSpace.Linear) : new Image(Format.RGBA8, width, height, dataArray.get(0), ColorSpace.Linear);
|
||||
ColorSpace colorSpace = baseImage.getColorSpace() != null ? baseImage.getColorSpace() : ColorSpace.Linear;
|
||||
Image result = depth > 1 ? new Image(Format.RGBA8, width, height, depth, dataArray, colorSpace) : new Image(Format.RGBA8, width, height, dataArray.get(0), colorSpace);
|
||||
if (image.getMipMapSizes() != null) {
|
||||
result.setMipMapSizes(image.getMipMapSizes().clone());
|
||||
}
|
||||
|
@ -529,9 +529,10 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
|
||||
MatParamTexture val = getTextureParam(name);
|
||||
if (val == null) {
|
||||
checkTextureParamColorSpace(name, value);
|
||||
paramValues.put(name, new MatParamTexture(type, name, value, null));
|
||||
paramValues.put(name, new MatParamTexture(type, name, value, value.getImage() != null ? value.getImage().getColorSpace() : null));
|
||||
} else {
|
||||
val.setTextureValue(value);
|
||||
val.setColorSpace(value.getImage() != null ? value.getImage().getColorSpace() : null);
|
||||
}
|
||||
|
||||
if (technique != null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user