There seem to be several areas in the vanilla rendering of End Portals that cause severe issues when many end portal decorative blocks are placed. This PR aims to resolve several of the inefficiencies by culling invisible faces and introducing custom BufferBuilders to enable batching of render calls - as the majority of the time is spent switching between the 16 different render layers that end portal rendering uses. In order to do this, an injection into WorldRenderer.render is used to render these BufferBuilders to the render layers after all BERs have been run.
Do note that this PR renders the mod incompatible with Canvas, however Grondag has suggested implementing a callback in FREX which can be conditionally used instead of WorldRendererMixin.
There seem to be several areas in the vanilla rendering of End Portals that cause severe issues when many end portal decorative blocks are placed. This PR aims to resolve several of the inefficiencies by culling invisible faces and introducing custom BufferBuilders to enable batching of render calls - as the majority of the time is spent switching between the 16 different render layers that end portal rendering uses. In order to do this, an injection into
WorldRenderer.render
is used to render these BufferBuilders to the render layers after all BERs have been run.Do note that this PR renders the mod incompatible with Canvas, however Grondag has suggested implementing a callback in FREX which can be conditionally used instead of WorldRendererMixin.
Before: After: