Fix seeing void through height map oceans

This commit is contained in:
James Seibel
2023-05-16 07:55:24 -05:00
parent b4eda2fc46
commit 824a8f835c
@@ -93,7 +93,14 @@ public class ColumnBox
boolean skipTop = RenderDataPointUtil.doesDataPointExist(topData) && (RenderDataPointUtil.getDepth(topData) == maxY) && !isTopTransparent;
if (!skipTop)
{
builder.addQuadUp(x, maxY, z, xSize, zSize, ColorUtil.applyShade(color, MC.getShade(ELodDirection.UP)), skyLightTop, blockLight);
// if there isn't any data below this LOD, make it opaque to prevent seeing void through transparent blocks
int topColor = color;
if (!RenderDataPointUtil.doesDataPointExist(bottomData))
{
topColor = ColorUtil.setAlpha(color, 255);
}
builder.addQuadUp(x, maxY, z, xSize, zSize, ColorUtil.applyShade(topColor, MC.getShade(ELodDirection.UP)), skyLightTop, blockLight);
}
boolean skipBottom = RenderDataPointUtil.doesDataPointExist(bottomData) && (RenderDataPointUtil.getHeight(bottomData) == y) && !isBottomTransparent;