Original Post
I'm reading the ATI programming guide and it has this example regarding dynamic branching: float diffuse = dot(lightVec, normal); if( diffuse > 0.0 ) { // compute lighting } It says, if the normal is interpolated across the surface, the branch is fine. But with a normal map where the normals vary at a high frequency, the hardware will not be able to skip past the code within the if-statement. So I don't get this. Doesn't it do the if statement per pixel anyway? Why does it matter if the result of the condition statement is different for nearby pixels?