dpsv
01-09-2002, 09:32 AM
Hi,
Please tell me what state (Enabled/Disabled) should be of the following when I have to implement transparency.
a. GL_DEPTH_TEST
b. GL_CULL_FACE
c. GL_ALPHA_TEST
I am rendering the opaqe objects first and then transparent objects. The transparent objects are sorted and split using BSP.
Consider following :
Obj 1 : Alpha-1
Obj 2 : Alpha-2
Obj 3 : Alpha-2
Obj 4 : Alpha-1
Alpha-2 is less (more transparent) than Alpha-1.
While sorting should I sort Obj 1 & 4 together and render, finally sort Obj 2 & 3 and render OR I can collectively sort 1,2,3 & 4 together and render them.
Currently I am sorting & rendering the transparent polygons collectively, but the results are sometimes questionable.
Often I have more than 3,000 transparent polygons which while sorting hang up machine ie out of resources or take lot of time. Which is the fastest algorithm to select the polygon to act as a splitting plane?
Thanks
DP
Please tell me what state (Enabled/Disabled) should be of the following when I have to implement transparency.
a. GL_DEPTH_TEST
b. GL_CULL_FACE
c. GL_ALPHA_TEST
I am rendering the opaqe objects first and then transparent objects. The transparent objects are sorted and split using BSP.
Consider following :
Obj 1 : Alpha-1
Obj 2 : Alpha-2
Obj 3 : Alpha-2
Obj 4 : Alpha-1
Alpha-2 is less (more transparent) than Alpha-1.
While sorting should I sort Obj 1 & 4 together and render, finally sort Obj 2 & 3 and render OR I can collectively sort 1,2,3 & 4 together and render them.
Currently I am sorting & rendering the transparent polygons collectively, but the results are sometimes questionable.
Often I have more than 3,000 transparent polygons which while sorting hang up machine ie out of resources or take lot of time. Which is the fastest algorithm to select the polygon to act as a splitting plane?
Thanks
DP