Page 1 of 1

Post Process template and _MainTex

PostPosted: Thu Jan 18, 2018 11:38 pm
by Wodzuu
Hello!

I am trying to make an Unity image effect with ASE and when I select Shader Type=Post Process I can see in the generated code that _MainTex sampler is added automatically from the template. The question is how to reference the _MainTex sampler in the visual node editor? I can add new "Texture Sample" node but I am not allowed to name it "Main Tex" as the name collides with existing one.

Thank you in advance for any help. Have a great day!
Maciej

Re: Post Process template and _MainTex

PostPosted: Fri Jan 19, 2018 2:49 pm
by Amplify_Borba
Hello Wodzuu, thank you for getting in touch and for your support!

In order to access shader properties and global variables that have been declared for the current Template you're editing, you need to add a Template Parameter Node and select which parameter to use by clicking on the upper left corner or going to the node's properties.

Image

You can find more information about Shader Templates in our wiki page.

Please let me know if you have any further questions, thanks!

Re: Post Process template and _MainTex

PostPosted: Fri Jan 19, 2018 5:20 pm
by Wodzuu
Thank you @Amplify_Borba. That's what I was looking for.

Re: Post Process template and _MainTex

PostPosted: Mon Jan 22, 2018 12:09 pm
by Amplify_Borba
Wodzuu wrote:Thank you @Amplify_Borba. That's what I was looking for.


Glad to be of assistance!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback.Every bit helps, your feedback is extremely valuable to us.

Feel free to get back in touch if you have further questions, thanks!