Page 1 of 1

Static Switch without #else

PostPosted: Wed Apr 03, 2019 3:02 pm
by mortenblaa
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!

Re: Static Switch without #else

PostPosted: Fri Apr 05, 2019 11:03 am
by Amplify_Borba
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.