Increased far plane.

This commit is contained in:
Andrew Lalis 2022-07-07 01:27:50 +02:00
parent d5bed83e86
commit e66c94680d
2 changed files with 3 additions and 1 deletions

View File

@ -83,6 +83,8 @@ public class Client implements Runnable {
if (glfwGetKey(windowHandle, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS) cam.move(Camera.DOWN); if (glfwGetKey(windowHandle, GLFW_KEY_LEFT_SHIFT) == GLFW_PRESS) cam.move(Camera.DOWN);
} }
communicationHandler.shutdown();
chunkRenderer.free(); chunkRenderer.free();
WindowUtils.clearUI(windowHandle); WindowUtils.clearUI(windowHandle);
} }

View File

@ -27,7 +27,7 @@ public class ChunkRenderer {
private final List<ChunkMesh> chunkMeshes = new ArrayList<>(); private final List<ChunkMesh> chunkMeshes = new ArrayList<>();
public ChunkRenderer(int windowWidth, int windowHeight) { public ChunkRenderer(int windowWidth, int windowHeight) {
this.projectionTransform = new Matrix4f().perspective(70, (float) windowWidth / (float) windowHeight, 0.01f, 100.0f); this.projectionTransform = new Matrix4f().perspective(70, (float) windowWidth / (float) windowHeight, 0.01f, 500.0f);
this.shaderProgram = new ShaderProgram.Builder() this.shaderProgram = new ShaderProgram.Builder()
.withShader("shader/chunk/vertex.glsl", GL_VERTEX_SHADER) .withShader("shader/chunk/vertex.glsl", GL_VERTEX_SHADER)
.withShader("shader/chunk/fragment.glsl", GL_FRAGMENT_SHADER) .withShader("shader/chunk/fragment.glsl", GL_FRAGMENT_SHADER)