• Unity
  • Sprite Shaders for Unity

Pharan :

The version bundled with Spine-Unity is compatible with 5.6.
Note that the shader names/paths there are different.

My question though is if, is it the last updated version of the shader or not?.
We're currently using the one bundled with the Spine-Unity version for Spine 3.6.X. The one in the asset store have more options I think, I read in it's github that includes a dissolve shader. And that's exactly what we want for some Spine deaths haha.

Thank you for the answer!

Related Discussions
...

hmm.. looks like it's not, just based on the dates of the cgincludes.

Pharan :

hmm.. looks like it's not, just based on the dates of the cgincludes.

Thanks again, I tried anyways the shader downloading it from github and the dissolve shader doesn't work well with our scenes, it outupts some weird overlay effects.
In the scene I have fog particles behind and over the playground plane, and also unity distance fog (lighting settings). The dissolve shader works really great but it mask the particles behind I think. And also I don't know why it outlines the sprite too, like this:

Here is the material inspector settings:

Here a picture without all the particles floating behind and in front. Just the distance fog effect that as it seems makes the sprite outlined, don't know why.

As a lot of my questions, maybe is because I don't know how shaders work and some shaders don't work well combined, like the particles one with this one, and distance fog all in one scene. Thanks!

Our game is 2d but we're writing every sprite into the Z buffer for pixel lit sprites, and also because some post processing effects need the Z buffer like DoF and Motion Blur. We could just have sorting layers but we need the Z Buffer for a lot of effects.
Thanks!

2 个月 后

Hi, everyone

We are using the Spine/Sprite/Vertex Lit shader and we've come across a weird problem.
It is easily reproducible in your Sprite Shaders Example, so I'll use it to describe the issue.

The light reflections on a model with normal map are fine, but when you override a bone and rotate it the reflections on that bone become incorrect. And it only happens at runtime. Everything is fine when viewed in the editor.

In your Example I've turned off every light except the rotating one (disabling the rotation). I'm rotating the head.
Here is what happens in the Editor:

the lights on the head are correct.

... and at runtime

the lights are as if the head hasn't been rotated.

Solve Tangents is checked, we are using Unity 2017.3.1p4

Do you have any ideas?

Thanks for reporting. I think we found the problem but we need to make sure of it first. Stay tuned!


Thanks again for reporting!
The fix has been applied on git and in the new unitypackage (Mar 23) available here : Spine Unity Download

Let us know if it works correctly for you!

Have anyone tested if these work with the new Unity Lightweight Render Pipelines (in 2018.1), or logically should/shouldn’t work?

@Pharan, it works beautifully.

Thank you

Thanks for letting us know, nsf!

19 天 后

Is the rim lighting working? I can't get it working here, I am using normal map.

5 个月 后

Can anyone confirm if light map baking works for them? I wasn't able to do any baking with the spine shaders sadly. I switched to standard shaders and it works.

10 个月 后

Can you reattach missed pics from topic?

If you mean ToddRiver's fist posting 3 years ago, I fear that he will simply not be able to do so.

3 个月 后

Hi, is there any way to get this shader to work with SpriteMasks?

The Spine/Sprite/* shaders included in spine-unity 3.8 and 3.9 are already compatible with SpriteMasks.

To activate mask interaction, you just have to select your SkeletonAnimation (or SkeletonMecanim) GameObject and in the Inspector and change Mask Interaction from None to your desired interaction mode.

1 年 后

Many thanks for Todd and Respect : )


Hello again. Have a problem. And need help to understand
What does it mean Z order. And how I can fix it?



Fixed.
Change Lighting mode to Vertex Lit

9 天 后
3 个月 后
mercuryarms :

How to get sharp shadow edges ( toon shading ) like in this video?

SOLVED:
Create a new texture with any resolution (power of two preferably), and paint the left half of the texture with a dark color, and the right half with white. Then place the texture in the Spine/Sprite/VertexLit material's Diffuse Ramp texture slot in Unity.

Probably its too late asking in this thread
I used this file (the last attachment) for ramp. Bur result is not the same as in your post.

Without DR

With DR

DR

Where is a problem?
Unity 2020. Point Light.

This seems to be the same question as posted on this thread:
2D Light URP Light Mask Duffuse Ramp and Specular
Please always keep to a single forum thread and not double post your question. And don't worry, we will find new forum postings, no matter on which subforum or thread they have been posted.

If the two questions are the same, let's please keep it to one of the two threads.
If they are separate questions, could you please provide more information about whether you are using Universal Render Pipeline or not, and if so, wheter you are perhaps using 2D Renderer for 2D lighting?