Sign in to follow this  

multipass rendering define??

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hihi! ok i jus need some clarifications on what is considered multipass rendering. 1)suppose i got a render loop that has pass 1 pass 2 pass ... pass last //present/swap double buffer 2)suppose i several render calls, and different render calls are done by different frames with an order. eg: frame 1 calls render function 1 //present/swap resultant image from frame 3 frame 2 calls render function 2 //present/swap resultant image from frame 3 frame 3 calls render function 3 (assume last indicated frame) //present/swap resultant image from frame 3 thx! issit the 2nd one is considered multipass rendering??

Share this post


Link to post
Share on other sites
The easiest way I can think to explain this would be to consider a single polygon that I wanted to render. In the case of a single pass, I can only really apply a single texture to the "polygon" (or rather the projected 2d image that was the polygon) *AT A TIME*. With multipass rendering I can apply multiple textures in one pass. This is useful for doing things like to environment map a texture. While you could do this with single pass hardware, it takes longer since you can only do one write at a time.

I remember there being some pretty good discussions on this in the forums a while back - you may want to do a search on some of the older threads for a better/more technical discussion.


Hope that helps -


#dth-0

Share this post


Link to post
Share on other sites
The first (1st) one is multipass.

If you present the image each time you render it then your next image will replace the image instead of being rendered on top which is what multipass is.

In multipass rendering you render one object with one set of properties (textures etc), then you render the same object again with the next set of properties, and repeat until you've rendered (and thus combined) each pass of the object into the framebuffer.

Finally you present it (or swap the buffers) which actually puts it on the screen.

Thats why presenting each time will just give you the same objects but rendered in a "single pass" with different properties (textures/lighting/etc) for each frame, which would look really bad... unless you're drunk or high or something [smile]

Andy

Share this post


Link to post
Share on other sites
I think multipass is used for things like translucency and zbuffer tricks and stuff.

One technique is to render all the totally opaque items in the scene, with the z buffer enabled for writing and checking.

Then render the partially transparent items, back to front, with z buffer readonly.

Some I've seen go through a complete pass of opaque objects initially, writing to the z buffer *only*, i.e. not affecting the accumulation buffer at all. This avoids overdrawing, but I'm not sure if it's necessarily a performance advantage as you need to send (most of) the geometry to the hardware more than once (Yes, I know you could use display lists etc)

Mark

Share this post


Link to post
Share on other sites
Writing everything as a depth only pass is useful if you're fillrate limited because on your next pass and all subsequent passes you wont be using the pixel shaders for all the hidden stuff as it will be discarded at the depth test stage.

It's very useful if you have a lot of complex pixel shaders.

Andy

Share this post


Link to post
Share on other sites
hihi!
thx fer all the replies!

suppose i modify the 2nd one:
eg:
frame 1 calls render function 1 and render to offscreen buffer
frame 2 calls render function 2 and render to offscreen buffer
frame 3 calls render function 3 and render to framebuffer
present/swap at end of frame 3

this is still considered "single pass" rendering?

i noticed that i am getting much better performance if i do it this way. Yet I am not too sure if my performance indicator is actually giving me the correct results though.

Theoretically, having many many single passes will incur alot of present/swaps compared to doing everything in one multipass render call.

thx!
Edwinz

Share this post


Link to post
Share on other sites
Quote:
Original post by xiuhcoatl
The easiest way I can think to explain this would be to consider a single polygon that I wanted to render. In the case of a single pass, I can only really apply a single texture to the "polygon" (or rather the projected 2d image that was the polygon) *AT A TIME*. With multipass rendering I can apply multiple textures in one pass. This is useful for doing things like to environment map a texture. While you could do this with single pass hardware, it takes longer since you can only do one write at a time.

I remember there being some pretty good discussions on this in the forums a while back - you may want to do a search on some of the older threads for a better/more technical discussion.


Hope that helps -


#dth-0


isn t it a contradiction ...with multipass i can apply multiple textures in a singlepass?

as multipass says you render the same scene / polygon / geometry with different textures multiple times

with multitexturing you can apply multiple textures in a single pass

in my engine i will probably need 2-4 passes to render all the lights and shadowmaps

Share this post


Link to post
Share on other sites

This topic is 4837 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this