just one word really, HOW?
i’v seen these magical words in many places, but no real description of what they mean in code terms.
can i set up a few frag shaders and automatically run through them.
or do i render with one, flush, render with the next, flush…
You can only use one program object for the entire pass. Cannot pipeline shaders in one pass.
multi-pass does what the name suggests :- Multiple passes. You can perform effects that cannot be done in one pass by multi-passing. For example:
1st pass) Render diffuse lighting of the object
2nd pass) Render specular lighting of the object (with additive blending)
For each of these passes you will have to bind a different shader but you do not have to do a “flush” between passes.
It has been suggested that future drivers/hardware may be able to break up complex shaders into multiple passes - but no driver will currently do this. If you want to multi pass you will have to do it manually.
my graphics card is 3dlabs wildcat realizm 200. could i also do multipass?
it seems that i understood multi pass wrongly. if i do a image convolution with a 7x7 kernel, i must read the texture 48 times. siince the exture reads are limited, maybe i use a shader to read 24 neighboring pixels and another shader to read the other 24 neighboring pixel. is it also kinda multi pass? is it possible?
I imagine that multi pass means rendering the same geometry at the same location more than once.
But these are just words (multipass). Do whatever you find necessary.
If you will multipass, just remember that invarience is important. We want fragments to be in the same X and Y positions and have the same Z as previous passes, otherwise you get what resembles z fighting and missed pixels.
With GLSL, invarience is acheived with
gl_Position = ftransform();
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.