Amplifying your potential.

Help with XRay Shader

Node-based Shader Editor
4 posts • Page 1 of 1

Help with XRay Shader

Postby alex.turner » Mon Jul 09, 2018 10:20 pm

Hello.

Let me start off by saying I am pretty new to shaders and Amplify Shader. I am trying to modify the XRay shader that comes with the examples in the Unity package. My goal is to make a shader that has the xray effect on objects that are behind other objects, but renders nothing if the object is not behind other objects. I have a non-Amplify shader that works like this, but I'm trying to get better at using Amplify, so I want to replicate this in my Amplify shader.

Any help would be appreciated!
Thanks.
alex.turner
 
Posts: 2
Joined: Mon Jul 09, 2018 10:13 pm

Re: Help with XRay Shader

Postby Amplify_Borba » Tue Jul 10, 2018 9:40 am

Hello, thank you for getting in touch and for your support!

It's possible to achieve the effect you intend with some tweaks to the XRay sample, however, you must first update ASE to the latest build currently available on our website, due to a recent bug fix that can cause the following setup to throw an error.

Image

You'll have to set the Blend mode to Custom, Type and Queue to Transparent, in order to enable the Opacity port.
Then proceed to remove the Outline node, connect its Color input to the Emission port and the Alpha to the Opacity port.

Make sure that the Blend RGB is set to Alpha Blend, and within the Depth tab set the ZWrite Mode to Off, ZTest Mode to Greater or Equal, and turn off the Extra Depth Pass.

Please let me know if this helps, thanks!
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: 543
Joined: Mon Jul 24, 2017 9:50 am

Re: Help with XRay Shader

Postby alex.turner » Tue Jul 10, 2018 2:35 pm

Thank you so much! That works exactly how I expect it to. I really appreciate the quick response!
alex.turner
 
Posts: 2
Joined: Mon Jul 09, 2018 10:13 pm

Re: Help with XRay Shader

Postby Amplify_Borba » Tue Jul 10, 2018 3:53 pm

Glad we could help!

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 any further questions, thanks!
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: 543
Joined: Mon Jul 24, 2017 9:50 am


4 posts • Page 1 of 1

Return to Amplify Shader Editor

Who is online

Users browsing this forum: Ricardo Teixeira and 0 guests