From f05497a28ca72496ba3e4e8a38bc34b14b7e3369 Mon Sep 17 00:00:00 2001 From: JozsefA Date: Sun, 24 Jan 2021 01:07:22 -0800 Subject: [PATCH] okay the synchronized functions didn't actually fix it but now we actually benefit from the tile entity render filtering, another 2x ish performance --- .../content/contraptions/base/KineticTileEntityRenderer.java | 5 ----- .../content/contraptions/relays/belt/BeltRenderer.java | 5 ----- .../simibubi/create/foundation/render/light/LightVolume.java | 3 ++- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java index 4f969416b..fe5f8387c 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/base/KineticTileEntityRenderer.java @@ -35,11 +35,6 @@ public class KineticTileEntityRenderer extends SafeTileEntityRenderer impleme public BeltRenderer(TileEntityRendererDispatcher dispatcher) { super(dispatcher); } - - @Override - public boolean isGlobalRenderer(BeltTileEntity te) { - return BeltBlock.canTransportObjects(te.getBlockState()); - } @Override protected void renderSafe(BeltTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffer, diff --git a/src/main/java/com/simibubi/create/foundation/render/light/LightVolume.java b/src/main/java/com/simibubi/create/foundation/render/light/LightVolume.java index 54b56b982..836139b49 100644 --- a/src/main/java/com/simibubi/create/foundation/render/light/LightVolume.java +++ b/src/main/java/com/simibubi/create/foundation/render/light/LightVolume.java @@ -178,12 +178,13 @@ public class LightVolume { GL11.glTexParameteri(GL13.GL_TEXTURE_3D, GL13.GL_TEXTURE_WRAP_T, GL20.GL_MIRRORED_REPEAT); if (bufferDirty) { uploadTexture(); - bufferDirty = false; } } private synchronized void uploadTexture() { + lightData.rewind(); GL12.glTexImage3D(GL12.GL_TEXTURE_3D, 0, GL40.GL_RG8, textureVolume.sizeX(), textureVolume.sizeY(), textureVolume.sizeZ(), 0, GL40.GL_RG, GL40.GL_UNSIGNED_BYTE, lightData); + bufferDirty = false; } public void release() {