Conversation
embeddedt
left a comment
There was a problem hiding this comment.
The change to the block iteration order significantly complicates the core meshing loop (which is a hot path), and is unlikely to be beneficial to visuals in many scenarios, as chunks do not get remeshed when the camera moves, only when blocks within them change.
Sorting the TEs in CeleritasWorldRenderer on each frame makes more sense and I'm ok with this change. Really you need to sort the emitted geometry, not just render the TEs in a given order, but that is probably difficult to do with 1.7.10 since everything uses direct GL calls.
Makes sense. I've reverted the iteration order changes. Agree on needing to sort the emitted geo, but I think this is at least good fairly often as many TESRs are closely located with the block. |
|
Can you run a profile of this vs before in a TE heavy world? |
Due to how TESRs are currently handled, they are not included in translucency sorting for blocks. This PR makes two key changes to add this:
Tested in game and can confirm translucent TESRs now consistently render in the correct order.
Critically, this only works for TESRs closely tied to the coordinates of the underlying TE. Adding translucency sorting for all TESRs would probably require much more work in redirecting all
renderTileEntitydraws so they can be later sorted.