Skip to main content
gamedev.net
🔒 Locked

Sorting order...

Started by Freaky 4 replies 450+ views
Original Post
Freaky
Freaky
I have been wondering what the correct rendering order for a game engine is. I have read about sorting on shaders and making sure you try to limit texture changes by sorting them after the shader sorting pass. I always thought this was the correct thing to do. But, earlier this week I''ve seen a engine which sorts by shadow volume first, then by texture and later on by the textures. Is this a more effective way of doing things. The author states that redetermining the shadow volume kills performance. By sorting by shadow volume he eliminates this because the shadow volume is calculated only once and is then available. I was wondering on how other GDnetters are doing their rendering sorting. And if you have any comments on sorting by shadow volume then that''s okay too - Freaky
sirSolarius
sirSolarius
I''m also interested in this... there''s also sorting by z, which would allow the graphics card to quickly reject obscured pixels.
Etnu
Etnu
The best rendering method is going to depend completely on what your engine does.
I''m sure the optimal sort order for Doom III is a lot different from the optimal sort order for a Final Fantasy game.

It''s probably a trial and error type of thing.
---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.
Infinisearch
Infinisearch
Freaky where did you read about that sort by shadow volume first thing?
-potential energy is easily made kinetic-
Freaky
Freaky
That''s a problem, I can''t remember anymore

If something pops in mind then i''ll post it here...

- Freaky
OrangyTang
OrangyTang
Usually some sort of sorting is imposed by your lighting method anyway, to the extent that its not really sorting - its just the way an algorithm works.

With shadow volumes (and to a lesser extent shadow maps) you end up doing a pass per light (and associated shadows). Then you''ll be rendering all appropriate geometry with whatever state sorting works best for you.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.