fix blocks selection with semi-transparent blocks

This commit is contained in:
MihailRis
2024-11-16 09:30:02 +03:00
parent b28bcf052b
commit 171cbb48d0
2 changed files with 12 additions and 2 deletions
+8 -1
View File
@@ -164,10 +164,18 @@ void WorldRenderer::renderLevel(
particles->render(camera, delta * !pause);
auto& shader = assets.require<Shader>("main");
auto& linesShader = assets.require<Shader>("lines");
setupWorldShader(shader, camera, settings, fogFactor);
chunks->drawChunks(camera, shader);
if (hudVisible) {
renderLines(camera, linesShader, ctx);
}
shader.use();
chunks->drawSortedMeshes(camera, shader);
if (!pause) {
scripting::on_frontend_render();
}
@@ -326,7 +334,6 @@ void WorldRenderer::draw(
ctx, camera, *lineBatch, linesShader, showChunkBorders
);
}
renderLines(camera, linesShader, ctx);
if (player->currentCamera == player->fpCamera) {
renderHands(camera, delta * !pause);
}