Please,How to fix the alphaBlending objects’s depth problem

Software: Away3D 4.x

tree, Newbie
Posted: 10 June 2012 03:32 AM   Total Posts: 6

i know if alphaBlend is false and set alphaThreshold to 0.5
maybe the depth problem will be better,but..no,is there someother way to make the depth right? or ... the problem will be better in the future vesion?

i want to use lots of object with opacity texture..so,help me please

   

Richard Olsson, Administrator
Posted: 16 June 2012 11:53 AM   Total Posts: 1192   [ # 1 ]

On a GPU usually what you do is just draw everything in any order, and the GPU will figure out how to composite them (which goes on top, and which goes behind) based on the depth buffer.

However, when using alpha transparency, objects must be drawn in the correct order. This means that sorting has to happen on the CPU, and be based on object position rather than happen per-pixel.

Unfortunately, this can result in so called “z-fighting” where two objects take turns being in front of each other based on rounding errors or as the camera moves around. There is no way of solving this with reasonable performance.

However, there are ways that you can “hack” it to affect the sorting algorithm based on your own logic of which should go in front and which should go behind. Here’s another discussion on this topic:

http://away3d.com/forum/viewthread/2623

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X