@pmndrs/bvh
    Preparing search index...

    Interface BvhSdfTexture

    A field on the GPU: the texture, the box it covers, and how to sample it in TSL.

    interface BvhSdfTexture {
        box: Box3;
        gpuTexture: GPUTexture;
        grid: SdfGrid;
        ms: number;
        resolution: readonly [number, number, number];
        texture: Storage3DTexture;
        dispose(): void;
        sample(position: any): any;
        uvw(position: any): any;
    }
    Index
    box: Box3

    The world-space box the texture covers (a copy).

    gpuTexture: GPUTexture

    The GPUTexture three made for it, for raw WebGPU passes and readSdf (three owns it).

    grid: SdfGrid

    The core's grid: the box and resolution, for readSdf, sdfVoxelCenter and generateSdfCpu.

    ms: number

    Wall time of the generation, submit to done.

    resolution: readonly [number, number, number]
    texture: Storage3DTexture

    r32float, the box's extent; linear filtering where the device has float32-filterable, else nearest.

    • Disposes the texture.

      Returns void

    • TSL: the signed distance at a world-space position node (a float; trilinear inside the box, clamped to its edge outside).

      Parameters

      • position: any

      Returns any

    • TSL: the texture coordinate of a world-space position node, (p - min) / (max - min).

      Parameters

      • position: any

      Returns any