• Unity
  • Spine's own vertexlit shader that has a cutout blend mode?

Is there a Spine's own vertexlit shader that has a cutout blend mode?
I'm asking this because I currently have graphics in a 2D game using the Spine's vertexlit shader and would like to see if cutout shader would be more optimized. I'm assuming it would be more optimized as all the transparent graphics would have much less transparent pixels for the gpu.

I tried the unity's default cutout shader on some graphics among with the other graphics using the Spine's vertexlit shader then it doesn't somehow work properly with the layering I have used with all the graphic objects that are using the Spine's vertexlit shader.

Here is a material from the game using the Spine's vertexlit shader:

I don't have that much understanding about shaders.

Cheers!

Related Discussions
...
  • Изменено

Unity's cutout shaders are basically disabling alpha blending (you get jaggy borders then) and have enabled ZWrite (parameter Write to Depth in Spine shaders) instead.

When enabling Write to Depth or using shaders with ZWrite enabled, you have to set Z-Spacing to a value other than 0 in the SkeletonRenderers Advanced section in the Inspector to space the parts at least a bit apart. Otherwise you will get problems with Z-fighting.

However, using cutout (Write to Depth) shaders currently will not benefit you at all when using any SkeletonRenderer, since draw order is always back to front for correct alpha blending. This will then not save you any overdraw, which would require draw order to be front to back. So until the "invert draw order" feature is implemented for SkeletonRenderers, we would not expect cutout shaders to gain anything.