From 5545c14563dd31b3fbf204f53160f56f668ff9d0 Mon Sep 17 00:00:00 2001 From: fayer3 Date: Sun, 3 Nov 2024 23:02:12 +0100 Subject: [PATCH] fix shadows with iris 1.8 beta 5 --- .../mixin/irisshaders/IrisRenderingPipelineVRMixin.java | 8 ++++++++ gradle.properties | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/org/vivecraft/mod_compat_vr/iris/mixin/irisshaders/IrisRenderingPipelineVRMixin.java b/common/src/main/java/org/vivecraft/mod_compat_vr/iris/mixin/irisshaders/IrisRenderingPipelineVRMixin.java index 55d1dda9c..d59a3a72a 100644 --- a/common/src/main/java/org/vivecraft/mod_compat_vr/iris/mixin/irisshaders/IrisRenderingPipelineVRMixin.java +++ b/common/src/main/java/org/vivecraft/mod_compat_vr/iris/mixin/irisshaders/IrisRenderingPipelineVRMixin.java @@ -47,6 +47,14 @@ public class IrisRenderingPipelineVRMixin { } } + @Group(name = "one shadowRenderTargets", min = 1, max = 1) + @Inject(target = @Desc(value = "lambda$new$3", owner = IrisRenderingPipeline.class, ret = ShadowRenderTargets.class, args = PackShadowDirectives.class), at = @At("HEAD"), cancellable = true, remap = false, expect = 0) + private void vivecraft$onlyOneShadowTargetSupplier180b5(CallbackInfoReturnable cir) { + if (!RenderPassType.isVanilla() && ((PipelineManagerExtension) Iris.getPipelineManager()).vivecraft$getShadowRenderTargets() != null) { + cir.setReturnValue((ShadowRenderTargets) ((PipelineManagerExtension) Iris.getPipelineManager()).vivecraft$getShadowRenderTargets()); + } + } + @Inject(method = "shouldDisableVanillaEntityShadows()Z", at = @At("HEAD"), cancellable = true, remap = false) private void vivecraft$shouldDisableEntityShadows(CallbackInfoReturnable cir) { if (!RenderPassType.isVanilla() && (shadowRenderer != null || ((PipelineManagerExtension) Iris.getPipelineManager()).vivecraft$getShadowRenderTargets() != null)) { diff --git a/gradle.properties b/gradle.properties index 52adae287..ce8ebca57 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,7 +4,7 @@ minecraft_version=1.21.1 enabled_platforms=fabric,forge,neoforge archives_base_name=vivecraft -mod_version=1.1.14-b1 +mod_version=1.1.14-b2 maven_group=org.vivecraft architectury_version=13.0.6