UI Shader

Node-based Shader Editor

UI Shader

Postby lmgiorni » Wed Jan 23, 2019 3:43 pm

Hi Im Leandro, I´m very new with amplify shader editor, a great tool by the way!

I have a few questions because I´m not clear how will be the correct approach to start a shader and work with sprites.

The thing is that after I revised the SimpleUI shader that cames with the examples I got a warning that says: "Node Template Mastger Node is deprecated and was replaced by Template MultipPass Master Node".

Image

Im not sure if this means it wont work but I guess I read somewhere in the forum that may not work correctly. So what I did is create a new shader with the multipass Unlit in the Legacy section. Is this the one I must use?

Image

WIth this one I could not be able to make Alpha to work. Not sure what but I think there is something I´m missing.


[EDIT]

I continued trying a bit more and activated Blend RGB in Premultiplied and now it works.

Image


Is this the best method continuo forward?


I got the problem of Zfighting with the Canvas Background.

Image

Here is the graph:

Image

What woulud be the correct way to implement this?

I got it working but It seems the UI needs some specific properties

"Material Background_Season_Medieval_MTL doesn't have _Stencil property
UnityEngine.Canvas:SendWillRenderCanvases()"



Couldn't find any template that meets this requierements. Any idea what could be done?



Thanks in advance!
lmgiorni
 
Posts: 3
Joined: Wed Jan 23, 2019 12:12 pm

Re: UI Shader

Postby Amplify_Borba » Fri Jan 25, 2019 2:43 pm

Hello, thank you for your support and kind words!

The template that you should be using for canvas elements is the DefaultUI, since when you create or use a shader based on a Template, it will inherit all its shader properties and global variables, which you can access through the Template Parameter node.

Image

The warning message you see is due to the original template being replaced by an updated one, and should no longer show if you compile the shader after opening it for the first time.

Please let me know if this helps and if you have any further questions.
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: UI Shader

Postby lmgiorni » Sat Jan 26, 2019 6:26 pm

Thanks for the response!

I changed to the DefaultUI and so far, so good! I dont understand why I need the Use Alpha Clip ( in template parameter node). I´ll post later some other issues I had with the template parameter node or at least some unexpected behaviour.

Thanks!
lmgiorni
 
Posts: 3
Joined: Wed Jan 23, 2019 12:12 pm

Re: UI Shader

Postby Amplify_Borba » Tue Jan 29, 2019 10:20 am

Just to clarify, you don't need to use all of the parameters available in that list, the image I shared in my previous post was meant to serve only as an example.
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 113 guests