Please be a bit patient with me as I am still a big OpenGL noob.
I am playing around with the DESCENT engine - maybe someone remembers. I managed to get textures filtered using mipmap and also using alpha for things like explosions.
This ONLY happens if the bitmap has it’s center coordinates BEHIND (from my point of view) such a wall.
Problem is: If an explosion bitmap (always aligned to viewer) is clipped “through” a wall (while the coordinates of the bitmap are BEHIND the wall texture), I the wall becomes invisible on the clipped part.
- The black line represents a wall texture (yes, only one texture)
- The dotted line represents the FOV of the viewer/player
- The red line represents an explosion bitmap which is located “behind” the wall but tru alignment to player is clipped through the wall
- The green line now represents the part of the wall I SHOULD see behind the explosion part which came tru the wall… but it isn’t there.
Here is also a shot from the ectual engine:
I know it’s hard to see on this shot as there is a lot of red (explosion and lava behind the fence). Problem is: Behind that explosion slash bitmap, the fence is not visible…
I think this might be a problem with GL_BLEND? Or is it impossible to “fix” this, when such a clipping is happening? I hope it’s not.
Here are some hopefully important function I set for the rendering:
glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GEQUAL,0.02); glEnable(GL_DEPTH_TEST); glDepthFunc(GL_LEQUAL);
Sorry for asking that stupid… but I hope anyone can help me.
thanks in advance