Skip to main content

Type Alias: PathTracerOptions

PathTracerOptions: object

Configuration options for the path tracer.

Type declaration​

clearColor?​

optional clearColor: Color | false

Color to clear the canvas with. Set to false to disable clearing.

enableDenoise?​

optional enableDenoise: boolean | OIDNConfig | GaussianConfig

Enable denoising pass. Set to true to enable Gaussian denoising, or provide an object with configuration for more detailed configuration or OIDN denoising.

enableFloatTextureFiltering?​

optional enableFloatTextureFiltering: boolean

Enable float texture filtering, mainly used for development.

enableTimestampQuery?​

optional enableTimestampQuery: boolean

Enable timestamp query for performance measurements

environmentLightConfiguration?​

optional environmentLightConfiguration: EnvironmentLightConfig

Configuration for the environment light for sun and sky.

maxRayDepth?​

optional maxRayDepth: number

Maximum number of ray bounces

onSampleStart()?​

optional onSampleStart: (params) => void

Callback called before a sample is started.

Parameters​

• params

• params.cameraPosition: RawCameraSetup["matrixWorldContent"]

Returns​

void

onSamplingFinished()?​

optional onSamplingFinished: (result) => void

Callback for when the path tracer has finished sampling.

Parameters​

• result

• result.allRenderTime: number

• result.bvhBuildTime: number

• result.fullRenderLoopTime: number

• result.renderTimes: number[]

Returns​

void

samplesPerIteration?​

optional samplesPerIteration: number

Number of samples per iteration.

signal?​

optional signal: AbortSignal

Signal to abort the path tracer. May be used at any time.

size?​

optional size: number | OutputSizeConfiguration

Ouput size of the render. The canvas may use a different size.

targetSamples?​

optional targetSamples: number

Number of samples per pixel.

viewProjectionConfiguration?​

optional viewProjectionConfiguration: ViewProjectionConfiguration

Configuration for the view and controls.

Defined in​

path-tracer.ts:73