diff --git a/strahl-lib/src/path-tracer.ts b/strahl-lib/src/path-tracer.ts index 0b7b805..cce6389 100644 --- a/strahl-lib/src/path-tracer.ts +++ b/strahl-lib/src/path-tracer.ts @@ -84,7 +84,7 @@ export type PathTracerOptions = { viewProjectionConfiguration?: ViewProjectionConfiguration; environmentLightConfiguration?: EnvironmentLightConfig; samplesPerIteration?: number; - clearColor?: number[]; + clearColor?: number[] | false; maxRayDepth?: number; finishedSampling?: (result: { bvhBuildTime: number; @@ -704,8 +704,8 @@ async function runPathTracer( sunPower: Math.pow(10, environmentLightConfiguration.sun.power), sunAngularSize: environmentLightConfiguration.sun.angularSize, sunColor: environmentLightConfiguration.sun.color, - clearColor: isNil(clearColor) ? [0, 0, 0] : clearColor, - enableClearColor: isNil(clearColor) ? 0 : 1, + clearColor: clearColor === false ? [0, 0, 0] : clearColor, + enableClearColor: clearColor === false ? 0 : 1, maxRayDepth, objectDefinitionLength: groups.length, });