Indigo: Relax vertex order requirements for modded quads
grondag opened this issue ยท 2 comments
Vanilla's AmbientOcclusionCalculator expects a rigid vertex order for all quads. The square()
method on QuadEmitter
acts as a helper to meet this requirement but is limited in functionality and some mods will have special baking requirements that make it a poor fit.
Additionally, quad transformations that change geometry will naturally break original vertex order for both BakedQuad and Mesh content. While it is possible to re-order vertices after transformation, this is wasteful and error-prone, and a likely source of issue reports and frustration.
Given that Indigo already has the machinery to correctly light quads with any vertex ordering it should simply detect when this is needed and handle appropriately.
I was originally looking to implement a check, but the simplest solution is to use the same geometry-driven logic used for partial faces for all non-vanilla quads in HYBRID or ENHANCED mode. This naturally only happens when AO calculation is invoked. Chunk reload timing indicates no measurable difference in performance.