// Will not even compile void main() { ... float n = lookupValueFromTexture(); for ( float i = 0.0; i < n; i += 1.0 ) { // Do something } ... }