babylon.quarks - v1.0.0
    Preparing search index...

    Function softDepthParams

    • Writes the four coefficients the soft-particle shaders decode a depth sample d with: view depth = |(x·d + y) / (z·d + w)|. Each encoding is a ratio of linear terms in d for every projection Babylon builds, so one formula covers them all.

      Parameters

      • camera: Camera

        The camera the particles are drawn for, normally the one the depth was drawn for.

      • encoding: SoftDepthEncoding

        What the depth texture stores.

      • out: Vector4

        Receives the coefficients.

      Returns Vector4