Small World Engine API Reference - v0.78.00
    Preparing search index...

    Class AOPassGPU

    Generates the HBAO texture for WebGPU via a compute pass -- reading the opaque depth texture directly via textureLoad and writing to a storage texture (r8unorm).

    Index
    • Computes the HBAO texture from the opaque depth texture via a compute pass.

      Parameters

      • ce: GPUCommandEncoder

        The command encoder to record into.

      • depthView: GPUTextureView

        View of the already-captured opaque (pre-transparent) depth texture.

      • width: number

        Canvas width in pixels.

      • height: number

        Canvas height in pixels.

      • near: number

        Camera near plane.

      • far: number

        Camera far plane.

      • projMatrixData: Float32Array

        The camera's raw perspective projection matrix.

      • hbao: HbaoElement

        The HBAO effect parameters (radius, intensity).

      Returns GPUTextureView | null

      A view of the single-channel AO texture (R = occlusion factor), or null if unavailable.