Evaluation of flat variables

I couldn’t find this information anywhere. I was wondering if flat variables are evaluated only for the provoking vertex, as the first impression is that they aren’t. Which would be a waste, obviously. Or maybe the answer is so obvious that there is no need to specify it.

Thanks

What do you mean by “evaluated”?

well, if I have an assignment like myFlatVariable = <whateverComplexExpression>, then I mean computing whateverComplexExpression. I guess I can’t pretend to have more complex definitions.

You can safely assume that they will be evaluated at every vertex. It is permissible for an implementation to not evaluate it, but the structure of graphics hardware makes that impossible.

GPUs like a lot of executions of the same code running in lock-step. If some vertex shaders execute code and some don’t, then they’re not all running in lock-step. And that’s bad.

Ah, good to know. Thanks