How can I create a lit sprite shader?

Node-based Shader Editor

How can I create a lit sprite shader?

Postby virtush » Tue Dec 04, 2018 1:46 pm

I've created a sprite shader with a wind effect for 2D foliage, and I need it to react to lighting.

Obviously there are lit sprite shaders out there in the wild, but from what I gather, I need surface shading to enable lighting and I have no idea how I can do that through amplify while retaining the sprite functionality. :?
virtush
 
Posts: 1
Joined: Tue Dec 04, 2018 7:40 am

Re: How can I create a lit sprite shader?

Postby Amplify_Borba » Mon Dec 10, 2018 12:13 pm

Hello! If you want your sprite template shader to react to lighting, you'll need to manually set up those calculations in the shader, and we do provide some Light specific nodes for such endeavours.

As an alternative, you could also consider using a Surface shader since it already has the lighting calculations set up for you, in this case you'd have to create a Texture Sample node called MainTex, or at least make sure that its Property Name is called _MainTex, so that it can be used with Unity's Sprites.
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


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 10 guests

cron