Thanks for the link. I tested with an Expression
node with an input Scalar times
and output Color color
.
color = vec3(0.5,0.1,0.1);
for(int i=0; i < int(times);i++) {
color = color + 0.1;
}
so you can add loops :-)
This loop gets injected into the VisualShader output like:
// Expression:3
vec3 n_out3p0;
n_out3p0 = vec3(0.0, 0.0, 0.0);
{
n_out3p0 = vec3(0.5,0.1,0.1);
for(int i=0; i < int(n_out4p0);i++) {
n_out3p0 = n_out3p0 + 0.1;
}
}