Skip to content

Commit

Permalink
Use global stencil state
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Jan 14, 2025
1 parent 7946bfc commit 42746f0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
--- a/net/minecraft/client/renderer/LevelRenderer.java
+++ b/net/minecraft/client/renderer/LevelRenderer.java
@@ -459,7 +_,8 @@
@@ -459,7 +_,7 @@
this.targets.main = framegraphbuilder.importExternal("main", this.minecraft.getMainRenderTarget());
int i = this.minecraft.getMainRenderTarget().width;
int j = this.minecraft.getMainRenderTarget().height;
- RenderTargetDescriptor rendertargetdescriptor = new RenderTargetDescriptor(i, j, true);
+ boolean useStencil = this.minecraft.getMainRenderTarget().useStencil;
+ RenderTargetDescriptor rendertargetdescriptor = new RenderTargetDescriptor(i, j, true, useStencil);
+ RenderTargetDescriptor rendertargetdescriptor = new RenderTargetDescriptor(i, j, true, net.neoforged.neoforge.client.ClientHooks.isStencilEnabled());
PostChain postchain = this.getTransparencyChain();
if (postchain != null) {
this.targets.translucent = framegraphbuilder.createInternal("translucent", rendertargetdescriptor);
Expand Down

0 comments on commit 42746f0

Please sign in to comment.