Transparency should work but it doesn't

This commit is contained in:
morippi
2022-07-21 18:46:08 +02:00
parent 5e99efe093
commit db72d1cdc2
3 changed files with 4 additions and 4 deletions
@@ -179,7 +179,7 @@ public class LodBox
boolean isAdjTransparent = DataPointUtil.isTransparent(adjPoint);
// TODO transparency ocean floor fix
if (!isTransparent && isAdjTransparent)
continue;
continue;
short height = DataPointUtil.getHeight(adjPoint);
short depth = DataPointUtil.getDepth(adjPoint);
@@ -330,7 +330,7 @@ public class RenderRegion implements AutoCloseable
// We avoid cases where the adjPosition is in player chunk while the position is
// not
// to always have a wall underwater
for (int transparency = 0; transparency < 2; transparency++)
for (int transparency = 0; transparency <= 1; transparency++)
{
for (LodDirection lodDirection : LodDirection.ADJ_DIRECTIONS) {
try {
@@ -396,7 +396,7 @@ public class RenderRegion implements AutoCloseable
// We only stop when we find a block that is void or non-existing block
for (int i = 0; i < posData.length; i++) {
long data = posData[i];
if (DataPointUtil.isTransparent(data) == (transparency == 1))
if (DataPointUtil.isTransparent(data) == (transparency == 0))
continue;
// If the data is not renderable (Void or non-existing) we stop since there is
// no data left in this position
@@ -270,7 +270,7 @@ public class LodRenderer
GL32.glBlendFunc(GL32.GL_SRC_ALPHA, GL32.GL_ONE_MINUS_SRC_ALPHA);
GL32.glEnable(GL32.GL_BLEND);
GL32.glDisable(GL32.GL_BLEND);
//GL32.glDisable(GL32.GL_BLEND);
GL32.glClear(GL32.GL_DEPTH_BUFFER_BIT);
/*---------Bind required objects--------*/