XRay Shader: How was it created?

Node-based Shader Editor

XRay Shader: How was it created?

Postby AurochChris » Mon Aug 06, 2018 12:44 pm

Hey there,

I am a little unfamiliar with the higher skills of shader programming, so apologies if I am asking some very basic questions:

So, I've just updated ASE, and found the XRay sample. We're working on an XRay system in our game, and we're going to use the standard Unity route of using replacement shaders; however this looks like an interesting and easier solution.

However, because there's no documentation yet, I am left with some questions how this is implemented:

1) The vertex outline is only rendered when the Z value in the depth buffer is closer than the z of the fragment. However, I can't find any logic which actually tests this - is this a property of the outline function itself?

2) Would I be able to replicate this if I wanted to create something entirely custom? (For example, generate a color gradient for the mesh based on fragment height; and only show that on parts that are behind the current z buffer value.)

3) I was under the impression it wasn't possible to create multi-pass standard surface shaders yet. The .shader file contains multiple cg programs, but not passes. How exactly was this achieved?

My end goal is to take Unity's standard shader and a couple of our own custom ones, add new pass into it like the XRay sample but with our own visuals for about 8+ different shaders. If I can get through to that using ASE rather than hacking our tech artist's shader into existing .shader files that'd be amazing.

Thanks in advance!

Chris
AurochChris
 
Posts: 2
Joined: Mon Aug 06, 2018 11:17 am

Re: XRay Shader: How was it created?

Postby Amplify_Borba » Mon Aug 06, 2018 4:48 pm

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

I'll have to pass this topic to the developer as he can provide better insight regarding the X-Ray sample than I can, he'll get back to you as soon as possible, thank you for understanding!
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: XRay Shader: How was it created?

Postby AurochChris » Tue Aug 07, 2018 2:41 pm

No worries, I understand!
AurochChris
 
Posts: 2
Joined: Mon Aug 06, 2018 11:17 am


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 85 guests

cron