![]() ![]() The problem is, the only way to get perfectly clean alpha blending is to draw things back to front with z writing off.* As far as I can tell, this is a built in behavior of Unity. Only things drawn in the Transparent queue (starting at 3000) are sorted strictly back to front. Getting into shader queue settings for a moment, the AlphaTest queue value is equal to 2450, and the Transparent queue value is equal to 3000. I'm assuming that's because dynamic shadows are drawn just after 2500 in the render queue. In Unity, nothing in the render queue after 2500 can have a dynamic shadow cast onto it. So draw order is a bit more complex here than in some 2D cases. Let me preface this by saying that I'm using spine animations in full 3D space in my game, with a downward angled camera that's meant to look kind of like Xenogears or Grandia If anyone is reading this and has gotten shadow casting to work in combination with nice alpha blending, please post to let me know I'm overcomplicating this, I would love to know it's simpler than I'm making it. Getting dynamic shadow receiving to work on a transparent shader like the shaders used in spine is not trivial in Unity. time to play!Īlright, I looked into this a bit today. I'm really looking forward to those amazing tools you've been working on!Įdit wait, your unity tools just got merged. Doesn't using alpha testing rather than alpha blending mean the spine animation will have rough, pixelated edges? The cutout does indeed receive shadows though, I'm going to take a look at this now and see what I can do from here. I guess I'd been assuming that there must be more specialized stuff going on with the spine shaders. Hey mitch, thanks for the reply! I hadn't even thought of using the cutouts as a starting point That is, unless there are plans to add an official shader for unity which receives shadows at some point? In that case, I'll save myself the work □ ![]() I'm not sure which one is the best starting point, but I'll take a look sometime. With my very limited shader programming abilities, I'm guessing it would have to be written as a fragment shader in those passes to receive a shadow? Anyway, I've been thinking maybe the best way for me to get a shader which will receive shadows is to base one off of the normal mapped shaders for unity which have been kicking around on the forums. I'm basing this on the fact that it uses vertex lighting for everything but the shadow casting. I was traveling less graphical roads the past couple days, but now that I'm coming back to this and taking a closer look, it seems like the skeleton lit shader isn't meant to receive shadows, only cast them. ![]() If it does support shadow receiving, are there any common pitfalls I should look for when setting up my skeleton animation in Unity? I've tried messing around with settings and can't get dynamic shadows to appear on my spine character. Hey, I'm wondering if the current Spine SkeletonLit shader in the Unity Runtimes supports receiving shadows. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |