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

    Class AOPassGPU

    Generates the HBAO texture for WebGPU -- same algorithm as AOPassGL, reading the opaque depth texture directly via textureLoad (no sampler needed for a texture_depth_2d).

    Index
    • Renders the HBAO texture from the opaque depth texture.

      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.