Repository navigation
Show Litematica and MiniHUD world overlays with a pack on - #1
Open
simply-sunny wants to merge 2 commits into
Open
simply-sunny wants to merge 2 commits into
simply-sunny wants to merge 2 commits into
Conversation
The pack chain ran after LevelRenderer.render returned, behind MaLiLib's world-last renderers at its RETURN, so the pack's final covered MiniHUD's overlays and Litematica's boxes. It now runs at the Matrix4fStack pop inside render, the line Iris ends its level on, and those draws land on the pack's image. Nothing between there and the return draws.
Litematica draws its schematic at the head and tail of executeOutline, through passes it opens on the main target, where the pack's final covered them. For the length of that method the main target's colour now points at a cleared layer, keeping the world's depth, and the layer is composed premultiplied onto the target the world's translucents blend onto. The game's glowing outlines draw to a target of their own and are untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
With any pack on, the pack's final covered draws that mods make straight into the main target. Two places needed changes.
The first is the end of the level, which now happens at the same point Iris uses:
LevelRenderer.render frame.execute executeOutline Matrix4fStack.popMatrix + EngineStages.afterLevel # pack chain + final ... RETURN MaLiLib world-last renderers # MiniHUD numbers, Litematica boxes -GameRenderer.renderLevel - EngineStages.afterLevelThe second is a layer that holds whatever mods draw on the main target during the outline phase:
New files:
LevelRendererModDrawsMixinandRenderTargetAccessor, both mc26.3 only.Evidence
Tested on Minecraft 26.3 with Fabric, Sodium 0.9.2, Metallum 0.0.25, Litematica 0.29.1, MiniHUD 0.41.2 and MaLiLib 0.30.2. A schematic was placed and MiniHUD's light level overlay was on. The 26.2 and 26.3 builds and
./gradlew testpass.After (oh shiny!):
After (Complementary):
There were no visible regressions in the sky, sun, clouds or hand: oh shiny!, Complementary.
Merge Danger
Door: two-way
Mixin and rendering changes only. Reverting the two commits restores 0.2.0's behaviour exactly.
Blast Radius: rendering
LevelRenderer.renderRETURN. Any mod that drew there and relied on being covered, or on being composited by the pack, now draws on top, as it does on Iris.executeOutlinegoes through the layer. The pack doesn't light or shade it, much like Litematica on Iris.AfterLevelMixinand outline phase are untouched.