+6
Under review
Static Switch
Hi, is there a Static Switch node planned? (If you know the node from the UDK I'm sorry for the next explanation )It Is use full when you got something of a bigger shader and you don't want to always use the whole functionality, lets say I have a hair shader and for some characters I use a kind of wind simulation(Vertex movement) It would let me switch it off or on in the material.
I don't even know if it is preferable. It would just save me the time to maintain 2 different shaders. Esspecially when there is a really big shader like an ocean shader with different wave types.
I don't even know if it is preferable. It would just save me the time to maintain 2 different shaders. Esspecially when there is a really big shader like an ocean shader with different wave types.
Answer
0
Answer
Planned
Freya Holmér (Developer) fa 11 anys
It's planned, but as a post-release update :)
Hello, Is this feature still planned?
It would be great to have 'uber shader' and turn off functions that don't need to be calculated.
It would be great to have 'uber shader' and turn off functions that don't need to be calculated.
Under review
Unfortunately, no. It has too many implications that would require a *huge* rewrite of the shader compiler, I'm afraid :(
Couldn't this still be implemented but just with a "hidden" Slider? I've been doing exactly that where I use a 0-1 Slider connected to a Lerp. I remap the output of the slider where 0-0.5 = 0 and 0.5-1 = 1 before going to the Lerp so it's effectively a boolean switch.
That gives the same result as the OT, but it still leaves all the calculations in the shader code, basically calculating the "other branch" for nothing.
I also like the feature of having compile-time switches to just disable certain shader features for different materials.
It is not possible to have multiple switch with the same variable like in U4?
I would like to use the same switch exposed to make different logics on the shader.
Is the static switch that remove the calculations of the disabled branch not planned any more?
Customer support service by UserEcho