I'm not very good at explaining such very specific things in english, so maybe my words are imprecise.
With 'fixed' I didn't mean a value that doesn't change, but a value known to and checkable for HLSL. The upper bounds check needs to be local (local to the effect function, defined within the effect function).
clamp() is a function and that's why it is like a black box for HLSL, while modulo is a specific operator.
radius is local, while radius2 is global.
I hope you can follow the above, because I don't kow how to express it else
EDIT: Maybe this makes it a bit more clear.
radius = radius2; //sets radius = unknown
radius = 15; //sets radius = known
radius = clamp(radius2, 1, 6); // sets radius = clamp(unknown, 1, 6), which makes it still being unknown
radius = clamp(radius, 1, 6); // sets radius = clamp(known, 1, 6), which makes it still knowntulamide2011-09-02 23:33:17