So I've had the big task or practically re-working our render manager to enable alpha blending.
What this means is that I need to store two lists of render entities: one that has alpha enabled, and another that doesn't. The list of alpha not-enabled is rendered out first, followed by the alpha list.
The small problem is that the alpha enabled entities need to be ordered by their Z-Buffer depth so that they are rendered on top of the others from far to near. The basic maths involved is to follow the transformation pipeline by multiplying each entities world matrix by the current camera view matrix. From here, each entity is positioned in relation to the origin looking down the Z-Axis. To get the Z-Buffer depth, you can then pull it out of the world matrix from the z depth.
To make the sorting easier, I plan to use a priority cue. I think of it as a learning experience. This process needs to take place each frame, because the camera has most likely moved, so I've got to make sure that the function isn't too time hungry.
Monday, December 8, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment