Prevent loop unwinding in fragment shader
问题 I'm writing a fragment shader for WebGL(GLSL ES 1.0) using the latest version of Chrome(and Firefox), and I wrote an iterative algorithm. So first of all, I found out the hard way that the length of the loop is quite restricted (doc says it must be guessable at compile-time, which means it must be a constant or very close). In addition, I must write a ( for , since it's the only one which must be implemented according to the standard) loop that's potentially long but that breaks almost every