hey, Was wondering if Unity supports a 'scripted' multi-pass setting in the shaders? The only multi-pass example I could find was the fur shader on these forums - but the author has manually copy/pasted the Pass 'x' times. Other engines/shader systems I've worked with allow something along the lines of: Code (csharp): SubShader{ LoopPass [string passName] [int count] Pass "Foo" { } } There would also be a constant set each pass by the engine to reflect the current pass count. Does something like this exist in Unity - if not, are there plans for something like this? Cheers!
Looping through passes isn't supported in Shaderlab, and I don't expect it ever will be. You could build the shader from a script, and add passes procedurally that way.
Yeh, I guess it's "bang for the buck", can only see grass/fur benefiting from it, and only then during dev time. Cheers!