• Advertisement
Sign in to follow this  

Multi-pass engine architecture?

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

I've got the graphics module of my engine running okay now for basic shader effects like textures and simple pixel shading. I want to extend it though, and add light pre-pass rendering, shadow maps, and post-processing. I also want to add a few instancing, tesselation, and geometry shader techniques, and maybe some SSAO later on. I've been looking around for examples of engine architectures that make this possible to add, but I haven't really found anything. What would the best way to add this be? Should I break up my simple architecture to allow custom passes to be added that derive from an interface class? For the tesselation and geometry shaders, is it possible to have some sort of geometry pass that gets run first and then that geometry would be operated on by the other rendering passes? And finally, how would special cases be able to be handled, like transparent objects, sky, and particles?

Share this post


Link to post
Share on other sites
Advertisement

You could take a look at Hieroglyph 3, which has an object oriented way of managing rendering passes and a quite a few samples to show variations on the standard rendering setup.

Share this post


Link to post
Share on other sites

I'll take a look right now. One thing that I'm trying to find a way around is how to optimize my vertex, geometry, and tesselation shaders so that they don't have to run for every pass. Mainly because I want to do hardware skinning. I'll just use stream out from the vertex shader most likely, but I would need a fallback in case it wasn't supported.

Share this post


Link to post
Share on other sites

Are you using OpenGL or Direct3D 11?  In either case, stream output should be supported anywhere that you are doing tessellation, so that shouldn't be a problem.

Share this post


Link to post
Share on other sites


I've been looking around for examples of engine architectures that make this possible to add, but I haven't really found anything. What would the best way to add this be? Should I break up my simple architecture to allow custom passes to be added that derive from an interface class?
Check out Horde3D's data-driven pipeline solution:

http://horde3d.org/docs/manual.html

http://horde3d.org/wiki/index.php5?title=The_Flexible_Rendering_Pipeline

http://horde3d.org/wiki/index.php5?title=Basic_Pipeline_Tutorial

Share this post


Link to post
Share on other sites

Are you using OpenGL or Direct3D 11?  In either case, stream output should be supported anywhere that you are doing tessellation, so that shouldn't be a problem.

The stream output isn't a problem for tessellation. It's mainly for skinning I'm worried about.

Share this post


Link to post
Share on other sites

 

Are you using OpenGL or Direct3D 11?  In either case, stream output should be supported anywhere that you are doing tessellation, so that shouldn't be a problem.

The stream output isn't a problem for tessellation. It's mainly for skinning I'm worried about.

 

You might want to consider it for the tessellated content as well - skinning is not the only thing you wouldn't want to have to repeat in a multipass renderer...

Share this post


Link to post
Share on other sites

unless im mistaken, streamoutput doesnt work in sli mode, so you got to be careful about that... if youd like to support it, thats if your using direct x 11, i dunno about opengl... it case you already knew. :)

Edited by rouncer

Share this post


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

  • Advertisement