Sign in to follow this  
Animaxander

Render direction

Recommended Posts

Hi Im going from homemade Delphi 2D-engines to C# and DirectX9 in a weekend. I find it very hard, but after three days of studying I think I'm more or less capable of working with this. I have a list of objects that I have to render. In what direction do I have to render this. In normal 2D-engines, you go from the back to front, because of the alphachannel. I read somewhere that it is a command mistake with directX. That with Direct3D one should render from front to back. Is this true and how about alphachannels? Kind regards and many thanks Alexander

Share this post


Link to post
Share on other sites
There is some performance benefit from ordering front-to-back with the Z-buffer. This prevents it from having to draw pixels that will later be covered over by something else. However, unless you're using complex shaders or something, it's not worth sorting everything. (One benefit of using something like a BSP tree is that you get sorting cheap)

Basically, if you're just getting started, don't worry about sorting opaque stuff. As long as you use a z-buffer it'll look right.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this