Fix separate entity draws and late mod rendering - #867
Draft
DecoderCoder wants to merge 4 commits into
Draft
DecoderCoder wants to merge 4 commits into
DecoderCoder wants to merge 4 commits into
Conversation
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.
Allow compatible mods to opt held items into the post-deferred hand pass without a hard dependency.
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.
What
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