Hi,
While I was working on implementing shadows in my graphics framework, I came to realize that multiplass rendering is the way forward as it makes coneptual sense (that is, it is clean and easy to understand). In a rendering system which utilizes an effects system (similar to the DirectX effects file), multi-pass rendering is used heavily.
However, it is generally true that some multi-pass effects could be performed in only one pass and is usually faster.
My question is, are the current GPU vendors optimizing for multi-pass rendering? Is it bad practise to use it?
Thanks!
Are GPUs optimized for multi-pass rendering?
Started by cdgray, Sep 08 2005 05:17 PM
6 replies to this topic
#1
Posted 08 September 2005 - 05:17 PM
#2
Posted 08 September 2005 - 10:40 PM
Do things in one pass where you can. Multipassing involves writing to the frame buffer (or a texture) and then reading from it again, which is slower than just running one long shader. Of course, some effects require multiple passes, at least until general-purpose shaders with branches and loops become commonplace and fast.
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 20 September 2005 - 07:21 AM
Reedbeta said:
Do things in one pass where you can. Multipassing involves writing to the frame buffer (or a texture) and then reading from it again, which is slower than just running one long shader. Of course, some effects require multiple passes, at least until general-purpose shaders with branches and loops become commonplace and fast.
I've seen the word "branches" many places now and I'm realy curious about it..
What are "branches"?
I know there is a similar word for the things pointing out from a tree..
But what does branches have to do with enything?
#4
Posted 20 September 2005 - 10:57 AM
Branches is usally if's and stuff..
-si
-si
#5
Posted 20 September 2005 - 03:43 PM
This is 'branching' in pseudocode:
In C, this would read
somevar = 4; compare somevar to othervar; branch if equal somewhere; somevar--; somewhere:
In C, this would read
if (somevar != othervar) {
somevar--;
}
#6
Posted 20 September 2005 - 05:17 PM
Branching is anything where the program flow is affected by the value of a variable or similiar. This includes if statements, switches, and also loops.
reedbeta.com - developer blog, OpenGL demos, and other projects
#7
Posted 21 September 2005 - 02:41 PM
We have experimented with multipass vs branching pixel shaders and found that multipass is faster. However I was at a recent dev event and from what I understand, improvements to the shader compiler may reverse this.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












