When using custom materials with Spine skeletons in Unity, especially with URP and Shader Graph, it's important to ensure that your shader correctly handles the alpha and color blending. The issue you're experiencing with color differences when using SkeletonRendererCustomMaterials
might be due to how the alpha is being processed in your shader.
To address this, you should ensure that your shader multiplies the vertex color (which includes alpha) with the texture color. This is crucial for maintaining the correct transparency and color blending. If your shader is not handling premultiplied alpha (PMA) correctly, you might see unexpected results. You can refer to the documentation on writing your own shaders for Spine here to ensure your shader is set up correctly. Additionally, make sure that your material settings match the export settings from Spine, particularly regarding the alpha workflow (Straight vs. PMA).
If you are using a straight alpha workflow, ensure that the Straight Alpha Texture
option is enabled on your material. If your shader is intended to work with PMA, you might need to adjust the blend mode to Premultiply
in your Shader Graph.