mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-22 13:09:59 +00:00
Remove redundant rendering options (#10140)
This commit is contained in:
1 parent
de587eb50a
commit
b8f5e4553b
4 files changed
+4
-51
No files matched your search
@@ -11,18 +11,11 @@
|
||||
}
|
||||
|
||||
this.setFilterMode(9728, true);
|
||||
@@ -106,8 +_,13 @@
|
||||
GlStateManager._texImage2D(3553, 0, 32856, this.width, this.height, 0, 6408, 5121, null);
|
||||
GlStateManager._glBindFramebuffer(36160, this.frameBufferId);
|
||||
@@ -108,6 +_,7 @@
|
||||
GlStateManager._glFramebufferTexture2D(36160, 36064, 3553, this.colorTextureId, 0);
|
||||
- if (this.useDepth) {
|
||||
+ if (this.useDepth && !stencilEnabled) {
|
||||
if (this.useDepth) {
|
||||
GlStateManager._glFramebufferTexture2D(36160, 36096, 3553, this.depthBufferId, 0);
|
||||
+ } else if(this.useDepth && 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.depthBufferId, 0);
|
||||
+ } else if (this.useDepth) {
|
||||
+ GlStateManager._glFramebufferTexture2D(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER, org.lwjgl.opengl.GL30.GL_DEPTH_ATTACHMENT, 3553, this.depthBufferId, 0);
|
||||
+ GlStateManager._glFramebufferTexture2D(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER, org.lwjgl.opengl.GL30.GL_STENCIL_ATTACHMENT, 3553, this.depthBufferId, 0);
|
||||
+ if (stencilEnabled) GlStateManager._glFramebufferTexture2D(org.lwjgl.opengl.GL30.GL_FRAMEBUFFER, org.lwjgl.opengl.GL30.GL_STENCIL_ATTACHMENT, 3553, this.depthBufferId, 0);
|
||||
}
|
||||
|
||||
this.checkStatus();
|
||||
|
||||
@@ -177,15 +177,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1112,7 +_,7 @@
|
||||
boolean flag = false;
|
||||
if (this.minecraft.options.prioritizeChunkUpdates().get() == PrioritizeChunkUpdates.NEARBY) {
|
||||
BlockPos blockpos1 = sectionrenderdispatcher$rendersection.getOrigin().offset(8, 8, 8);
|
||||
- flag = blockpos1.distSqr(blockpos) < 768.0 || sectionrenderdispatcher$rendersection.isDirtyFromPlayer();
|
||||
+ flag = !net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() && (blockpos1.distSqr(blockpos) < 768.0D || sectionrenderdispatcher$rendersection.isDirtyFromPlayer()); // the target is the else block below, so invert the forge addition to get there early
|
||||
} else if (this.minecraft.options.prioritizeChunkUpdates().get() == PrioritizeChunkUpdates.PLAYER_AFFECTED) {
|
||||
flag = sectionrenderdispatcher$rendersection.isDirtyFromPlayer();
|
||||
}
|
||||
@@ -1391,7 +_,7 @@
|
||||
} else {
|
||||
int i = p_109538_.getBrightness(LightLayer.SKY, p_109540_);
|
||||
|
||||
@@ -447,7 +447,7 @@ public class ForgeHooksClient {
|
||||
// TODO Do we need this?
|
||||
public static void fillNormal(int[] faceData, Direction facing, boolean calculateNormals) {
|
||||
Vector3f v2;
|
||||
if (calculateNormals || ForgeConfig.CLIENT.calculateAllNormals()) {
|
||||
if (calculateNormals) {
|
||||
Vector3f v1 = getVertexPos(faceData, 3);
|
||||
Vector3f t1 = getVertexPos(faceData, 1);
|
||||
v2 = getVertexPos(faceData, 2);
|
||||
|
||||
@@ -94,27 +94,14 @@ public class ForgeConfig {
|
||||
* Client specific configuration - only loaded clientside from forge-client.toml
|
||||
*/
|
||||
public static class Client {
|
||||
public final BooleanValue alwaysSetupTerrainOffThread;
|
||||
|
||||
public final BooleanValue experimentalForgeLightPipelineEnabled;
|
||||
|
||||
public final BooleanValue showLoadWarnings;
|
||||
|
||||
public final BooleanValue useCombinedDepthStencilAttachment;
|
||||
|
||||
public final BooleanValue calculateAllNormals;
|
||||
|
||||
Client(ForgeConfigSpec.Builder builder) {
|
||||
builder.comment("Client only settings, mostly things related to rendering")
|
||||
.push("client");
|
||||
|
||||
alwaysSetupTerrainOffThread = builder
|
||||
.comment("Enable Forge to queue all chunk updates to the Chunk Update thread.",
|
||||
"May increase FPS significantly, but may also cause weird rendering lag.",
|
||||
"Not recommended for computers without a significant number of cores available.")
|
||||
.translation("forge.configgui.alwaysSetupTerrainOffThread")
|
||||
.define("alwaysSetupTerrainOffThread", false);
|
||||
|
||||
experimentalForgeLightPipelineEnabled = builder
|
||||
.comment("EXPERIMENTAL: Enable the Forge block rendering pipeline - fixes the lighting of custom models.")
|
||||
.translation("forge.configgui.forgeLightPipelineEnabled")
|
||||
@@ -125,29 +112,11 @@ public class ForgeConfig {
|
||||
.translation("forge.configgui.showLoadWarnings")
|
||||
.define("showLoadWarnings", true);
|
||||
|
||||
useCombinedDepthStencilAttachment = builder
|
||||
.comment("Set to true to use a combined DEPTH_STENCIL attachment instead of two separate ones.")
|
||||
.translation("forge.configgui.useCombinedDepthStencilAttachment")
|
||||
.define("useCombinedDepthStencilAttachment", false);
|
||||
|
||||
calculateAllNormals = builder
|
||||
.comment("During block model baking, manually calculates the normal for all faces.",
|
||||
"This was the default behavior of forge between versions 31.0 and 47.1.",
|
||||
"May result in differences between vanilla rendering and forge rendering.",
|
||||
"Will only produce differences for blocks that contain non-axis aligned faces.",
|
||||
"You will need to reload your resources to see results.")
|
||||
.translation("forge.configgui.calculateAllNormals")
|
||||
.define("calculateAllNormals", false);
|
||||
|
||||
builder.pop();
|
||||
}
|
||||
|
||||
// Allow these to be called before the config is loaded because its used before loading the error screens.
|
||||
// Prevents a ton of spam when an error screen is displayed.
|
||||
public final boolean calculateAllNormals() {
|
||||
return clientSpec.isLoaded() ? calculateAllNormals.get() : calculateAllNormals.getDefault();
|
||||
}
|
||||
|
||||
public final boolean showLoadWarnings() {
|
||||
return clientSpec.isLoaded() ? showLoadWarnings.get() : showLoadWarnings.getDefault();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user