Upload magma
This commit is contained in:
commit
dfa9ee0b24
5008 changed files with 653442 additions and 0 deletions
|
@ -0,0 +1,56 @@
|
|||
--- a/com/mojang/blaze3d/pipeline/RenderTarget.java
|
||||
+++ b/com/mojang/blaze3d/pipeline/RenderTarget.java
|
||||
@@ -113,7 +_,10 @@
|
||||
GlStateManager._texParameter(3553, 34892, 0);
|
||||
GlStateManager._texParameter(3553, 10242, 33071);
|
||||
GlStateManager._texParameter(3553, 10243, 33071);
|
||||
+ if (!stencilEnabled)
|
||||
GlStateManager._texImage2D(3553, 0, 6402, this.f_83915_, this.f_83916_, 0, 6402, 5126, (IntBuffer)null);
|
||||
+ else
|
||||
+ GlStateManager._texImage2D(3553, 0, org.lwjgl.opengl.GL30.GL_DEPTH32F_STENCIL8, this.f_83915_, this.f_83916_, 0, org.lwjgl.opengl.GL30.GL_DEPTH_STENCIL, org.lwjgl.opengl.GL30.GL_FLOAT_32_UNSIGNED_INT_24_8_REV, null);
|
||||
}
|
||||
|
||||
this.m_83936_(9728);
|
||||
@@ -124,7 +_,14 @@
|
||||
GlStateManager._glBindFramebuffer(36160, this.f_83920_);
|
||||
GlStateManager._glFramebufferTexture2D(36160, 36064, 3553, this.f_83923_, 0);
|
||||
if (this.f_83919_) {
|
||||
+ if(!stencilEnabled)
|
||||
GlStateManager._glFramebufferTexture2D(36160, 36096, 3553, this.f_83924_, 0);
|
||||
+ else if(net.minecraftforge.common.ForgeConfig.CLIENT.useCombinedDepthStencilAttachment.get()) {
|
||||
+ GlStateManager._glFramebufferTexture2D(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER, org.lwjgl.opengl.GL30.GL_DEPTH_STENCIL_ATTACHMENT, 3553, this.f_83924_, 0);
|
||||
+ } else {
|
||||
+ GlStateManager._glFramebufferTexture2D(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER, org.lwjgl.opengl.GL30.GL_DEPTH_ATTACHMENT, 3553, this.f_83924_, 0);
|
||||
+ GlStateManager._glFramebufferTexture2D(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER, org.lwjgl.opengl.GL30.GL_STENCIL_ATTACHMENT, 3553, this.f_83924_, 0);
|
||||
+ }
|
||||
}
|
||||
|
||||
this.m_83949_();
|
||||
@@ -292,4 +_,27 @@
|
||||
public int m_83980_() {
|
||||
return this.f_83924_;
|
||||
}
|
||||
+
|
||||
+ /*================================ FORGE START ================================================*/
|
||||
+ private boolean stencilEnabled = false;
|
||||
+ /**
|
||||
+ * Attempts to enable 8 bits of stencil buffer on this FrameBuffer.
|
||||
+ * Modders must call this directly to set things up.
|
||||
+ * This is to prevent the default cause where graphics cards do not support stencil bits.
|
||||
+ * <b>Make sure to call this on the main render thread!</b>
|
||||
+ */
|
||||
+ public void enableStencil() {
|
||||
+ if(stencilEnabled) return;
|
||||
+ stencilEnabled = true;
|
||||
+ this.m_83941_(f_83917_, f_83918_, net.minecraft.client.Minecraft.f_91002_);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Returns wither or not this FBO has been successfully initialized with stencil bits.
|
||||
+ * If not, and a modder wishes it to be, they must call enableStencil.
|
||||
+ */
|
||||
+ public boolean isStencilEnabled() {
|
||||
+ return this.stencilEnabled;
|
||||
+ }
|
||||
+ /*================================ FORGE END ================================================*/
|
||||
}
|
8
patches/minecraft/com/mojang/blaze3d/pipeline/index.html
Normal file
8
patches/minecraft/com/mojang/blaze3d/pipeline/index.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<html>
|
||||
<head><title>Index of /mirror/src/Magma-1-20-x/patches/minecraft/com/mojang/blaze3d/pipeline/</title></head>
|
||||
<body>
|
||||
<h1>Index of /mirror/src/Magma-1-20-x/patches/minecraft/com/mojang/blaze3d/pipeline/</h1><hr><pre><a href="../">../</a>
|
||||
<a href="RenderTarget.java.patch">RenderTarget.java.patch</a> 07-Oct-2023 14:12 2825
|
||||
</pre><hr><script defer src="https://static.cloudflareinsights.com/beacon.min.js/v84a3a4012de94ce1a686ba8c167c359c1696973893317" integrity="sha512-euoFGowhlaLqXsPWQ48qSkBSCFs3DPRyiwVu3FjR96cMPx+Fr+gpWRhIafcHwqwCqWS42RZhIudOvEI+Ckf6MA==" nonce="b5071d53531dfce169be75e91c3bf7b8" data-cf-beacon='{"rayId":"85f016eabab650c2","version":"2024.2.4","r":1,"token":"583109dda43e47a593fd006526a81120","b":1}' crossorigin="anonymous"></script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue