[1.16.5] Fix shaders breaking almost every overlay that uses textures, fixes #7575 (#7624)

This commit is contained in:
Dennis C authored and GitHub committed 2021-02-14 19:11:46 -08:00
1 parent d16a8d6d5d
commit 007cd42ec6
3 files changed
+34 -4

No files matched your search

@@ -18,7 +18,15 @@
}
}
@@ -486,7 +488,7 @@
@@ -439,6 +441,7 @@
RenderSystem.loadIdentity();
this.field_147707_d.func_148018_a(p_195458_1_);
RenderSystem.popMatrix();
+ RenderSystem.enableTexture(); //FORGE: Fix MC-194675
}
this.field_78531_r.func_147110_a().func_147610_a(true);
@@ -486,7 +489,7 @@
}
} else if (this.field_78531_r.field_71462_r != null) {
try {
@@ -27,7 +35,7 @@
} catch (Throwable throwable) {
CrashReport crashreport1 = CrashReport.func_85055_a(throwable, "Rendering screen");
CrashReportCategory crashreportcategory1 = crashreport1.func_85058_a("Screen render details");
@@ -595,9 +597,16 @@
@@ -595,9 +598,16 @@
Matrix4f matrix4f = matrixstack.func_227866_c_().func_227870_a_();
this.func_228379_a_(matrix4f);
activerenderinfo.func_216772_a(this.field_78531_r.field_71441_e, (Entity)(this.field_78531_r.func_175606_aa() == null ? this.field_78531_r.field_71439_g : this.field_78531_r.func_175606_aa()), !this.field_78531_r.field_71474_y.func_243230_g().func_243192_a(), this.field_78531_r.field_71474_y.func_243230_g().func_243193_b(), p_228378_1_);
@@ -44,7 +52,7 @@
this.field_78531_r.func_213239_aq().func_219895_b("hand");
if (this.field_175074_C) {
RenderSystem.clear(256, Minecraft.field_142025_a);
@@ -709,4 +718,9 @@
@@ -709,4 +719,9 @@
public OverlayTexture func_228385_m_() {
return this.field_228375_t_;
}
@@ -0,0 +1,20 @@
package net.minecraftforge.debug.client.rendering;
import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
@Mod("shader_fix_test")
@Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
public class ShaderFixTest
{
@SubscribeEvent
public static void clientSetup(final FMLClientSetupEvent event)
{
ClientRegistry.registerEntityShader(ClientPlayerEntity.class, new ResourceLocation("shaders/post/desaturate.json"));
}
}
+3 -1
View File
@@ -109,4 +109,6 @@ license="LGPL v2.1"
[[mods]]
modId="item_modifier_test"
[[mods]]
modId="worldgen_registry_desync_test"
modId="shader_fix_test"
[[mods]]
modId="worldgen_registry_desync_test"