Package 

Class LightManager.ShadowCascades

    • Method Detail

      • computeUniformSplits

         static void computeUniformSplits(@NonNull() @Size(min = 1) Array<float> splitPositions, @IntRange(from = 1, to = 4) int cascades)

        Utility method to compute cascadeSplitPositions according to auniform split scheme.

        Parameters:
        splitPositions - a float array of at least size (cascades - 1) to write the splitpositions into
        cascades - the number of shadow cascades, at most 4
      • computeLogSplits

         static void computeLogSplits(@NonNull() @Size(min = 1) Array<float> splitPositions, @IntRange(from = 1, to = 4) int cascades, float near, float far)

        Utility method to compute cascadeSplitPositions according to alogarithmic split scheme.

        Parameters:
        splitPositions - a float array of at least size (cascades - 1) to write the splitpositions into
        cascades - the number of shadow cascades, at most 4
        near - the camera near plane
        far - the camera far plane
      • computePracticalSplits

         static void computePracticalSplits(@NonNull() @Size(min = 1) Array<float> splitPositions, @IntRange(from = 1, to = 4) int cascades, float near, float far, float lambda)

        Utility method to compute cascadeSplitPositions according to apractical split scheme.

        The practical split scheme uses uses a lambda value to interpolate between the logrithmicand uniform split schemes. Start with a lambda value of 0.5f and adjust for your scene.

        See: Zhang et al 2006, "Parallel-split shadow maps for large-scale virtual environments"
        Parameters:
        splitPositions - a float array of at least size (cascades - 1) to write the splitpositions into
        cascades - the number of shadow cascades, at most 4
        near - the camera near plane
        far - the camera far plane
        lambda - a float in the range [0, 1] that interpolates between log anduniform split schemes