Archived

This topic is now archived and is closed to further replies.

Jok

Help!

Recommended Posts

I have a problem with alpha blending. I have poly with texture A and poly with texture B. Poly A has all pixels with 50% alpha channel and B has 100% alpha. So i turned on alphablending, turned off z-buffer and rendered polies. First, i rendered poly A, then poly B. I have poly B laying on the poly A, but B poly is further by Z value. But when i render firstly B and then A, i have effect that i wanted: i can see poly B through A. Does it mean i should render polies in special way? Is it possible to render them in random way? I didn''t manage to find out solution in the SDK.

Share this post


Link to post
Share on other sites
The traditional method is to render all opaque (non-translucent, alpha = 1) polygons first, then you sort your translucent objects back-to-front and render them in that order (back-to-front).

There are methods to allow order-independent transparency, but none of which work on all hardware (nVidia has a paper demonstrating this using depth peeling, but it only works on their hardware, as far as I recall. Search their developer subweb)

Muhammad Haggag
Bitwise account: MHaggag -

Share this post


Link to post
Share on other sites