Skip to content

Commit

Permalink
Merge branch '1.19.1' into 1.6.2-without-0.4.11
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Jun 6, 2023
2 parents 1d471de + 4a9e483 commit 8b8fe03
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/net/coderbot/iris/gl/IrisRenderSystem.java
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,20 @@ public static void bindSamplerToUnit(int unit, int sampler) {
samplers[unit] = sampler;
}

private static int[] emptyArray = new int[SamplerLimits.get().getMaxTextureUnits()];

public static void unbindAllSamplers() {
boolean usedASampler = false;
for (int i = 0; i < samplers.length; i++) {
if (samplers[i] != 0) {
GL33C.glBindSampler(i, 0);
usedASampler = true;
if (!hasMultibind) GL33C.glBindSampler(i, 0);
samplers[i] = 0;
}
}
if (usedASampler && hasMultibind) {
GL45C.glBindSamplers(0, emptyArray);
}
}


Expand Down

0 comments on commit 8b8fe03

Please sign in to comment.