-
Alpha Decal sorting problem
I'm trying to get decals to work properly, but am having some problems. Namely, they z-fight with each other ( I think, heh ).
First I'm rendering down a lightmap, then using DST_COLOR - SRC_COLOR to apply the wall texture. Next, I render the decals using SRC_ALPHA - ONE_MINUS_SRC_ALPHA...polygonOffset enabled, and depthFunc set to GL_LEQUAL.
At first, I thought they were just being rendered in a more-or-less random order every time, but it seems that the problem happens even when I can guarantee that they are rendered in the exact same order.
Options I've read about:
Use polygonOffset -- actually, I already am doing this but it doesn't seem to be sufficient.
Use a depthfunc of GL_EQUAL -- seems to make the problem worse.
Switch art and blend mode so that you can render the decals using DST_COLOR - SRC_COLOR -- This actually does have some promise, but I can't use this for the blood stains and pools that I need to create...because..they wouldn't ever show up on a completely green/cyan/blue/black type surface...there has to be at least some red in the texture in order to see anything.
Any help would be greatly appreciated.
Thanks in advance.
El Jefe
[This message has been edited by El Jefe (edited 03-11-2002).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules