rayzee 7.23.3 → 7.24.0

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 CHANGED
@@ -137,7 +137,7 @@ A single HTML file — no Node.js, no build step. Uses [ES module import maps](h
137
137
  "three/tsl": "https://cdn.jsdelivr.net/npm/three@0.185.0/build/three.tsl.js",
138
138
  "three/webgpu": "https://cdn.jsdelivr.net/npm/three@0.185.0/build/three.webgpu.js",
139
139
  "three/addons/": "https://cdn.jsdelivr.net/npm/three@0.185.0/examples/jsm/",
140
- "oidn-web": "https://cdn.jsdelivr.net/npm/oidn-web@0.3.5/dist/oidn.js",
140
+ "oidn-web": "https://cdn.jsdelivr.net/npm/oidn-web@0.4.0/dist/oidn.js",
141
141
  "rayzee": "https://cdn.jsdelivr.net/npm/rayzee/dist/rayzee.es.js"
142
142
  }
143
143
  }
@@ -698,6 +698,19 @@ WebGPU timestamp queries are the only true GPU metric here — `pipeline.getStat
698
698
 
699
699
  `getKernelGPUTimings()` attributes each compute pass of the last resolved frame back to a wavefront kernel name. Durations are **summed per kernel across the frame**, so `extend` reports its whole per-frame cost over every bounce iteration, not one bounce. `unattributed` collects passes belonging to no registered kernel (other stages, denoisers), so `sum(kernels) + unattributed` reconciles with `total`.
700
700
 
701
+ Neither method can see the OIDN denoise — `oidn-web` submits on its own command encoders, outside
702
+ the stages three.js times. It carries its own profiler instead:
703
+
704
+ ```js
705
+ engine.profileNextDenoise(); // arms one capture; per-denoise, not sticky
706
+ const { profile, runtime } = await engine.getDenoiseProfile();
707
+ ```
708
+
709
+ `profile` is the per-layer GPU timing of that denoise; `runtime` reports the selected engine and
710
+ precision, the model, kernel capabilities, tile state and resource counts — which is the way to
711
+ confirm FP16 actually engaged on a given GPU rather than inferring it from the device's feature
712
+ list. Both need `timestamp-query`, and `getDenoiseProfile()` returns `null` when OIDN is not set up.
713
+
701
714
  ---
702
715
 
703
716
  ### Events
@@ -824,7 +837,7 @@ import { setBindingAudit, getBindingAuditFindings, clearBindingAuditFindings } f
824
837
 
825
838
  | Package | Purpose | Install needed? |
826
839
  |---|---|---|
827
- | `oidn-web` | Intel Open Image Denoise for high-quality final renders | Yes — `npm install oidn-web` |
840
+ | `oidn-web` | Intel Open Image Denoise for high-quality final renders | Yes — `npm install oidn-web` (**>=0.4.0**) |
828
841
  | `onnxruntime-web` | AI-powered upscaling | No — loaded from CDN at runtime |
829
842
 
830
843
  > **Note:** `onnxruntime-web` is also listed in `package.json` under `optionalDependencies` for bundler compatibility, but the engine's own runtime path always fetches it from a CDN (see `ortRuntimeUrl` / `ortWasmPaths` in [Configuring Assets](#configuring-assets-cdn-urls--cache-namespace)) rather than importing the installed package — installing it locally has no effect unless you also override those URLs to point at your own copy.
@@ -844,7 +857,7 @@ OIDN provides high-quality AI denoising for final renders. It runs automatically
844
857
  ```js
845
858
  // After engine.init() completes
846
859
  engine.denoisingManager.setOIDNEnabled(true);
847
- engine.denoisingManager.setOIDNQuality('balance'); // 'fast' | 'balance' | 'high'
860
+ engine.denoisingManager.setOIDNQuality('balance'); // 'fast' | 'fast-clean' | 'balance' | 'high'
848
861
  ```
849
862
 
850
863
  3. **Listen for progress** (optional)
@@ -858,11 +871,27 @@ OIDN provides high-quality AI denoising for final renders. It runs automatically
858
871
  });
859
872
  ```
860
873
 
861
- | Quality | Model size | Speed | Best for |
874
+ | Quality | Weights | Aux guide | Best for |
862
875
  |---|---|---|---|
