gpu: increase texture limit

This commit is contained in:
Max Weber
2021-05-19 05:17:39 -06:00
parent 9a5c9053a7
commit 401fbf3ca4
2 changed files with 3 additions and 3 deletions

View File

@@ -218,7 +218,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
private int textureArrayId;
private final GLBuffer uniformBuffer = new GLBuffer();
private final float[] textureOffsets = new float[128];
private final float[] textureOffsets = new float[256];
private GpuIntBuffer vertexBuffer;
private GpuFloatBuffer uvBuffer;
@@ -1198,7 +1198,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
// Bind uniforms
gl.glUniformBlockBinding(glProgram, uniBlockMain, 0);
gl.glUniform1i(uniTextures, 1); // texture sampler array is bound to texture1
gl.glUniform2fv(uniTextureOffsets, 128, textureOffsets, 0);
gl.glUniform2fv(uniTextureOffsets, textureOffsets.length, textureOffsets, 0);
// We just allow the GL to do face culling. Note this requires the priority renderer
// to have logic to disregard culled faces in the priority depth testing.

View File

@@ -25,7 +25,7 @@
#version 330
uniform sampler2DArray textures;
uniform vec2 textureOffsets[64];
uniform vec2 textureOffsets[128];
uniform float brightness;
uniform float smoothBanding;
uniform vec4 fogColor;