These techniques your talking about aren't zero cost at all. There just moving the cost elsewhere.
Dynamic branch with branch prediction has a hardware space cost, gate cost (IHV have to implement it) and usually a high penalty when prediction fails.
Static branches without branch prediction have runtime execution cost.
Runtime static branch removal has a runtime CPU cost, upload cost and memory cost.
Offline branch removal has a offline CPU and a runtime memory and upload cost.
There are no free lunches.
Currently on consoles shader hardware, we have
a) no branch predictors
b) branches cost a certain amount to execute
c) CPU is a very scarse resource (compared to shaders)
d) Upload cost can be lost and the memory cost is 'reasonable'
So offline branch removal (lots of little shaders) makes sense, I personally predict the same costs will mean PC shaders for a few years will balance the same way.
Dynamic branch with branch prediction has a hardware space cost, gate cost (IHV have to implement it) and usually a high penalty when prediction fails.
Static branches without branch prediction have runtime execution cost.
Runtime static branch removal has a runtime CPU cost, upload cost and memory cost.
Offline branch removal has a offline CPU and a runtime memory and upload cost.
There are no free lunches.
Currently on consoles shader hardware, we have
a) no branch predictors
b) branches cost a certain amount to execute
c) CPU is a very scarse resource (compared to shaders)
d) Upload cost can be lost and the memory cost is 'reasonable'
So offline branch removal (lots of little shaders) makes sense, I personally predict the same costs will mean PC shaders for a few years will balance the same way.