Shadow(Script) Component affected by Sprite shader

Node-based Shader Editor
Post Reply
Hylian_a6324
Posts: 4
Joined: Tue Aug 28, 2018 4:41 pm

Shadow(Script) Component affected by Sprite shader

Post 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
User avatar
Amplify_Borba
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: Shadow(Script) Component affected by Sprite shader

Post 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.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
Amplify_RnD_Rick
Posts: 40
Joined: Wed Mar 01, 2017 6:33 pm

Re: Shadow(Script) Component affected by Sprite shader

Post 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
Hylian_a6324
Posts: 4
Joined: Tue Aug 28, 2018 4:41 pm

Re: Shadow(Script) Component affected by Sprite shader

Post by Hylian_a6324 »

Thanks! That worked for me =)
Post Reply