@woosh/meep-engine 3.60.3 → 3.60.4
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/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +3 -0
- package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -1
- package/editor/ecs/component/editors/ecs/Trail3DEditor.js +6 -0
- package/package.json +1 -1
- package/src/engine/ecs/ik/PLAN.md +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometryFlags.js +1 -2
- package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts +14 -0
- package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.d.ts.map +1 -0
- package/src/engine/graphics/ecs/trail3d/TRAIL3D_FADE_LINEAR.js +22 -0
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +19 -3
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.js +31 -4
- package/src/engine/graphics/ecs/trail3d/advance_trail.js +1 -1
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts +5 -5
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.d.ts.map +1 -1
- package/src/engine/graphics/trail/tube/simulator/TubeXFixedPhysicsSimulator.js +6 -6
- package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts +10 -0
- package/src/engine/graphics3/trail/trail_tube_write_geometry.d.ts.map +1 -1
- package/src/engine/graphics3/trail/trail_tube_write_geometry.js +13 -1
- package/src/engine/physics/cloth/ecs/cloth_geodesic.d.ts +2 -2
- package/src/engine/physics/cloth/ecs/cloth_geodesic.js +2 -2
- package/src/shade/playground/probe_clipmap/README.md +1 -0
- package/src/shade/playground/probe_clipmap/index.html +5 -0
- package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
- package/src/shade/playground/probe_clipmap/main.js +16 -2
- package/src/shade/playground/vgeo_scene/README.md +1 -1
- package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts +4 -6
- package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/MULTISCATTER_LUT_CONFIG.js +34 -36
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts +1 -1
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.d.ts.map +1 -1
- package/src/shade/renderer/atmosphere/chunk_get_multiscatter_values.js +162 -163
- package/src/shade/renderer/atmosphere/compute_mie_absorption.d.ts +1 -1
- package/src/shade/renderer/atmosphere/compute_mie_absorption.js +1 -1
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_EARTH.js +1 -1
- package/src/shade/renderer/atmosphere/hillaire/ATMOSPHERE_PARAMETERS_STRUCT.js +1 -1
- package/src/shade/renderer/atmosphere/shader_multiscatter_lut.js +164 -164
- package/src/shade/renderer/atmosphere/shader_sky_irradiance_lut.js +1 -1
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +2 -2
- package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +2 -2
- package/src/shade/renderer/geometry/sdf/cards/mesh_cards_raster_pass_descriptor.js +2 -2
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.d.ts +1 -1
- package/src/shade/renderer/geometry/sdf/cards/shader_mesh_cards_histogram.js +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts +4 -5
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.d.ts.map +1 -1
- package/src/shade/renderer/geometry/sdf/chunk_blas_query_band_sdf.js +6 -7
- package/src/shade/renderer/geometry/virtual/ATTRIBUTE_PLAN_2026_09_18.md +1 -1
- package/src/shade/renderer/geometry/virtual/VIRTUAL_GEOMETRY_PLAN.md +2 -4
- package/src/shade/renderer/geometry/virtual/WEDGE_PLAN_2026_09_18.md +1 -1
- package/src/shade/renderer/geometry/virtual/runtime/SHADOW_PLAN_2026_09_28.md +3 -10
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md +119 -38
- package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_RAYS_VARIABLE_AND_SORTED_SCOPE_2026_10_30.md +2 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +12 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +22 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +4 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +50 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +6 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +7 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js +13 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +17 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +20 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts +18 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_resampled.js +42 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +5 -4
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +4 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +13 -2
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts +52 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.d.ts.map +1 -0
- package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_resample.js +250 -0
- package/src/shade/renderer/light/cluster/PROPOSAL_ALGORITHM_2026_10_16.md +7 -7
- package/src/shade/renderer/light/cluster/PROPOSAL_HIERARCHICAL_2026_10_16.md +2 -2
- package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts +39 -0
- package/src/shade/renderer/light/environment/environment_level_1_blur_plan.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/environment_level_1_blur_plan.js +119 -0
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts +15 -7
- package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/execute_filter_environment_map.js +66 -83
- package/src/shade/renderer/light/environment/graph_filter_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/graph_filter_environment_map.js +15 -6
- package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts +3 -0
- package/src/shade/renderer/light/environment/shader_blur_environment_map.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/shader_blur_environment_map.js +111 -0
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts +3 -0
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.d.ts.map +1 -0
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_blurred.js +128 -0
- package/src/shade/renderer/light/environment/shader_downsample_environment_map.d.ts.map +1 -1
- package/src/shade/renderer/light/environment/shader_downsample_environment_map.js +0 -1
- package/src/shade/renderer/particles/EMITTER_GLOBAL_STATE_PLAN_2026_10_29.md +1 -4
- package/src/shade/renderer/particles/ORIENTATION_PLAN_2026_10_15.md +2 -2
- package/src/shade/renderer/postprocess/nss/NOTES.md +14 -21
- package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -3
- package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/NSS.js +1 -3
- package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts +5 -6
- package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/NSS_NETWORK_SCHEMA.js +9 -10
- package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/shader_nss_extract_feedback.js +48 -49
- package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.d.ts.map +1 -1
- package/src/shade/renderer/postprocess/nss/shader_nss_postprocess.js +12 -16
- package/src/shade/renderer/postprocess/nss/shader_nss_preprocess.js +246 -246
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts +1 -2
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.d.ts.map +1 -1
- package/src/shade/renderer/rasterize/chunk_triangle_winding_is_reversed.js +34 -35
- package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.d.ts +2 -2
- package/src/shade/renderer/shader/chunk/atmosphere/C_MIE_SCATTERING_DECLARATION.js +2 -2
- package/src/shade/renderer/shader/chunk/atmosphere/NOTES.md +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/chunk_compute_extinction.js +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/atmosphere/hillaire/DENSITY_PROFILE_LAYER_STRUCT.js +1 -1
- package/src/shade/renderer/shader/chunk/brdf/FRESNEL_BRIEF_2026_10_16.md +4 -7
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.d.ts +3 -3
- package/src/shade/renderer/shader/chunk/brdf/fresnel/chunk_F_Schlick.js +3 -3
- package/src/shade/renderer/shader/chunk/color/tonemap/ACES_TONE_MAPPING_BRIEF_2026_10_17.md +12 -19
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts +9 -10
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_aces_ue_matrices.js +9 -10
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.d.ts +4 -4
- package/src/shade/renderer/shader/chunk/color/tonemap/aces/chunk_tonemap_ue_filmic.js +5 -5
- package/src/shade/renderer/shader/chunk/material/MULTISCATTER.md +1 -1
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts +1 -2
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/math/chunk_f16_round_stochastic.js +1 -2
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts +14 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec2.js +19 -6
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts +10 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.d.ts.map +1 -1
- package/src/shade/renderer/shader/chunk/noise/chunk_stbn_sample_vec3.js +14 -6
- package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.d.ts +1 -1
- package/src/shade/renderer/shader/chunk/random/murmur/chunk_murmur3_vec3u.js +1 -1
- package/src/shade/renderer/shader/compiler/SHADER_SWITCH_PROPOSAL_2026_10_16.md +9 -14
- package/src/shade/renderer/shadow/contact/FINDINGS.md +5 -5
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts +2 -3
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.js +7 -8
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.d.ts +1 -1
- package/src/shade/renderer/shadow/vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.js +12 -12
- package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts +2 -2
- package/src/shade/renderer/shadow/vsm/VSMPageManager.d.ts.map +1 -1
- package/src/shade/renderer/shadow/vsm/VSMPageManager.js +3 -4
- package/src/shade/renderer/texture/mipmaps/NOTES.md +1 -2
- package/src/shade/renderer/volumetrics/VOLUMETRIC_NOISE_PLAN_2026_10_15.md +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts +0 -19
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.d.ts.map +1 -1
- package/src/view/elements/progress/segmented/SegmentedResourceBarView.js +2 -52
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts +0 -13
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.d.ts.map +0 -1
- package/src/shade/renderer/light/environment/shader_convolve_reflection_map_from_averages.js +0 -198
- package/src/view/elements/progress/segmented/segment_frame_transform.d.ts +0 -15
- package/src/view/elements/progress/segmented/segment_frame_transform.d.ts.map +0 -1
- package/src/view/elements/progress/segmented/segment_frame_transform.js +0 -69
package/src/shade/renderer/global_illumination/probe_clipmap/PROBE_CLIPMAP_PROPOSAL_2026_10_27.md
CHANGED
|
@@ -436,8 +436,7 @@ the SDF [49:08].
|
|
|
436
436
|
|
|
437
437
|
### 2.2 UE 5.4 Global Distance Field
|
|
438
438
|
|
|
439
|
-
|
|
440
|
-
the brick clipmap.
|
|
439
|
+
The production reference for the brick clipmap.
|
|
441
440
|
|
|
442
441
|
**Clipmaps**
|
|
443
442
|
- 4 clipmaps (up to 6) of 252 voxels a side, i.e. 36 pages × 7 voxels.
|
|
@@ -473,10 +472,9 @@ objects, with a minimum object radius of max(20 cm, ½ voxel).
|
|
|
473
472
|
|
|
474
473
|
### 2.3 UE 5.4 mesh distance fields, composition, and Lumen's surface cache
|
|
475
474
|
|
|
476
|
-
|
|
475
|
+
The production reference for §6 and §7.7.
|
|
477
476
|
|
|
478
|
-
**Mesh distance fields**
|
|
479
|
-
`Source/Developer/MeshUtilities/Private/MeshDistanceFieldUtilities.cpp`)
|
|
477
|
+
**Mesh distance fields**
|
|
480
478
|
- Bricks of 8³ texels with 7 unique on the corner lattice, `G8`, a band of 4, and 3 mips. An empty
|
|
481
479
|
brick is `0xFFFFFFFF` and reads +band.
|
|
482
480
|
- Resolution: 0.2 voxels a centimetre (5 cm) × a per-mesh scale. Mip 0 is capped at 128 voxels a
|
|
@@ -489,12 +487,10 @@ From the local source. The production reference for §6 and §7.7. Paths are und
|
|
|
489
487
|
- Rays are traced only where the unsigned distance is inside the band.
|
|
490
488
|
- There are 98 of them (a 7×7 stratified hemisphere and its mirror), each one band long.
|
|
491
489
|
- The voxel is inside when more than 25% hit back faces. Two-sided triangles never count.
|
|
492
|
-
- Translucent sections, and primitives with
|
|
490
|
+
- Translucent sections, and primitives with distance-field lighting disabled, are left out: the
|
|
493
491
|
precedent for the membership bit (D25).
|
|
494
492
|
|
|
495
|
-
**Composition**
|
|
496
|
-
`Shaders/Private/DistanceField/GlobalDistanceFieldCompositeObjects.usf`,
|
|
497
|
-
`Shaders/Private/MeshDistanceFieldCommon.ush`)
|
|
493
|
+
**Composition**
|
|
498
494
|
- Objects are culled to the clipmap, then to tiles of 4³ pages, then to each page's 4³-voxel tile in
|
|
499
495
|
LDS, 511 a pass. The passes loop, so there is no hard cap.
|
|
500
496
|
- Per object:
|
|
@@ -507,8 +503,7 @@ From the local source. The production reference for §6 and §7.7. Paths are und
|
|
|
507
503
|
3 inside clipmap 1's box, 2 inside clipmap 3's, 1 elsewhere.
|
|
508
504
|
- Mostly-static and movable layers are merged by a minimum: the static/dynamic category E4 refuses.
|
|
509
505
|
|
|
510
|
-
**The object grid**
|
|
511
|
-
`Shaders/Private/Lumen/LumenSoftwareRayTracing.ush`)
|
|
506
|
+
**The object grid**
|
|
512
507
|
- Layout: a page has 4³ cells. Each cell holds the 4 nearest objects as a `uint4`: a 24-bit instance
|
|
513
508
|
index and an 8-bit distance. That is 1 KiB a page.
|
|
514
509
|
- It is filled by its own pass, one thread per cell.
|
|
@@ -517,23 +512,22 @@ From the local source. The production reference for §6 and §7.7. Paths are und
|
|
|
517
512
|
- each entry's mesh cards are sampled in turn, until the summed weight reaches 0.9 or an entry is
|
|
518
513
|
empty.
|
|
519
514
|
|
|
520
|
-
**Mesh cards**
|
|
515
|
+
**Mesh cards**
|
|
521
516
|
- Cards are axis-aligned in mesh space, six directions.
|
|
522
517
|
- Surfels:
|
|
523
518
|
- Per column of a 10 cm grid, 32 jittered rays march through successive hits.
|
|
524
|
-
- A hit is kept if it faces the card and follows an empty cell. Its
|
|
519
|
+
- A hit is kept if it faces the card and follows an empty cell. Its minimum ray Z is the layer after
|
|
525
520
|
the previous hit.
|
|
526
521
|
- Clustering, per direction:
|
|
527
522
|
- first the outer projection (near plane 0);
|
|
528
523
|
- then, greedily, the near plane that best covers the unassigned surfels. A near plane N sees a
|
|
529
|
-
surfel at layer Z when
|
|
524
|
+
surfel at layer Z when its minimum ray Z ≤ N ≤ Z.
|
|
530
525
|
- This is how concave meshes get interior cards.
|
|
531
526
|
- The weakest clusters are dropped down to 12 cards a mesh (32 at most; the runtime lookup is a
|
|
532
527
|
32-bit mask per direction).
|
|
533
528
|
- A mesh with no card has no fallback.
|
|
534
529
|
|
|
535
|
-
**The surface cache**
|
|
536
|
-
`LumenSceneRendering.cpp`, `LumenSceneCardCapture.cpp`)
|
|
530
|
+
**The surface cache**
|
|
537
531
|
- Layers: 128² physical pages in a 4096² atlas, holding depth `G16`, diffuse albedo `RGBA8` (stored
|
|
538
532
|
as its square root), opacity, normal, emissive `R11G11B10`, and three lighting layers.
|
|
539
533
|
- Card resolution:
|
|
@@ -542,11 +536,11 @@ From the local source. The production reference for §6 and §7.7. Paths are und
|
|
|
542
536
|
- idle pages kept for 256 frames.
|
|
543
537
|
- Capture:
|
|
544
538
|
- the mesh is rasterised through an ortho camera on the card, at most 300 pages a frame;
|
|
545
|
-
- a recapture follows a resolution change, an explicit
|
|
539
|
+
- a recapture follows a resolution change, an explicit surface-cache invalidation on the
|
|
546
540
|
primitive, or a slow refresh of the oldest pages;
|
|
547
541
|
- a material change is not tracked.
|
|
548
542
|
|
|
549
|
-
**Sampling at a hit**
|
|
543
|
+
**Sampling at a hit**
|
|
550
544
|
- Cards are selected by the normal's sign per axis, weighted by n², and every card holding the point
|
|
551
545
|
within the bias is blended.
|
|
552
546
|
- Depth test: four depth taps, each weighted by `1 − saturate((|t − depth| − bias)/(¼·bias))` in card
|
|
@@ -564,7 +558,7 @@ The production reference for sparse probe allocation.
|
|
|
564
558
|
- 4 clipmaps of 48³ at 1.04 m (clip 0).
|
|
565
559
|
- The indirection (`R32_UINT`) is cleared and rebuilt every frame: consumers mark the eight probes
|
|
566
560
|
around each sample, and a probe is reused if marked within 8 frames, else freed.
|
|
567
|
-
- 16,384-probe capacity (128² atlas).
|
|
561
|
+
- 16,384-probe capacity (128² atlas). Overflow renders incorrectly.
|
|
568
562
|
|
|
569
563
|
**Probes**
|
|
570
564
|
- 32² equal-area octahedral `R11G11B10F` radiance plus `R16F` hit distance.
|
|
@@ -1079,7 +1073,7 @@ geometry, as built in S2 (below). It is UE's surfel clustering (§2.3) at brick
|
|
|
1079
1073
|
- The directions are ±X, ±Y, ±Z of local space.
|
|
1080
1074
|
- Along a direction δ, a column is a line of bricks.
|
|
1081
1075
|
- A **run start** is an occupied brick at layer z whose predecessor along δ is empty or outside the
|
|
1082
|
-
grid. Its m is the layer after the previous run's end (0 for the first run)
|
|
1076
|
+
grid. Its m is the layer after the previous run's end (0 for the first run).
|
|
1083
1077
|
- A card (δ, [k₀, k₁)) looks along δ through brick layers k₀ to k₁ − 1.
|
|
1084
1078
|
- In each column it sees the first surface after layer k₀.
|
|
1085
1079
|
- It covers a run start (z, m) when m ≤ k₀ ≤ z < k₁: nothing occupied lies between its near face
|
|
@@ -1156,7 +1150,7 @@ cards are drawn rather than traced, through the material's own template.
|
|
|
1156
1150
|
so the hardware clips to it as the trace's t ≤ depth does. Culling is off: a card sees either side.
|
|
1157
1151
|
- The fragment stage is the template's `material_surface` and `material_opacity`, with the material's
|
|
1158
1152
|
one bind group, the G-buffer pass's: its textures, their mips and hardware filtering, at the card
|
|
1159
|
-
texel's footprint, unbiased
|
|
1153
|
+
texel's footprint, unbiased (mip bias 0). Coverage is
|
|
1160
1154
|
drawn as the trace draws it, from a seed fixed per (pair, card, texel); the depth test keeps the
|
|
1161
1155
|
nearest opaque draw. A template without a surface function is traced.
|
|
1162
1156
|
- A scatter then moves each page's texels from the pair's cells into its atlas tiles, in the trace's
|
|
@@ -3210,11 +3204,106 @@ a per-invocation function instead. Each is tier 2 whole, and no thread's loop ru
|
|
|
3210
3204
|
updates)`.
|
|
3211
3205
|
- The value it hands the store is a half already, so the device's own rounding never applies.
|
|
3212
3206
|
- The blend moves in expectation however small its step.
|
|
3213
|
-
- UE 5.4's TSR stores its history through `QuantizeForFloatRenderTarget` for the same reason.
|
|
3214
3207
|
- The emulator's `pack2x16float` rounds to nearest even, so tier 2 sees half the devices' stall, and on
|
|
3215
3208
|
both sides. `probe_clipmap_accumulate.spec.js` pins convergence from either side at α = 1/64; it was
|
|
3216
3209
|
red before the change.
|
|
3217
3210
|
|
|
3211
|
+
**As built (re-sampling, 2026-10-30): Enshrouded's probe reprojection, a step of its own, off by default.**
|
|
3212
|
+
Alex asked for it as a prototype he can switch for testing, chasing convergence, blur accepted.
|
|
3213
|
+
- **The step**: `probe/shader_probe_clipmap_resample.js`, recorded before accumulate only when
|
|
3214
|
+
`ProbeClipmapSettings.resampling` is on. A thread a radiance texel of each listed probe B, through the texels'
|
|
3215
|
+
command. It traces nothing: it reads the atlases as the last publish left them.
|
|
3216
|
+
- 4 distinct of B's 26 neighbours in its cascade's 3×3×3 (`PROBE_RESAMPLE_NEIGHBOURS`), a start and a stride
|
|
3217
|
+
coprime with 26 from a hash of the slot, the texel and the update count. Over its updates a texel meets
|
|
3218
|
+
all 26.
|
|
3219
|
+
- The point B sees: along the texel's centre at B's mean depth there. A neighbour (ALIVE, its record's cell
|
|
3220
|
+
the point asked for, since the storage wraps) is read toward it, weighed by how well its depth confirms a
|
|
3221
|
+
surface there: s²/(s² + (d − μ)²), s² its depth's variance plus the receiver bias squared.
|
|
3222
|
+
- Two-sided because a neighbour that sees past the point is looking past a point in mid-air, which B's
|
|
3223
|
+
texel puts there where it mixes a near depth with a far one.
|
|
3224
|
+
- Nothing depth cannot confirm: a texel whose depth is at the limit takes nothing, nor is a point at the
|
|
3225
|
+
limit or past it from the neighbour read.
|
|
3226
|
+
- **Accumulate** pools a texel's rays with its re-samples, each a ray's worth at a visibility of one, through
|
|
3227
|
+
the `PROBE_CLIPMAP_RESAMPLING` switch (`probe/chunk_probe_clipmap_resampled.js`): off, its WGSL is what it
|
|
3228
|
+
was. Only a texel some ray reached takes them.
|
|
3229
|
+
- **Measured on Sponza, both GPUs (`scratchpad/device/resample.js`, 2026-10-30)**: settle at one end, cut the
|
|
3230
|
+
camera to the other, where the finest probes are new. The eight-corner diffuse in 8×8 blocks each frame,
|
|
3231
|
+
against a reference of four times the rays without re-sampling. 3 runs an arm; mean error, [range]:
|
|
3232
|
+
|
|
3233
|
+
| frames after the cut | 4090 off | 4090 on | iGPU off | iGPU on |
|
|
3234
|
+
|---|---|---|---|---|
|
|
3235
|
+
| 1–10 | 0.140 [0.106–0.181] | 0.158 [0.139–0.174] | 0.119 [0.100–0.129] | 0.132 [0.113–0.158] |
|
|
3236
|
+
| 11–30 | 0.090 | 0.105 | 0.089 | 0.101 |
|
|
3237
|
+
| 31–120 | 0.055 | 0.073 | 0.058 | 0.067 |
|
|
3238
|
+
| 121–480 | 0.038 | 0.080 | 0.039 | 0.069 |
|
|
3239
|
+
| 481–1200 | 0.037 | 0.094 | 0.030 | 0.081 |
|
|
3240
|
+
| first frame under 5% | 53–108 | never | 71–101 | never |
|
|
3241
|
+
|
|
3242
|
+
- Worse in every window on both GPUs, and growing: the re-samples are the neighbours' histories, which hold
|
|
3243
|
+
the re-samples they took, so the field settles on a fixed point of its own and drifts toward it. Against its
|
|
3244
|
+
own settled frame, re-sampling converges no faster either (4 and 3 runs: 4090 31–120 frames 0.087 against
|
|
3245
|
+
0.060; 481–1200, 0.022 against 0.026).
|
|
3246
|
+
- Settled: frame-to-frame change 0.0064 against 0.0069; the mean +4.7% (4090) and +3.3% (iGPU) over the
|
|
3247
|
+
reference, against +2.0% and +0.4% off; |diff| 9.3% and 7.8% against 3.6% and 2.3%.
|
|
3248
|
+
- Taking what depth cannot confirm made it worse: one-sided Chebyshev, with B's far texels read along their
|
|
3249
|
+
own direction and points past the limit at the limit alone, came out +11.5% on the 4090; two-sided, +9.8%;
|
|
3250
|
+
without the points past the limit, +6.5%; without either, +3.2% in its first run.
|
|
3251
|
+
- The sun doubled once settled: 90% of the step in 182–288 frames on the 4090 against 190–260; on the iGPU
|
|
3252
|
+
280–335 against 192–261.
|
|
3253
|
+
- Cost, the arms alternating frame by frame in one process: the pass 18.4 µs on the 4090 (the update's trace
|
|
3254
|
+
~0.9 ms), 1.03 ms on the AMD iGPU (its trace 4.9 ms); accumulate unchanged on both.
|
|
3255
|
+
- Tier 2: `probe_clipmap_resample.spec.js` (the picks, every neighbour met, the weight both ways and with the
|
|
3256
|
+
neighbour's spread, the read direction, nothing unconfirmed, the wrap, the kinds, a texel no ray reached),
|
|
3257
|
+
`probe_clipmap_accumulate.spec.js` (the pool, the switch off, a texel no ray reached); 12 of 12 mutants of the
|
|
3258
|
+
pass killed, 3 of 3 of the pool. Tier 3: `GPUProbeClipmap.spec.js` (recorded only when on, before accumulate,
|
|
3259
|
+
through the texels' command).
|
|
3260
|
+
|
|
3261
|
+
**As built (re-sampling confidence, 2026-10-30): a re-sample weighs what it reads.** Alex asked for the
|
|
3262
|
+
neighbour's estimator spread, its sample count and its age.
|
|
3263
|
+
- **Confidence**: σ²_B / (σ²_B + σ²_A / n_A). σ²_A is the deviation of the neighbour's texel the point falls in
|
|
3264
|
+
(`probe_estimators`, luma), n_A that texel's count (the radiance alpha), so σ²_A / n_A is the variance of its
|
|
3265
|
+
mean; σ²_B is the variance of one of B's own rays, from B's texel. Both absolute, floored at 1e-5, so a dark
|
|
3266
|
+
neighbour is not doubted for being dark. A neighbour no noisier than one of B's rays counts as one; one whose
|
|
3267
|
+
mean is as noisy as a ray, as half.
|
|
3268
|
+
- **Freshness**: e^(−age / `response_frames`), age the frames since the neighbour's `traced_frame`.
|
|
3269
|
+
- Still at most a ray's worth: visibility × confidence × freshness.
|
|
3270
|
+
- **No solid angle.** Rays are jittered over their texel's octahedral square and averaged unweighted; the
|
|
3271
|
+
solid angle enters at the projection, per texel. A re-sample is one tap along B's texel centre, and the
|
|
3272
|
+
neighbour's bilinear tap averages its own texel's footprint, which is not B's. Neither is corrected.
|
|
3273
|
+
- **Measured** (`scratchpad/device/ab/`, 2026-10-30): plain is the pass of the block above, confidence this
|
|
3274
|
+
one, against references of four times the rays without re-sampling taken that day. 4090 3 runs an arm, iGPU 2;
|
|
3275
|
+
mean [range]. Stability settles 1,500 frames, TAA off: |Δ| frame to frame over the frame's mean, the same pixel
|
|
3276
|
+
still, the reprojected point on an orbit; probe texels |Δ| between two reads of a probe updated between them.
|
|
3277
|
+
|
|
3278
|
+
| | 4090 off | plain | confidence | iGPU off | plain | confidence |
|
|
3279
|
+
|---|---|---|---|---|---|---|
|
|
3280
|
+
| still, eight corners | 0.0506 | 0.0476 | 0.0481 | 0.0506 | 0.0474 | 0.0482 |
|
|
3281
|
+
| still, pick | 0.144 | 0.130 | 0.131 | 0.144 | 0.131 | 0.132 |
|
|
3282
|
+
| orbit, eight corners | 0.111 | 0.076 | 0.090 [0.084–0.096] | 0.110 | 0.075 | 0.083 |
|
|
3283
|
+
| orbit, pick | 0.237 | 0.152 | 0.201 [0.180–0.215] | 0.238 | 0.151 | 0.176 |
|
|
3284
|
+
| probe texels an update | 0.019 | 0.023 | 0.022 | 0.020 | 0.033 | 0.027 |
|
|
3285
|
+
| vs reference, 31–120 | 0.082 | 0.073 | 0.098 | 0.056 | 0.070 | 0.078 |
|
|
3286
|
+
| vs reference, 121–480 | 0.046 | 0.064 | 0.066 | 0.032 | 0.079 | 0.061 |
|
|
3287
|
+
| vs reference, 481–1200 | 0.030 | 0.069 | 0.053 | 0.029 | 0.084 | 0.055 |
|
|
3288
|
+
| first frame under 5% | 197–282 | never | 455–888 | 32–117 | never | 465–494 |
|
|
3289
|
+
| vs own settled, 31–120 | 0.070 | 0.071 | 0.087 | 0.055 | 0.065 | 0.073 |
|
|
3290
|
+
| vs own settled, 121–480 | 0.035 | 0.036 | 0.049 | 0.031 | 0.028 | 0.046 |
|
|
3291
|
+
| settled mean vs reference | −0.9% | +2.2% | −0.7% | +0.6% | +3.2% | +0.5% |
|
|
3292
|
+
| sun ×2, 90% (frames) | 234–255 | 245–287 | 237–263 | 220–229 | 224–251 | 216–218 |
|
|
3293
|
+
| the pass (µs) | | 18.4 | 34.1 | | 905 | 1,484 |
|
|
3294
|
+
|
|
3295
|
+
- Confidence takes the bias out: the settled mean is off's on both GPUs. The per-pixel error stays above
|
|
3296
|
+
off's, so what is left is spatial, the blur.
|
|
3297
|
+
- Re-sampling is quieter in every arm, most on an orbit: plain −31% at the eight corners, −36% at the pick;
|
|
3298
|
+
confidence keeps about half of that. Still, −5% to −10% in both.
|
|
3299
|
+
- It converges no faster in any arm, toward the reference or toward its own settled frame; confidence is the
|
|
3300
|
+
slowest of the three toward its own. A probe's texels move more an update with re-sampling.
|
|
3301
|
+
- Confidence doubles the pass.
|
|
3302
|
+
- Tier 2 adds to `probe_clipmap_resample.spec.js`: the confidence (a count of 4 and of 1, a dark neighbour,
|
|
3303
|
+
the floor, the floor against a deviation above it), the freshness at two ages, the spread read from the
|
|
3304
|
+
neighbour's texel the point falls in. Every mutant of the terms killed. Tier 3: the pass's frame and
|
|
3305
|
+
response immediates, the estimators bound.
|
|
3306
|
+
|
|
3218
3307
|
## 9. Sampling
|
|
3219
3308
|
|
|
3220
3309
|
### 9.1 The pick: `probe_clipmap_pick(position, normal, view_direction, ξ) -> pick`
|
|
@@ -4062,7 +4151,7 @@ Each says what would reverse it.
|
|
|
4062
4151
|
geometry.**
|
|
4063
4152
|
- Six bounds cards would miss every interior surface of a single-mesh room or atrium.
|
|
4064
4153
|
- UE places its near planes from 10 cm surfels with 32 rays a column. The brick occupancy the bake
|
|
4065
|
-
already holds gives the same rule (
|
|
4154
|
+
already holds gives the same rule (m ≤ N ≤ Z) at 7-voxel granularity, with no rays.
|
|
4066
4155
|
- *Reverse:* if coverage measures short on real assets, then surfels from the capture rays.
|
|
4067
4156
|
- **D24. Card texels are two `rgba8unorm` planes, 8 B in all.**
|
|
4068
4157
|
- Diffuse albedo is stored as its square root, as UE stores it.
|
|
@@ -4073,7 +4162,7 @@ Each says what would reverse it.
|
|
|
4073
4162
|
- *Reverse:* an emissive that measures banded; then `rgba16float` for that plane, 4 B more a texel.
|
|
4074
4163
|
- **D25. SDF membership is a `ShadedGeometryFlags` bit, on by default, mirrored into the row.**
|
|
4075
4164
|
- It is the entity's data, carried as `Skinned` is, and transparent materials stay out by rule.
|
|
4076
|
-
- UE
|
|
4165
|
+
- UE has a per-primitive distance-field lighting switch and leaves translucent sections out
|
|
4077
4166
|
too.
|
|
4078
4167
|
- **D26. A cascade samples the coarsest mesh level no coarser than itself.**
|
|
4079
4168
|
- Its voxel is within a factor of two of the cascade's, and its band reaches at least half the
|
|
@@ -4089,7 +4178,7 @@ Each says what would reverse it.
|
|
|
4089
4178
|
- It is the change signal every material consumer already uses, and the repack is the one place it
|
|
4090
4179
|
is read. Nothing polls.
|
|
4091
4180
|
- UE tracks no material change at all; there a primitive is recaptured on an explicit
|
|
4092
|
-
|
|
4181
|
+
surface-cache invalidation or by the slow refresh of its oldest pages (§2.3).
|
|
4093
4182
|
- *Reverse:* none foreseen.
|
|
4094
4183
|
- **D30. Each passing card gives one texel, blended across cards by n².**
|
|
4095
4184
|
- UE also blends four depth-weighted taps per card.
|
|
@@ -4172,7 +4261,9 @@ Each item is added only if a measurement asks for it, or, where marked, when Ale
|
|
|
4172
4261
|
one.
|
|
4173
4262
|
- **Caches persisted across sessions**, an offline bake format.
|
|
4174
4263
|
- Ray and history reprojection between probes, if long-range propagation into enclosed spaces
|
|
4175
|
-
measures short.
|
|
4264
|
+
measures short. History re-sampling is built as a switch, off, and measured quieter but no faster to
|
|
4265
|
+
converge; weighed by the neighbour's confidence and age it is unbiased, blurred, and slower still (§8.8, as
|
|
4266
|
+
built 2026-10-30); reprojecting the frame's own rays is not built.
|
|
4176
4267
|
- Foliage and translucency in the field, Enshrouded's open problem too.
|
|
4177
4268
|
- Alpha-tested geometry is in the SDF as its triangles, so canopies over-occlude. The `SDFWorld`
|
|
4178
4269
|
bit is the authored way out.
|
|
@@ -4186,18 +4277,8 @@ Each item is added only if a measurement asks for it, or, where marked, when Ale
|
|
|
4186
4277
|
|
|
4187
4278
|
- J. Kolesik, *Realtime Global Illumination in Enshrouded*, GPC 2024 —
|
|
4188
4279
|
https://www.youtube.com/watch?v=57F1ezwH7Mk
|
|
4189
|
-
- Unreal Engine 5.4
|
|
4190
|
-
|
|
4191
|
-
`Shaders/Private/DistanceField/GlobalDistanceField*.usf/.ush`, `GlobalDistanceFieldObjectGrid.ush`;
|
|
4192
|
-
- mesh distance fields: `Source/Runtime/Engine/Public/DistanceFieldAtlas.h`,
|
|
4193
|
-
`Source/Developer/MeshUtilities/Private/MeshDistanceFieldUtilities.cpp`,
|
|
4194
|
-
`Shaders/Private/MeshDistanceFieldCommon.ush`, `Shaders/Private/DistanceFieldLightingShared.ush`;
|
|
4195
|
-
- mesh cards and the surface cache: `Source/Developer/MeshUtilities/Private/MeshCardRepresentationUtilities.cpp`,
|
|
4196
|
-
`Source/Runtime/Renderer/Private/Lumen/LumenSurfaceCache.cpp`, `LumenSceneRendering.cpp`,
|
|
4197
|
-
`LumenSceneCardCapture.cpp`, `Shaders/Private/Lumen/SurfaceCache/LumenSurfaceCacheSampling.ush`,
|
|
4198
|
-
`Shaders/Private/Lumen/LumenSoftwareRayTracing.ush`;
|
|
4199
|
-
- the radiance cache: `Source/Runtime/Renderer/Private/Lumen/LumenRadianceCache*.cpp`,
|
|
4200
|
-
`Shaders/Private/Lumen/LumenRadianceCache*.usf/.ush`.
|
|
4280
|
+
- Unreal Engine 5.4 Lumen and Global Distance Field documentation:
|
|
4281
|
+
https://dev.epicgames.com/documentation/en-us/unreal-engine/lumen-technical-details-in-unreal-engine
|
|
4201
4282
|
- Z. Majercik et al., *Dynamic Diffuse Global Illumination with Ray-Traced Irradiance Fields*,
|
|
4202
4283
|
JCGT 8(2), 2019 — https://jcgt.org/published/0008/02/01/ ; *Scaling Probe-Based Real-Time Dynamic
|
|
4203
4284
|
Global Illumination for Production*, JCGT 10(2), 2021 — https://jcgt.org/published/0010/02/01/
|
|
@@ -145,7 +145,7 @@ only helps if the request sees the change, which per-texel inconsistency does no
|
|
|
145
145
|
- **Consumers:** trace, light and shade take `ray = order[thread]`. Their outputs stay at the ray's
|
|
146
146
|
index, so want_hits, accumulate and projection do not change.
|
|
147
147
|
- **Layout fork, measured in stage 0:**
|
|
148
|
-
- direction-major:
|
|
148
|
+
- direction-major: binning 64 directions, with Morton position a todo;
|
|
149
149
|
- origin-major: today's grouping by probe, with directions ordered within it;
|
|
150
150
|
- interleaved.
|
|
151
151
|
|
|
@@ -270,7 +270,7 @@ otherwise, the figures are the busy time from relocation to the light pass's end
|
|
|
270
270
|
**The local sort.** A workgroup takes a chunk of the launch's threads, packs each ray's key above its
|
|
271
271
|
place in the chunk, and sorts them with the radix scatter's stable binary split, a bit a round. The
|
|
272
272
|
rays move only within their chunk. Keyed by the ray's direction bin, as the trace finds its texel:
|
|
273
|
-
8×8 bins of the octahedral map (6 bits
|
|
273
|
+
8×8 bins of the octahedral map (6 bits) or 4×4 (4 bits).
|
|
274
274
|
"Probe order, then" runs the trace-list sort below first. iGPU, Emerald avenue / Sponza:
|
|
275
275
|
|
|
276
276
|
| Order | 2048-ray chunks | 1024 | 512 |
|
|
@@ -274,6 +274,18 @@ export class ProbeClipmapSettings {
|
|
|
274
274
|
* @returns {number}
|
|
275
275
|
*/
|
|
276
276
|
get response_frames(): number;
|
|
277
|
+
/**
|
|
278
|
+
* @param {boolean} v
|
|
279
|
+
*/
|
|
280
|
+
set resampling(v: boolean);
|
|
281
|
+
/**
|
|
282
|
+
* Whether each probe update also re-samples its neighbours: every radiance texel takes what four of the
|
|
283
|
+
* probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
|
|
284
|
+
* they can see it, each a ray's worth beside its own rays. It traces nothing, and buys convergence for
|
|
285
|
+
* some spatial blur. Off, the update's pass is not recorded. Takes effect the next frame.
|
|
286
|
+
* @returns {boolean}
|
|
287
|
+
*/
|
|
288
|
+
get resampling(): boolean;
|
|
277
289
|
/**
|
|
278
290
|
* @param {ProbeClipmapDebugView} v
|
|
279
291
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProbeClipmapSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,gDAFU,cAAc,MAAM,CAAC,CAE8C;AAE7E;;;GAGG;AACH,sDAFU,MAAM,CAEyC;AAEzD;;GAEG;AACH,sDAFU,MAAM,CAE0C;AAE1D;;;GAGG;AACH,mDAFU,MAAM,CAEuC;AAEvD;;;;;GAKG;AACH,sDAFU,MAAM,CAE0C;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH;IAaI;;OAEG;IACH,mCAKC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;OAEG;IACH,wCAIC;IAfD;;;OAGG;IACH,uCAEC;IAuBD;;OAEG;IACH,gCAKC;IAlBD;;;;;OAKG;IACH,+BAEC;IAuBD;;OAEG;IACH,kCAKC;IAjBD;;;;OAIG;IACH,iCAEC;IAwBD;;OAEG;IACH,mCAKC;IAlBD;;;;;OAKG;IACH,kCAEC;IAyBD;;;OAGG;IACH,mCAOC;IAtBD;;;;;;OAMG;IACH,kCAEC;IAqCD;;;OAGG;IACH,oCAKC;IA7BD;;;;;;;;;;;;;;;OAeG;IACH,mCAEC;IA6CD;;;OAGG;IACH,mCAKC;IAvCD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,kCAEC;IAoCD;;OAEG;IACH,iCAIC;IA5BD;;;;;;;;;;;;;;;;OAgBG;IACH,gCAEC;IAsBD;;OAEG;IACH,mCAKC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;OAEG;IACH,wCAIC;IAfD;;;OAGG;IACH,uCAEC;IAuBD;;OAEG;IACH,6BAKC;IAlBD;;;;;OAKG;IACH,4BAEC;IAuBD;;;OAGG;IACH,mCAOC;IApBD;;;;OAIG;IACH,kCAEC;IA0BD;;;OAGG;IACH,gCAOC;IApBD;;;;OAIG;IACH,+BAEC;IA0BD;;;OAGG;IACH,8BAKC;IAlBD;;;;OAIG;IACH,6BAEC;IAyBD;;OAEG;IACH,0BAIC;IAjBD;;;;;OAKG;IACH,yBAEC;IAyBD;;OAEG;IACH,+BAKC;IApBD;;;;;;;OAOG;IACH,8BAEC;
|
|
1
|
+
{"version":3,"file":"ProbeClipmapSettings.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js"],"names":[],"mappings":"AAOA;;;GAGG;AACH,8CAFU,MAAM,CAEiC;AAEjD;;;GAGG;AACH,gDAFU,cAAc,MAAM,CAAC,CAE8C;AAE7E;;;GAGG;AACH,sDAFU,MAAM,CAEyC;AAEzD;;GAEG;AACH,sDAFU,MAAM,CAE0C;AAE1D;;;GAGG;AACH,mDAFU,MAAM,CAEuC;AAEvD;;;;;GAKG;AACH,sDAFU,MAAM,CAE0C;AAE1D;;;;;;;;;;;;;;;;GAgBG;AACH;IAaI;;OAEG;IACH,mCAKC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;OAEG;IACH,wCAIC;IAfD;;;OAGG;IACH,uCAEC;IAuBD;;OAEG;IACH,gCAKC;IAlBD;;;;;OAKG;IACH,+BAEC;IAuBD;;OAEG;IACH,kCAKC;IAjBD;;;;OAIG;IACH,iCAEC;IAwBD;;OAEG;IACH,mCAKC;IAlBD;;;;;OAKG;IACH,kCAEC;IAyBD;;;OAGG;IACH,mCAOC;IAtBD;;;;;;OAMG;IACH,kCAEC;IAqCD;;;OAGG;IACH,oCAKC;IA7BD;;;;;;;;;;;;;;;OAeG;IACH,mCAEC;IA6CD;;;OAGG;IACH,mCAKC;IAvCD;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,kCAEC;IAoCD;;OAEG;IACH,iCAIC;IA5BD;;;;;;;;;;;;;;;;OAgBG;IACH,gCAEC;IAsBD;;OAEG;IACH,mCAKC;IAjBD;;;;OAIG;IACH,kCAEC;IAsBD;;OAEG;IACH,wCAIC;IAfD;;;OAGG;IACH,uCAEC;IAuBD;;OAEG;IACH,6BAKC;IAlBD;;;;;OAKG;IACH,4BAEC;IAuBD;;;OAGG;IACH,mCAOC;IApBD;;;;OAIG;IACH,kCAEC;IA0BD;;;OAGG;IACH,gCAOC;IApBD;;;;OAIG;IACH,+BAEC;IA0BD;;;OAGG;IACH,8BAKC;IAlBD;;;;OAIG;IACH,6BAEC;IAyBD;;OAEG;IACH,0BAIC;IAjBD;;;;;OAKG;IACH,yBAEC;IAyBD;;OAEG;IACH,+BAKC;IApBD;;;;;;;OAOG;IACH,8BAEC;IAyBD;;OAEG;IACH,2BAIC;IAlBD;;;;;;OAMG;IACH,0BAEC;IAsBD;;OAEG;IACH,0BAIC;IAhBD;;;;OAIG;IACH,yBAEC;;CAUJ"}
|
|
@@ -477,6 +477,28 @@ export class ProbeClipmapSettings {
|
|
|
477
477
|
this.#response_frames = v;
|
|
478
478
|
}
|
|
479
479
|
|
|
480
|
+
#resampling = false;
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Whether each probe update also re-samples its neighbours: every radiance texel takes what four of the
|
|
484
|
+
* probe's 26 neighbours in its cascade have already seen of the point it sees, where their depth says
|
|
485
|
+
* they can see it, each a ray's worth beside its own rays. It traces nothing, and buys convergence for
|
|
486
|
+
* some spatial blur. Off, the update's pass is not recorded. Takes effect the next frame.
|
|
487
|
+
* @returns {boolean}
|
|
488
|
+
*/
|
|
489
|
+
get resampling() {
|
|
490
|
+
return this.#resampling;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
/**
|
|
494
|
+
* @param {boolean} v
|
|
495
|
+
*/
|
|
496
|
+
set resampling(v) {
|
|
497
|
+
assert.isBoolean(v, 'resampling');
|
|
498
|
+
|
|
499
|
+
this.#resampling = v;
|
|
500
|
+
}
|
|
501
|
+
|
|
480
502
|
#debug_view = ProbeClipmapDebugView.None;
|
|
481
503
|
|
|
482
504
|
/**
|
|
@@ -159,8 +159,10 @@ export class GPUProbeClipmap {
|
|
|
159
159
|
* @param {import("../../../material/resident/GPUResidentMaterialContext.js").GPUResidentMaterialContext} options.materials
|
|
160
160
|
* the resident materials, updated this frame: what a hit no card sees takes
|
|
161
161
|
* @param {GPUBuffer} options.card_rows the row → card set table, a word a `meshes` row
|
|
162
|
+
* @param {boolean} options.resampling whether each update re-samples its neighbours, adding what they have
|
|
163
|
+
* seen to its rays (`shader_probe_clipmap_resample`)
|
|
162
164
|
*/
|
|
163
|
-
graph_update({ graph, x, y, z, depth, normal, camera, stbn, resolution, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, materials, card_rows }: {
|
|
165
|
+
graph_update({ graph, x, y, z, depth, normal, camera, stbn, resolution, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, materials, card_rows, resampling }: {
|
|
164
166
|
graph: FrameGraph;
|
|
165
167
|
x: number;
|
|
166
168
|
y: number;
|
|
@@ -178,6 +180,7 @@ export class GPUProbeClipmap {
|
|
|
178
180
|
scene: import("../../../scene/GPUSceneContext.js").GPUSceneContext;
|
|
179
181
|
materials: import("../../../material/resident/GPUResidentMaterialContext.js").GPUResidentMaterialContext;
|
|
180
182
|
card_rows: GPUBuffer;
|
|
183
|
+
resampling: boolean;
|
|
181
184
|
}): void;
|
|
182
185
|
destroy(): void;
|
|
183
186
|
#private;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GPUProbeClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GPUProbeClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade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OAAO,0DAA0D,EAAE,0BAA0B;QAE1E,SAAS;QACX,UAAU,EAA3B,OAAO;aAiPjB;IA0eD,gBAcC;;CACJ;mCArvCY,OAAO,4BAA4B,EAAE,oBAAoB;yBACzD,OAAO,iEAAiE,EAAE,UAAU"}
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
} from "../../../gpu_primitive/slot_stack/shader_slot_stack_push_range.js";
|
|
17
17
|
import { CLIPMAP_LEVEL_ARRAY, CLIPMAP_LEVEL_STRUCT } from "../../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
|
|
18
18
|
import { graph_import_buffer } from "../../../shader/graph/graph_import_buffer.js";
|
|
19
|
+
import { ShaderSwitchSet } from "../../../shader/compiler/ShaderSwitchSet.js";
|
|
19
20
|
import { GPUTileAtlas2D } from "../../../texture/atlas/GPUTileAtlas2D.js";
|
|
20
21
|
import {
|
|
21
22
|
PROBE_CLIPMAP_CASCADE_COUNT_MAX,
|
|
@@ -60,6 +61,7 @@ import {
|
|
|
60
61
|
import { shader_probe_clipmap_project, shader_probe_clipmap_project_rows } from "./shader_probe_clipmap_project.js";
|
|
61
62
|
import { shader_probe_clipmap_publish } from "./shader_probe_clipmap_publish.js";
|
|
62
63
|
import { shader_probe_clipmap_relocate } from "./shader_probe_clipmap_relocate.js";
|
|
64
|
+
import { shader_probe_clipmap_resample } from "./shader_probe_clipmap_resample.js";
|
|
63
65
|
import { shader_probe_clipmap_retire } from "./shader_probe_clipmap_retire.js";
|
|
64
66
|
import { shader_probe_clipmap_schedule } from "./shader_probe_clipmap_schedule.js";
|
|
65
67
|
import { shader_probe_clipmap_light } from "./shader_probe_clipmap_light.js";
|
|
@@ -74,6 +76,7 @@ import { shader_probe_clipmap_order } from "./shader_probe_clipmap_order.js";
|
|
|
74
76
|
import { shader_probe_clipmap_trace_command } from "./shader_probe_clipmap_trace_command.js";
|
|
75
77
|
import { shader_probe_clipmap_want } from "./shader_probe_clipmap_want.js";
|
|
76
78
|
import { shader_probe_clipmap_want_hits } from "./shader_probe_clipmap_want_hits.js";
|
|
79
|
+
import { PROBE_CLIPMAP_RESAMPLING } from "./PROBE_CLIPMAP_RESAMPLING.js";
|
|
77
80
|
|
|
78
81
|
/**
|
|
79
82
|
* @typedef {import("../ProbeClipmapSettings.js").ProbeClipmapSettings} ProbeClipmapSettings
|
|
@@ -251,6 +254,17 @@ export class GPUProbeClipmap {
|
|
|
251
254
|
/** The listed probes' guides, as the guide passes write them, as many as the trace list holds. @type {GPUBuffer|null} */
|
|
252
255
|
#guide = null;
|
|
253
256
|
|
|
257
|
+
/**
|
|
258
|
+
* The listed probes' re-samples of their neighbours, n_r² a probe, as the re-sample pass writes them, as many
|
|
259
|
+
* as the trace list holds. Kept whether or not the frame re-samples: accumulate's variants share their
|
|
260
|
+
* resources. @type {GPUBuffer|null}
|
|
261
|
+
*/
|
|
262
|
+
#resamples = null;
|
|
263
|
+
|
|
264
|
+
/** Whether the frame's updates re-sample their neighbours, and the switches accumulate is recorded with. */
|
|
265
|
+
#resampling = false;
|
|
266
|
+
#accumulate_switches = ShaderSwitchSet.EMPTY;
|
|
267
|
+
|
|
254
268
|
/** The listed probes' projected rows, n_r a probe, as many as the trace list holds. @type {GPUBuffer|null} */
|
|
255
269
|
#projection = null;
|
|
256
270
|
|
|
@@ -340,6 +354,7 @@ export class GPUProbeClipmap {
|
|
|
340
354
|
#accumulate_settings = { trace_capacity: 0, rays_per_probe: 0, radiance_resolution: 0, depth_resolution: 0, radiance_tiles_per_row: 0, depth_tiles_per_row: 0, frame: 0, response_frames: 0, uniform_period: PROBE_UNIFORM_PERIOD };
|
|
341
355
|
#project_settings = { trace_capacity: 0, rays_per_probe: 0, radiance_resolution: 0, depth_resolution: 0, frame: 0, uniform_period: PROBE_UNIFORM_PERIOD, rays_min: 0, rays_max: 0, response_frames: 0 };
|
|
342
356
|
#publish_settings = { trace_capacity: 0, radiance_resolution: 0, depth_resolution: 0, radiance_tiles_per_row: 0, depth_tiles_per_row: 0 };
|
|
357
|
+
#resample_settings = { trace_capacity: 0, radiance_resolution: 0, depth_resolution: 0, frame: 0, response_frames: 0 };
|
|
343
358
|
#push_settings = { first: 0, count: 0, counter: PROBE_COUNTER_FREE };
|
|
344
359
|
|
|
345
360
|
#bindings = {};
|
|
@@ -587,8 +602,10 @@ export class GPUProbeClipmap {
|
|
|
587
602
|
* @param {import("../../../material/resident/GPUResidentMaterialContext.js").GPUResidentMaterialContext} options.materials
|
|
588
603
|
* the resident materials, updated this frame: what a hit no card sees takes
|
|
589
604
|
* @param {GPUBuffer} options.card_rows the row → card set table, a word a `meshes` row
|
|
605
|
+
* @param {boolean} options.resampling whether each update re-samples its neighbours, adding what they have
|
|
606
|
+
* seen to its rays (`shader_probe_clipmap_resample`)
|
|
590
607
|
*/
|
|
591
|
-
graph_update({ graph, x, y, z, depth, normal, camera, stbn, resolution, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, materials, card_rows }) {
|
|
608
|
+
graph_update({ graph, x, y, z, depth, normal, camera, stbn, resolution, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, materials, card_rows, resampling }) {
|
|
592
609
|
assert.defined(graph, 'graph');
|
|
593
610
|
assert.defined(camera, 'camera');
|
|
594
611
|
assert.defined(stbn, 'stbn');
|
|
@@ -601,6 +618,7 @@ export class GPUProbeClipmap {
|
|
|
601
618
|
assert.defined(scene, 'scene');
|
|
602
619
|
assert.defined(materials, 'materials');
|
|
603
620
|
assert.defined(card_rows, 'card_rows');
|
|
621
|
+
assert.isBoolean(resampling, 'resampling');
|
|
604
622
|
assert.notOk(this.#destroyed, 'destroyed');
|
|
605
623
|
|
|
606
624
|
if (this.#grow_pending) {
|
|
@@ -733,6 +751,17 @@ export class GPUProbeClipmap {
|
|
|
733
751
|
this.#project_settings.rays_max = rays_max;
|
|
734
752
|
this.#project_settings.response_frames = response_frames;
|
|
735
753
|
|
|
754
|
+
const resample = this.#resample_settings;
|
|
755
|
+
|
|
756
|
+
resample.trace_capacity = trace_capacity;
|
|
757
|
+
resample.radiance_resolution = this.radiance_resolution;
|
|
758
|
+
resample.depth_resolution = this.depth_resolution;
|
|
759
|
+
resample.frame = this.#frame;
|
|
760
|
+
resample.response_frames = response_frames;
|
|
761
|
+
|
|
762
|
+
this.#resampling = resampling;
|
|
763
|
+
this.#accumulate_switches = ShaderSwitchSet.EMPTY.with(PROBE_CLIPMAP_RESAMPLING, resampling);
|
|
764
|
+
|
|
736
765
|
const publish = this.#publish_settings;
|
|
737
766
|
|
|
738
767
|
publish.trace_capacity = trace_capacity;
|
|
@@ -882,6 +911,7 @@ export class GPUProbeClipmap {
|
|
|
882
911
|
this.#origins?.destroy();
|
|
883
912
|
this.#maps?.destroy();
|
|
884
913
|
this.#guide?.destroy();
|
|
914
|
+
this.#resamples?.destroy();
|
|
885
915
|
this.#projection?.destroy();
|
|
886
916
|
this.#ray_counts?.destroy();
|
|
887
917
|
this.#ray_requests?.destroy();
|
|
@@ -904,6 +934,7 @@ export class GPUProbeClipmap {
|
|
|
904
934
|
this.#origins = this.#create_buffer('probe origins', 16 * trace_capacity, 0);
|
|
905
935
|
this.#maps = this.#create_buffer('probe maps', 4 * probe_clipmap_maps_words(this.radiance_resolution, this.depth_resolution) * trace_capacity, 0);
|
|
906
936
|
this.#guide = this.#create_buffer('probe guide', 4 * probe_clipmap_guide_words(this.radiance_resolution) * trace_capacity, 0);
|
|
937
|
+
this.#resamples = this.#create_buffer('probe resamples', 16 * this.radiance_resolution * this.radiance_resolution * trace_capacity, 0);
|
|
907
938
|
this.#projection = this.#create_buffer('probe projection', PROBE_PROJECTION_ROW_STRUCT.size * this.radiance_resolution * trace_capacity, 0);
|
|
908
939
|
}
|
|
909
940
|
|
|
@@ -1207,6 +1238,22 @@ export class GPUProbeClipmap {
|
|
|
1207
1238
|
command_offset: 4 * PROBE_DISPATCH_RAYS,
|
|
1208
1239
|
});
|
|
1209
1240
|
|
|
1241
|
+
// what each listed probe's neighbours have already seen, from the atlases and estimators as they were,
|
|
1242
|
+
// where the frame re-samples; accumulate's variant without it reads none
|
|
1243
|
+
b.probe_resamples = this.#resamples;
|
|
1244
|
+
b.probe_estimators = this.#estimators;
|
|
1245
|
+
|
|
1246
|
+
if (this.#resampling) {
|
|
1247
|
+
b.settings = this.#resample_settings;
|
|
1248
|
+
|
|
1249
|
+
shader_probe_clipmap_resample.dispatchIndirect({
|
|
1250
|
+
encoder,
|
|
1251
|
+
bindings: b,
|
|
1252
|
+
command: this.#dispatch,
|
|
1253
|
+
command_offset: 4 * PROBE_DISPATCH_TEXELS,
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1210
1257
|
// the probes' maps from their rays, against the atlases as they were; their SH and kind from the
|
|
1211
1258
|
// maps; then the atlases from the maps
|
|
1212
1259
|
b.probe_maps = this.#maps;
|
|
@@ -1214,10 +1261,9 @@ export class GPUProbeClipmap {
|
|
|
1214
1261
|
b.probe_requests = this.#requests;
|
|
1215
1262
|
b.probe_radiance = this.#radiance.texture_at(0).obtainView();
|
|
1216
1263
|
b.probe_depth = this.#depth.texture_at(0).obtainView();
|
|
1217
|
-
b.probe_estimators = this.#estimators;
|
|
1218
1264
|
b.settings = this.#accumulate_settings;
|
|
1219
1265
|
|
|
1220
|
-
shader_probe_clipmap_accumulate.dispatchIndirect({
|
|
1266
|
+
shader_probe_clipmap_accumulate.variant(this.#accumulate_switches).dispatchIndirect({
|
|
1221
1267
|
encoder,
|
|
1222
1268
|
bindings: b,
|
|
1223
1269
|
command: this.#dispatch,
|
|
@@ -1298,7 +1344,7 @@ export class GPUProbeClipmap {
|
|
|
1298
1344
|
this.#radiance.destroy();
|
|
1299
1345
|
this.#depth.destroy();
|
|
1300
1346
|
|
|
1301
|
-
for (const buffer of [this.#levels, this.#states, this.#estimators, this.#records, this.#free, this.#counters, this.#dispatch, this.#eviction, ...this.#active, this.#wanted, this.#wanted_bits, this.#trace, this.#origins, this.#maps, this.#guide, this.#projection, this.#requests, this.#ray_counts, this.#ray_requests, this.#ray_count_sums, this.#ray_request_sums, this.#ray_sums, this.#ray_scan_spine, this.#ray_scan_command, this.#rays, this.#sampling]) {
|
|
1347
|
+
for (const buffer of [this.#levels, this.#states, this.#estimators, this.#records, this.#free, this.#counters, this.#dispatch, this.#eviction, ...this.#active, this.#wanted, this.#wanted_bits, this.#trace, this.#origins, this.#maps, this.#guide, this.#resamples, this.#projection, this.#requests, this.#ray_counts, this.#ray_requests, this.#ray_count_sums, this.#ray_request_sums, this.#ray_sums, this.#ray_scan_spine, this.#ray_scan_command, this.#rays, this.#sampling]) {
|
|
1302
1348
|
buffer?.destroy();
|
|
1303
1349
|
}
|
|
1304
1350
|
}
|
|
@@ -361,4 +361,10 @@ export const PROBE_RECEIVER_BIAS: number;
|
|
|
361
361
|
* @type {number}
|
|
362
362
|
*/
|
|
363
363
|
export const PROBE_RECEIVER_BIAS_VIEW: number;
|
|
364
|
+
/**
|
|
365
|
+
* The neighbours a radiance texel re-samples an update when the frame re-samples (`shader_probe_clipmap_resample`):
|
|
366
|
+
* distinct ones of the probe's 26 in its cascade's 3×3×3, picked afresh each update. Enshrouded's 4:1.
|
|
367
|
+
* @type {number}
|
|
368
|
+
*/
|
|
369
|
+
export const PROBE_RESAMPLE_NEIGHBOURS: number;
|
|
364
370
|
//# sourceMappingURL=PROBE_CLIPMAP.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PROBE_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js"],"names":[],"mappings":"AA2QA;;;;;;;;;;GAUG;AACH,8DAJW,MAAM,oBACN,MAAM,GACJ,MAAM,CAIlB;AAuDD;;;;;;;;;;;GAWG;AACH,+DAHW,MAAM,GACJ,MAAM,CAIlB;AAlVD;;;GAGG;AACH,iCAFU,MAAM,CAE6B;AAS7C;;;GAGG;AACH,+BAFU,MAAM,CAEkB;AAElC;;;GAGG;AACH,8BAF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;GAIG;AACH,oCAFU,MAAM,CAEyB;AAEzC;;;;GAIG;AACH,2CAFU,MAAM,CAEgC;AAEhD;;;GAGG;AACH,yCAFU,MAAM,CAE+B;AAE/C;;;GAGG;AACH,qCAFU,MAAM,CAEyB;AAiBzC;;;;;;;GAOG;AACH,mCAFU,MAAM,CAEsB;AAEtC;;;;;GAKG;AACH,uCAFU,MAAM,CAE8B;AAE9C;;;;;GAKG;AACH,uCAFU,MAAM,CAE0B;AAE1C;;;;;;;;GAQG;AACH,wCAFU,MAAM,CAE2B;AAE3C;;;;;GAKG;AACH,+BAFU,MAAM,CAEuC;AAEvD;;;;;GAKG;AACH,gCAFU,MAAM,CAEuB;AAkBvC;;;;GAIG;AACH,kCAFU,MAAM,CAEqB;AAQrC;;;GAGG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;;GAIG;AACH,6BAFU,MAAM,CAEgB;AAEhC;;;GAGG;AACH,kCAFU,MAAM,CAEqB;AAErC;;;GAGG;AACH,sCAFU,MAAM,CAEyB;AAEzC;;;;GAIG;AACH,qCAFU,MAAM,CAEwB;AAExC;;;GAGG;AACH,oCAFU,MAAM,CAEuB;AAOvC;;;;GAIG;AACH,kCAFU,MAAM,CAE2B;AAE3C;;;GAGG;AACH,yCAFU,MAAM,CAE6B;AAE7C;;;GAGG;AACH,8BAFU,MAAM,CAEiB;AAEjC;;;GAGG;AACH,yCAFU,MAAM,CAE4B;AAE5C;;;;;GAKG;AACH,kCAFU,MAAM,CAE8B;AAE9C;;;GAGG;AACH,wCAFU,MAAM,CAE4B;AAE5C;;;;GAIG;AACH,gCAFU,MAAM,CAEmB;AAEnC;;;GAGG;AACH,kCAFU,MAAM,CAEuB;AAEvC;;;;GAIG;AACH,uCAFU,MAAM,CAE4B"}
|
|
1
|
+
{"version":3,"file":"PROBE_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js"],"names":[],"mappings":"AA2QA;;;;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;AAEnC;;;GAGG;AACH,kCAFU,MAAM,CAEuB;AAEvC;;;;GAIG;AACH,uCAFU,MAAM,CAE4B;AAE5C;;;;GAIG;AACH,wCAFU,MAAM,CAE2B"}
|
|
@@ -463,3 +463,10 @@ export const PROBE_RECEIVER_BIAS = 0.1;
|
|
|
463
463
|
* @type {number}
|
|
464
464
|
*/
|
|
465
465
|
export const PROBE_RECEIVER_BIAS_VIEW = 0.2;
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* The neighbours a radiance texel re-samples an update when the frame re-samples (`shader_probe_clipmap_resample`):
|
|
469
|
+
* distinct ones of the probe's 26 in its cascade's 3×3×3, picked afresh each update. Enshrouded's 4:1.
|
|
470
|
+
* @type {number}
|
|
471
|
+
*/
|
|
472
|
+
export const PROBE_RESAMPLE_NEIGHBOURS = 4;
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the frame's updates re-sample their neighbours (`shader_probe_clipmap_resample`): accumulate
|
|
3
|
+
* then adds each radiance texel's re-samples to its rays (`chunk_probe_clipmap_resampled`). Decided by
|
|
4
|
+
* `chunk_probe_clipmap_resampled`, whose `false` alternative, the default, is the texel's own rays alone
|
|
5
|
+
* and binds nothing more, so a pass that never sets it accumulates exactly as it always did.
|
|
6
|
+
*
|
|
7
|
+
* `GPUProbeClipmap` sets it from `ProbeClipmapSettings.resampling` the frame it records the update.
|
|
8
|
+
*
|
|
9
|
+
* @type {ShaderSwitch}
|
|
10
|
+
*/
|
|
11
|
+
export const PROBE_CLIPMAP_RESAMPLING: ShaderSwitch;
|
|
12
|
+
import { ShaderSwitch } from "../../../shader/compiler/ShaderSwitch.js";
|
|
13
|
+
//# sourceMappingURL=PROBE_CLIPMAP_RESAMPLING.d.ts.map
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PROBE_CLIPMAP_RESAMPLING.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,uCAFU,YAAY,CAEgE;6BAZzD,0CAA0C"}
|
package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP_RESAMPLING.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ShaderSwitch } from "../../../shader/compiler/ShaderSwitch.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Whether the frame's updates re-sample their neighbours (`shader_probe_clipmap_resample`): accumulate
|
|
5
|
+
* then adds each radiance texel's re-samples to its rays (`chunk_probe_clipmap_resampled`). Decided by
|
|
6
|
+
* `chunk_probe_clipmap_resampled`, whose `false` alternative, the default, is the texel's own rays alone
|
|
7
|
+
* and binds nothing more, so a pass that never sets it accumulates exactly as it always did.
|
|
8
|
+
*
|
|
9
|
+
* `GPUProbeClipmap` sets it from `ProbeClipmapSettings.resampling` the frame it records the update.
|
|
10
|
+
*
|
|
11
|
+
* @type {ShaderSwitch}
|
|
12
|
+
*/
|
|
13
|
+
export const PROBE_CLIPMAP_RESAMPLING = ShaderSwitch.bool('probe clipmap resampling');
|
|
@@ -224,6 +224,23 @@ export const PROBE_MAPS_READ_RESOURCE: ShaderResourceDescriptor;
|
|
|
224
224
|
* @type {ShaderResourceDescriptor}
|
|
225
225
|
*/
|
|
226
226
|
export const PROBE_ESTIMATORS_RESOURCE: ShaderResourceDescriptor;
|
|
227
|
+
/**
|
|
228
|
+
* Each slot's radiance estimators, as the re-sample pass reads them: how spread each texel's samples are.
|
|
229
|
+
* @type {ShaderResourceDescriptor}
|
|
230
|
+
*/
|
|
231
|
+
export const PROBE_ESTIMATORS_READ_RESOURCE: ShaderResourceDescriptor;
|
|
232
|
+
/**
|
|
233
|
+
* The listed probes' re-samples of their neighbours, n_r² a probe by radiance texel, in list order: the
|
|
234
|
+
* accepted re-samples' radiance, each times its weight, summed, and the weights' sum
|
|
235
|
+
* (`shader_probe_clipmap_resample`), as the re-sample pass writes them.
|
|
236
|
+
* @type {ShaderResourceDescriptor}
|
|
237
|
+
*/
|
|
238
|
+
export const PROBE_RESAMPLES_WRITE_RESOURCE: ShaderResourceDescriptor;
|
|
239
|
+
/**
|
|
240
|
+
* The listed probes' re-samples, as accumulation reads them.
|
|
241
|
+
* @type {ShaderResourceDescriptor}
|
|
242
|
+
*/
|
|
243
|
+
export const PROBE_RESAMPLES_READ_RESOURCE: ShaderResourceDescriptor;
|
|
227
244
|
/**
|
|
228
245
|
* A row of a listed probe's radiance map, projected: its irradiance SH, and its rays this update.
|
|
229
246
|
* @type {WebGPUStruct}
|