fixed stained glass not rendering the water

This commit is contained in:
Marvelco
2026-04-16 21:26:40 +03:00
parent 4e5b225aba
commit 833e449c8c
7 changed files with 96 additions and 50 deletions
+14
View File
@@ -1550,6 +1550,18 @@ void GameRenderer::renderLevel(float a, int64_t until)
PIXEndNamedEvent();
}
glBlendFunc(GL_ZERO, GL_ONE);
PIXBeginNamedEvent(0,"Third pass level render");
int visibleTopTransparentChunks = levelRenderer->render(cameraEntity, 2, a, updateChunks);
PIXEndNamedEvent();
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if (visibleTopTransparentChunks > 0)
{
PIXBeginNamedEvent(0,"Third pass level direct render");
levelRenderer->renderChunksDirect(2, a);
PIXEndNamedEvent();
}
GL11::glShadeModel(GL11::GL_FLAT);
}
else
@@ -1557,6 +1569,8 @@ void GameRenderer::renderLevel(float a, int64_t until)
PIXBeginNamedEvent(0,"Second pass level render");
levelRenderer->render(cameraEntity, 1, a, updateChunks);
PIXEndNamedEvent();
levelRenderer->render(cameraEntity, 2, a, updateChunks);
PIXEndNamedEvent();
}
// 4J - added - have split out translucent particle rendering so that it happens after the water is rendered, primarily for fireworks