rayzee 7.12.0 → 7.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/rayzee.es.js +1 -1
- package/dist/rayzee.es.js.map +1 -1
- package/dist/rayzee.umd.js +6 -0
- package/dist/rayzee.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/TSL/PathTracerCore.js +6 -0
package/package.json
CHANGED
|
@@ -228,6 +228,12 @@ export const generateSampledDirection = Fn( ( [
|
|
|
228
228
|
|
|
229
229
|
export const regularizePathContribution = /*@__PURE__*/ wgslFn( `
|
|
230
230
|
fn regularizePathContribution( contribution: vec3f, pathLength: f32, fireflyThreshold: f32, frame: i32 ) -> vec3f {
|
|
231
|
+
// Indirect-only clamp: pathLength 0 is a direct/primary contribution (bounce-0 hit, direct NEE,
|
|
232
|
+
// or a directly-viewed backdrop/sun) — that is signal, not a firefly, and clamping it darkens
|
|
233
|
+
// legitimately bright pixels. Fireflies arise on indirect bounces, so only suppress pathLength>=1.
|
|
234
|
+
if ( pathLength < 0.5 ) {
|
|
235
|
+
return contribution;
|
|
236
|
+
}
|
|
231
237
|
let threshold = calculateFireflyThreshold( fireflyThreshold, i32( pathLength ), frame );
|
|
232
238
|
return applySoftSuppressionRGB( contribution, threshold, 0.5f );
|
|
233
239
|
}
|