Skip to content

Commit

Permalink
Ensure depth test is configured when rendering clouds
Browse files Browse the repository at this point in the history
The state of the depth test prior to cloud rendering is
undefined. After rendering, it is expected to be
disabled again.
  • Loading branch information
jellysquid3 committed Nov 27, 2024
1 parent 87c1bd5 commit a69adec
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ public void render(Camera camera,
RenderSystem.disableCull();
}

RenderSystem.enableDepthTest();
RenderSystem.depthFunc(GL32C.GL_LESS);

// Draw
Expand All @@ -184,6 +185,7 @@ public void render(Camera camera,

// State teardown
RenderSystem.depthFunc(GL32C.GL_LEQUAL);
RenderSystem.disableDepthTest();

if (flat) {
RenderSystem.enableCull();
Expand Down

0 comments on commit a69adec

Please sign in to comment.