rayzee 11.6.0 → 11.8.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.
Files changed (72) hide show
  1. package/README.md +26 -14
  2. package/dist/{ArchiveImporter-iofnC8zB.js → ArchiveImporter-_sJm5uaK.js} +1923 -1243
  3. package/dist/{BidirectionalIntegrator-CqAilt2I.js → BidirectionalIntegrator-Dzt4Z97x.js} +290 -289
  4. package/dist/{ColorManagement-oeEk7oSu.js → ColorManagement-30MfpHwQ.js} +1 -1
  5. package/dist/{EngineIssues-CIZnXHsF.js → EngineIssues-xljoXM0E.js} +18 -8
  6. package/dist/{NeuralRetouch-DFI4pOjO.js → NeuralRetouch-BKQCsmEs.js} +2 -2
  7. package/dist/{NeuralSuperRes-ChCiiilS.js → NeuralSuperRes-C4ymq68e.js} +2 -2
  8. package/dist/{PathTracer-BX4sJLx7.js → PathTracer-C_to_i40.js} +3158 -3102
  9. package/dist/{PhysicalSky-Biv39eTA.js → PhysicalSky-bMHbm_7H.js} +1 -1
  10. package/dist/{RayzeeRenderer-D8XRKU3A.js → RayzeeRenderer-B_aB6VTJ.js} +370 -372
  11. package/dist/SceneMetadata-CSmlJW4c.js +183 -0
  12. package/dist/{ToneMapGPU-sAs8wdgI.js → ToneMapGPU-4GPwoG_c.js} +13 -6
  13. package/dist/addons/archives.es.js +1 -1
  14. package/dist/addons/bidirectional.es.js +1 -1
  15. package/dist/addons/color.es.js +1 -1
  16. package/dist/addons/physical-sky.es.js +1 -1
  17. package/dist/addons/storage.es.js +1 -1
  18. package/dist/{openStorage-Fe9BoS1_.js → openStorage-B085D9FR.js} +1 -1
  19. package/dist/rayzee-core.es.js +5 -5
  20. package/dist/rayzee.es.js +917 -1624
  21. package/dist/rayzee.umd.js +113 -156
  22. package/dist/{sceneCachePolicy-W5PLbzuR.js → sceneCachePolicy-D_uBSbQF.js} +2 -2
  23. package/package.json +1 -1
  24. package/src/EngineIssues.js +20 -6
  25. package/src/Passes/AIUpscaler.js +4 -0
  26. package/src/Passes/OIDNDenoiser.js +17 -17
  27. package/src/PathTracerApp.js +16 -18
  28. package/src/Pipeline/BindingAudit.js +2 -3
  29. package/src/Pipeline/PipelineContext.js +0 -1
  30. package/src/Pipeline/RenderPipeline.js +1 -2
  31. package/src/Pipeline/RenderStage.js +1 -1
  32. package/src/Processor/ArchiveImporter.js +23 -6
  33. package/src/Processor/AssetLoader.js +15 -0
  34. package/src/Processor/LightSerializer.js +6 -2
  35. package/src/Processor/PBRT/PBRTMaterials.js +2 -1
  36. package/src/Processor/PBRT/PBRTSceneBuilder.js +1 -1
  37. package/src/Processor/PackedRayBuffer.js +2 -2
  38. package/src/Processor/PlatformImageLoader.js +9 -0
  39. package/src/Processor/StorageTexturePool.js +1 -1
  40. package/src/Processor/TextureCreator.js +44 -4
  41. package/src/Processor/ToneMapCPU.js +34 -5
  42. package/src/Processor/ToneMapGPU.js +15 -9
  43. package/src/Processor/USD/USDScene.js +981 -17
  44. package/src/RayzeeRenderer.js +82 -27
  45. package/src/Stages/AutoExposure.js +21 -8
  46. package/src/Stages/Compositor.js +39 -1
  47. package/src/Stages/DenoiserSettings.js +5 -81
  48. package/src/Stages/LocalExposure.js +44 -18
  49. package/src/Stages/MotionVector.js +21 -215
  50. package/src/Stages/NormalDepth.js +12 -8
  51. package/src/Stages/PathTracer.js +26 -2
  52. package/src/Stages/PathTracerStage.js +13 -18
  53. package/src/TSL/CameraRay.js +12 -1
  54. package/src/TSL/DebugKernel.js +3 -2
  55. package/src/TSL/FinalWriteKernel.js +6 -9
  56. package/src/TSL/GenerateKernel.js +6 -2
  57. package/src/TSL/LightSplatKernel.js +7 -4
  58. package/src/TSL/LightsCore.js +6 -2
  59. package/src/TSL/LightsSampling.js +45 -12
  60. package/src/TSL/SceneResources.js +11 -0
  61. package/src/TSL/ShadeKernel.js +4 -5
  62. package/src/index.js +1 -1
  63. package/src/integrators/BidirectionalIntegrator.js +1 -0
  64. package/src/managers/CameraManager.js +9 -0
  65. package/src/managers/DenoisingManager.js +79 -187
  66. package/src/managers/InteractionManager.js +6 -0
  67. package/src/managers/UniformManager.js +3 -1
  68. package/dist/SceneMetadata-D2Sh-0e-.js +0 -110
  69. package/src/Stages/ASVGF.js +0 -932
  70. package/src/Stages/BilateralFilter.js +0 -486
  71. package/src/Stages/EdgeFilter.js +0 -545
  72. package/src/Stages/Variance.js +0 -443
