Jump to content
  • Advertisement
Sign in to follow this  
luasitdown

why need to sort object by ascending distance

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

look ,below is render step of a engine. but why need to sort object ? Can not the renderpipe judge ojbect according to z-buffer? // - update transform hierarchy // - find out front and back plane distances // - collect visible objects and lights // - update node visibility // - sort visible objects by ascending distance // - set viewport, view- and projection transformation // - add affecting lights to rendering device // - set fog and ambient if any

Share this post


Link to post
Share on other sites
Advertisement
It's about saving pixel fill rate. If you draw the closer objects first, the renderer doesn't have to calculate pixel values for stuff that's occluded by those. If you'd draw the distant objects first, the renderer would calculate the complete pixel values for those objects even though they'd be overwritten by closer objects later in the rendering process.

Share this post


Link to post
Share on other sites
Quote:
Original post by Shadowdancer
It's about saving pixel fill rate. If you draw the closer objects first, the renderer doesn't have to calculate pixel values for stuff that's occluded by those. If you'd draw the distant objects first, the renderer would calculate the complete pixel values for those objects even though they'd be overwritten by closer objects later in the rendering process.


Of course, when dealing with alpha blending, the opposite is typically true because you require the background pixels to already be there before you start blending with them.

Share this post


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

  • 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!