863
- | `'fast'` | ~20 MB | Fastest | Quick previews |
864
- | `'balance'` | ~50 MB | Moderate | General use (default) |
865
- | `'high'` | ~100 MB | Slowest | Final quality renders |
876
+ | `'fast'` | 0.6 MB | point-sampled | Low sample counts — the default |
877
+ | `'fast-clean'` | 0.6 MB | accumulated | Converged frames, at `'fast'`'s cost |
878
+ | `'balance'` | 1.8 MB | accumulated | General use |
879
+ | `'high'` | 7.3 MB | accumulated | Final renders — used by `configureForMode('production')` |
880
+
881
+ `'fast'` and `'fast-clean'` are the same network size and cost the same to run; they differ only in
882
+ which auxiliary guide their weights expect. That makes the ordering **not** a simple quality ladder:
883
+ at 1 spp the accumulated guide has one sample, so `'fast-clean'` is fed something it was not trained
884
+ for and measures materially worse than `'fast'` (on a transmission-heavy scene, more than double the
885
+ RMSE). Once the guide converges it wins by a few percent — but `'high'` beats it there anyway. Pick
886
+ `'fast'` for previews and `'high'` for output; `'fast-clean'` is for the narrow case of denoising a
887
+ converged frame on a budget.
888
+
889
+ Denoise cost scales with frame area, and the tile tracks the frame so that a frame fitting inside one
890
+ tile pays no overlap padding — at 1024x1024 that is roughly 1.8x faster than tiling it. A cap
891
+ (default 1024) bounds the one-time activation allocation, so larger frames tile and stay
892
+ memory-bounded. Raise or lower it with
893
+ `engine.denoisingManager.denoiser.updateConfiguration({ tileSize: 2048 })`; the effective tile is
894
+ `min( max( width, height ), tileSize )`.
866
895
 
867
896
  > **Note:** The neural network model is downloaded on first use. Subsequent runs use the browser cache. OIDN also works with `configureForMode('production')`, which enables it automatically alongside high-quality render settings.
868
897
 
@@ -908,21 +937,14 @@ Then load it via a script tag or import map instead:
908
937
  <script type="importmap">
909
938
  {
910
939
  "imports": {
911
- "oidn-web": "https://cdn.jsdelivr.net/npm/oidn-web@0.3.5/dist/oidn.js"
940
+ "oidn-web": "https://cdn.jsdelivr.net/npm/oidn-web@0.4.0/dist/oidn.js"
912
941
  }
913
942
  }
914
943
  </script>
915
944
  ```
916
945
 
917
- **OIDN: `TypeError: t.alea is not a function` or `Argument 'x' passed to 'conv2d' must be a Tensor ... got 'L'`**
918
- You're loading `oidn-web` via `jsdelivr.net/npm/oidn-web/+esm` or `esm.sh/oidn-web`. Don't — use the **self-bundled** `/dist/oidn.js` path instead:
919
-
920
- ```diff
921
- - "oidn-web": "https://cdn.jsdelivr.net/npm/oidn-web@0.3.5/+esm"
922
- + "oidn-web": "https://cdn.jsdelivr.net/npm/oidn-web@0.3.5/dist/oidn.js"
923
- ```
924
-
925
- Why: `oidn-web` transitively depends on `@tensorflow/tfjs-core`, which does `import * as t from "seedrandom"` and calls `t.alea(...)`. jsDelivr's `/+esm` CJS→ESM shim of `seedrandom` emits only `export default` (no named exports), so `t.alea` is undefined. Swapping to `esm.sh` trades that for a different issue: deep-path imports produce multiple tfjs-core instances, so a Tensor made in one module fails `instanceof` checks in another (`got 'L'`). The `/dist/oidn.js` file in the npm package is a single pre-bundled ESM with all of tfjs inlined — no external imports, one tfjs instance, same exports. Use it.
946
+ **OIDN from a CDN**
947
+ Load the self-bundled `/dist/oidn.js` path rather than `/+esm` or `esm.sh` — it is a single pre-bundled ESM with no external imports, and it is the path this engine is tested against.
926
948
 
927
949
  **Black screen / "WebGPU not supported"**
928
950
  Your browser may not support WebGPU. Use Chrome 113+, Edge 113+, Safari 18+, or Firefox 141+. Ensure you're on HTTPS or localhost.