Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Sorting multipass render objects pipeline

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

This question is especially targeted to people using ID3DXEffect framework for render state setup, but not only. I have RenderObject with its VBs,IB,VB offets,IB offset,vertex declaration,effect,effect params. Effect (or the way the object is drawn) is multipass one, with the ristriction that geometric streams stays the same (else we need other effect). But (vs,ps,ffp setup) + shader params change between passes. How to sort RenderObjects in that situation? When there are many objects with the same effect it is more appropriate to render first pass for all of them, then render the other passes in the same manner. When RenderObjects have all different shaders it is more suitable to render them one by one, after completing all passes for the previous object. How to mix that both techniques? I had an idea of splitting effect into passes, and to put passes as separate entities to be sorted... Any other ideas? Second question: the interface of the RenderObject. Now I have just one function that gives the rendering system the minimal data for the sorting job - a DWORD stream (vb1id,vb1offset,vb2id,vb2offset,ib,iboffset,vdeclid,shaderid,difftexid,normtexid,custid1,custid2,...). custidX are for custom shader params, that will sort RenderObjects of one effect pass (same shaderid). Other function is the Setup( SETUP_VB1 | SETUP_VB2 | SETUP_IB | SETUP_SHADER ) function, that tell exactly what is needed to be setup by the RenderObject. The system tracks the usage of resources and calls RenderObject::Setup() only with needed flags. Comments...?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!