rayzee 11.14.0 → 11.15.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 +37 -19
- package/dist/{ActiveColor-7CZdmrsz.js → ActiveColor-DakLCifA.js} +1 -1
- package/dist/{ArchiveImporter-DBMmDG98.js → ArchiveImporter-DuWqpbXf.js} +260 -260
- package/dist/{BidirectionalIntegrator-D6rcU7N1.js → BidirectionalIntegrator-BEXXxmZH.js} +99 -99
- package/dist/{BufferLayout-SvkefbAs.js → BufferLayout-ny3WneEc.js} +1 -1
- package/dist/{ColorManagement-D9eYhssc.js → ColorManagement-CKN2pTRS.js} +88 -60
- package/dist/{DepthPass-D4Zh108s.js → DepthPass-u5g7hr7J.js} +4 -4
- package/dist/{EngineEvents-CLckhYbL.js → EngineEvents-oQGofgRf.js} +16 -2
- package/dist/{EngineIssues-B14FGIHX.js → EngineIssues-t5p7TEjb.js} +1 -0
- package/dist/{FileFormats-B_VqIVDq.js → FileFormats-C91JE5DM.js} +1 -1
- package/dist/LocalExposure-Cw1g8rdU.js +344 -0
- package/dist/{Logger-dDDGj9Av.js → Logger-CH-TZ1co.js} +1 -1
- package/dist/{NeuralRetouch-Cyh0AwUT.js → NeuralRetouch-CLtoW6Vt.js} +5 -5
- package/dist/{NeuralSuperRes-BPp05Ipu.js → NeuralSuperRes-PlLjWpMF.js} +14 -14
- package/dist/{PackedRayBuffer-BtJJxs43.js → PackedRayBuffer-DwhV931f.js} +6 -6
- package/dist/{PathTracer-BLV2bVqi.js → PathTracer-BMtUFjdP.js} +4532 -3349
- package/dist/{PhysicalSky-VonV_lAD.js → PhysicalSky-DqanSS2m.js} +7 -7
- package/dist/PictureView-DpHE_jDr.js +96 -0
- package/dist/RayzeeRenderer-C9zGAMJo.js +3281 -0
- package/dist/{sceneCachePolicy-DcEWCTKO.js → SceneMetadata-BUfzHMSj.js} +334 -301
- package/dist/{SolarLimb-DSig_M0f.js → SolarLimb-BiVdxxmL.js} +1 -1
- package/dist/{TextureBuckets-CcSAhgVc.js → TextureBuckets-D09iX9_y.js} +1 -1
- package/dist/{TextureSampling-C4Sg4Yw_.js → TextureSampling-CvMi8LNc.js} +19 -16
- package/dist/{ToneMapGPU-l_79riZd.js → ToneMapGPU-tJZo_-7S.js} +2 -2
- package/dist/{ViewTransforms-Crdom11t.js → ViewTransforms-Bh7hSjSb.js} +1 -1
- package/dist/{WorkingMatrix-DWJV2JM2.js → WorkingMatrix-CDGicYGE.js} +1 -1
- package/dist/{ZipReader-Bva4oiva.js → ZipReader-KPFbIuOs.js} +1 -1
- package/dist/addons/archives.es.js +2 -2
- package/dist/addons/bidirectional.es.js +1 -1
- package/dist/addons/color.es.js +3 -3
- package/dist/addons/formats.es.js +1 -1
- package/dist/addons/physical-sky.es.js +1 -1
- package/dist/addons/storage.es.js +3 -3
- package/dist/archiveFormats-j39rQeKs.js +37 -0
- package/dist/encoders.es.js +1 -1
- package/dist/identity-x_UfobDa.js +65 -0
- package/dist/{openStorage-D6DBv9_I.js → openStorage-CxLMw2_a.js} +61 -62
- package/dist/rayzee-core.es.js +13 -13
- package/dist/rayzee.es.js +769 -1030
- package/dist/rayzee.umd.js +121 -115
- package/package.json +2 -2
- package/src/AssetConfig.js +1 -1
- package/src/EngineDefaults.js +1 -1
- package/src/EngineEvents.js +26 -0
- package/src/EngineIssues.js +1 -0
- package/src/Platform.js +40 -0
- package/src/RayzeeRenderer.js +186 -1343
- package/src/RenderSettings.js +3 -3
- package/src/addons/archives.js +2 -2
- package/src/addons/bidirectional.js +1 -1
- package/src/addons/color.js +6 -6
- package/src/addons/formats.js +1 -1
- package/src/addons/physicalSky.js +1 -1
- package/src/addons/storage.js +3 -3
- package/src/{Processor → bvh}/BVHBuilder.js +2 -2
- package/src/{Processor → bvh}/BVHLeafFold.js +1 -1
- package/src/{Processor/Workers → bvh}/BVHRefitWorker.js +2 -2
- package/src/{Processor → bvh}/BVHRefitter.js +1 -1
- package/src/{Processor/Workers → bvh}/BVHSubtreeWorker.js +2 -2
- package/src/{Processor/Workers → bvh}/BVHWorker.js +3 -3
- package/src/{Processor → bvh}/ParallelBVHBuilder.js +3 -3
- package/src/{Processor → bvh}/SplitBLAS.js +2 -2
- package/src/{Processor → bvh}/TLASBuilder.js +4 -4
- package/src/{Processor/Workers → bvh}/TLASWorker.js +2 -2
- package/src/{Color → color}/ColorManagement.js +87 -41
- package/src/{Color → color}/OcioRuntime.js +1 -1
- package/src/core.js +8 -8
- package/src/{Processor/Workers → environment}/CDFWorker.js +1 -1
- package/src/{Processor → environment}/EnvironmentExactTable.js +2 -2
- package/src/{managers → environment}/EnvironmentManager.js +10 -10
- package/src/{Processor → environment}/EquirectHDRInfo.js +1 -1
- package/src/{Processor → environment}/PhysicalSky.js +5 -5
- package/src/{Processor → environment}/SolarLimb.js +1 -1
- package/src/index.js +46 -46
- package/src/{Processor → lights}/EmissiveTriangleBuilder.js +5 -5
- package/src/{managers → lights}/LightManager.js +3 -3
- package/src/{Processor → lights}/LightSerializer.js +1 -1
- package/src/{Processor → loaders}/AssetLoader.js +115 -11
- package/src/loaders/SceneLoading.js +730 -0
- package/src/{Processor → loaders/archives}/ArchiveCache.js +3 -3
- package/src/{Processor → loaders/archives}/ArchiveImporter.js +15 -15
- package/src/{Processor/PBRT → loaders/pbrt}/PBRTSceneBuilder.js +2 -3
- package/src/{Processor/USD → loaders/usd}/USDScene.js +1 -1
- package/src/{Processor/USD → loaders/usd}/index.js +1 -1
- package/src/{managers → materials}/MaterialDataManager.js +8 -8
- package/src/{Processor → materials}/MaterialPacking.js +1 -1
- package/src/{Processor/Workers → materials}/PackWorker.js +1 -1
- package/src/{Processor → materials}/TextureCreator.js +6 -6
- package/src/{Processor/Workers → materials}/TexturesWorker.js +1 -1
- package/src/{Processor → memory}/HostMemory.js +1 -1
- package/src/memory/SceneSpill.js +477 -0
- package/src/node/nodePlatform.js +4 -2
- package/src/output/Pictures.js +460 -0
- package/src/{Processor → output}/ToneMapCPU.js +2 -2
- package/src/{Processor → output}/ToneMapGPU.js +2 -2
- package/src/{integrators → pathtracer}/BidirectionalIntegrator.js +16 -16
- package/src/{Processor → pathtracer}/KernelManager.js +29 -4
- package/src/{Processor → pathtracer}/PackedRayBuffer.js +3 -3
- package/src/{Stages → pathtracer}/PathTracer.js +272 -180
- package/src/{Stages → pathtracer}/PathTracerStage.js +21 -25
- package/src/{Processor → pathtracer}/QueueManager.js +42 -13
- package/src/{Processor → pathtracer}/ShaderBuilder.js +1 -1
- package/src/{Processor → pathtracer}/StorageTexturePool.js +2 -2
- package/src/{managers → pathtracer}/UniformManager.js +2 -2
- package/src/{Pipeline → pipeline}/CompletionTracker.js +8 -1
- package/src/{Stages → pipeline}/Compositor.js +23 -10
- package/src/{Processor → scene}/BuildTimer.js +1 -1
- package/src/{Processor → scene}/GeometryExtractor.js +46 -6
- package/src/scene/SceneEdits.js +260 -0
- package/src/{Processor → scene}/SceneProcessor.js +64 -1105
- package/src/scene/SceneRefit.js +823 -0
- package/src/{TSL → shaders}/Atmosphere.js +1 -1
- package/src/{TSL → shaders}/BVHTraversal.js +1 -1
- package/src/{TSL → shaders}/CameraRay.js +1 -1
- package/src/{TSL → shaders}/Common.js +1 -1
- package/src/{TSL → shaders}/EmissiveSampling.js +1 -1
- package/src/{TSL → shaders}/Environment.js +1 -1
- package/src/{TSL → shaders}/LightGuide.js +1 -1
- package/src/{TSL → shaders}/LightVisibility.js +1 -1
- package/src/{TSL → shaders}/Sun.js +1 -1
- package/src/{TSL → shaders}/TextureSampling.js +1 -1
- package/src/{TSL → shaders/kernels}/CompactKernel.js +2 -2
- package/src/{TSL → shaders/kernels}/ConnectKernel.js +10 -10
- package/src/{TSL → shaders/kernels}/DebugKernel.js +4 -4
- package/src/{TSL → shaders/kernels}/DepthPass.js +10 -10
- package/src/{TSL → shaders/kernels}/ExtendKernel.js +5 -5
- package/src/{TSL → shaders/kernels}/FinalWriteKernel.js +14 -4
- package/src/{TSL → shaders/kernels}/GenerateKernel.js +5 -5
- package/src/{TSL → shaders/kernels}/LightGenerateKernel.js +14 -14
- package/src/{TSL → shaders/kernels}/LightSplatKernel.js +9 -9
- package/src/{TSL → shaders/kernels}/MergeKernel.js +7 -7
- package/src/{TSL → shaders/kernels}/ShadeKernel.js +27 -27
- package/src/{TSL → shaders/kernels}/SortGlobalKernels.js +2 -2
- package/src/{TSL → shaders}/patches.js +1 -1
- package/src/{Storage → storage}/BLASCache.js +1 -1
- package/src/{Storage → storage}/DownloadCache.js +10 -0
- package/src/{Headless.js → viewer/Headless.js} +15 -3
- package/src/{PathTracerApp.js → viewer/PathTracerApp.js} +54 -32
- package/src/{SceneState → viewer}/SceneState.js +3 -3
- package/src/{managers → viewer/animation}/AnimationManager.js +1 -1
- package/src/{managers/timeline → viewer/animation}/CameraTrack.js +1 -1
- package/src/{managers/timeline → viewer/animation}/TimelineManager.js +1 -1
- package/src/{managers → viewer/animation}/VideoRenderManager.js +4 -4
- package/src/{managers → viewer/camera}/CameraManager.js +10 -10
- package/src/{managers → viewer/camera}/InteractionManager.js +4 -4
- package/src/{Stages → viewer/denoise}/DenoiserSettings.js +1 -1
- package/src/{managers → viewer/denoise}/DenoisingManager.js +27 -17
- package/src/{Stages → viewer/denoise}/MotionVector.js +3 -3
- package/src/{Stages → viewer/denoise}/NRD.js +4 -4
- package/src/{Stages → viewer/denoise}/NormalDepth.js +8 -8
- package/src/{Passes → viewer/denoise}/OIDNDenoiser.js +94 -25
- package/src/{Passes → viewer/denoise}/OIDNTemporalHistory.js +1 -1
- package/src/{managers → viewer/lights}/GoboManager.js +3 -3
- package/src/{managers → viewer/lights}/IESManager.js +4 -4
- package/src/{Processor → viewer/lights}/IESParser.js +1 -1
- package/src/{managers → viewer/overlays}/OverlayManager.js +10 -10
- package/src/{managers/helpers → viewer/overlays}/TransformGizmoHelper.js +1 -1
- package/src/{managers → viewer/overlays}/TransformManager.js +1 -1
- package/src/{managers/helpers → viewer/overlays}/ViewOverlayRenderer.js +2 -12
- package/src/{Passes → viewer/picture}/AIUpscaler.js +3 -3
- package/src/{Processor/Workers → viewer/picture}/AIUpscalerWorker.js +2 -2
- package/src/{Stages → viewer/picture}/AutoExposure.js +2 -2
- package/src/{Stages → viewer/picture}/LocalExposure.js +2 -2
- package/src/{neural → viewer/picture}/NeuralRetouch.js +3 -3
- package/src/{neural → viewer/picture}/NeuralSuperRes.js +5 -5
- package/src/viewer/picture/PictureView.js +205 -0
- package/dist/RayzeeRenderer-D1NeGoVA.js +0 -4051
- package/dist/SceneMetadata-BBx6k2EY.js +0 -183
- package/dist/identity-CtOwEU7N.js +0 -49
- package/dist/shared-ubP8eJlr.js +0 -17
- package/src/Processor/generateMaterialSpheres.js +0 -71
- package/src/Processor/utils.js +0 -613
- /package/dist/{AssetConfig-BY4jDfTH.js → AssetConfig-C8BsprCp.js} +0 -0
- /package/src/{utils/Logger.js → Logger.js} +0 -0
- /package/src/{Processor → bvh}/ReinsertionOptimizer.js +0 -0
- /package/src/{Color → color}/ActiveColor.js +0 -0
- /package/src/{Color → color}/BakedViews.js +0 -0
- /package/src/{Color → color}/BasicColor.js +0 -0
- /package/src/{Color → color}/BuiltinViews.js +0 -0
- /package/src/{Color → color}/ColorSpaces.js +0 -0
- /package/src/{Color → color}/Displays.js +0 -0
- /package/src/{Color → color}/InputColorSpaces.js +0 -0
- /package/src/{Color → color}/LutBake.js +0 -0
- /package/src/{Color → color}/OcioViews.js +0 -0
- /package/src/{Color → color}/ViewTransforms.js +0 -0
- /package/src/{Color → color}/WorkingMatrix.js +0 -0
- /package/src/{Processor → environment}/AtmosphereModel.js +0 -0
- /package/src/{Processor → environment}/SimpleSky.js +0 -0
- /package/src/{Processor → environment}/SunPosition.js +0 -0
- /package/src/{Processor → lights}/LightBVHBuilder.js +0 -0
- /package/src/{Processor → lights}/blackbody.js +0 -0
- /package/src/{Processor → loaders}/FileFormats.js +0 -0
- /package/src/{Processor → loaders}/GLTFDecoders.js +0 -0
- /package/src/{Processor → loaders}/GLTFDiffuseTransmission.js +0 -0
- /package/src/{Processor → loaders}/PlatformImageLoader.js +0 -0
- /package/src/{Processor → loaders}/SceneMetadata.js +0 -0
- /package/src/{Processor → loaders/archives}/ArchiveReader.js +0 -0
- /package/src/{Processor → loaders/archives}/ZipReader.js +0 -0
- /package/src/{Processor → loaders/archives}/archiveFormats.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/EqualAreaOctahedral.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/LoopSubdivision.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTAnimation.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTCurves.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTMaterials.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTMath.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTParser.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTScattering.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTTextureBake.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PBRTTokenizer.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/PFM.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/buffers.js +0 -0
- /package/src/{Processor/PBRT → loaders/pbrt}/index.js +0 -0
- /package/src/{Processor/USD → loaders/usd}/USDLayer.js +0 -0
- /package/src/{Processor/USD → loaders/usd}/USDStage.js +0 -0
- /package/src/{Processor/USD → loaders/usd}/USDText.js +0 -0
- /package/src/{Processor → materials}/ResampleRGBA8.js +0 -0
- /package/src/{Processor → materials}/TextureBuckets.js +0 -0
- /package/src/{Processor → memory}/ChunkedRecords.js +0 -0
- /package/src/{Processor → memory}/VRAMTracker.js +0 -0
- /package/src/{Processor → output}/ImageEncoders.js +0 -0
- /package/src/{Processor → output}/TextureReadback.js +0 -0
- /package/src/{Processor → pathtracer}/CameraOptimizer.js +0 -0
- /package/src/{Pipeline → pipeline}/BindingAudit.js +0 -0
- /package/src/{Pipeline → pipeline}/EventDispatcher.js +0 -0
- /package/src/{Pipeline → pipeline}/PipelineContext.js +0 -0
- /package/src/{Pipeline → pipeline}/RenderPipeline.js +0 -0
- /package/src/{Pipeline → pipeline}/RenderStage.js +0 -0
- /package/src/{SceneState/portable.js → portable.js} +0 -0
- /package/src/{Processor → scene}/BufferLayout.js +0 -0
- /package/src/{Processor → scene}/InstanceTable.js +0 -0
- /package/src/{SceneHelpers.js → scene/SceneHelpers.js} +0 -0
- /package/src/{managers → scene}/ViewCamera.js +0 -0
- /package/src/{TSL → shaders}/Bidirectional.js +0 -0
- /package/src/{TSL → shaders}/BidirectionalLamps.js +0 -0
- /package/src/{TSL → shaders}/Clearcoat.js +0 -0
- /package/src/{TSL → shaders}/Debugger.js +0 -0
- /package/src/{TSL → shaders}/Displacement.js +0 -0
- /package/src/{TSL → shaders}/EnvironmentCDF.js +0 -0
- /package/src/{TSL → shaders}/Fresnel.js +0 -0
- /package/src/{TSL → shaders}/HitFacet.js +0 -0
- /package/src/{TSL → shaders}/LightBVHSampling.js +0 -0
- /package/src/{TSL → shaders}/LightsCore.js +0 -0
- /package/src/{TSL → shaders}/LightsDirect.js +0 -0
- /package/src/{TSL → shaders}/LightsIndirect.js +0 -0
- /package/src/{TSL → shaders}/LightsSampling.js +0 -0
- /package/src/{TSL → shaders}/MaterialEvaluation.js +0 -0
- /package/src/{TSL → shaders}/MaterialProperties.js +0 -0
- /package/src/{TSL → shaders}/MaterialSampling.js +0 -0
- /package/src/{TSL → shaders}/MaterialTransmission.js +0 -0
- /package/src/{TSL → shaders}/PathTracerCore.js +0 -0
- /package/src/{TSL → shaders}/Random.js +0 -0
- /package/src/{TSL → shaders}/SceneResources.js +0 -0
- /package/src/{TSL → shaders}/ShadowTerminator.js +0 -0
- /package/src/{TSL → shaders}/Struct.js +0 -0
- /package/src/{TSL → shaders}/Subsurface.js +0 -0
- /package/src/{Storage → storage}/CDFCache.js +0 -0
- /package/src/{Storage → storage}/GeometrySpill.js +0 -0
- /package/src/{Storage → storage}/SceneGraphCodec.js +0 -0
- /package/src/{Storage → storage}/SpillStore.js +0 -0
- /package/src/{Storage → storage}/StorageManager.js +0 -0
- /package/src/{Storage → storage}/StorageOps.js +0 -0
- /package/src/{Storage → storage}/StorageWorker.js +0 -0
- /package/src/{Storage → storage}/areas.js +0 -0
- /package/src/{Storage → storage}/events.js +0 -0
- /package/src/{Storage → storage}/identity.js +0 -0
- /package/src/{Storage → storage}/index.js +0 -0
- /package/src/{Storage → storage}/inlineTransport.js +0 -0
- /package/src/{Storage → storage}/locks.js +0 -0
- /package/src/{Storage → storage}/openStorage.js +0 -0
- /package/src/{Storage → storage}/sceneCachePolicy.js +0 -0
- /package/src/{Storage → storage}/shared.js +0 -0
- /package/src/{Storage → storage}/transport.js +0 -0
- /package/src/{managers → viewer/camera}/WalkControls.js +0 -0
- /package/src/{managers/helpers → viewer/overlays}/OutlineHelper.js +0 -0
- /package/src/{managers/helpers → viewer/overlays}/TileHelper.js +0 -0
- /package/src/{managers/helpers → viewer/overlays}/overlaySurface.js +0 -0
package/README.md
CHANGED
|
@@ -147,7 +147,7 @@ A single HTML file — no Node.js, no build step. Uses [ES module import maps](h
|
|
|
147
147
|
"three/tsl": "https://cdn.jsdelivr.net/npm/three@0.186.0/build/three.tsl.js",
|
|
148
148
|
"three/webgpu": "https://cdn.jsdelivr.net/npm/three@0.186.0/build/three.webgpu.js",
|
|
149
149
|
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.186.0/examples/jsm/",
|
|
150
|
-
"oidn-
|
|
150
|
+
"oidn-webgpu/": "https://cdn.jsdelivr.net/npm/oidn-webgpu@0.6.0/",
|
|
151
151
|
"rayzee": "https://cdn.jsdelivr.net/npm/rayzee/dist/rayzee.es.js"
|
|
152
152
|
}
|
|
153
153
|
}
|
|
@@ -1081,6 +1081,7 @@ surface** — pin a version and branch on the strings; they are never renamed or
|
|
|
1081
1081
|
| `emissive.instances_collapsed` | an emissive instanced mesh was too large to expand, so its copies light the scene as one |
|
|
1082
1082
|
| `refit.shared_geometry` | a deform was asked for on a mesh that shares its triangles, and was skipped |
|
|
1083
1083
|
| `denoiser.unavailable` | a requested denoise or upscale produced nothing — the denoiser was not built, OIDN was off while accumulating, or the pass needs a canvas in a document |
|
|
1084
|
+
| `denoiser.non_finite_input` | the render handed OIDN NaN or infinite pixels (`detail.color` / `albedo` / `normal`: how many), which were treated as zero — a warning, recorded again only after a clean frame |
|
|
1084
1085
|
| `output.source_fallback` | `renderToBuffer( { source: 'display' } )` found no denoised picture and returned the raw accumulation |
|
|
1085
1086
|
| `output.tonemap_fallback` | `renderToBuffer`'s `'srgb'` bytes were tone-mapped on the CPU, not the GPU — the picture is the same within a level, only slower (a warning: strict does not throw) |
|
|
1086
1087
|
| `output.pass_unavailable` | `exportImage` was asked for an EXR layer it cannot write, such as `albedo` or `normal` with no denoiser on (`detail.pass`); the file is written without it |
|
|
@@ -1163,7 +1164,14 @@ engine.exportInfo(); // what can be written now: { width, height, upscaled, hd
|
|
|
1163
1164
|
- **Where each works.** JPEG, WebP, HEIC and AVIF need a browser (its canvas or video encoder); PNG, EXR and HDR work in
|
|
1164
1165
|
Node too. `canEncodeStill('heic')` from `rayzee/encoders` says whether this browser can write HEIC or AVIF.
|
|
1165
1166
|
- Render details (samples, size, view, settings, versions) go into the file, except a WebP, unless `metadata: false`.
|
|
1166
|
-
|
|
1167
|
+
An EXR's also say how its picture was shown (the exposure, auto exposure's included, local exposure and a held
|
|
1168
|
+
backdrop). The file writers download on the first export, not at startup.
|
|
1169
|
+
- **Showing a saved EXR again.** `await engine.createPictureView(canvas)` (the viewer, `PathTracerApp`) gives a
|
|
1170
|
+
picture view on a canvas of your own; `await view.show(exrBlob)` draws the raw EXR exactly as an HDR screen showed it,
|
|
1171
|
+
through the same view, exposure and local exposure, and returns `{ shown, reason }` (`reason`: the screen shows no HDR,
|
|
1172
|
+
the file has no such details, its colour config is not the one loaded, or a later `show()` took over). It reads the
|
|
1173
|
+
file's header first and decodes the pixels only of a file it shows. `view.setGrade(fn)` adds your own edit after
|
|
1174
|
+
the view, a TSL function of the shown colour; `view.redraw()` after its uniforms change; `view.dispose()`.
|
|
1167
1175
|
|
|
1168
1176
|
The writers are also a module of their own, `rayzee/encoders`, for pixels a host already has. It is part of the
|
|
1169
1177
|
package, not an add-on: nothing to install, and importing it loads nothing else (9 KB compressed).
|
|
@@ -1232,7 +1240,7 @@ engine.vram.getReport(); // formatted one-line summary string
|
|
|
1232
1240
|
|
|
1233
1241
|
`denoiser` is what the engine allocates for OIDN — its three float inputs, its half-float output and
|
|
1234
1242
|
the motion history. `canvas` is one image per presented surface (a browser may keep one or two more)
|
|
1235
|
-
plus the buffer three.js's output pass tone-maps through. Not counted: oidn-
|
|
1243
|
+
plus the buffer three.js's output pass tone-maps through. Not counted: oidn-webgpu's own network weights
|
|
1236
1244
|
and activations, which it reports by count, not by size; and the neural passes, which run on a
|
|
1237
1245
|
`GPUDevice` of their own.
|
|
1238
1246
|
|
|
@@ -1306,10 +1314,10 @@ const blob = await engine.screenshot();
|
|
|
1306
1314
|
engine.setDeterministicMode(false); // restore the previous configuration
|
|
1307
1315
|
```
|
|
1308
1316
|
|
|
1309
|
-
The RNG is already pure — `hash(pixel, rayIndex, frame)`, no clock, no `Math.random()` in any shader. What varies run to run is *which* uniforms and dispatch grids are live on frame k, so `setDeterministicMode` disables adaptive sampling, per-pixel freeze, the readback-driven per-bounce early exit and
|
|
1317
|
+
The RNG is already pure — `hash(pixel, rayIndex, frame)`, no clock, no `Math.random()` in any shader. What varies run to run is *which* uniforms and dispatch grids are live on frame k, so `setDeterministicMode` disables adaptive sampling, per-pixel freeze, the readback-driven per-bounce early exit and GPU-sized dispatch, interaction mode, auto-focus, and auto-exposure, and pins the sampler's seed axis to the accumulation frame. It also forces `renderLimitMode` to `'frames'` — a wall-clock render limit retires at a run-dependent sample count. It leaves the rAF loop stopped; `renderFrames` is the drive.
|
|
1310
1318
|
|
|
1311
1319
|
- `engine.isDeterministic` — whether output is currently bit-reproducible.
|
|
1312
|
-
- `setDeterministicMode(true, { pinDispatch: false })` keeps the two readback-driven
|
|
1320
|
+
- `setDeterministicMode(true, { pinDispatch: false })` keeps the two dispatch heuristics active (GPU-sized dispatch and the readback-driven early exit). Output is then *not* reproducible; this exists so performance measurements reflect shipping behaviour rather than a configuration production never runs.
|
|
1313
1321
|
- `renderFrames` raises `maxSamples` if needed, and throws if something retires the render early.
|
|
1314
1322
|
|
|
1315
1323
|
#### Production renders, reproducibly
|
|
@@ -1328,8 +1336,9 @@ It renders without `requestAnimationFrame` until the sample ceiling, convergence
|
|
|
1328
1336
|
whichever comes first — then runs the final OIDN denoise once, and fires `RENDER_COMPLETE` as the
|
|
1329
1337
|
loop does. Adaptive sampling decides from counts read back from the GPU; normally each is applied
|
|
1330
1338
|
whenever it lands, so the frame that retires depends on how fast frames are submitted. For its
|
|
1331
|
-
duration `renderUntilComplete` runs those readbacks in **lockstep**:
|
|
1332
|
-
at frame
|
|
1339
|
+
duration `renderUntilComplete` runs those readbacks in **lockstep**: the first, issued at frame 1, is
|
|
1340
|
+
applied at frame 2, then one issued at frame N (a multiple of 4) at frame N + 4 exactly, and the
|
|
1341
|
+
render waits if one has not landed; every reset also starts from seed
|
|
1333
1342
|
0 and from nothing the previous render measured. It turns interaction mode off meanwhile (a
|
|
1334
1343
|
wall-clock mode for camera drags), and keeps submissions at most 2 × `drainEvery` frames ahead of
|
|
1335
1344
|
the GPU. A time limit is wall-clock by nature, so that one stop is not reproducible. Auto exposure, if you turn it
|
|
@@ -1339,7 +1348,7 @@ on, lands on a metering of the finished image before the closing denoise.
|
|
|
1339
1348
|
|
|
1340
1349
|
#### Batch rendering
|
|
1341
1350
|
|
|
1342
|
-
The supported entry point for a render farm is `rayzee/src/Headless.js`, exported from the package.
|
|
1351
|
+
The supported entry point for a render farm is `rayzee/src/viewer/Headless.js`, exported from the package.
|
|
1343
1352
|
Its defaults are a batch renderer's — `strict`, deterministic, storage off —
|
|
1344
1353
|
so a degraded render throws instead of shipping:
|
|
1345
1354
|
|
|
@@ -1360,6 +1369,9 @@ try {
|
|
|
1360
1369
|
`denoise: true` turns OIDN on before accumulating (it reads the albedo and normal buffers, which
|
|
1361
1370
|
are written only while it is on), runs **one** final denoise with `app.runFinalDenoise()`, and reads
|
|
1362
1371
|
it back with `renderToBuffer( { source: 'display' } )`. Driving it yourself is the same three calls.
|
|
1372
|
+
`denoise: { quality: 'high', tileSize: 2048 }` also picks the model (the default is `'fast'`) and the tile cap: with no
|
|
1373
|
+
live view to keep smooth, a larger cap is faster for more GPU memory — 1920×1080 as one tile instead of four took 27 %
|
|
1374
|
+
less time on an M5 Pro. A tile never grows past what the GPU can dispatch (~2000² with its border), whatever the cap.
|
|
1363
1375
|
`renderToBuffer` reports the picture it read as `source`, and records `output.source_fallback` when
|
|
1364
1376
|
`'display'` was asked for, a denoiser is in use, and nothing had published — so a strict host cannot
|
|
1365
1377
|
ship a noisy image by mistake. Its `'srgb'` bytes are tone-mapped on the GPU — 9 ms at 4096×2160,
|
|
@@ -1377,7 +1389,8 @@ here, or `engine.settings` before loading the model.
|
|
|
1377
1389
|
|
|
1378
1390
|
**Provenance.** `engine.getProvenance()` — also `frame.provenance` from `captureHeadless` — is plain
|
|
1379
1391
|
JSON naming what produced the image: engine and three.js versions, the adapter, every live setting with its source, the colour pipeline, the render size and
|
|
1380
|
-
samples,
|
|
1392
|
+
samples, whether it ran headless, strict, deterministic or lockstepped, and the denoisers (`denoise.live`, and
|
|
1393
|
+
`denoise.final`: the OIDN tier, weights file, precision and tile). `mode.lockstep` says
|
|
1381
1394
|
whether the current image was traced in lockstep, so it stays true after `renderUntilComplete` turns
|
|
1382
1395
|
lockstep back off. Store it beside each render and "what made this?" has an answer without rendering
|
|
1383
1396
|
again.
|
|
@@ -1417,7 +1430,7 @@ app.dispose();
|
|
|
1417
1430
|
- **No canvas means headless.** `new PathTracerApp(null)` — or `{ headless: true }` — makes its own
|
|
1418
1431
|
canvas (a WebGPU context over a plain texture), runs no render loop (drive it with `renderFrames` or
|
|
1419
1432
|
`renderUntilComplete`), and builds neither the overlay renderer nor the transform gizmo.
|
|
1420
|
-
- **`configurePlatform({ Worker, decodeImage })`** is where a host without a browser supplies what one
|
|
1433
|
+
- **`configurePlatform({ Worker, decodeImage, readFile })`** is where a host without a browser supplies what one
|
|
1421
1434
|
would. `nodePlatform()` from `rayzee/node` fills it: `NodeWorker`, the Web Worker API over
|
|
1422
1435
|
`worker_threads`, runs the engine's inlined workers; `decodeImage(bytes, mimeType)` is yours — PNG,
|
|
1423
1436
|
JPEG or WebP to RGBA8, straight alpha, top row first — since the engine carries no decoder. It decodes
|
|
@@ -1438,6 +1451,10 @@ app.dispose();
|
|
|
1438
1451
|
packs in a worker, reading images decoded by `decodeImage` in place (they are kept in shared
|
|
1439
1452
|
memory): on the main thread it held up the BVH workers, and a 1.9M-triangle, 91-texture model
|
|
1440
1453
|
loaded in 4.1–4.9 s. It now loads in 2.1 s, against Chrome's 2.9 s on the same machine.
|
|
1454
|
+
- **Offline: OIDN weights from disk.** Node's `fetch` cannot open `file:` URLs, so `nodePlatform()` also hands
|
|
1455
|
+
the engine a file reader, and what it downloads itself — the OIDN weights, IES profiles — can come from a folder:
|
|
1456
|
+
`configureAssets({ oidnWeightsBaseUrl: 'file:///opt/rayzee/oidn/' })`, holding the `.tza` files the tiers
|
|
1457
|
+
name (`rt_hdr_alb_nrm_small`, `rt_hdr_calb_cnrm_small`, `rt_hdr_calb_cnrm`, `rt_hdr_calb_cnrm_large`).
|
|
1441
1458
|
- `nodePlatform()` also defines `ProgressEvent`, which three.js's `FileLoader` constructs while
|
|
1442
1459
|
streaming; that is the only global it sets. three.js's own Draco and KTX2 loaders call the global
|
|
1443
1460
|
`Worker`; the engine lends them `NodeWorker` for the length of each glTF parse, so a Draco or KTX2
|
|
@@ -1461,7 +1478,7 @@ WebGPU timestamp queries are the only true GPU metric here — `pipeline.getStat
|
|
|
1461
1478
|
|
|
1462
1479
|
`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`.
|
|
1463
1480
|
|
|
1464
|
-
Neither method can see the OIDN denoise — `oidn-
|
|
1481
|
+
Neither method can see the OIDN denoise — `oidn-webgpu` submits on its own command encoders, outside
|
|
1465
1482
|
the stages three.js times. It carries its own profiler instead:
|
|
1466
1483
|
|
|
1467
1484
|
```js
|
|
@@ -1781,7 +1798,7 @@ import { setBindingAudit, getBindingAuditFindings, clearBindingAuditFindings } f
|
|
|
1781
1798
|
|
|
1782
1799
|
| Package | Purpose | Install needed? |
|
|
1783
1800
|
|---|---|---|
|
|
1784
|
-
| `oidn-
|
|
1801
|
+
| `oidn-webgpu` | Intel Open Image Denoise for high-quality final renders | Yes — `npm install oidn-webgpu` (**>=0.6.0**; it was `oidn-web` up to 0.5.0) |
|
|
1785
1802
|
| `onnxruntime-web` | AI-powered upscaling | No — loaded from CDN at runtime |
|
|
1786
1803
|
| `@bb-studio/ocio` | OpenColorIO runtime for [Colour Management](#colour-management) (~6 MB WebAssembly) | Only to load colour configs — `npm install @bb-studio/ocio`, then pass it as `ocioRuntimeFactory` |
|
|
1787
1804
|
|
|
@@ -1797,7 +1814,7 @@ accumulating, so a preview shows a clean picture as it refines instead of only a
|
|
|
1797
1814
|
1. **Install the package**
|
|
1798
1815
|
|
|
1799
1816
|
```bash
|
|
1800
|
-
npm install oidn-
|
|
1817
|
+
npm install oidn-webgpu
|
|
1801
1818
|
```
|
|
1802
1819
|
|
|
1803
1820
|
2. **Enable in your app**
|
|
@@ -1912,7 +1929,7 @@ Two constraints shape that table, and neither is optional:
|
|
|
1912
1929
|
(`> 120 ms`).** A tier a machine can afford is kept — at 512² that is every tier. The verdict
|
|
1913
1930
|
survives a camera move, because the device does not get faster between them; it is re-taken when
|
|
1914
1931
|
the tier or the resolution changes. Past it, each render swaps twice (to the cheap model when the
|
|
1915
|
-
view moves, back for the finished image). A swap costs 10
|
|
1932
|
+
view moves, back for the finished image). A swap costs 10–50 ms on oidn-webgpu 0.6.0 (the large model the most), and each model's
|
|
1916
1933
|
weights are downloaded once and kept, so a swap never goes back to the network.
|
|
1917
1934
|
|
|
1918
1935
|
#### What paces the refreshes
|
|
@@ -1972,8 +1989,9 @@ Denoise cost scales with frame area, and the tile tracks the frame so that a fra
|
|
|
1972
1989
|
tile pays no overlap padding — at 1024x1024 that is roughly 1.8x faster than tiling it. A cap
|
|
1973
1990
|
(default 1024) bounds the one-time activation allocation, so larger frames tile and stay
|
|
1974
1991
|
memory-bounded. Raise or lower it with
|
|
1975
|
-
`engine.denoisingManager.denoiser.updateConfiguration({ tileSize: 2048 })
|
|
1976
|
-
`
|
|
1992
|
+
`engine.denoisingManager.denoiser.updateConfiguration({ tileSize: 2048 })`: a frame no larger in area than
|
|
1993
|
+
`tileSize`² is one tile, a larger one is split into tiles of at most `tileSize`, and no tile grows past what the GPU
|
|
1994
|
+
can dispatch (about 2000² with its border and overlap) — past that the denoise would silently do nothing.
|
|
1977
1995
|
|
|
1978
1996
|
> **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.
|
|
1979
1997
|
|
|
@@ -2002,13 +2020,13 @@ engine.addEventListener(EngineEvents.UPSCALING_END, () => console.log('Upsc
|
|
|
2002
2020
|
## Troubleshooting
|
|
2003
2021
|
|
|
2004
2022
|
**OIDN: `Cannot find module './tza'` (webpack)**
|
|
2005
|
-
The `oidn-
|
|
2023
|
+
The `oidn-webgpu` package uses dynamic imports that webpack cannot resolve. This does not affect Vite or other ESM-native bundlers. Add the engine's import of it to your webpack externals:
|
|
2006
2024
|
|
|
2007
2025
|
```js
|
|
2008
2026
|
// webpack.config.js
|
|
2009
2027
|
module.exports = {
|
|
2010
2028
|
externals: {
|
|
2011
|
-
'oidn-
|
|
2029
|
+
'oidn-webgpu/dist/oidn.js': 'oidn-webgpu/dist/oidn.js'
|
|
2012
2030
|
}
|
|
2013
2031
|
};
|
|
2014
2032
|
```
|
|
@@ -2019,7 +2037,7 @@ Then load it via a script tag or import map instead:
|
|
|
2019
2037
|
<script type="importmap">
|
|
2020
2038
|
{
|
|
2021
2039
|
"imports": {
|
|
2022
|
-
"oidn-
|
|
2040
|
+
"oidn-webgpu/dist/oidn.js": "https://cdn.jsdelivr.net/npm/oidn-webgpu@0.6.0/dist/oidn.js"
|
|
2023
2041
|
}
|
|
2024
2042
|
}
|
|
2025
2043
|
</script>
|