Page 1 of 1

Shadow(Script) Component affected by Sprite shader

PostPosted: Tue Sep 25, 2018 12:09 pm
by Hylian_a6324
Hello,

I was wondering how to create a sprite shader within ASE that doesn't affect the Unity "Shadow(Script)" component, which is very useful in creating a simple shadow for UI elements.
I created a shader that applies a color gradient on a sprite texture that is being used within my Image UI component.
Image

However, this gradient is also applied to the shadow, which I want to be black or whatever color I assign within the "Effect Color" parameter.

ImageImage
Image

Is this a Unity bug? Or is there a way to achieve this through the right configuration in ASE?

Looking forward to an answer from you guys,

Best wishes

Re: Shadow(Script) Component affected by Sprite shader

PostPosted: Tue Sep 25, 2018 4:09 pm
by Amplify_Borba
Hey there, thank you for getting in touch!

We're going to take a look into this as soon as possible to see if there's a way to achieve what you intend or if there's any limitation on Unity's side.

Re: Shadow(Script) Component affected by Sprite shader

PostPosted: Tue Sep 25, 2018 5:09 pm
by Amplify_RnD_Rick
Hey Hylian_a6324,

This component renders the same object using the same shader but with different vertex color values.

So in order for you to achieve your effect, you'll only need to multiply the final color value by the Vertex Color node.

Image

Re: Shadow(Script) Component affected by Sprite shader

PostPosted: Fri Sep 28, 2018 3:27 pm
by Hylian_a6324
Thanks! That worked for me =)