Hi There,
I just ran into to cases, where the Alpha in Stride Textures is not working right.
I have a png with Alpha Background. This I use for a material and I use blend (transparency) for fading in and out. one png file works and the other doesn’t fade into alpha. just fades out the color and the rest remains white. Both I generated with photoshop. But I can not create another working png Image.
I’ll upload a patch with the bug.
I think it is caused by the default for Intensity of the Emissive node inside TextureMaterial not being set correctly when no IO-box is attached. Could be considered a bug. For now you can make a copy of the TextureMaterial and “fix” it yourself. Or use PBRMaterial instead which also seems to work.
always trying to understand what goes on with colors in the pipeline, i just spent considerable time to understand what’s going on here (suspecting a unfortunate combination of premultiplied alpha and sRGB/linear conversion (and non of my “solutions” worked).
i’d never have suspected the emissive feature and a non-existant IOBox to be the culprit. thanks @bjoern !
and @ravel :
your images are quite different even though they appear to be similar. while one is straight black and the “hand” is just in the alpha channel, the other does have info in color and alpha channel. premultiplication on import diminishes the effect, but they do behave different…
did some more digging as the suggestion to set Emissive Intensity to zero only works in the special case where color does not matter, as colors will be turned to grayscale:
what does work as expected is to use the Rendering pipeline with the ConstantColorTextured shader and AlphaBlend (RenderEntity on the Transparent RenderStage)
ah yes, that’s probably the preferred solution as it does not need an extra shaderpass for the texture.
makes sense, as the Blend transparency feature expects premultiplied alpha. therefore you could also use the vanilla Premultiply texture filter instead of a custom one.