Class EnhancedAoRenderStorage


public class EnhancedAoRenderStorage extends ModelBlockRenderer.AmbientOcclusionRenderStorage
Entrypoint and main class of our enhanced AO pipeline.

Vanilla's AO logic works well for faces that are axis-aligned. That computation is replicated in FullFaceCalculator, with some bug fixes. The job of the enhanced pipeline is to handle faces that are more complicated, by combining multiple full faces as needed using interpolation.

Compared to vanilla, we also remove any assumption about vertex order in the quad.

  • Field Details

    • COMPARE_WITH_VANILLA

      private static final boolean COMPARE_WITH_VANILLA
      Debug option to compare the emulated vanilla AO with the actual vanilla AO. Only does something if emulated AO is enabled.
    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • AO_OBJECT_CACHE

      private static final ThreadLocal<EnhancedAoRenderStorage.AoObjectCache> AO_OBJECT_CACHE
    • calculator

      private final FullFaceCalculator calculator
      Calculator for full faces.
    • weights

      private final float[] weights
    • currentQuad

      private BakedQuad currentQuad
    • AO_EPS

      private static final float AO_EPS
      See Also:
    • AVERAGE_WEIGHT

      private static final float AVERAGE_WEIGHT
      See Also:
    • MAX_WEIGHT

      private static final float MAX_WEIGHT
      See Also:
  • Constructor Details

    • EnhancedAoRenderStorage

      public EnhancedAoRenderStorage()
  • Method Details