http://www.beyond3d.com/forum/showpost.php?p=683577&postcount=616
Here Nick kindly identified a 3DMk06 shader that uses dynamic branching.
Additionally, sections of the code use partial precision (_PP at the end of the instruction name).
What's interesting, in my view, is:
- clearly this is an optimisation for NVidia hardware - and who knows whether the driver will even respect this and instead just change every instruction to _PP
- the complexity in identifying the portions of shader code that can withstand _PP
To be honest, if you're a half-decent programmer, then an awareness of precision is right there at the time the algorithm is cast and the data structures formed, so I don't think it's actually that difficult to say these "variables are _PP". It's not much different from choosing texture formats, I guess.
I can imagine the lead graphics engine developer will have laid-down the parameters for _PP, too - so the code monkeys can get on without having to think too much.
I suppose where it might get interesting is in artist-configured shaders - but again I imagine the lead dev will have identified the conditions under which precision is at risk.
Arguably, I suppose, it would be nice as a dev to be able to think "FP32 all the way, no need to worry about the precision of my variables" - like when I used to program finance stuff I knew my money fields were always 15.4 and life was simple, I just had to be careful about
when I rounded, etc. etc.
Jawed