disable depth wirte for blended, less or equal depth func for seethrough

This commit is contained in:
veclav talica 2024-07-29 00:08:53 +03:00
parent 3edd692771
commit 8a0f767002

View File

@ -159,11 +159,11 @@ static void render_sprites(const struct primitive_2d primitives[],
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDepthFunc(GL_ALWAYS);
glDepthMask(GL_TRUE);
glDepthMask(GL_FALSE);
glDisable(GL_ALPHA_TEST);
} else if (batch.mode == TEXTURE_MODE_SEETHROUGH) {
glDisable(GL_BLEND);
glDepthFunc(GL_ALWAYS);
glDepthFunc(GL_LEQUAL);
glDepthMask(GL_TRUE);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_EQUAL, 1.0f);