I realized, after having posted, that the setter style I used isn’t so nice for transitions. Originally, I just had the new value being returned, before realizing one could assign multiple values by doing it a different way. But I suppose that could still be done (with the other “internal” parameters) while returning the interpolation-friendly “public” value.
Anyhow, a few questions about multi-pass shaders have occurred to me.
-
Do the new effects inherit the parameters of the passes, or are they stuck with the defaults? And if the former, what happens when there’s a name conflict? In the tutorial’s example, for instance, the two blur passes’ parameters share the same names.
-
Is it safe to assume that multi-pass breaks batching? I’m thinking, for instance, if I make shaders meant exclusively to be used as shader passes, can I just avoid the hassle of trying to cram everything into four floats and go to with the more generous allotment of uniforms?
-
When an input comes from a previous pass, can it be treated like a makeshift snapshot, e.g. to play with pixels from the background?
-
If so, could the first pass be spoofed, say by providing a vertex shader that just sent all vertices way outside the content:
P_POSITION vec2 VertexKernel( P_POSITION vec2 position ) { position.x = -10000; return position; }
and still get that capture (without wasting as much fill)? Or is there logic to try to detect “degenerates” and early-out? (Assuming there’s even a reasonable / efficient way to do that test!)
(I can obviously try these out. It would just be nice to have them spelled out, if possible.)
- On the earlier subject of uniforms and batching, was a UniformsGroup or AttributesGroup concept ever discussed, along the lines of the old ImageGroup? With some constraints, it seems like that could work. (I totally overthought this idea while out running tonight. ) Maybe too much hassle, though.
That’s all for now!