Multi-Pass Questions

Node-based Shader Editor

Multi-Pass Questions

Postby Velksy » Mon Mar 19, 2018 3:03 pm

It's great to see Amplify Shader Editor get multi-pass support but to be honest after opening it up I'm at quite a loss on how it works... I see that the documentation is currently in the process of being updated but I have a number of questions I was hoping to get answered.

Template example
First and foremost, would it be possible to get an example shader for the multi-pass template? I always find that jumping into the provided examples is the best way to learn for myself and it's hard to do that in this situation considering how different a template it is. Even a snapshot of a simple multi-pass shader would be greatly appreciated :)

Adding additional passes
Again, I'm a bit at a loss as to how this template works so perhaps I am completely missing the point but is there a way to add additional passes through the shader editor or is it up to me to add them by editing the template?

Pass blending
One thing I have noticed is that the "Forward Base" lacks the ZWrite & blending options that are common to all other shader templates as well as the second "Forward Add" pass. Is this a technical limitation of sorts? Additionally there does not appear to be any option of modifying the ZTest value for any passes?

Shader name
Not sure if this is more of a bug report or something I am misunderstanding but once I hit the compile shader button in the top left, the shader (despite being named ex. "Custom/multi-pass") will compile as the template "ASETemplateShaders/Multi Pass/Unlit".

Multi-Pass Lighting
I feel like I'll be more comfortable with this once I better understand the template but I figure I'll ask it now. Having dealt with them previously I'm comfortable using most of the custom lighting nodes that are provided with the editor, however in this template there were some new obstacles, notably "light attenuation" now shows a warning about creating a shadow-caster pass and it appears that a number of the custom light nodes such as "Light Color", Indirect Diffuse Light", "Standard Surface Light", etc nodes are unavailable.

I'm not a shader expert but I do know that surface shaders work quite differently from vert/frag shaders so forgive my ignorance on the subject but is it possible/planned for surface shader support to be available in the multi-pass template? I know that surface shaders can work similar to multi-pass shaders (https://goo.gl/x3zMJS) but again, I don't know what limitations that might have in this editor; your input would be appreciated.

Once again thank you very much for continuing to develop and support this product & thanks for your time!
Velksy
 
Posts: 4
Joined: Mon Jan 08, 2018 9:46 pm

Re: Multi-Pass Questions

Postby Amplify_RnD_Rick » Mon Mar 19, 2018 5:15 pm

Hey Velksy,

First and foremost we would like to apologize for not having the documentation fully updated to the new multi-pass system.
We hope to have it up and running really soon ( over the following days ).

Template example
First and foremost, would it be possible to get an example shader for the multi-pass template? I always find that jumping into the provided examples is the best way to learn for myself and it's hard to do that in this situation considering how different a template it is. Even a snapshot of a simple multi-pass shader would be greatly appreciated :)

Yes, definitely. We'll add a simple multi-pass example and explain it step by step.

Adding additional passes
Again, I'm a bit at a loss as to how this template works so perhaps I am completely missing the point but is there a way to add additional passes through the shader editor or is it up to me to add them by editing the template?

It's up to the template creator to add all the passes necessary for its usage on the template itself.

Pass blending
One thing I have noticed is that the "Forward Base" lacks the ZWrite & blending options that are common to all other shader templates as well as the second "Forward Add" pass. Is this a technical limitation of sorts? Additionally there does not appear to be any option of modifying the ZTest value for any passes?

Not really, this template was merely created without these options.
All options available on the graph must be set over the template and our developer simply didn't included them on the template.

Shader name
Not sure if this is more of a bug report or something I am misunderstanding but once I hit the compile shader button in the top left, the shader (despite being named ex. "Custom/multi-pass") will compile as the template "ASETemplateShaders/Multi Pass/Unlit".

You have found a bug. We really glad you've found it.

Multi-Pass Lighting
I feel like I'll be more comfortable with this once I better understand the template but I figure I'll ask it now. Having dealt with them previously I'm comfortable using most of the custom lighting nodes that are provided with the editor, however in this template there were some new obstacles, notably "light attenuation" now shows a warning about creating a shadow-caster pass and it appears that a number of the custom light nodes such as "Light Color", Indirect Diffuse Light", "Standard Surface Light", etc nodes are unavailable.

These nodes are still not 100% template compatible. But rest assured that we are working on it.

I'm not a shader expert but I do know that surface shaders work quite differently from vert/frag shaders so forgive my ignorance on the subject but is it possible/planned for surface shader support to be available in the multi-pass template? I know that surface shaders can work similar to multi-pass shaders (https://goo.gl/x3zMJS) but again, I don't know what limitations that might have in this editor; your input would be appreciated.

We are planing to also extending multi-pass to surface shaders. We'll start working on it as soon as we feel the template system is robust enough.

Your feedback was incredibly important to us and will help us shape the missing documentation.

Again we apologize for not having the official documentation ready and in sync with this feature launch. We'll let you know as soon as it is up and running.
Amplify_RnD_Rick
 
Posts: 40
Joined: Wed Mar 01, 2017 6:33 pm

Re: Multi-Pass Questions

Postby Velksy » Mon Mar 19, 2018 9:24 pm

Hey, thank you again for the help!

I've been able to jump into editing the template to add ZWrite & depth options now that I understand it a bit more.

If possible, would you be able to provide a quick screenshot of a working multi-pass shader graph that someone on the team must have created/played with when building the template? I don't need anything special/unique, I'm just looking to understand what kind of information you are plugging into where :)
Velksy
 
Posts: 4
Joined: Mon Jan 08, 2018 9:46 pm

Re: Multi-Pass Questions

Postby Amplify_RnD_Rick » Wed Mar 21, 2018 6:08 pm

Hey Velki,

Node-wise, multi-pass shaders work exactly like single-pass ones so you can check our template samples over the package for reference.

Template specific nodes ( listed bellow ) only need some extra configuration to select the correct subshader and pass to retrieve data:
Template Parameter: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Template_Parameter
Template Vertex Data: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Template_Vertex_Data
Template Fragment Data: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Template_Fragment_Data
Template Multi-Pass Switch: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Template_Multi-Pass_Switch

For Multi-Pass specific samples you can check Lightweight SRP samples which uses a multi-pass template.
http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Scriptable_Rendering_Pipeline

We also updated the templates documentation and included a multi-pass template example. Is it possible for you to take a look and let us know if there's something that isn't quite clear or you don't understand?
http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Templates
Amplify_RnD_Rick
 
Posts: 40
Joined: Wed Mar 01, 2017 6:33 pm


Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 39 guests