From a3f561b1d8951fc375d9aa5435f83ebc5c91cc58 Mon Sep 17 00:00:00 2001 From: IMS212 Date: Fri, 26 Jan 2024 05:34:57 -0800 Subject: [PATCH] Sodium 0.5.6 support --- buildscript/src/main/java/Buildscript.java | 4 +- .../mixin/vertices/MixinBufferBuilder.java | 106 ++++++++---------- src/main/resources/fabric.mod.json | 2 +- .../IrisChunkProgramOverrides.java | 2 +- .../IrisChunkMeshAttributes.java | 4 - .../terrain_xhfp/XHFPModelVertexType.java | 24 +++- .../mixin/options/MixinSodiumGameOptions.java | 4 +- .../MixinChunkMeshAttribute.java | 22 +--- .../MixinRegionChunkRenderer.java | 9 +- 9 files changed, 84 insertions(+), 93 deletions(-) diff --git a/buildscript/src/main/java/Buildscript.java b/buildscript/src/main/java/Buildscript.java index 15ddc59234..c540e5da0b 100644 --- a/buildscript/src/main/java/Buildscript.java +++ b/buildscript/src/main/java/Buildscript.java @@ -44,9 +44,9 @@ public class Buildscript extends SimpleFabricProject { static final boolean SODIUM = true; - static final boolean CUSTOM_SODIUM = false; + static final boolean CUSTOM_SODIUM = true; static final String MC_VERSION = "1.20.4"; - static final String customSodiumName = "sodium-fabric-mc23w45a-0.5.3git.86b69d2-dirty.jar"; + static final String customSodiumName = "sodium-fabric-mc1.20.3-0.5.6git.7a62284.jar"; private static final String[] SOURCE_SETS = new String[] { "main", diff --git a/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java b/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java index 1402a9893a..5b8ae15471 100644 --- a/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java +++ b/src/main/java/net/coderbot/iris/mixin/vertices/MixinBufferBuilder.java @@ -7,11 +7,7 @@ import com.mojang.blaze3d.vertex.VertexConsumer; import com.mojang.blaze3d.vertex.VertexFormat; import com.mojang.blaze3d.vertex.VertexFormatElement; -import net.caffeinemc.mods.sodium.api.vertex.attributes.CommonVertexAttribute; -import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatDescription; -import net.caffeinemc.mods.sodium.api.vertex.format.VertexFormatRegistry; import net.coderbot.iris.block_rendering.BlockRenderingSettings; -import net.coderbot.iris.compat.sodium.impl.vertex_format.IrisCommonVertexAttributes; import org.joml.Vector3f; import net.coderbot.iris.vertices.NormI8; import org.jetbrains.annotations.NotNull; @@ -23,7 +19,6 @@ import net.coderbot.iris.vertices.IrisVertexFormats; import net.coderbot.iris.vertices.NormalHelper; import org.jetbrains.annotations.Nullable; -import org.lwjgl.system.MemoryUtil; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Unique; @@ -99,9 +94,15 @@ public abstract class MixinBufferBuilder extends DefaultedVertexConsumer impleme @Shadow public abstract void begin(VertexFormat.Mode drawMode, VertexFormat vertexFormat); + @Shadow + public abstract void putShort(int i, short s); + @Shadow protected abstract void switchFormat(VertexFormat arg); + @Shadow + public abstract void nextElement(); + @Override public void iris$beginWithoutExtending(VertexFormat.Mode drawMode, VertexFormat vertexFormat) { iris$shouldNotExtend = true; @@ -138,6 +139,12 @@ public abstract class MixinBufferBuilder extends DefaultedVertexConsumer impleme } } + @Override + public @NotNull VertexConsumer uv2(int pBufferVertexConsumer0, int pInt1) { + + return BufferVertexConsumer.super.uv2(pBufferVertexConsumer0, pInt1); + } + @ModifyArg(method = "begin", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/BufferBuilder;switchFormat(Lcom/mojang/blaze3d/vertex/VertexFormat;)V")) private VertexFormat iris$afterBeginSwitchFormat(VertexFormat arg) { if (extending) { @@ -164,39 +171,12 @@ public abstract class MixinBufferBuilder extends DefaultedVertexConsumer impleme vertexCount = 0; } - @Unique - private int uv1Offset, normalOffset, tangentOffset, midTexOffset, midBlockOffset, blockIdOffset, entityIdOffset; - @Inject(method = "switchFormat", at = @At("RETURN")) private void iris$preventHardcodedVertexWriting(VertexFormat format, CallbackInfo ci) { if (!extending) { return; } - VertexFormatDescription formatDescription = VertexFormatRegistry.instance() - .get(format); - - if (formatDescription.containsElement(CommonVertexAttribute.OVERLAY)) { - this.uv1Offset = formatDescription.getElementOffset(CommonVertexAttribute.OVERLAY); - } - if (formatDescription.containsElement(CommonVertexAttribute.NORMAL)) { - this.normalOffset = formatDescription.getElementOffset(CommonVertexAttribute.NORMAL); - } - if (formatDescription.containsElement(IrisCommonVertexAttributes.TANGENT)) { - this.tangentOffset = formatDescription.getElementOffset(IrisCommonVertexAttributes.TANGENT); - } - if (formatDescription.containsElement(IrisCommonVertexAttributes.MID_TEX_COORD)) { - this.midTexOffset = formatDescription.getElementOffset(IrisCommonVertexAttributes.MID_TEX_COORD); - } - if (formatDescription.containsElement(IrisCommonVertexAttributes.BLOCK_ID)) { - this.blockIdOffset = formatDescription.getElementOffset(IrisCommonVertexAttributes.BLOCK_ID); - } - if (formatDescription.containsElement(IrisCommonVertexAttributes.ENTITY_ID)) { - this.entityIdOffset = formatDescription.getElementOffset(IrisCommonVertexAttributes.ENTITY_ID); - } - if (formatDescription.containsElement(IrisCommonVertexAttributes.MID_BLOCK)) { - this.midBlockOffset = formatDescription.getElementOffset(IrisCommonVertexAttributes.MID_BLOCK); - } fastFormat = false; fullFormat = false; } @@ -207,30 +187,39 @@ public abstract class MixinBufferBuilder extends DefaultedVertexConsumer impleme return; } - if (injectNormalAndUV1) { - this.normal(0, 0, 0); + if (injectNormalAndUV1 && currentElement == DefaultVertexFormat.ELEMENT_NORMAL) { + this.putInt(0, 0); + this.nextElement(); } if (iris$isTerrain) { // ENTITY_ELEMENT - long offset = MemoryUtil.memAddress(buffer, nextElementByte + blockIdOffset); - MemoryUtil.memPutShort(offset, currentBlock); - MemoryUtil.memPutShort(offset + 2, currentRenderType); + this.putShort(0, currentBlock); + this.putShort(2, currentRenderType); } else { // ENTITY_ELEMENT - long offset = MemoryUtil.memAddress(buffer, nextElementByte + entityIdOffset); - MemoryUtil.memPutShort(offset, (short) CapturedRenderingState.INSTANCE.getCurrentRenderedEntity()); - MemoryUtil.memPutShort(offset + 2, (short) CapturedRenderingState.INSTANCE.getCurrentRenderedBlockEntity()); - MemoryUtil.memPutShort(offset + 4, (short) CapturedRenderingState.INSTANCE.getCurrentRenderedItem()); + this.putShort(0, (short) CapturedRenderingState.INSTANCE.getCurrentRenderedEntity()); + this.putShort(2, (short) CapturedRenderingState.INSTANCE.getCurrentRenderedBlockEntity()); + this.putShort(4, (short) CapturedRenderingState.INSTANCE.getCurrentRenderedItem()); } + this.nextElement(); + + // MID_TEXTURE_ELEMENT + this.putFloat(0, 0); + this.putFloat(4, 0); + this.nextElement(); + // TANGENT_ELEMENT + this.putInt(0, 0); + this.nextElement(); if (iris$isTerrain) { // MID_BLOCK_ELEMENT - long bufferIndex = MemoryUtil.memAddress(buffer, nextElementByte); - float x = MemoryUtil.memGetFloat(bufferIndex); - float y = MemoryUtil.memGetFloat(bufferIndex + 4); - float z = MemoryUtil.memGetFloat(bufferIndex + 8); - MemoryUtil.memPutInt(MemoryUtil.memAddress(buffer, nextElementByte + midBlockOffset), ExtendedDataHelper.computeMidBlock(x, y, z, currentLocalPosX, currentLocalPosY, currentLocalPosZ)); + int posIndex = this.nextElementByte - 48; + float x = buffer.getFloat(posIndex); + float y = buffer.getFloat(posIndex + 4); + float z = buffer.getFloat(posIndex + 8); + this.putInt(0, ExtendedDataHelper.computeMidBlock(x, y, z, currentLocalPosX, currentLocalPosY, currentLocalPosZ)); + this.nextElement(); } vertexCount++; @@ -246,9 +235,7 @@ private void fillExtendedData(int vertexAmount) { int stride = format.getVertexSize(); - int offset = nextElementByte + stride; - - polygon.setup(buffer, offset, stride, vertexAmount); + polygon.setup(buffer, nextElementByte, stride, vertexAmount); float midU = 0; float midV = 0; @@ -281,13 +268,13 @@ private void fillExtendedData(int vertexAmount) { // NormalHelper.computeFaceNormalTri(normal, polygon); // Removed to enable smooth shaded triangles. Mods rendering triangles with bad normals need to recalculate their normals manually or otherwise shading might be inconsistent. for (int vertex = 0; vertex < vertexAmount; vertex++) { - int packedNormal = buffer.getInt(offset - normalOffset - stride * vertex); // retrieve per-vertex normal + int packedNormal = buffer.getInt(nextElementByte - normalOffset - stride * vertex); // retrieve per-vertex normal int tangent = NormalHelper.computeTangentSmooth(NormI8.unpackX(packedNormal), NormI8.unpackY(packedNormal), NormI8.unpackZ(packedNormal), polygon); - buffer.putFloat(offset - midUOffset - stride * vertex, midU); - buffer.putFloat(offset - midVOffset - stride * vertex, midV); - buffer.putInt(offset - tangentOffset - stride * vertex, tangent); + buffer.putFloat(nextElementByte - midUOffset - stride * vertex, midU); + buffer.putFloat(nextElementByte - midVOffset - stride * vertex, midV); + buffer.putInt(nextElementByte - tangentOffset - stride * vertex, tangent); } } else { NormalHelper.computeFaceNormal(normal, polygon); @@ -295,10 +282,10 @@ private void fillExtendedData(int vertexAmount) { int tangent = NormalHelper.computeTangent(normal.x, normal.y, normal.z, polygon); for (int vertex = 0; vertex < vertexAmount; vertex++) { - buffer.putFloat(offset - midUOffset - stride * vertex, midU); - buffer.putFloat(offset - midVOffset - stride * vertex, midV); - buffer.putInt(offset - normalOffset - stride * vertex, packedNormal); - buffer.putInt(offset - tangentOffset - stride * vertex, tangent); + buffer.putFloat(nextElementByte - midUOffset - stride * vertex, midU); + buffer.putFloat(nextElementByte - midVOffset - stride * vertex, midV); + buffer.putInt(nextElementByte - normalOffset - stride * vertex, packedNormal); + buffer.putInt(nextElementByte - tangentOffset - stride * vertex, tangent); } } } @@ -320,4 +307,9 @@ public void endBlock() { this.currentLocalPosY = 0; this.currentLocalPosZ = 0; } + + @Unique + private void putInt(int i, int value) { + this.buffer.putInt(this.nextElementByte + i, value); + } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 89e0e7fcee..7d05651d15 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -46,7 +46,7 @@ "depends": { "fabricloader": ">=0.12.3", "minecraft": ["1.20.3", "1.20.4"], - "sodium": "0.5.5" + "sodium": "0.5.6" }, "breaks": { diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java index 521440be24..af9baecec9 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/shader_overrides/IrisChunkProgramOverrides.java @@ -255,7 +255,7 @@ private GlProgram createShader(IrisTerrainPass pass, S int handle = ((GlObject) shader).handle(); ShaderBindingContextExt contextExt = (ShaderBindingContextExt) shader; - return new IrisChunkShaderInterface(handle, contextExt, pipeline, new ChunkShaderOptions(ChunkFogMode.SMOOTH, pass.toTerrainPass()), + return new IrisChunkShaderInterface(handle, contextExt, pipeline, new ChunkShaderOptions(ChunkFogMode.SMOOTH, pass.toTerrainPass(), vertexType), tessCShader != null || tessEShader != null, pass == IrisTerrainPass.SHADOW || pass == IrisTerrainPass.SHADOW_CUTOUT, blendOverride, bufferOverrides, alpha, pipeline.getCustomUniforms()); }); } finally { diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java index 7acc12ee5d..e51bcbde08 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/IrisChunkMeshAttributes.java @@ -6,10 +6,6 @@ * Initialized by {@link net.coderbot.iris.compat.sodium.mixin.vertex_format.MixinChunkMeshAttribute} */ public class IrisChunkMeshAttributes { - public static ChunkMeshAttribute POSITION_MATERIAL_MESH; - public static ChunkMeshAttribute COLOR_SHADE; - public static ChunkMeshAttribute BLOCK_TEXTURE; - public static ChunkMeshAttribute LIGHT_TEXTURE; public static ChunkMeshAttribute NORMAL; public static ChunkMeshAttribute TANGENT; public static ChunkMeshAttribute MID_TEX_COORD; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java index 5588199216..c4c282362b 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/impl/vertex_format/terrain_xhfp/XHFPModelVertexType.java @@ -14,16 +14,15 @@ public class XHFPModelVertexType implements ChunkVertexType { public static final int STRIDE = 40; public static final GlVertexFormat VERTEX_FORMAT = GlVertexFormat.builder(ChunkMeshAttribute.class, STRIDE) - .addElement(IrisChunkMeshAttributes.POSITION_MATERIAL_MESH, 0, GlVertexAttributeFormat.UNSIGNED_SHORT, 4, false, true) - .addElement(IrisChunkMeshAttributes.COLOR_SHADE, 8, GlVertexAttributeFormat.UNSIGNED_BYTE, 4, true, false) - .addElement(IrisChunkMeshAttributes.BLOCK_TEXTURE, 12, GlVertexAttributeFormat.UNSIGNED_SHORT, 2, false, false) - .addElement(IrisChunkMeshAttributes.LIGHT_TEXTURE, 16, GlVertexAttributeFormat.UNSIGNED_SHORT, 2, false, true) + .addElement(ChunkMeshAttribute.POSITION_MATERIAL_MESH, 0, GlVertexAttributeFormat.UNSIGNED_SHORT, 4, false, true) + .addElement(ChunkMeshAttribute.COLOR_SHADE, 8, GlVertexAttributeFormat.UNSIGNED_BYTE, 4, true, false) + .addElement(ChunkMeshAttribute.BLOCK_TEXTURE, 12, GlVertexAttributeFormat.UNSIGNED_SHORT, 2, false, false) + .addElement(ChunkMeshAttribute.LIGHT_TEXTURE, 16, GlVertexAttributeFormat.UNSIGNED_SHORT, 2, false, true) .addElement(IrisChunkMeshAttributes.MID_TEX_COORD, 20, GlVertexAttributeFormat.UNSIGNED_SHORT, 2, false, false) .addElement(IrisChunkMeshAttributes.TANGENT, 24, IrisGlVertexAttributeFormat.BYTE, 4, true, false) .addElement(IrisChunkMeshAttributes.NORMAL, 28, IrisGlVertexAttributeFormat.BYTE, 3, true, false) .addElement(IrisChunkMeshAttributes.BLOCK_ID, 32, IrisGlVertexAttributeFormat.SHORT, 2, false, false) .addElement(IrisChunkMeshAttributes.MID_BLOCK, 36, IrisGlVertexAttributeFormat.BYTE, 3, false, false) - .addElement(ChunkMeshAttribute.VERTEX_DATA, 40, IrisGlVertexAttributeFormat.BYTE, 0, false, false) .build(); private static final int POSITION_MAX_VALUE = 65536; @@ -37,6 +36,21 @@ public class XHFPModelVertexType implements ChunkVertexType { private static final float TEXTURE_SCALE = (1.0f / TEXTURE_MAX_VALUE); + @Override + public float getTextureScale() { + return TEXTURE_SCALE; + } + + @Override + public float getPositionScale() { + return MODEL_SCALE; + } + + @Override + public float getPositionOffset() { + return -MODEL_ORIGIN; + } + @Override public GlVertexFormat getVertexFormat() { return VERTEX_FORMAT; diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java index 75310208d8..8c41771e50 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/options/MixinSodiumGameOptions.java @@ -15,8 +15,8 @@ */ @Mixin(SodiumGameOptions.class) public class MixinSodiumGameOptions { - @Inject(method = "writeChanges()V", at = @At("RETURN"), remap = false) - public void iris$writeIrisConfig(CallbackInfo ci) { + @Inject(method = "writeToDisk", at = @At("RETURN"), remap = false) + private static void iris$writeIrisConfig(CallbackInfo ci) { try { if (Iris.getIrisConfig() != null) { Iris.getIrisConfig().save(); diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java index 1131b34869..1d40f2374a 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinChunkMeshAttribute.java @@ -25,30 +25,18 @@ public class MixinChunkMeshAttribute { static { int baseOrdinal = $VALUES.length; - IrisChunkMeshAttributes.POSITION_MATERIAL_MESH - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("POSITION_MATERIAL_MESH", baseOrdinal); - IrisChunkMeshAttributes.COLOR_SHADE - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("COLOR_SHADE", baseOrdinal + 1); - IrisChunkMeshAttributes.BLOCK_TEXTURE - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("BLOCK_TEXTURE", baseOrdinal + 2); - IrisChunkMeshAttributes.LIGHT_TEXTURE - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("LIGHT_TEXTURE", baseOrdinal + 3); IrisChunkMeshAttributes.NORMAL - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("NORMAL", baseOrdinal + 4); + = ChunkMeshAttributeAccessor.createChunkMeshAttribute("NORMAL", baseOrdinal); IrisChunkMeshAttributes.TANGENT - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("TANGENT", baseOrdinal + 5); + = ChunkMeshAttributeAccessor.createChunkMeshAttribute("TANGENT", baseOrdinal + 1); IrisChunkMeshAttributes.MID_TEX_COORD - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("MID_TEX_COORD", baseOrdinal + 6); + = ChunkMeshAttributeAccessor.createChunkMeshAttribute("MID_TEX_COORD", baseOrdinal + 2); IrisChunkMeshAttributes.BLOCK_ID - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("BLOCK_ID", baseOrdinal + 7); + = ChunkMeshAttributeAccessor.createChunkMeshAttribute("BLOCK_ID", baseOrdinal + 3); IrisChunkMeshAttributes.MID_BLOCK - = ChunkMeshAttributeAccessor.createChunkMeshAttribute("MID_BLOCK", baseOrdinal + 8); + = ChunkMeshAttributeAccessor.createChunkMeshAttribute("MID_BLOCK", baseOrdinal + 4); $VALUES = ArrayUtils.addAll($VALUES, - IrisChunkMeshAttributes.POSITION_MATERIAL_MESH, - IrisChunkMeshAttributes.COLOR_SHADE, - IrisChunkMeshAttributes.BLOCK_TEXTURE, - IrisChunkMeshAttributes.LIGHT_TEXTURE, IrisChunkMeshAttributes.NORMAL, IrisChunkMeshAttributes.TANGENT, IrisChunkMeshAttributes.MID_TEX_COORD, diff --git a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinRegionChunkRenderer.java b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinRegionChunkRenderer.java index 3ab5cf1e6a..d20099ebe6 100644 --- a/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinRegionChunkRenderer.java +++ b/src/sodiumCompatibility/java/net/coderbot/iris/compat/sodium/mixin/vertex_format/MixinRegionChunkRenderer.java @@ -7,6 +7,7 @@ import me.jellysquid.mods.sodium.client.gl.tessellation.TessellationBinding; import me.jellysquid.mods.sodium.client.render.chunk.DefaultChunkRenderer; import me.jellysquid.mods.sodium.client.render.chunk.ShaderChunkRenderer; +import me.jellysquid.mods.sodium.client.render.chunk.vertex.format.ChunkMeshAttribute; import me.jellysquid.mods.sodium.client.render.chunk.vertex.format.ChunkVertexType; import net.coderbot.iris.block_rendering.BlockRenderingSettings; import net.coderbot.iris.compat.sodium.impl.IrisChunkShaderBindingPoints; @@ -36,13 +37,13 @@ public MixinRegionChunkRenderer(RenderDevice device, ChunkVertexType vertexType) attributes = new GlVertexAttributeBinding[]{ new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.ATTRIBUTE_POSITION_ID, - vertexFormat.getAttribute(IrisChunkMeshAttributes.POSITION_MATERIAL_MESH)), + vertexFormat.getAttribute(ChunkMeshAttribute.POSITION_MATERIAL_MESH)), new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.ATTRIBUTE_COLOR, - vertexFormat.getAttribute(IrisChunkMeshAttributes.COLOR_SHADE)), + vertexFormat.getAttribute(ChunkMeshAttribute.COLOR_SHADE)), new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.ATTRIBUTE_BLOCK_TEXTURE, - vertexFormat.getAttribute(IrisChunkMeshAttributes.BLOCK_TEXTURE)), + vertexFormat.getAttribute(ChunkMeshAttribute.BLOCK_TEXTURE)), new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.ATTRIBUTE_LIGHT_TEXTURE, - vertexFormat.getAttribute(IrisChunkMeshAttributes.LIGHT_TEXTURE)), + vertexFormat.getAttribute(ChunkMeshAttribute.LIGHT_TEXTURE)), new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.MID_BLOCK, vertexFormat.getAttribute(IrisChunkMeshAttributes.MID_BLOCK)), new GlVertexAttributeBinding(IrisChunkShaderBindingPoints.BLOCK_ID,