I new using Spine. I´m creating a URP shader in Unity shader graph and I need to translate the straight alpha texture option from Spine/Skeleton shader. How can I achieve that?
Straight alpha texture in URP shader
@husher Hi and welcome to Spine!
You can find documentation about Spine shaders and ShaderGraph here:
https://esotericsoftware.com/spine-unity#Shader-Graph
In short:
- For
Straight alpha texture
enabled, you normally don't need to do anything when using normal blend mode. - When disabled, it means that the texture has
Premultiply Alpha
already applied, which means the RGB channels have been multiplied by the A channel already. When this shall be used with normal blend mode on the output, you need to dividetexture.rgb
bytexture.a
. Also don't forget to add atexture.a == 0
check and don't divide if it's 0.
Thanks so much!