Skip to content

Commit

Permalink
fixed bug with optifine shaders
Browse files Browse the repository at this point in the history
  • Loading branch information
FalsePattern committed Nov 14, 2024
1 parent 7ced94e commit 57fc786
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ public void toggleEnabled(boolean enabled) {

public void disable() {
resetScale();
unbind();
}

public void enable() {
Expand All @@ -98,12 +97,6 @@ public void bind() {
bTexture.bind();
}

public void unbind() {
rTexture.unbind();
gTexture.unbind();
bTexture.unbind();
}

public void resetScale() {
rTexture.resetScale();
gTexture.resetScale();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ public void resetScale() {
GL13.glActiveTexture(shaderTextureCoordsBinding);
} else {
GL13.glActiveTexture(fixedTextureUnitBinding);
GL11.glEnable(GL11.GL_TEXTURE_2D);
}
val lastMatrixMode = GL11.glGetInteger(GL11.GL_MATRIX_MODE);
GL11.glMatrixMode(GL11.GL_TEXTURE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,9 @@ private void setupColorLightMaps(Minecraft minecraft, IResourceManager resourceM

@Inject(method = "disableLightmap",
at = @At("HEAD"),
cancellable = true,
require = 1)
private void disableLightMaps(double p_78463_1_, CallbackInfo ci) {
LightMap.lightMap().disable();
ci.cancel();
}

@Inject(method = "enableLightmap",
Expand Down

0 comments on commit 57fc786

Please sign in to comment.