aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
diff options
context:
space:
mode:
authorFalsePattern <me@falsepattern.com>2024-01-07 17:50:15 +0100
committermakamys <makamys@outlook.com>2024-01-08 22:49:40 +0100
commit3ee0c611c0d1e9cb8f74182c1dd672dda9cb36b5 (patch)
tree3fcc3a744fe099698bb51b40b715389ab0f94ffb /src/main/java/makamys/neodymium/renderer/ChunkMesh.java
parentcaec6f115cc42e2f2cf73e136892110ba3726251 (diff)
downloadNeodymium-3ee0c611c0d1e9cb8f74182c1dd672dda9cb36b5.tar.gz
Neodymium-3ee0c611c0d1e9cb8f74182c1dd672dda9cb36b5.tar.bz2
Neodymium-3ee0c611c0d1e9cb8f74182c1dd672dda9cb36b5.zip
RPLE shader compat
Diffstat (limited to 'src/main/java/makamys/neodymium/renderer/ChunkMesh.java')
-rw-r--r--src/main/java/makamys/neodymium/renderer/ChunkMesh.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
index 72c20ff..decc90d 100644
--- a/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
+++ b/src/main/java/makamys/neodymium/renderer/ChunkMesh.java
@@ -110,8 +110,12 @@ public class ChunkMesh extends Mesh {
int verticesPerPrimitive = t.drawMode == GL11.GL_QUADS ? 4 : 3;
- int tessellatorVertexSize = Compat.isShaders() ? 18 : Compat.RPLE() ? 12 : 8;
-
+ int tessellatorVertexSize = 8;
+ if (Compat.isShaders())
+ tessellatorVertexSize += 10;
+ if (Compat.RPLE())
+ tessellatorVertexSize += 4;
+
for(int quadI = 0; quadI < t.vertexCount / verticesPerPrimitive; quadI++) {
MeshQuad quad = quadBuf.next();
quad.setState(t.rawBuffer, tessellatorVertexSize, quadI * (verticesPerPrimitive * tessellatorVertexSize), FLAGS, t.drawMode, NeoRegion.toRelativeOffset(-t.xOffset), NeoRegion.toRelativeOffset(-t.yOffset), NeoRegion.toRelativeOffset(-t.zOffset));