Shadow(Script) Component affected by Sprite shader

Node-based Shader Editor

Shadow(Script) Component affected by Sprite shader

Postby Hylian_a6324 » Tue Sep 25, 2018 12:09 pm

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

Re: Shadow(Script) Component affected by Sprite shader

Postby Amplify_Borba » Tue Sep 25, 2018 4:09 pm

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

Re: Shadow(Script) Component affected by Sprite shader

Postby Amplify_RnD_Rick » Tue Sep 25, 2018 5:09 pm

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
Amplify_RnD_Rick
 
Posts: 40
Joined: Wed Mar 01, 2017 6:33 pm

Re: Shadow(Script) Component affected by Sprite shader

Postby Hylian_a6324 » Fri Sep 28, 2018 3:27 pm

Thanks! That worked for me =)
Hylian_a6324
 
Posts: 4
Joined: Tue Aug 28, 2018 4:41 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 25 guests