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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayzee",
3
- "version": "7.12.0",
3
+ "version": "7.12.1",
4
4
  "type": "module",
5
5
  "description": "Real-time WebGPU path tracing engine built on Three.js",
6
6
  "main": "dist/rayzee.umd.js",
@@ -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
  }