Skip to content

Commit

Permalink
Merge branch '1.20.3-dh-api' into 1.20.3-dh
Browse files Browse the repository at this point in the history
  • Loading branch information
IMS212 committed Feb 1, 2024
2 parents 28617df + 127f1a9 commit 03ed0f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,19 @@ public void prepareNewPipeline(NewWorldRenderingPipeline pipeline, boolean dhSha
shadowProgram = null;
}

if (depthTexNoTranslucent != null) {
depthTexNoTranslucent.destroy();
depthTexNoTranslucent = null;
}

if (pipeline.getDHTerrainShader().isEmpty() && pipeline.getDHWaterShader().isEmpty()) {
Iris.logger.warn("No DH shader found in this pack.");
return;
}

createDepthTex(Minecraft.getInstance().getMainRenderTarget().width, Minecraft.getInstance().getMainRenderTarget().height);
translucentDepthDirty = true;

ProgramSource terrain = pipeline.getDHTerrainShader().get();
solidProgram = IrisLodRenderProgram.createProgram(terrain.getName(), false, false, terrain, pipeline.getCustomUniforms(), pipeline);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,8 @@ public void destroy() {

Minecraft.getInstance().getMainRenderTarget().bindWrite(false);

renderTargets.destroy();
DHCompat.clearPipeline();
renderTargets.destroy();

customImages.forEach(GlImage::destroy);

Expand Down

0 comments on commit 03ed0f0

Please sign in to comment.