package/README.md CHANGED
@@ -500,7 +500,7 @@ Key settings:
500
500
  | `transparentBackground` | `boolean` | false | Transparent canvas background |
501
501
  | `interactionModeEnabled` | `boolean` | true | Render at lower resolution while the camera moves, keeping the full bounce budget ("Fast Navigation" in the app) |
502
502
  | `interactionRenderScale` | `number` | 0.5 | Per-axis render scale while the camera moves (0.5 = a quarter of the pixels); `1` turns the drop off. Ignored while OIDN is the live denoiser. `PathTracerApp` only |
503
- | `renderMode` | `number` | 0 | Internal preview(0)/production(1) flag driving accumulation & ASVGF behavior — normally set via `configureForMode()`, not written directly |
503
+ | `renderMode` | `number` | 0 | Internal preview(0)/production(1) flag driving accumulation & denoiser history — normally set via `configureForMode()`, not written directly |
504
504
  | `visMode` | `number` | 0 | Debug visualization mode (0 = off) |
505
505
  | `environmentMode` | `string` | 'hdri' | Sky mode: `'hdri'` \| `'procedural'` \| `'color'` — not routed through `engine.settings`; use `engine.environmentManager.setMode()` instead |
506
506
  | `cameraProjection` | `string` | 'perspective' | `'perspective'` \| `'orthographic'` \| `'equirectangular'` — see [Camera Projection](#camera-projection-orthographic-360-panorama) |
@@ -748,7 +748,7 @@ Depth of field still works: the lens plane is built from each ray's own frame, n
748
748
 
749
749
  Two features are incompatible with a non-frustum camera and the engine switches them off for you when panorama is enabled:
750
750
 
751
- - **ASVGF** falls back to the `edgeaware` denoiser — ASVGF's motion vectors unproject through the projection matrix, which is meaningless when every pixel is its own direction.
751
+ - **NRD** hands the view to OIDN — NRD's motion vectors unproject through the projection matrix, which is meaningless when every pixel is its own direction. OIDN keeps working (without its motion history). Asking for `'nrd'` while in a panorama runs `'oidn'` and records `denoiser.unavailable`.
752
752
  - **Auto-focus** pauses and focus holds its last distance — it raycasts via `Raycaster.setFromCamera`, which only understands a frustum. It resumes when you leave the panorama.
753
753
 
754
754
  Read the denoiser outcome back rather than duplicating the rule (`engine.denoisingManager.denoiserStrategy`); it is not restored automatically when you leave the panorama.
@@ -918,7 +918,7 @@ await engine.environmentManager.generateProcedural();
918
918
 
919
919
  ### engine.denoisingManager
920
920
 
921
- Denoiser strategy, ASVGF, OIDN, upscaler, and auto-exposure. Auto exposure meters the accumulated image on the GPU
921
+ Denoiser strategy, NRD, OIDN, upscaler, and auto-exposure. Auto exposure meters the accumulated image on the GPU
922
922
  and moves in stops; it follows a room level learned as the camera moves plus a damped share of each view, so a scene lit
923
923
  for its manual exposure stays near it while one lit far off is corrected in full. It eases while the image restarts
924
924
  every frame (a moving camera, playback) and lands within about a third of a second once the image builds up, so a
@@ -926,15 +926,13 @@ finished render shows its own exposure at any sample count. While it is on, `exp
926
926
 
927
927
  ```js
928
928
  // Strategy
929
- engine.denoisingManager.setStrategy('asvgf', 'medium') // 'none' | 'asvgf' | 'nrd' | 'edgeaware' | 'oidn'
929
+ engine.denoisingManager.setStrategy('nrd', 'medium') // DENOISER_STRATEGIES: 'none' | 'nrd' | 'oidn'
930
930
  engine.denoisingManager.denoiserStrategy // read back the active strategy (derived from stage state)
931
- engine.denoisingManager.setASVGFEnabled(true, 'medium')
932
- engine.denoisingManager.applyASVGFPreset('high') // 'low' | 'medium' | 'high'
931
+ engine.denoisingManager.applyNRDPreset('high') // 'low' | 'medium' | 'high'
933
932
  engine.denoisingManager.setAutoExposure(true)
934
933
 
935
934
  // Fine-grained parameters
936
- engine.denoisingManager.setASVGFParams({ temporalAlpha: 0.1, maxAccumFrames: 16 })
937
- engine.denoisingManager.setEdgeAwareParams({ phiLuminance: 4.0, atrousIterations: 5 })
935
+ engine.denoisingManager.setNRDParams({ maxAccumulatedFrameNum: 16, maxBlurRadius: 20 })
938
936
  engine.denoisingManager.setAutoExposureParams({
939
937
  strength: 0.3, // 0..1, how far it follows each view; 1 averages every view to middle grey
940
938
  metering: 'center', // 'average' | 'center' | 'spot' (at the auto-focus point)
@@ -1081,6 +1079,19 @@ surface** — pin a version and branch on the strings; they are never renamed or
1081
1079
  `asset.unreachable` also covers what the engine fetches for itself: OIDN weights, IES profiles and
1082
1080
  gobos (`detail.asset` says which).
1083
1081
 
1082
+ `init()` cannot degrade past a missing GPU, so these three always reject it with an
1083
+ `EngineIssueError`, strict or not, and are recorded too. `error.cause` is the WebGPU error, when there was one:
1084
+
1085
+ | Code | Raised when |
1086
+ |---|---|
1087
+ | `webgpu.unavailable` | there is no `navigator.gpu`, or three.js could start only WebGL2 on the canvas |
1088
+ | `adapter.unavailable` | `requestAdapter()` returned no adapter or rejected — no GPU, or no driver for it |
1089
+ | `device.unavailable` | the adapter was found but `requestDevice()` rejected |
1090
+
1091
+ ```js
1092
+ try { await engine.init(); } catch (error) { metrics.failure = error.code ?? 'unknown'; }
1093
+ ```
1094
+
1084
1095
  `settings.getEffective()` is the companion for the `setting.unknown_key` case: it returns every live
1085
1096
  setting as `{ value, source, routed }`, and `routed: false` means stored but reaching no stage.
1086
1097
 
@@ -1604,7 +1615,7 @@ import {
1604
1615
  AUTO_EXPOSURE_DEFAULTS,
1605
1616
  LOCAL_EXPOSURE_DEFAULTS,
1606
1617
  AUTO_FOCUS_DEFAULTS,
1607
- ASVGF_QUALITY_PRESETS,
1618
+ DENOISER_STRATEGIES,
1608
1619
  SKY_DEFAULTS,
1609
1620
  DEFAULT_SUN_PATH,
1610
1621
  DEFAULT_VIEW,
@@ -1754,7 +1765,7 @@ Two independent decisions, because they answer different questions — *what cle
1754
1765
  render works*, and *does the finished image get a proper pass*:
1755
1766
 
1756
1767
  ```js
1757
- engine.denoisingManager.setStrategy('oidn'); // 'none' | 'edgeaware' | 'asvgf' | 'nrd' | 'oidn'
1768
+ engine.denoisingManager.setStrategy('oidn'); // 'none' | 'nrd' | 'oidn'
1758
1769
  engine.denoisingManager.setOIDNEnabled(false); // a full OIDN pass on the finished image
1759
1770
  ```
1760
1771
 
@@ -1767,8 +1778,8 @@ switching the final pass on says nothing about the live view. All six combinatio
1767
1778
  |---|---|---|---|---|
1768
1779
  | `'none'` | `false` | raw | raw | raw |
1769
1780
  | `'none'` | `true` | raw | raw | OIDN |
1770
- | `'asvgf'` | `false` | ASVGF | ASVGF | ASVGF's last frame |
1771
- | `'asvgf'` | `true` | ASVGF | ASVGF | OIDN |
1781
+ | `'nrd'` | `false` | NRD | NRD, then raw once it hands over | NRD's last frame, or raw past the handover |
1782
+ | `'nrd'` | `true` | NRD | NRD, then raw once it hands over | OIDN |
1772
1783
  | `'oidn'` | `false` | OIDN, from the motion history | OIDN, refreshing | one last refresh |
1773
1784
  | `'oidn'` | `true` | OIDN, from the motion history | OIDN, refreshing | OIDN, full quality |
1774
1785
 
@@ -1780,9 +1791,10 @@ With OIDN on the live view and the final pass off, the render still closes with
1780
1791
  cadence's last tick lands short of the end, and the picture should match the render that finished. On
1781
1792
  a 150-sample render that gap measured **11 samples at 512²** and **1 at 1024²** — larger where the
1782
1793
  renderer is fast, because more samples land between refreshes. It uses whatever model the refreshes
1783
- were already on: no reload for an image the user never asked to be denoised at full quality.
1794
+ were already on: no reload for an image the user never asked to be denoised at full quality. A final render
1795
+ (`configureForMode( 'production' )`) has no live view to match, so with the final pass off it finishes undenoised.
1784
1796
 
1785
- In the app that is `Real-Time Denoiser` (None / EdgeAware / ASVGF / NRD / **OIDN (AI)**) and the
1797
+ In the app that is `Real-Time Denoiser` (None / NRD / **OIDN (AI)**, OIDN by default) and the
1786
1798
  `Final Denoise (OIDN)` switch. Deterministic mode pins the live refreshes off, since which frame a
1787
1799
  wall-clock cadence lands on is not reproducible.
1788
1800