@pmndrs/reflections
    Preparing search index...

    Class LayoutPrefilter

    Prefilters captured cubes (faces of sourceSize px, mip 0 read) into one probe of layout at size px (mip 0 face, or octa side). The roughness levels are the layout's mips (layout.mipLevelCount - 1 = maxLod, normally maxLodFor(sourceSize)).

    Index
    • options.cubeSourceCopy: sample the GGX levels from a copy of the source chain bound only as 'cube' (default: on for compatibility-mode devices, which need it, off otherwise; D4100).

      Parameters

      • device: GPUDevice
      • layout: ProbeLayout
      • size: number
      • sourceSize: number
      • options: { cubeSourceCopy?: boolean } = {}

      Returns LayoutPrefilter

    layout: ProbeLayout
    maxLod: number
    scratch: GPUTexture

    rgba16float, one probe of the layout (layersPerProbe layers, every mip): the last result.

    size: number
    sourceSize: number
    • Copies scratch into probe slot slot of target (rgba16float, the layout's descriptor).

      Parameters

      • encoder: GPUCommandEncoder
      • target: GPUTexture
      • slot: number

      Returns void

    • Prefilter + copy into slot slot of an rgba16float target.

      Parameters

      • encoder: GPUCommandEncoder
      • source: GPUTexture
      • target: GPUTexture
      • slot: number

      Returns void

    • Records the prefilter of source (a cube texture of sourceSize px faces) into scratch. With remap (a capture transform's face remap, ../capture.ts), the source is read in through it instead of copied.

      Parameters

      • encoder: GPUCommandEncoder
      • source: GPUTexture
      • OptionaltimestampWrites: GPUComputePassTimestampWrites
      • Optionalremap: {
            encode(
                encoder: GPUCommandEncoder,
                source: GPUTexture,
                dst: GPUTexture,
            ): void;
        }

      Returns void