Fixed z-fighting issue on the inside of hollow facades and reduced the offset a bit to reduce long-range fighting
This commit is contained in:
parent
f112d90363
commit
eb78ff7efa
1 changed files with 4 additions and 2 deletions
|
@ -159,7 +159,7 @@ public class PipeWorldRenderer {
|
||||||
private void pipeFacadeRenderer(RenderBlocks renderblocks, Block block, PipeRenderState state, int x, int y, int z) {
|
private void pipeFacadeRenderer(RenderBlocks renderblocks, Block block, PipeRenderState state, int x, int y, int z) {
|
||||||
|
|
||||||
float facadeThickness = 1F / 16F;
|
float facadeThickness = 1F / 16F;
|
||||||
float zFightOffset = 1F / 8192F;
|
float zFightOffset = 1F / 4096F;
|
||||||
|
|
||||||
float[][] zeroState = new float[3][2];
|
float[][] zeroState = new float[3][2];
|
||||||
//X START - END
|
//X START - END
|
||||||
|
@ -197,6 +197,7 @@ public class PipeWorldRenderer {
|
||||||
rotated = deepClone(zeroState);
|
rotated = deepClone(zeroState);
|
||||||
rotated[0][0] = 0.0F;
|
rotated[0][0] = 0.0F;
|
||||||
rotated[0][1] = Utils.pipeMinPos;
|
rotated[0][1] = Utils.pipeMinPos;
|
||||||
|
rotated[1][1] -= zFightOffset;
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
@ -204,6 +205,7 @@ public class PipeWorldRenderer {
|
||||||
rotated = deepClone(zeroState);
|
rotated = deepClone(zeroState);
|
||||||
rotated[0][0] = Utils.pipeMaxPos;
|
rotated[0][0] = Utils.pipeMaxPos;
|
||||||
rotated[0][1] = 1F;
|
rotated[0][1] = 1F;
|
||||||
|
rotated[1][1] -= zFightOffset;
|
||||||
transform(rotated, direction);
|
transform(rotated, direction);
|
||||||
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
block.setBlockBounds(rotated[0][0], rotated[1][0], rotated[2][0], rotated[0][1], rotated[1][1], rotated[2][1]);
|
||||||
renderblocks.renderStandardBlock(block, x, y, z);
|
renderblocks.renderStandardBlock(block, x, y, z);
|
||||||
|
|
Loading…
Reference in a new issue