Iterate Pass

Hello. I have a question.

I’m trying to do a flur shader, and i need too “execute” the same shader pass multiple times “N times” (The shader pass take a value “N” and displace the vertex position pos = pos + normal * N;)
Is possible to iterate in the subshader? something like:

SubShader {
for (int N = 0; N < max; N++){
Pass{}
}
}

Thanks for the help.

No, you have to write each pass explicitly. They can, however, share code from a CGINCLUDE block.

1 Like

Thanks! :slight_smile: