I'm running an issue where every object that needs to be drawn in a specific Order In Layer in unity requires the same shader or it ignores/causes draw order issues.
How can I use the Sprite/Diffuse shader in unity with the Skeleton Lit shader and have proper draw order?
My setup is something like this:
- Background Layer: Tilemap
- Background2 Layer: Tilemap fluff
- Dynamic Layer: Everything that has a Order In Layer based on Y position on the map
Everything on all layers is required to have the same shader or else the rendering order blows up. Background can get rendered in front of the character if it uses Sprite/Diffuse and the spine character is using Skeleton Lit. My tileset doesn't like the Skeleton Lit shader either for some reason, it draws the top half dark and bottom half of the tile light.
Using Sprite/Diffuse on everything in the game works perfectly for draw order but results in some really odd light and dark spots across the Spine character.
It seems like an absolute requirement to use the Skeleton Lit shader to properly light the Spine character, so I'm not seeing any good ways around this.
Is there a better way to do lighting in unity besides actual lights? I considered overlaying a dark mesh and punching holes in it where lights are with raycasts to screen or something, but before I try to start thinking outside the box I need to see if there's any easy fix for this.
Thanks.
This actually doesn't appear to be a shader issue. Using SkeletonLit on a regular sprite correctly renders it in the order in layer and layers set up in unity, so there must be something special with the rendering itself of the Spine Animation character in unity. I am using Instantiate (Mecanim) for my graphics if that is of any use.