rayzee 7.10.1 → 7.10.3

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.10.1",
3
+ "version": "7.10.3",
4
4
  "type": "module",
5
5
  "description": "Real-time WebGPU path tracing engine built on Three.js",
6
6
  "main": "dist/rayzee.umd.js",
@@ -109,9 +109,15 @@ export const ENGINE_DEFAULTS = {
109
109
  directionalLightPosition: [ 1, 1, 1 ],
110
110
  directionalLightAngle: 0.0,
111
111
 
112
- filterStrength: 0.75,
113
- strengthDecaySpeed: 0.05,
114
- edgeThreshold: 1.0,
112
+ // EdgeAware denoiser (spatial-only SVGF à-trous). filterStrength: final blend
113
+ // (0 = raw, 1 = filtered). edgeAtrousIterations: à-trous passes (step 1,2,4,8,16).
114
+ // edgePhiLuminance: variance-scaled luminance edge-stop. edgePhiNormal: normal cone
115
+ // exponent. edgePhiDepth: RELATIVE depth tolerance (fraction of ray distance).
116
+ filterStrength: 1.0,
117
+ edgeAtrousIterations: 5,
118
+ edgePhiLuminance: 4.0,
119
+ edgePhiNormal: 64.0,
120
+ edgePhiDepth: 0.1,
115
121
 
116
122
  enableOIDN: false,
117
123
  oidnQuality: 'fast',
@@ -151,11 +157,6 @@ export const ENGINE_DEFAULTS = {
151
157
  asvgfQualityPreset: 'medium',
152
158
  showAsvgfHeatmap: false,
153
159
 
154
- // SSRC settings
155
- ssrcTemporalAlpha: 0.1,
156
- ssrcSpatialRadius: 4,
157
- ssrcSpatialWeight: 0.4,
158
-
159
160
  // Auto-exposure settings
160
161
  autoExposure: false,
161
162
  autoExposureKeyValue: 0.18,
@@ -13,7 +13,6 @@ import { Variance } from './Stages/Variance.js';
13
13
  import { BilateralFilter } from './Stages/BilateralFilter.js';
14
14
  import { EdgeFilter } from './Stages/EdgeFilter.js';
15
15
  import { AutoExposure } from './Stages/AutoExposure.js';
16
- import { SSRC } from './Stages/SSRC.js';
17
16
  import { Compositor } from './Stages/Compositor.js';
18
17
  import { RenderPipeline } from './Pipeline/RenderPipeline.js';
19
18
  import { CompletionTracker } from './Pipeline/CompletionTracker.js';
@@ -1677,7 +1676,6 @@ export class PathTracerApp extends EventDispatcher {
1677
1676
  this.pipeline.addStage( this.stages.pathTracer );
1678
1677
  this.pipeline.addStage( this.stages.normalDepth );
1679
1678
  this.pipeline.addStage( this.stages.motionVector );
1680
- this.pipeline.addStage( this.stages.ssrc );
1681
1679
  this.pipeline.addStage( this.stages.asvgf );
1682
1680
  this.pipeline.addStage( this.stages.variance );
1683
1681
  this.pipeline.addStage( this.stages.bilateralFilter );
@@ -1893,7 +1891,6 @@ export class PathTracerApp extends EventDispatcher {
1893
1891
  this.stages.motionVector = new MotionVector( this.renderer, this.cameraManager.camera, {
1894
1892
  pathTracer: this.stages.pathTracer
1895
1893
  } );
1896
- this.stages.ssrc = new SSRC( this.renderer, { enabled: false } );
1897
1894
  this.stages.asvgf = new ASVGF( this.renderer, { enabled: false } );
1898
1895
  this.stages.variance = new Variance( this.renderer, { enabled: false } );
1899
1896
  this.stages.bilateralFilter = new BilateralFilter( this.renderer, { enabled: false } );
@@ -1921,7 +1918,6 @@ export class PathTracerApp extends EventDispatcher {
1921
1918
  variance: this.stages.variance,
1922
1919
  bilateralFilter: this.stages.bilateralFilter,
1923
1920
  edgeFilter: this.stages.edgeFilter,
1924
- ssrc: this.stages.ssrc,
1925
1921
  autoExposure: this.stages.autoExposure,
1926
1922
  compositor: this.stages.compositor,
1927
1923
  },
@@ -366,6 +366,21 @@ class TextureCache {
366
366
 
367
367
  if ( this.cache.has( key ) ) {
368
368
 
369
+ const texture = this.cache.get( key );
370
+
371
+ // A pool-backed texture disposed out-of-band (e.g. SceneProcessor._disposeBucketTextures
372
+ // on a scene rebuild) has returned its backing buffer to the SmartBufferPool — a later
373
+ // build may have already reused/overwritten it, so its pixels are now garbage. Never hand
374
+ // it back: drop the stale entry and force a fresh rebuild. (dispose() nulls userData.buffer.)
375
+ if ( texture?.userData && texture.userData.buffer === null ) {
376
+
377
+ this.cache.delete( key );
378
+ const stale = this.accessOrder.indexOf( key );
379
+ if ( stale > - 1 ) this.accessOrder.splice( stale, 1 );
380
+ return null;
381
+
382
+ }
383
+
369
384
  // Move to end (most recently used)
370
385
  const index = this.accessOrder.indexOf( key );
371
386
  if ( index > - 1 ) {
@@ -379,7 +394,7 @@ class TextureCache {
379
394
  // Return cached texture directly — clone() fails on large DataArrayTextures
380
395
  // because Three.js's copy() calls JSON.stringify on the data array.
381
396
  // Each map type stores its own reference so shared instances are safe.
382
- return this.cache.get( key );
397
+ return texture;
383
398
 
384
399
  }
385
400
 
@@ -59,7 +59,6 @@ export class Compositor extends RenderStage {
59
59
  || context.getTexture( 'edgeFiltering:output' )
60
60
  || context.getTexture( 'bilateralFiltering:output' )
61
61
  || context.getTexture( 'asvgf:output' )
62
- || context.getTexture( 'ssrc:output' )
63
62
  || context.getTexture( 'pathtracer:color' );
64
63
 
65
64
  }