Change Render Type during Runtime

Node-based Shader Editor

Change Render Type during Runtime

Postby AiSard » Sun Mar 24, 2019 9:45 pm

Is it possible to change a shader's Render Type/Queue from Transparent/Transparent to Opaque/Geometry during runtime? By script or otherwise.

Trying to achieve a Depth of Field effect and found that Transparent objects don't play well with it as it doesn't have Depth Information. But manually switching to Opaque/Geometry during Play Mode seems to work, trying to find a way to do it with script.

I've seen a few posts that seem to do it, but require fiddling with the shader itself which I'm unsure how to do with amplify shaders.
AiSard
 
Posts: 4
Joined: Wed Mar 20, 2019 7:53 pm

Re: Change Render Type during Runtime

Postby Amplify_Borba » Mon Apr 01, 2019 2:52 pm

Hello, apologies for the delay in our response!

You may access and modify certain parameters of your materials through scripting, such as the render queue, and we provide a few samples - ForceShield, Smear - that make use of scripts and should help you understand how to achieve this.

You may at any time manually edit your shader's code, but if you load it up into ASE and compile then you will lose all manual changes.
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: Bing [Bot], Google [Bot] and 95 guests