Skip to content

Fix separate entity draws and late mod rendering - #867

Draft
DecoderCoder wants to merge 4 commits into
Asek3:1.20.1-newfrom
DecoderCoder:agent/separate-entity-draw-fixes
Draft

DecoderCoder wants to merge 4 commits into
Asek3:1.20.1-newfrom
DecoderCoder:agent/separate-entity-draw-fixes

Conversation

@DecoderCoder

@DecoderCoder DecoderCoder commented Aug 4, 2026 •

Copy link
Copy Markdown

What

  • Preserve prepared entity batches and keep first-person rendering on its dedicated buffer.
  • Make optional CodeChickenLib AO and directional shading follow shader-pack settings.
  • Keep the shader pipeline active through Forge's late world stage.
  • Route late solid, cutout, and translucent block draws to post-deferred shader programs.
  • Keep ProjectRed halo rendering on an Oculus-managed shader when shader transparency is disabled.
  • Release any deferred depth/color write lock when replacing the shader pipeline.
  • Let compatible mods register held-item IDs for the post-deferred hand pass through Forge IMC.

Why

Forge mods can render world geometry after Oculus has already run deferred shading. Reusing ordinary terrain or block programs then writes G-buffer data that is never shaded, producing missing geometry, transparent schematic previews, and lights visible through blocks.

Disabling or reloading shaders can also replace the pipeline before the shader that acquired the global depth/color lock is cleared. The stale lock breaks later vanilla depth clears, including first-person rendering.

Separately drawn translucent players render after the solid hand pass. The small IMC opt-in lets a compatible first-person item use the existing late hand pass, so player models cannot composite over it.

Compatibility

All routing is limited to an active shader world pass with Separate Entity Draws enabled. Terrain formats and cutout alpha testing are preserved. Optional integrations use mixins, shader names, or a ResourceLocation IMC payload, so CodeChickenLib, ProjectRed, Create, TACZ, Photon, and Distant Horizons are not hard dependencies. Unknown or absent IMC partners are inert, and the Oculus version remains unchanged.

Checks

  • Clean Gradle build
  • git diff --check
  • Publication branch contains no custom version change
  • Runtime-tested earlier fixes in the reporter's Forge 1.20.1 modpack
  • Late-hand scope/stencil runtime smoke test requested for the paired TACZ change

Flush prepared batches instead of discarding them, keep hand rendering on its dedicated buffer, and adapt optional CodeChickenLib lighting only when the corresponding shader modes are active.
@DecoderCoder DecoderCoder changed the title Fix separate entity draw buffer ownership Fix separate entity draws and late mod rendering Aug 10, 2026
Allow compatible mods to opt held items into the post-deferred hand pass without a hard dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant