FogMode

public extension FogMode
  • Cast constructor, converting any binary integer to a FogMode.

    Declaration

    Swift

    @inlinable
    init!<I>(_ raw: I) where I : BinaryInteger

    Parameters

    raw

    The raw integer value to initialise the enum from

  • Calculates the fog blend factor as:

      f = end - eye_distance / end - start
    

    Declaration

    Swift

    static let linear: CoglFogMode
  • Calculates the fog blend factor as:

      f = e ^ -(density * eye_distance)
    

    Declaration

    Swift

    static let exponential: CoglFogMode
  • Calculates the fog blend factor as:

      f = e ^ -(density * eye_distance)^2
    

    Declaration

    Swift

    static let exponentialSquared: CoglFogMode