Temp fix for near clip plane going too far in some cases
This commit is contained in:
+4
@@ -187,6 +187,10 @@ public class LodRenderProgram extends ShaderProgram implements IDhApiShaderProgr
|
||||
|
||||
// Clip Uniform
|
||||
float dhNearClipDistance = RenderUtil.getNearClipPlaneDistanceInBlocks(renderParameters.partialTicks);
|
||||
// TODO a different multiplier might be necessary
|
||||
// this is to try and allow the fragment culling to go farther than the near clip plane.
|
||||
// Currently this only works for certain FOV/screen ratio combos.
|
||||
dhNearClipDistance *= 2.0f;
|
||||
setUniform(clipDistanceUniform, dhNearClipDistance);
|
||||
}
|
||||
|
||||
|
||||
@@ -186,13 +186,7 @@ public class RenderUtil
|
||||
public static float getNearClipPlaneDistanceInBlocks(float partialTicks)
|
||||
{
|
||||
int chunkRenderDistance = MC_RENDER.getRenderDistance();
|
||||
if (chunkRenderDistance % 2 == 0)
|
||||
{
|
||||
chunkRenderDistance += 1;
|
||||
}
|
||||
|
||||
int vanillaBlockRenderedDistance = chunkRenderDistance * LodUtil.CHUNK_WIDTH;
|
||||
vanillaBlockRenderedDistance *= 2;
|
||||
|
||||
float nearClipPlane;
|
||||
if (Config.Client.Advanced.Debugging.lodOnlyMode.get())
|
||||
|
||||
Reference in New Issue
Block a user