mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
fix black screen in water
This commit is contained in:
parent
1be79b746f
commit
f082d7608d
1 changed files with 7 additions and 2 deletions
|
|
@ -470,11 +470,16 @@ void WorldRenderer::renderFrame(
|
||||||
setupWorldShader(entityShader, hudcam, engine.getSettings(), 0.0f);
|
setupWorldShader(entityShader, hudcam, engine.getSettings(), 0.0f);
|
||||||
hands->render(camera);
|
hands->render(camera);
|
||||||
}
|
}
|
||||||
renderBlockOverlay(pctx);
|
{
|
||||||
|
auto bctx = pctx.sub();
|
||||||
|
bctx.useTexture(advanced_pipeline::TARGET_COLOR, nullptr);
|
||||||
|
renderBlockOverlay(pctx);
|
||||||
|
}
|
||||||
glActiveTexture(GL_TEXTURE0);
|
glActiveTexture(GL_TEXTURE0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
void WorldRenderer::renderBlockOverlay(const DrawContext& wctx) {
|
void WorldRenderer::renderBlockOverlay(const DrawContext& wctx) {
|
||||||
int x = std::floor(player.currentCamera->position.x);
|
int x = std::floor(player.currentCamera->position.x);
|
||||||
int y = std::floor(player.currentCamera->position.y);
|
int y = std::floor(player.currentCamera->position.y);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue