Static Switch without #else

Node-based Shader Editor

Static Switch without #else

Postby mortenblaa » Wed Apr 03, 2019 3:02 pm

Hi,

Is it possible to use the Static Switch where it only acts as a #ifdef, without the #else part?

What I am trying to do, is to connect a value to the Opacity input, but only when a keyword is enabled. Basically I want the shader to behave as if there is nothing connected to Opacity, when the keyword is not enabled. I know I could just put in a value of 1.0, but it still influences the shader somehow.

I'm trying to make an "uber/mega" shader, which can change the render type.

Thanks!
mortenblaa
 
Posts: 1
Joined: Wed Apr 03, 2019 2:57 pm

Re: Static Switch without #else

Postby Amplify_Borba » Fri Apr 05, 2019 11:03 am

Hello, thank you for getting in touch!

Our Static Switch node always creates an #if and #else, so you'll need to specify a default value for the #else, which corresponds to the False port, every time you need to use this node. Unfortunately it won't be possible to change this behavior.
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: No registered users and 4 guests