rayzee 11.2.1 → 11.4.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 +91 -34
- package/dist/ArchiveImporter-Cgyx5AF7.js +7860 -0
- package/dist/BidirectionalIntegrator-BKF-cwH2.js +954 -0
- package/dist/{BufferLayout-D_IBo2ci.js → BufferLayout-xPRH9jYD.js} +41 -5
- package/dist/{NeuralRetouch-Cr-otSW8.js → NeuralRetouch-C3Q2XqbF.js} +4 -3
- package/dist/{NeuralSuperRes-B7E3_M0t.js → NeuralSuperRes-DV5TtURP.js} +11 -5
- package/dist/{PathTracer-D6nbknj5.js → PathTracer-D3MvEaZK.js} +4384 -4618
- package/dist/{PhysicalSky-Dq5VSiCQ.js → PhysicalSky-CY4jiz6a.js} +2 -2
- package/dist/{RayzeeRenderer-DbjqO6v-.js → RayzeeRenderer-D23m6NqG.js} +486 -391
- package/dist/SolarLimb-bZE6y63S.js +762 -0
- package/dist/{ToneMapGPU-BOjpul7A.js → ToneMapGPU-CTDBvmmS.js} +31 -22
- package/dist/addons/archives.es.js +1 -1
- package/dist/addons/bidirectional.es.js +1 -1
- package/dist/addons/physical-sky.es.js +1 -1
- package/dist/rayzee-core.es.js +7 -7
- package/dist/rayzee.es.js +1327 -838
- package/dist/rayzee.umd.js +146 -134
- package/dist/sceneCachePolicy-AKOEu2lf.js +1602 -0
- package/package.json +1 -1
- package/src/EngineDefaults.js +2 -2
- package/src/Passes/AIUpscaler.js +2 -0
- package/src/PathTracerApp.js +126 -19
- package/src/Pipeline/CompletionTracker.js +7 -3
- package/src/Processor/ArchiveImporter.js +173 -94
- package/src/Processor/ArchiveReader.js +20 -23
- package/src/Processor/AssetLoader.js +48 -1
- package/src/Processor/BVHRefitter.js +109 -13
- package/src/Processor/BufferLayout.js +115 -0
- package/src/Processor/ChunkedRecords.js +3 -2
- package/src/Processor/EmissiveTriangleBuilder.js +6 -6
- package/src/Processor/GeometryExtractor.js +189 -79
- package/src/Processor/HostMemory.js +39 -9
- package/src/Processor/InstanceTable.js +714 -42
- package/src/Processor/PBRT/PBRTCurves.js +224 -6
- package/src/Processor/PBRT/PBRTMaterials.js +3 -0
- package/src/Processor/PBRT/PBRTSceneBuilder.js +82 -25
- package/src/Processor/PackedRayBuffer.js +5 -2
- package/src/Processor/SceneProcessor.js +747 -141
- package/src/Processor/TLASBuilder.js +32 -17
- package/src/Processor/ToneMapCPU.js +16 -4
- package/src/Processor/ToneMapGPU.js +30 -14
- package/src/Processor/USD/USDLayer.js +1149 -0
- package/src/Processor/USD/USDScene.js +1655 -0
- package/src/Processor/USD/USDStage.js +682 -0
- package/src/Processor/USD/USDText.js +674 -0
- package/src/Processor/USD/index.js +138 -0
- package/src/Processor/Workers/BVHRefitWorker.js +3 -3
- package/src/RayzeeRenderer.js +221 -33
- package/src/RenderSettings.js +4 -2
- package/src/Stages/AutoExposure.js +484 -494
- package/src/Stages/Compositor.js +27 -6
- package/src/Stages/LocalExposure.js +546 -0
- package/src/Stages/NormalDepth.js +7 -12
- package/src/Stages/PathTracer.js +18 -21
- package/src/Stages/PathTracerStage.js +282 -103
- package/src/Storage/GeometrySpill.js +46 -14
- package/src/Storage/SceneGraphCodec.js +17 -3
- package/src/Storage/SpillStore.js +9 -0
- package/src/TSL/BVHTraversal.js +183 -7
- package/src/TSL/Common.js +57 -13
- package/src/TSL/ShadeKernel.js +3 -2
- package/src/TSL/TextureSampling.js +11 -8
- package/src/TSL/patches.js +84 -0
- package/src/index.js +1 -0
- package/src/integrators/BidirectionalIntegrator.js +20 -2
- package/src/managers/DenoisingManager.js +15 -19
- package/src/managers/InteractionManager.js +19 -6
- package/src/managers/MaterialDataManager.js +22 -5
- package/src/managers/UniformManager.js +3 -0
- package/src/managers/VideoRenderManager.js +30 -4
- package/src/neural/NeuralRetouch.js +1 -0
- package/src/neural/NeuralSuperRes.js +6 -1
- package/dist/ArchiveImporter-D_x863yu.js +0 -5198
- package/dist/BidirectionalIntegrator-DmkxxEOR.js +0 -946
- package/dist/SolarLimb-CPaeZVwz.js +0 -721
- package/dist/sceneCachePolicy-C4-4qwt6.js +0 -485
package/src/Stages/PathTracer.js
CHANGED
|
@@ -57,7 +57,6 @@ export class PathTracer extends PathTracerStage {
|
|
|
57
57
|
this._packedBuffers = null;
|
|
58
58
|
this._queueManager = null;
|
|
59
59
|
this._kernelManager = null;
|
|
60
|
-
this._gBufferAttr = null; // per-pixel first-hit MRT (ND + albedo); see _buildWavefrontKernels
|
|
61
60
|
this._m2Attr = null; // per-pixel running mean of luminance² for the Tier-1 convergence early-stop
|
|
62
61
|
this._streakAttr = null; // Tier-2: per-pixel freeze-candidate streak (u32); frozen := streak >= K
|
|
63
62
|
// Tier-2 dilation: per-pixel frozen mask (1=skip), written race-free in buildActivePixels; a frozen pixel
|
|
@@ -209,7 +208,6 @@ export class PathTracer extends PathTracerStage {
|
|
|
209
208
|
t.register( 'gbuffer', () => {
|
|
210
209
|
|
|
211
210
|
const a = [];
|
|
212
|
-
if ( this._gBufferAttr ) a.push( this._gBufferAttr );
|
|
213
211
|
if ( this._m2Attr ) a.push( this._m2Attr );
|
|
214
212
|
if ( this._streakAttr ) a.push( this._streakAttr );
|
|
215
213
|
if ( this._frozenMaskAttr ) a.push( this._frozenMaskAttr );
|
|
@@ -226,7 +224,8 @@ export class PathTracer extends PathTracerStage {
|
|
|
226
224
|
} );
|
|
227
225
|
|
|
228
226
|
// Scene geometry (triangle data, two-level BVH, light BVH + emissive)
|
|
229
|
-
|
|
227
|
+
// The light data shares the materials' buffer and is counted with them.
|
|
228
|
+
t.register( 'geometry', () => [ ...( this._geoParts?.attrs ?? [] ), ...( this._shadeParts?.attrs ?? [] ), ...( this._bvhParts?.attrs ?? [ this.bvhStorageAttr ] ) ] );
|
|
230
229
|
|
|
231
230
|
// Material storage buffer + per-property texture arrays
|
|
232
231
|
t.register( 'materials', () => {
|
|
@@ -1094,9 +1093,9 @@ export class PathTracer extends PathTracerStage {
|
|
|
1094
1093
|
*/
|
|
1095
1094
|
_willReadCountersThisFrame() {
|
|
1096
1095
|
|
|
1097
|
-
if ( this.
|
|
1096
|
+
if ( this.cameraOptimizer?.isInInteractionMode() ) return false;
|
|
1098
1097
|
if ( this._lockstep ) return ! this._lockstepRead && this.frameCount % this._readbackEveryNFrames === 0;
|
|
1099
|
-
if ( this._readbackPending || this._convergedReadbackPending ) return false;
|
|
1098
|
+
if ( this.cameraChanged || this._readbackPending || this._convergedReadbackPending ) return false;
|
|
1100
1099
|
return this._readbackFrameCounter + 1 >= this._readbackEveryNFrames;
|
|
1101
1100
|
|
|
1102
1101
|
}
|
|
@@ -1208,9 +1207,11 @@ export class PathTracer extends PathTracerStage {
|
|
|
1208
1207
|
|
|
1209
1208
|
_issueLockstepReadback() {
|
|
1210
1209
|
|
|
1211
|
-
// One in flight, and none
|
|
1210
|
+
// One in flight, and none in interaction mode: frames there do not count, so frameCount stands still. A moved
|
|
1211
|
+
// camera skips none: a reset's frame 0 sees one whenever the frame before it traced another view, and skipping
|
|
1212
|
+
// it there made the render depend on what was traced before.
|
|
1212
1213
|
if ( this._lockstepRead || this.frameCount % this._readbackEveryNFrames !== 0 ) return;
|
|
1213
|
-
if ( this.
|
|
1214
|
+
if ( this.cameraOptimizer?.isInInteractionMode() ) return;
|
|
1214
1215
|
|
|
1215
1216
|
const bounceAttr = this._queueManager?.getBounceCountsAttribute();
|
|
1216
1217
|
const counterAttr = this._queueManager?.getCountersAttribute();
|
|
@@ -1369,8 +1370,9 @@ export class PathTracer extends PathTracerStage {
|
|
|
1369
1370
|
_computePathBudget() {
|
|
1370
1371
|
|
|
1371
1372
|
const RAY_BYTES = RAY_STRIDE * 16;
|
|
1372
|
-
|
|
1373
|
-
const
|
|
1373
|
+
// The hit buffer carries the G-buffer as its last region.
|
|
1374
|
+
const HIT_BYTES = ( ( this._integrator?.hitStride ?? HIT_STRIDE ) + GBUFFER_STRIDE ) * 16;
|
|
1375
|
+
const bytesPerPath = RAY_BYTES + HIT_BYTES
|
|
1374
1376
|
+ 4 + 4 /* activeIndices A/B */ + 4;
|
|
1375
1377
|
|
|
1376
1378
|
const limits = this.renderer?.backend?.device?.limits;
|
|
@@ -1493,15 +1495,12 @@ export class PathTracer extends PathTracerStage {
|
|
|
1493
1495
|
|
|
1494
1496
|
}
|
|
1495
1497
|
|
|
1496
|
-
// Per-CHUNK first-hit G-buffer (LOCAL slot r, size B), 1 uvec4/slot half-packed (pack2x16)
|
|
1497
|
-
// Generate + Shade(bounce 0), read by Shade + FinalWrite within the
|
|
1498
|
-
// uint (not f32): packed lanes can hit the NaN exponent range (snorm 1.0 →
|
|
1499
|
-
// canonicalize; u32 stores the bits verbatim.
|
|
1500
|
-
const
|
|
1501
|
-
|
|
1502
|
-
this._gBufferAttr = gpuOnlyStorageAttribute( gBufferVec4s, 4, Uint32Array );
|
|
1503
|
-
const gBufferRW = storage( this._gBufferAttr, 'uvec4' );
|
|
1504
|
-
const gBufferRO = storage( this._gBufferAttr, 'uvec4' ).toReadOnly();
|
|
1498
|
+
// Per-CHUNK first-hit G-buffer (LOCAL slot r, size B), 1 uvec4/slot half-packed (pack2x16), the hit buffer's
|
|
1499
|
+
// last region (PackedRayBuffer). Written by Generate + Shade(bounce 0), read by Shade + FinalWrite within the
|
|
1500
|
+
// SAME chunk, so per-chunk suffices. uint (not f32): packed lanes can hit the NaN exponent range (snorm 1.0 →
|
|
1501
|
+
// 0x7FFF) that an f32 store may canonicalize; u32 stores the bits verbatim.
|
|
1502
|
+
const gBufferRW = this._packedBuffers.hitBuffer.rw;
|
|
1503
|
+
const gBufferRO = this._packedBuffers.hitBuffer.ro;
|
|
1505
1504
|
|
|
1506
1505
|
// Per-PIXEL persistent buffers (m2/streak/frozenMask) are GLOBAL-pixel-indexed (p = pixelBase + r) and
|
|
1507
1506
|
// must span the whole frame across chunks AND persist across frames, so they're sized to the reserved
|
|
@@ -1842,7 +1841,7 @@ export class PathTracer extends PathTracerStage {
|
|
|
1842
1841
|
const freshTri = this.triangleStorageNode;
|
|
1843
1842
|
const freshMat = this.materialData.materialStorageNode;
|
|
1844
1843
|
const freshEnvCDF = texture( this.environment.envCDFTexture ); // independent CDF texture node; refreshed in _refreshWfTextureNodes
|
|
1845
|
-
const freshLight = this.
|
|
1844
|
+
const freshLight = this.lightDataNode;
|
|
1846
1845
|
// Independent texture nodes (never compiled elsewhere) avoid Three.js TextureNode caching across pipelines; refreshed via _refreshWfTextureNodes.
|
|
1847
1846
|
const _mat = this.materialData;
|
|
1848
1847
|
const _env = this.environment;
|
|
@@ -2231,7 +2230,6 @@ export class PathTracer extends PathTracerStage {
|
|
|
2231
2230
|
this._packedBuffers?.dispose();
|
|
2232
2231
|
this._queueManager?.dispose();
|
|
2233
2232
|
this._kernelManager?.dispose();
|
|
2234
|
-
this._gBufferAttr?.dispose?.();
|
|
2235
2233
|
this._m2Attr?.dispose?.();
|
|
2236
2234
|
this._streakAttr?.dispose?.();
|
|
2237
2235
|
this._frozenMaskAttr?.dispose?.();
|
|
@@ -2241,7 +2239,6 @@ export class PathTracer extends PathTracerStage {
|
|
|
2241
2239
|
this._packedBuffers = null;
|
|
2242
2240
|
this._queueManager = null;
|
|
2243
2241
|
this._kernelManager = null;
|
|
2244
|
-
this._gBufferAttr = null;
|
|
2245
2242
|
this._m2Attr = null;
|
|
2246
2243
|
this._streakAttr = null;
|
|
2247
2244
|
this._frozenMaskAttr = null;
|