docsby gkjohnson
Denoising a path traced image after a few samples
Data courtesy of NASA/JPL-Caltech, Poly Haven
On this page

Events

{ type: 'error' }
{ type: 'progress' }

Properties

complete: boolean

running: boolean

Methods

new OIDNDenoiser(
	options: {
		initUNetFromURL: function,

		// Weights for the guided model.
		auxWeightsUrl: string,

		// Weights for the color only model, needed only when `useAuxiliaryBuffers` is `false`.
		colorWeightsUrl?: string,
		useAuxiliaryBuffers?: boolean,
		maxTileSize?: number | null,

		// `false` pins every tile to `maxTileSize`. An object tunes the adaptive sizing.
		dynamicTile?: DynamicTileSetting | null
	}
)
init( renderer: WebGPURenderer ): void
update(
	// The path traced result, in linear HDR.
	target: Texture,

	// The packed auxiliary buffers, see "aux.wgsl.js".
	aux: StorageArrayTexture | null = null
): Texture | null

denoise

async
async denoise(
	// The path traced result, in linear HDR.
	color: Texture,
	albedo: Texture | null = null,
	normal: Texture | null = null
): void
reset(): void