Iris Shaders

Iris Shaders

36M Downloads

Idea: Use Batched Entity Rendering to avoid building entity geometry twice for entities visible in both the main pass and shadow pass

coderbot16 opened this issue ยท 0 comments

commented

Building geometry for entities is really slow. It's possible to only build the geometry once for a given entity or block entity each frame & make use of our entity batching setup, but a few things also are needed:

  • Now we need 3 buffers: shadow-only, player-only, both
  • We'll need to suppress beacon beams in the shadow pass differently. It's also worth checking whether hitboxes, entity shadows, text labels, and similar things should be rendered in the shadow pass at all.
  • Things that violate the vanilla contract of entity renderers / block entity renderers by issuing draw calls directly will break with this system (Lifts monitors, ComputerCraft monitors) and will need to be handled separately.
  • This could break some general expectations of mods as well
  • The modelview matrix is currently baked into the geometry, but since it differs between the main pass and the shadow pass this would need to be changed.

Other considerations:

  • The proposed Instanced Entity Rendering feature being developed as a Sodium PR could make this a lot less impactful. We would need to ensure that batched entity rendering doesn't get too entangled with Iris