was closed as ‘by design’ which does not make sense. Was this designation because it is unfixable and there just isnt an ‘unfixable’ category? I can not imagine any design in which is is preferable to pay the full cost of something that is being multiplied by 0 after all the effort to introduce per-pixel instruction-culling to substrate. Is this actually ‘by design’ or is is just unfixable?
Looking through more docs… is the subtrate ‘Select’ operator basically what i want here? It looks like it is but I’d like to sanity-check before I get my hopes up.
Legacy material do not do any clip/discard/dynamic branch based on opacity. I looked at the generated disassembly: both opacity and emissive are evaluated separately without any test/clip.
This is the same for substrate right now.
Also coverage is changed on another node, the plan is to leverage dynamic branching to skip part of the Substrate tree but right now it is not directly possible with the current translator (cannot reorder instructions). Clip discard is also useless since we would need to evaluate coverage first and clip first.
This can be made possible with the new translator and that is when we can apply this optimisation that is currently planned.
Right now there is no regression as compared to legacy.
Also if we do a dynamic branch of clip, it will have to account for the blend mode. Add or pre multiplied alpha cannot test opacity for instance. Only blend can.
So right now this is by design and optimisation is planed for the future.