• Advertisement
Sign in to follow this  

How Does Your Engine Handle Multi-Pass Rendering?

This topic is 4148 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

In mine I have a 'newpass' flag on the texture stages which forces a draw of the mesh and kicks the renderer stage index back to zero again. I'm thinking this may not be the best way of doing it now because it limits the order in which I can render my objects (ideally, I would like to be able to render the passes within the objects OR objects within the passes). I thought about just kicking a seperate mesh to the renderer for each pass too, but I'm not sure this would be much better. How have others handled this? Thanks Rael

Share this post


Link to post
Share on other sites
Advertisement
If your talking about mutli-texturing it pretty much has to be done per object, as you need the vertex data anyways to apply the textures. So it wouldn't make sense to draw your scene 1 texture pass then go back to the 2nd etc.

Unless your doing ray tracing or some CGI program.

Other things like using the buffers to do blur effects or HDR or glow you pretty much need to render the entire scene first, then re-apply the effects over your scene.

Share this post


Link to post
Share on other sites
I guess what I'm asking is that when you pass a list of stuff to the renderer to be rendered, is each stage of a multi-pass textured object a seperate entity to be rendered so all entities can be sorted by pass and then by texture to minimize texture switching?

I am thinking especially about terrain, where a single pass for multiple tiles could use the same texture. If you rendered each tile pass-by-pass rather than each pass tile-by-tile it would be making more texture change calls, which I understand a very expensive?

Thanks

Share this post


Link to post
Share on other sites
Yeah you can do it like that. I have also heard the same thing. However I did some testing and it only makes a difference when you have alot of polygons on the screen. anything less than 10,000 i pretty much saw no difference between using 1 texture bind in my whole renderer to using like 50. I was having slow downs in my engine and i heard about this that it might be caused by my contstant texture swapping but it wasn't the case for me.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement