Condition for apply in block


I’ve been thinking if there’s a way to add condition if some block is added or not.

The Uno language contains many cool features like I can make a condition if some texture is sampled or not and when it’s not the compiled shader doesn’t contain that code at all. This is awesome beyond anything.

So I was thinking maybe you added a condition for apply as well?

e.g. something like

apply (RenderShadowMap ? ShadowApply : null);

I could do this condition in my code when I tell which Pass should be used, because I use virtual apply. But this would require me to write the same Pass two times with and without the ShadowApply.

Or maybe if I just put the condition to PixelColor and when it doesn’t use values build inside that block, the calculations are never added to shader? (same as apply never happened)