@woosh/meep-engine 3.61.0 → 3.61.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/package.json +1 -1
  2. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  3. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +4 -0
  4. package/src/engine/graphics/ecs/decal/v2/Decal.d.ts +46 -2
  5. package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
  6. package/src/engine/graphics/ecs/decal/v2/Decal.js +74 -5
  7. package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.d.ts.map +1 -1
  8. package/src/engine/graphics/ecs/decal/v2/DecalSerializationAdapter.js +13 -1
  9. package/src/engine/graphics/ecs/decal/v2/DecalSerializationUpgrader_1_2.d.ts +9 -0
  10. package/src/engine/graphics/ecs/decal/v2/DecalSerializationUpgrader_1_2.d.ts.map +1 -0
  11. package/src/engine/graphics/ecs/decal/v2/DecalSerializationUpgrader_1_2.js +37 -0
  12. package/src/engine/graphics3/DecalSystem.d.ts.map +1 -1
  13. package/src/engine/graphics3/DecalSystem.js +462 -447
  14. package/src/engine/graphics3/decal/DECAL_GPU_RECORD.d.ts +14 -0
  15. package/src/engine/graphics3/decal/DECAL_GPU_RECORD.d.ts.map +1 -1
  16. package/src/engine/graphics3/decal/DECAL_GPU_RECORD.js +53 -13
  17. package/src/engine/graphics3/decal/chunk_decal_record.d.ts +6 -1
  18. package/src/engine/graphics3/decal/chunk_decal_record.d.ts.map +1 -1
  19. package/src/engine/graphics3/decal/chunk_decal_record.js +28 -9
  20. package/src/engine/graphics3/decal/decal_gpu_records.d.ts +2 -1
  21. package/src/engine/graphics3/decal/decal_gpu_records.d.ts.map +1 -1
  22. package/src/engine/graphics3/decal/decal_gpu_records.js +26 -5
  23. package/src/engine/graphics3/decal/decal_material_samplers.d.ts +6 -0
  24. package/src/engine/graphics3/decal/decal_material_samplers.d.ts.map +1 -1
  25. package/src/engine/graphics3/decal/decal_material_samplers.js +13 -0
  26. package/src/engine/graphics3/decal/shader_cluster_assign_decals.js +1 -1
  27. package/src/engine/graphics3/decal/shader_cull_decals_frustum.js +1 -1
  28. package/src/engine/graphics3/decal/shader_decal_composite.d.ts +5 -0
  29. package/src/engine/graphics3/decal/shader_decal_composite.d.ts.map +1 -1
  30. package/src/engine/graphics3/decal/shader_decal_composite.js +69 -28
  31. package/src/engine/network/sim/SimActionExecutor.d.ts +4 -0
  32. package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
  33. package/src/engine/network/sim/SimActionExecutor.js +4 -0
  34. package/src/generation/foliage/material/foliage_atlas_cutout.d.ts.map +1 -1
  35. package/src/generation/foliage/material/foliage_atlas_cutout.js +21 -5
  36. package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts +8 -0
  37. package/src/generation/foliage/mesh/tree_cluster_representatives.d.ts.map +1 -1
  38. package/src/generation/foliage/mesh/tree_cluster_representatives.js +178 -78
  39. package/src/generation/foliage/mesh/tree_mesh_build_bark.d.ts.map +1 -1
  40. package/src/generation/foliage/mesh/tree_mesh_build_bark.js +178 -97
  41. package/src/generation/foliage/skeleton/ShootLightField.d.ts +1 -0
  42. package/src/generation/foliage/skeleton/ShootLightField.d.ts.map +1 -1
  43. package/src/generation/foliage/skeleton/ShootLightField.js +88 -17
  44. package/src/generation/foliage/skeleton/ShootWoodHash.d.ts +8 -4
  45. package/src/generation/foliage/skeleton/ShootWoodHash.d.ts.map +1 -1
  46. package/src/generation/foliage/skeleton/ShootWoodHash.js +216 -27
  47. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  48. package/src/shade/playground/probe_clipmap/main.js +4 -0
  49. package/src/shade/playground/probe_clipmap_box/README.md +55 -0
  50. package/src/shade/playground/probe_clipmap_box/index.html +185 -0
  51. package/src/shade/playground/probe_clipmap_box/main.d.ts +8 -0
  52. package/src/shade/playground/probe_clipmap_box/main.d.ts.map +1 -0
  53. package/src/shade/playground/probe_clipmap_box/main.js +323 -0
  54. package/src/shade/playground/probe_clipmap_box/scene.d.ts +93 -0
  55. package/src/shade/playground/probe_clipmap_box/scene.d.ts.map +1 -0
  56. package/src/shade/playground/probe_clipmap_box/scene.js +256 -0
  57. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  58. package/src/shade/renderer/Renderer.js +6 -1
  59. package/src/shade/renderer/buffer/graph_read_buffer.d.ts +3 -1
  60. package/src/shade/renderer/buffer/graph_read_buffer.d.ts.map +1 -1
  61. package/src/shade/renderer/buffer/graph_read_buffer.js +9 -6
  62. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.d.ts +12 -0
  63. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.d.ts.map +1 -1
  64. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.js +49 -24
  65. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.d.ts +12 -0
  66. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.d.ts.map +1 -1
  67. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.js +50 -19
  68. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.d.ts.map +1 -1
  69. package/src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.js +6 -2
  70. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +5 -1
  71. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  72. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +7 -3
  73. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +6 -4
  74. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  75. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +10 -9
  76. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts +12 -0
  77. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.d.ts.map +1 -1
  78. package/src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js +14 -0
  79. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts +17 -22
  80. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.d.ts.map +1 -1
  81. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap.js +53 -65
  82. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts +2 -3
  83. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.d.ts.map +1 -1
  84. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_pick.js +9 -20
  85. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts +2 -2
  86. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.d.ts.map +1 -1
  87. package/src/shade/renderer/global_illumination/probe_clipmap/probe/chunk_probe_clipmap_sample_radiance.js +14 -19
  88. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts +1 -1
  89. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.d.ts.map +1 -1
  90. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_accumulate.js +8 -4
  91. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_admit.js +1 -1
  92. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts +2 -1
  93. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.d.ts.map +1 -1
  94. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_bounce.js +13 -18
  95. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts +1 -1
  96. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.d.ts.map +1 -1
  97. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_candidate.js +4 -2
  98. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.d.ts.map +1 -1
  99. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_diffuse.js +4 -6
  100. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
  101. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +4 -7
  102. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts +4 -3
  103. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.d.ts.map +1 -1
  104. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_project.js +14 -13
  105. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts +3 -4
  106. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.d.ts.map +1 -1
  107. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_trace.js +7 -15
  108. package/src/shade/renderer/light/environment/shader_downsample_environment_map.d.ts.map +1 -1
  109. package/src/shade/renderer/light/environment/shader_downsample_environment_map.js +5 -1
  110. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  111. package/src/shade/renderer/particles/GPUParticleSystem.js +1 -7
  112. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +26 -8
  113. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts.map +1 -1
  114. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +170 -142
  115. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts +1 -1
  116. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.d.ts.map +1 -1
  117. package/src/shade/renderer/rasterize/forward/chunk_forward_sample_indirect_probe_clipmap.js +5 -8
  118. package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts.map +1 -1
  119. package/src/shade/renderer/restir/di/chunk_restir_resolve.js +91 -94
  120. package/src/shade/renderer/restir/reservoir/chunk_rtxdi_stream_sample.js +1 -1
  121. package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.d.ts +14 -0
  122. package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.d.ts.map +1 -1
  123. package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_decode.js +36 -21
  124. package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_sample_gather.d.ts +22 -0
  125. package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_sample_gather.d.ts.map +1 -0
  126. package/src/shade/renderer/shader/chunk/color/rgbe9995/chunk_rgbe9995_sample_gather.js +64 -0
  127. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts +15 -4
  128. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.d.ts.map +1 -1
  129. package/src/shade/renderer/shader/chunk/filter/chunk_multiscale_mean.js +33 -7
  130. package/src/shade/renderer/shader/chunk/geometry/normal/chunk_decode_vertex_normal.d.ts.map +1 -1
  131. package/src/shade/renderer/shader/chunk/geometry/normal/chunk_decode_vertex_normal.js +13 -18
  132. package/src/shade/renderer/shader/chunk/geometry/normal/chunk_encode_vertex_normal.d.ts.map +1 -1
  133. package/src/shade/renderer/shader/chunk/geometry/normal/chunk_encode_vertex_normal.js +28 -30
  134. package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_u32_to_vec2.d.ts.map +1 -1
  135. package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_u32_to_vec2.js +15 -16
  136. package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.d.ts +0 -1
  137. package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.d.ts.map +1 -1
  138. package/src/shade/renderer/shader/chunk/geometry/vec2/chunk_unit_vec2_to_u32.js +15 -18
  139. package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.d.ts +40 -0
  140. package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.d.ts.map +1 -0
  141. package/src/shade/renderer/shader/chunk/noise/chunk_sobol_sample_vec2.js +75 -0
  142. package/src/shade/renderer/shader/chunk/noise/chunk_vdc_radical_inverse.d.ts.map +1 -1
  143. package/src/shade/renderer/shader/chunk/noise/chunk_vdc_radical_inverse.js +3 -1
  144. package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.d.ts +28 -0
  145. package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.d.ts.map +1 -0
  146. package/src/shade/renderer/shader/chunk/random/chunk_hash_lk.js +41 -0
  147. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.d.ts +12 -0
  148. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.d.ts.map +1 -0
  149. package/src/shade/renderer/shader/chunk/spherical_harmonics/chunk_sh3_color_add_scaled.js +24 -0
  150. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +3 -2
  151. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
  152. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +4 -0
  153. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts +2 -5
  154. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.d.ts.map +1 -1
  155. package/src/shade/renderer/volumetrics/irradiance_clipmap/chunk_irradiance_clipmap_gi_sample.js +3 -20
  156. package/src/shade/renderer/water/chunk_water_gi.d.ts +1 -1
  157. package/src/shade/renderer/water/chunk_water_gi.d.ts.map +1 -1
  158. package/src/shade/renderer/water/chunk_water_gi.js +6 -8
  159. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +8 -1
  160. package/src/shade/wgsl/emulator/WGSLLanguageCore.d.ts.map +1 -1
  161. package/src/shade/wgsl/emulator/WGSLLanguageCore.js +79 -35
  162. package/src/core/math/hash/squirrel3.d.ts +0 -17
  163. package/src/core/math/hash/squirrel3.d.ts.map +0 -1
  164. package/src/core/math/hash/squirrel3.js +0 -30
  165. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_sh3_color_encode.d.ts +0 -2
  166. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_sh3_color_encode.d.ts.map +0 -1
  167. package/src/shade/renderer/global_illumination/brick4/cpu/brick4_sh3_color_encode.js +0 -6
  168. package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.d.ts +0 -12
  169. package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.d.ts.map +0 -1
  170. package/src/shade/renderer/shader/chunk/random/chunk_hash_squirrel3.js +0 -30
@@ -2838,6 +2838,9 @@ export class Renderer {
2838
2838
  let gr_texture_depth_current = gr_raster_depth;
2839
2839
  const gr_buffer_camera_current = graph_import_buffer(graph, view_ctx.camera.gpu_buffer, "camera/current");
2840
2840
  const gr_buffer_camera_previous = graph_import_buffer(graph, view_ctx.gpu_previous_camera_state.gpu_buffer, "camera/previous");
2841
+ // the exposure the last frame was shown with, until this frame's own is written over it past the bloom: a pass
2842
+ // recorded ahead of that reads it as the display's exposure
2843
+ const gr_exposure_multiplier = graph_import_buffer(graph, this.#autoexposure.multiplier, "exposure multiplier");
2841
2844
  const gr_texture_hzb = graph_import_texture(graph, view_ctx.hierarchical_z_buffer.texture, "HZB");
2842
2845
  const gr_texture_environment = graph_import_texture(graph, view_ctx.scene.lights.environment);
2843
2846
 
@@ -3004,6 +3007,7 @@ export class Renderer {
3004
3007
  normal: gr_texture_normal,
3005
3008
  stbn: STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2,
3006
3009
  movers: gr_scene_movers,
3010
+ exposure: gr_exposure_multiplier,
3007
3011
  });
3008
3012
  } else {
3009
3013
  this.#probe_clipmap_gi.release();
@@ -3461,13 +3465,14 @@ export class Renderer {
3461
3465
  exposure = this.#autoexposure.update({
3462
3466
  graph,
3463
3467
  input_color: metered_color,
3468
+ multiplier: gr_exposure_multiplier,
3464
3469
  time_delta_seconds,
3465
3470
  });
3466
3471
  }
3467
3472
 
3468
3473
 
3469
3474
  if (this.feature_automatic_exposure_enabled === false) {
3470
- exposure = this.#autoexposure.unadapted({ graph });
3475
+ exposure = this.#autoexposure.unadapted({ graph, multiplier: gr_exposure_multiplier });
3471
3476
  }
3472
3477
 
3473
3478
 
@@ -5,7 +5,9 @@
5
5
  * @param {number} buffer
6
6
  * @param {number} [offset=0]
7
7
  * @param {number} [size] defaults to buffer.size - offset
8
- * @param {number} [timeout] in milliseconds, 0 for no timeout. Timeout will start immediately, meaning that if you don't schedule the graph immediately - you might see unexpected behaviour.
8
+ * @param {number} [timeout] in milliseconds, 0 for no timeout: how long the read waits for its pass to run, starting
9
+ * now. A graph that is never run, or stops at a throwing pass before this one, rejects the read here. Once the pass has
10
+ * run, the read waits for the device however far behind it is, and settles when the mapping does.
9
11
  * @returns {Promise<Reference<ArrayBuffer>>} don't forget to release the reference
10
12
  */
11
13
  export function graph_read_buffer({ graph, buffer, offset, size, timeout }: FrameGraph): Promise<Reference<ArrayBuffer>>;
@@ -1 +1 @@
1
- {"version":3,"file":"graph_read_buffer.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/buffer/graph_read_buffer.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AACH,yFAFa,QAAQ,UAAU,WAAW,CAAC,CAAC,CAuH3C;0BApIyB,2CAA2C"}
1
+ {"version":3,"file":"graph_read_buffer.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/buffer/graph_read_buffer.js"],"names":[],"mappings":"AAOA;;;;;;;;;;;GAWG;AACH,yFAFa,QAAQ,UAAU,WAAW,CAAC,CAAC,CAwH3C;0BAvIyB,2CAA2C"}
@@ -12,7 +12,9 @@ const scratch_buffer_descriptor = new BufferResourceDescriptor();
12
12
  * @param {number} buffer
13
13
  * @param {number} [offset=0]
14
14
  * @param {number} [size] defaults to buffer.size - offset
15
- * @param {number} [timeout] in milliseconds, 0 for no timeout. Timeout will start immediately, meaning that if you don't schedule the graph immediately - you might see unexpected behaviour.
15
+ * @param {number} [timeout] in milliseconds, 0 for no timeout: how long the read waits for its pass to run, starting
16
+ * now. A graph that is never run, or stops at a throwing pass before this one, rejects the read here. Once the pass has
17
+ * run, the read waits for the device however far behind it is, and settles when the mapping does.
16
18
  * @returns {Promise<Reference<ArrayBuffer>>} don't forget to release the reference
17
19
  */
18
20
  export function graph_read_buffer({
@@ -47,6 +49,12 @@ export function graph_read_buffer({
47
49
  * @param {GraphicsExecutionContext} context
48
50
  */
49
51
  function execute(data, resources, context) {
52
+ // the copy is recorded: the mapping lands, or is refused, however long the device takes
53
+ if (timeout_handle !== -1) {
54
+ clearTimeout(timeout_handle);
55
+ timeout_handle = -1;
56
+ }
57
+
50
58
  /**
51
59
  * @type {GPUBuffer}
52
60
  */
@@ -94,11 +102,6 @@ export function graph_read_buffer({
94
102
  return;
95
103
  }
96
104
 
97
- if (timeout_handle !== -1) {
98
- clearTimeout(timeout_handle);
99
- timeout_handle = -1;
100
- }
101
-
102
105
  const data = destination.getMappedRange(0, _size);
103
106
 
104
107
  ref = new Reference();
@@ -1,3 +1,15 @@
1
+ /**
2
+ * The RGB SH3 that {@link chunk_brick4_sh3_color_pack} packed, times `scale`, and its band 0 alone, which is the
3
+ * first word. Every coefficient decodes as a multiple of band 0, so the scale is applied to band 0 alone.
4
+ *
5
+ * ```wgsl
6
+ * fn brick4_sh3_color_unpack(words: array<u32, 7>, scale: f32) -> array<vec3<f32>, 9>
7
+ * fn brick4_sh3_color_unpack_dc(words: array<u32, 7>) -> vec3<f32>
8
+ * ```
9
+ *
10
+ * @type {CodeChunk}
11
+ */
12
+ export const chunk_brick4_sh3_color_unpack: CodeChunk;
1
13
  export const chunk_brick4_sh3_color_decode: CodeChunk;
2
14
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
3
15
  //# sourceMappingURL=chunk_brick4_sh3_color_decode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_brick4_sh3_color_decode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.js"],"names":[],"mappings":"AAOA,sDAyCC;0BA5CyB,6CAA6C"}
1
+ {"version":3,"file":"chunk_brick4_sh3_color_decode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_decode.js"],"names":[],"mappings":"AAQA;;;;;;;;;;GAUG;AACH,4CAFU,SAAS,CAiCjB;AAEF,sDAqBC;0BArEyB,6CAA6C"}
@@ -3,42 +3,44 @@ import {
3
3
  chunk_sh3_color_combine_channels
4
4
  } from "../../../../../shader/chunk/spherical_harmonics/chunk_sh3_color_combine_channels.js";
5
5
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
6
+ import { BRICK4_PROBE_ENCODED_SIZE } from "../../../BRICK4_PROBE_ENCODED_SIZE.js";
6
7
  import { chunk_sh3_uncompress } from "./chunk_sh3_uncompress.js";
7
8
 
8
- export const chunk_brick4_sh3_color_decode = CodeChunk.from(
9
+ /**
10
+ * The RGB SH3 that {@link chunk_brick4_sh3_color_pack} packed, times `scale`, and its band 0 alone, which is the
11
+ * first word. Every coefficient decodes as a multiple of band 0, so the scale is applied to band 0 alone.
12
+ *
13
+ * ```wgsl
14
+ * fn brick4_sh3_color_unpack(words: array<u32, 7>, scale: f32) -> array<vec3<f32>, 9>
15
+ * fn brick4_sh3_color_unpack_dc(words: array<u32, 7>) -> vec3<f32>
16
+ * ```
17
+ *
18
+ * @type {CodeChunk}
19
+ */
20
+ export const chunk_brick4_sh3_color_unpack = CodeChunk.from(
9
21
  //language=WGSL
10
22
  `
11
- fn brick4_sh3_color_decode(
12
- storage_buf: ptr<storage, array<u32>, read>,
13
- offset: u32
14
- ) -> array< vec3<f32>, 9 > {
23
+ fn brick4_sh3_color_unpack_dc(words: array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>) -> vec3<f32> {
24
+ return rgbe9995_decode(words[0]);
25
+ }
15
26
 
16
- let rgb_L0 = rgbe9995_decode((*storage_buf)[offset + 0u]);
27
+ fn brick4_sh3_color_unpack(words: array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>, scale: f32) -> array< vec3<f32>, 9 > {
28
+
29
+ let rgb_L0 = brick4_sh3_color_unpack_dc(words) * scale;
30
+
31
+ let compressed_r = vec2<u32>(words[1], words[2]);
32
+ let compressed_g = vec2<u32>(words[3], words[4]);
33
+ let compressed_b = vec2<u32>(words[5], words[6]);
17
34
 
18
- let compressed_r = vec2<u32>(
19
- (*storage_buf)[offset + 1u],
20
- (*storage_buf)[offset + 2u]
21
- );
22
-
23
- let compressed_g = vec2<u32>(
24
- (*storage_buf)[offset + 3u],
25
- (*storage_buf)[offset + 4u]
26
- );
27
-
28
- let compressed_b = vec2<u32>(
29
- (*storage_buf)[offset + 5u],
30
- (*storage_buf)[offset + 6u]
31
- );
32
-
33
35
  const nonZbound = 1.9365;
34
36
  const bits = 8;
35
37
  const sq = true;
36
38
  const isIrrad = false;
37
-
39
+
38
40
  let sh_r = sh3_uncompress(compressed_r, rgb_L0.x, bits, nonZbound, sq, isIrrad);
39
41
  let sh_g = sh3_uncompress(compressed_g, rgb_L0.y, bits, nonZbound, sq, isIrrad);
40
42
  let sh_b = sh3_uncompress(compressed_b, rgb_L0.z, bits, nonZbound, sq, isIrrad);
41
-
43
+
42
44
  return sh3_color_combine_channels(sh_r, sh_g, sh_b);
43
45
  }
44
46
  `, [
@@ -46,4 +48,27 @@ fn brick4_sh3_color_decode(
46
48
  chunk_sh3_color_combine_channels,
47
49
  chunk_sh3_uncompress,
48
50
  ]
49
- )
51
+ );
52
+
53
+ export const chunk_brick4_sh3_color_decode = CodeChunk.from(
54
+ //language=WGSL
55
+ `
56
+ fn brick4_sh3_color_decode(
57
+ storage_buf: ptr<storage, array<u32>, read>,
58
+ offset: u32
59
+ ) -> array< vec3<f32>, 9 > {
60
+
61
+ return brick4_sh3_color_unpack(array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>(
62
+ (*storage_buf)[offset + 0u],
63
+ (*storage_buf)[offset + 1u],
64
+ (*storage_buf)[offset + 2u],
65
+ (*storage_buf)[offset + 3u],
66
+ (*storage_buf)[offset + 4u],
67
+ (*storage_buf)[offset + 5u],
68
+ (*storage_buf)[offset + 6u],
69
+ ), 1.0);
70
+ }
71
+ `, [
72
+ chunk_brick4_sh3_color_unpack,
73
+ ]
74
+ )
@@ -1,3 +1,15 @@
1
+ /**
2
+ * An RGB SH3 of a non-negative function as {@link BRICK4_PROBE_ENCODED_SIZE} words: band 0 as RGB9E5 in the
3
+ * first, then each channel's bands 1 and 2 in two words, eight bits a coefficient over the band 0 the decoder
4
+ * reads back (`sh3_compress`).
5
+ *
6
+ * ```wgsl
7
+ * fn brick4_sh3_color_pack(sh: array<vec3<f32>, 9>) -> array<u32, 7>
8
+ * ```
9
+ *
10
+ * @type {CodeChunk}
11
+ */
12
+ export const chunk_brick4_sh3_color_pack: CodeChunk;
1
13
  export const chunk_brick4_sh3_color_encode: CodeChunk;
2
14
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
3
15
  //# sourceMappingURL=chunk_brick4_sh3_color_encode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_brick4_sh3_color_encode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.js"],"names":[],"mappings":"AAQA,sDAgDC;0BAnDyB,6CAA6C"}
1
+ {"version":3,"file":"chunk_brick4_sh3_color_encode.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_brick4_sh3_color_encode.js"],"names":[],"mappings":"AASA;;;;;;;;;;GAUG;AACH,0CAFU,SAAS,CA8CjB;AAEF,sDAqBC;0BAlFyB,6CAA6C"}
@@ -4,18 +4,25 @@ import {
4
4
  chunk_sh3_color_split_channels
5
5
  } from "../../../../../shader/chunk/spherical_harmonics/chunk_sh3_color_split_channels.js";
6
6
  import { CodeChunk } from "../../../../../shader/compiler/CodeChunk.js";
7
+ import { BRICK4_PROBE_ENCODED_SIZE } from "../../../BRICK4_PROBE_ENCODED_SIZE.js";
7
8
  import { chunk_sh3_compress } from "./chunk_sh3_compress.js";
8
9
 
9
- export const chunk_brick4_sh3_color_encode = CodeChunk.from(
10
+ /**
11
+ * An RGB SH3 of a non-negative function as {@link BRICK4_PROBE_ENCODED_SIZE} words: band 0 as RGB9E5 in the
12
+ * first, then each channel's bands 1 and 2 in two words, eight bits a coefficient over the band 0 the decoder
13
+ * reads back (`sh3_compress`).
14
+ *
15
+ * ```wgsl
16
+ * fn brick4_sh3_color_pack(sh: array<vec3<f32>, 9>) -> array<u32, 7>
17
+ * ```
18
+ *
19
+ * @type {CodeChunk}
20
+ */
21
+ export const chunk_brick4_sh3_color_pack = CodeChunk.from(
10
22
  //language=WGSL
11
23
  `
12
- fn brick4_sh3_color_encode(
13
- out:ptr<storage, array<u32>,read_write>,
14
- out_offset: u32,
15
- sh: array<vec3<f32>,9>
16
- ) {
24
+ fn brick4_sh3_color_pack(sh: array<vec3<f32>,9>) -> array<u32, ${BRICK4_PROBE_ENCODED_SIZE}> {
17
25
  let encoded_dc = rgbe9995_encode(sh[0]);
18
- (*out)[out_offset + 0u] = encoded_dc;
19
26
 
20
27
  // Normalize L1/L2 against the DC the DECODER will see — the rgbe9995 round-trip quantizes the
21
28
  // DC (shared 5-bit exponent, so a dim channel next to a bright one moves a lot), and
@@ -28,7 +35,7 @@ fn brick4_sh3_color_encode(
28
35
  rgb_sh[0][0] = quantized_dc.x;
29
36
  rgb_sh[1][0] = quantized_dc.y;
30
37
  rgb_sh[2][0] = quantized_dc.z;
31
-
38
+
32
39
  // sqrt(15)/2
33
40
  const nonZbound = 1.9365;
34
41
  const bits = 8;
@@ -38,20 +45,44 @@ fn brick4_sh3_color_encode(
38
45
  let compressed_r = sh3_compress(rgb_sh[0], bits, nonZbound, sq, isIrrad);
39
46
  let compressed_g = sh3_compress(rgb_sh[1], bits, nonZbound, sq, isIrrad);
40
47
  let compressed_b = sh3_compress(rgb_sh[2], bits, nonZbound, sq, isIrrad);
41
-
42
- (*out)[out_offset + 1u] = compressed_r.x;
43
- (*out)[out_offset + 2u] = compressed_r.y;
44
-
45
- (*out)[out_offset + 3u] = compressed_g.x;
46
- (*out)[out_offset + 4u] = compressed_g.y;
47
-
48
- (*out)[out_offset + 5u] = compressed_b.x;
49
- (*out)[out_offset + 6u] = compressed_b.y;
48
+
49
+ return array<u32, ${BRICK4_PROBE_ENCODED_SIZE}>(
50
+ encoded_dc,
51
+ compressed_r.x,
52
+ compressed_r.y,
53
+ compressed_g.x,
54
+ compressed_g.y,
55
+ compressed_b.x,
56
+ compressed_b.y,
57
+ );
50
58
  }
51
- `,[
59
+ `, [
52
60
  chunk_sh3_compress,
53
61
  chunk_rgbe9995_encode,
54
62
  chunk_rgbe9995_decode,
55
63
  chunk_sh3_color_split_channels,
56
64
  ]
57
- )
65
+ );
66
+
67
+ export const chunk_brick4_sh3_color_encode = CodeChunk.from(
68
+ //language=WGSL
69
+ `
70
+ fn brick4_sh3_color_encode(
71
+ out:ptr<storage, array<u32>,read_write>,
72
+ out_offset: u32,
73
+ sh: array<vec3<f32>,9>
74
+ ) {
75
+ let words = brick4_sh3_color_pack(sh);
76
+
77
+ (*out)[out_offset + 0u] = words[0];
78
+ (*out)[out_offset + 1u] = words[1];
79
+ (*out)[out_offset + 2u] = words[2];
80
+ (*out)[out_offset + 3u] = words[3];
81
+ (*out)[out_offset + 4u] = words[4];
82
+ (*out)[out_offset + 5u] = words[5];
83
+ (*out)[out_offset + 6u] = words[6];
84
+ }
85
+ `,[
86
+ chunk_brick4_sh3_color_pack,
87
+ ]
88
+ )
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_sh3_compress.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,iCAFU,SAAS,CAsDlB;0BA7DyB,6CAA6C"}
1
+ {"version":3,"file":"chunk_sh3_compress.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/shade/renderer/global_illumination/brick4/gpu/encoding/v2/chunk_sh3_compress.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,iCAFU,SAAS,CA0DlB;0BAjEyB,6CAA6C"}
@@ -38,10 +38,14 @@ fn sh3_compress(
38
38
  let nz_factor = select(1.0, 0.25, isIrrad); // Same factor as qz for irradiance
39
39
  let nz = 1.0 / (safe_DC * nz_denom * nz_factor);
40
40
 
41
+ // The bounds hold over the DC the function was projected with. Over a DC the caller quantized down
42
+ // (an RGB9E5 band 0) a coefficient can pass its bound, and pack4's byte would overflow into the
43
+ // next coefficient's: held to the bound instead.
44
+
41
45
  // Pack the first set: sh[1]..sh[4] (Linear + 1st Quad) [cite: 130-132]
42
46
  // Scaled by their respective bounds: lc, lc, lc, nz
43
47
  let packed0 = pack4(
44
- vec4<f32>(sh[1], sh[2], sh[3], sh[4]) * vec4<f32>(lc, lc, lc, nz),
48
+ clamp(vec4<f32>(sh[1], sh[2], sh[3], sh[4]) * vec4<f32>(lc, lc, lc, nz), vec4<f32>(-1.0), vec4<f32>(1.0)),
45
49
  bv,
46
50
  sq
47
51
  );
@@ -49,7 +53,7 @@ fn sh3_compress(
49
53
  // Pack the second set: sh[5]..sh[8] (Remaining Quads) [cite: 135-137]
50
54
  // Scaled by bounds: nz, qz, nz, nz
51
55
  let packed1 = pack4(
52
- vec4<f32>(sh[5], sh[6], sh[7], sh[8]) * vec4<f32>(nz, qz, nz, nz),
56
+ clamp(vec4<f32>(sh[5], sh[6], sh[7], sh[8]) * vec4<f32>(nz, qz, nz, nz), vec4<f32>(-1.0), vec4<f32>(1.0)),
53
57
  bv,
54
58
  sq
55
59
  );
@@ -68,8 +68,11 @@ export class GPUProbeClipmapGI {
68
68
  * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
69
69
  * @param {number} [options.movers] the graph handle of the scene's mover list for the frame,
70
70
  * which the world's bricks are built again over
71
+ * @param {number} options.exposure the graph handle of the factor the display multiplies radiance by ahead of its
72
+ * tone curve, as the last frame was shown (`GPUCameraExposureManager#multiplier`): what the probes'
73
+ * estimators state their thresholds in
71
74
  */
72
- graph_update({ graph, view, settings, depth, normal, stbn, movers }: {
75
+ graph_update({ graph, view, settings, depth, normal, stbn, movers, exposure }: {
73
76
  graph: FrameGraph;
74
77
  view: GPUViewContext;
75
78
  settings: ProbeClipmapSettings;
@@ -77,6 +80,7 @@ export class GPUProbeClipmapGI {
77
80
  normal: number;
78
81
  stbn: any;
79
82
  movers?: number;
83
+ exposure: number;
80
84
  }): void;
81
85
  /**
82
86
  * Whether the probes are there to read: the mode has run a frame and not been left since.
@@ -1 +1 @@
1
- {"version":3,"file":"GPUProbeClipmapGI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAoSI;;;;OAIG;IACH,oDAJW,eAAe,YACf,oBAAoB,GAClB,OAAO,CAUnB;IArOD;;OAEG;IACH,sBAFW,eAAe,EAMzB;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;;;;;;;;;;;;OAcG;IACH;QAT+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACJ,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACK,IAAI;QACE,MAAM,GAAvB,MAAM;aAiIhB;IAqDD;;;OAGG;IACH,0BAEC;IAED;;;;;;;;;OASG;IACH,4CAUC;IAwDD;;;;;;;;;;OAUG;IACH;QAN+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACF,UAAU,EAA5B,MAAM,EAAE;QACN,MAAM,CAmBlB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAgED;;;OAGG;IACH,gBAuBC;IAED,gBAcC;;CACJ;yBA5kBY,OAAO,8DAA8D,EAAE,UAAU;8BACjF,OAAO,0BAA0B,EAAE,eAAe;6BAClD,OAAO,8BAA8B,EAAE,cAAc;mCACrD,OAAO,2BAA2B,EAAE,oBAAoB;4BACxD,OAAO,4BAA4B,EAAE,aAAa;gCAnB/B,4BAA4B;gCAQ5B,4BAA4B;uCAIrB,6BAA6B"}
1
+ {"version":3,"file":"GPUProbeClipmapGI.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js"],"names":[],"mappings":"AAuBA;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH;IAwSI;;;;OAIG;IACH,oDAJW,eAAe,YACf,oBAAoB,GAClB,OAAO,CAUnB;IAzOD;;OAEG;IACH,sBAFW,eAAe,EAMzB;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,qCAEC;IAED;;OAEG;IACH,mCAEC;IAED;;OAEG;IACH,oCAEC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH;QAZ+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACJ,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;QACK,IAAI;QACE,MAAM,GAAvB,MAAM;QAEU,QAAQ,EAAxB,MAAM;aAmIhB;IAqDD;;;OAGG;IACH,0BAEC;IAED;;;;;;;;;OASG;IACH,4CAUC;IAwDD;;;;;;;;;;OAUG;IACH;QAN+B,KAAK,EAAzB,UAAU;QACc,IAAI,EAA5B,cAAc;QACgB,QAAQ,EAAtC,oBAAoB;QACF,UAAU,EAA5B,MAAM,EAAE;QACN,MAAM,CAmBlB;IAED;;;;;OAKG;IACH,uBAFW,aAAa,QASvB;IAED;;;OAGG;IACH,0BAHW,aAAa,GACX,OAAO,CAanB;IAgED;;;OAGG;IACH,gBAuBC;IAED,gBAcC;;CACJ;yBAhlBY,OAAO,8DAA8D,EAAE,UAAU;8BACjF,OAAO,0BAA0B,EAAE,eAAe;6BAClD,OAAO,8BAA8B,EAAE,cAAc;mCACrD,OAAO,2BAA2B,EAAE,oBAAoB;4BACxD,OAAO,4BAA4B,EAAE,aAAa;gCAnB/B,4BAA4B;gCAQ5B,4BAA4B;uCAIrB,6BAA6B"}
@@ -178,13 +178,17 @@ export class GPUProbeClipmapGI {
178
178
  * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
179
179
  * @param {number} [options.movers] the graph handle of the scene's mover list for the frame,
180
180
  * which the world's bricks are built again over
181
+ * @param {number} options.exposure the graph handle of the factor the display multiplies radiance by ahead of its
182
+ * tone curve, as the last frame was shown (`GPUCameraExposureManager#multiplier`): what the probes'
183
+ * estimators state their thresholds in
181
184
  */
182
- graph_update({ graph, view, settings, depth, normal, stbn, movers = -1 }) {
185
+ graph_update({ graph, view, settings, depth, normal, stbn, movers = -1, exposure }) {
183
186
  assert.defined(graph, 'graph');
184
187
  assert.defined(view, 'view');
185
188
  assert.defined(settings, 'settings');
186
189
  assert.isNonNegativeInteger(depth, 'depth');
187
190
  assert.isNonNegativeInteger(normal, 'normal');
191
+ assert.isNonNegativeInteger(exposure, 'exposure');
188
192
  assert.notOk(this.#destroyed, 'destroyed');
189
193
 
190
194
  // the relations between fields, checked here because each setter sees only its own field
@@ -269,7 +273,6 @@ export class GPUProbeClipmapGI {
269
273
  world.graph_update({
270
274
  graph,
271
275
  wants: this.#hit_wants,
272
- stbn,
273
276
  response_frames: settings.response_frames,
274
277
  ray_budget: settings.world_ray_budget,
275
278
  rays_per_probe: settings.world_cache_rays_per_probe,
@@ -284,6 +287,7 @@ export class GPUProbeClipmapGI {
284
287
  clusters,
285
288
  bounce_first: frustum,
286
289
  bounce_fallback: world,
290
+ exposure,
287
291
  });
288
292
 
289
293
  this.#screen_wants.set({ depth, normal, camera: view.camera.buffer, stbn, resolution: view.resolution });
@@ -291,7 +295,6 @@ export class GPUProbeClipmapGI {
291
295
  frustum.graph_update({
292
296
  graph,
293
297
  wants: this.#screen_wants,
294
- stbn,
295
298
  response_frames: settings.response_frames,
296
299
  ray_budget: settings.frustum_ray_budget,
297
300
  rays_per_probe: settings.rays_per_probe,
@@ -304,6 +307,7 @@ export class GPUProbeClipmapGI {
304
307
  clusters,
305
308
  bounce_first: frustum,
306
309
  bounce_fallback: world,
310
+ exposure,
307
311
  });
308
312
  }
309
313
 
@@ -13,7 +13,7 @@
13
13
  * stacked along z: the slot of the point's probe, or none. Allocated whole, since the lattice follows
14
14
  * from the structure alone.
15
15
  * - a slot each: a state of two words, the kind and updates and then where relocation moved it
16
- * (`PROBE_CLIPMAP.js`), a 48-byte record (`PROBE_RECORD_STRUCT`), an octahedral radiance tile of
16
+ * (`PROBE_CLIPMAP.js`), a 64-byte record (`PROBE_RECORD_STRUCT`), an octahedral radiance tile of
17
17
  * {@link radiance_resolution}² texels and a depth-moment tile of {@link depth_resolution}², in two 2-D
18
18
  * tile atlases. The depth tile has a one-texel skirt, which the pick's bilinear tap reads; the radiance
19
19
  * tile has one where {@link radiance_skirt}, for the specular's tap, and none where nothing samples it.
@@ -211,7 +211,6 @@ export class GPUProbeClipmap {
211
211
  * @param {Object} options
212
212
  * @param {FrameGraph} options.graph
213
213
  * @param {ProbeClipmapWants} options.wants who wants the frame's probes
214
- * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
215
214
  * @param {number} options.response_frames frames over which a re-sampled neighbour's history goes stale, τ
216
215
  * @param {number} options.ray_budget rays a frame
217
216
  * @param {number} options.rays_per_probe rays an update, R: the frame updates ⌊ray_budget / R⌋ probes at most
@@ -230,11 +229,13 @@ export class GPUProbeClipmap {
230
229
  * bricks' cascades, which the hits' local lights come from
231
230
  * @param {GPUProbeClipmap} options.bounce_first the clipmap a hit takes its next bounce from first
232
231
  * @param {GPUProbeClipmap} options.bounce_fallback the clipmap it takes it from where the first has no probe
232
+ * @param {number} options.exposure the graph handle of the factor the display multiplies radiance by ahead of its
233
+ * tone curve, a single f32, as the last frame was shown: the exposure the probes' estimators state their
234
+ * thresholds in
233
235
  */
234
- graph_update({ graph, wants, stbn, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, card_rows, history_resampling, ray_resampling, clusters, bounce_first, bounce_fallback }: {
236
+ graph_update({ graph, wants, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, card_rows, history_resampling, ray_resampling, clusters, bounce_first, bounce_fallback, exposure }: {
235
237
  graph: FrameGraph;
236
238
  wants: ProbeClipmapWants;
237
- stbn: any;
238
239
  response_frames: number;
239
240
  ray_budget: number;
240
241
  rays_per_probe: number;
@@ -250,6 +251,7 @@ export class GPUProbeClipmap {
250
251
  };
251
252
  bounce_first: GPUProbeClipmap;
252
253
  bounce_fallback: GPUProbeClipmap;
254
+ exposure: number;
253
255
  }): void;
254
256
  destroy(): void;
255
257
  #private;
@@ -1 +1 @@
1
- {"version":3,"file":"GPUProbeClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js"],"names":[],"mappings":"AAiIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH;IA4QI;;;;;;;;;;;;;;;;;OAiBG;IACH;QAf2B,aAAa,EAA7B,MAAM;QAEU,UAAU,EAA1B,MAAM;QAGU,OAAO,EAAvB,MAAM;QACU,mBAAmB,EAAnC,MAAM;QAEU,gBAAgB,EAAhC,MAAM;QACW,cAAc,EAA/B,OAAO;QAES,KAAK,EAArB,MAAM;QACU,QAAQ,EAAxB,MAAM;OA8GhB;IAxYD;;;OAGG;IACH,wBAHU,MAAM,CAGF;IAEd;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAEX;;;;OAIG;IACH,kBAHU,MAAM,CAGR;IAER;;;;OAIG;IACH,8BAHU,MAAM,CAGI;IAEpB;;;;OAIG;IACH,2BAHU,MAAM,CAGC;IAEjB;;;;;OAKG;IACH,yBAHU,OAAO,CAGF;IAEf;;;;OAIG;IACH,gBAHU,MAAM,CAGV;IA2VN;;;;;;;;OAQG;IACH,4CAUC;IAED;;OAEG;IACH,8BAEC;IAED;;;;;OAKG;IACH,uBAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;OAGG;IACH,sBAEC;IAGD;;;OAGG;IACH,0BAEC;IAED;;;;;OAKG;IACH,wBAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;;OAIG;IACH,gBAJW,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,oBAHW,oBAAoB,GAClB,OAAO,CAQnB;IAED;;;;;;;OAOG;IACH,SAJW,MAAM,KACN,MAAM,KACN,MAAM,QA6BhB;IAED;;;;;;;OAOG;IACH,sBAFW,eAAe,QA2BzB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH;QAtB+B,KAAK,EAAzB,UAAU;QACiB,KAAK,EAAhC,iBAAiB;QACN,IAAI;QACC,eAAe,EAA/B,MAAM;QACU,UAAU,EAA1B,MAAM;QACU,cAAc,EAA9B,MAAM;QACyD,aAAa,EAA5E,OAAO,6BAA6B,EAAE,eAAe;QAErC,MAAM,EAAtB,MAAM;QAE+D,KAAK,EAA1E,OAAO,mCAAmC,EAAE,eAAe;QAExC,SAAS;QACX,kBAAkB,EAAnC,OAAO;QAEU,cAAc,EAA/B,OAAO;QAEiC,QAAQ,EAAhD;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC;QAEL,YAAY,EAArC,eAAe;QACU,eAAe,EAAxC,eAAe;aAiOzB;IAshBD,gBAcC;;CACJ;mCAz7CY,OAAO,4BAA4B,EAAE,oBAAoB;yBACzD,OAAO,iEAAiE,EAAE,UAAU;gCACpF,OAAO,8BAA8B,EAAE,uBAAuB,GAAC,OAAO,2BAA2B,EAAE,oBAAoB"}
1
+ {"version":3,"file":"GPUProbeClipmap.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js"],"names":[],"mappings":"AAiIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH;IA4QI;;;;;;;;;;;;;;;;;OAiBG;IACH;QAf2B,aAAa,EAA7B,MAAM;QAEU,UAAU,EAA1B,MAAM;QAGU,OAAO,EAAvB,MAAM;QACU,mBAAmB,EAAnC,MAAM;QAEU,gBAAgB,EAAhC,MAAM;QACW,cAAc,EAA/B,OAAO;QAES,KAAK,EAArB,MAAM;QACU,QAAQ,EAAxB,MAAM;OA8GhB;IAxYD;;;OAGG;IACH,wBAHU,MAAM,CAGF;IAEd;;;;OAIG;IACH,qBAHU,MAAM,CAGL;IAEX;;;;OAIG;IACH,kBAHU,MAAM,CAGR;IAER;;;;OAIG;IACH,8BAHU,MAAM,CAGI;IAEpB;;;;OAIG;IACH,2BAHU,MAAM,CAGC;IAEjB;;;;;OAKG;IACH,yBAHU,OAAO,CAGF;IAEf;;;;OAIG;IACH,gBAHU,MAAM,CAGV;IA2VN;;;;;;;;OAQG;IACH,4CAUC;IAED;;OAEG;IACH,8BAEC;IAED;;;;;OAKG;IACH,uBAEC;IAED;;;OAGG;IACH,yBAEC;IAED;;;OAGG;IACH,sBAEC;IAGD;;;OAGG;IACH,0BAEC;IAED;;;;;OAKG;IACH,wBAEC;IAED;;;OAGG;IACH,uBAEC;IAED;;;;OAIG;IACH,gBAJW,MAAM,QACN,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,mBAHW,MAAM,GACJ,MAAM,CAIlB;IAED;;;OAGG;IACH,oBAHW,oBAAoB,GAClB,OAAO,CAQnB;IAED;;;;;;;OAOG;IACH,SAJW,MAAM,KACN,MAAM,KACN,MAAM,QA6BhB;IAED;;;;;;;OAOG;IACH,sBAFW,eAAe,QA2BzB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6BG;IACH;QAxB+B,KAAK,EAAzB,UAAU;QACiB,KAAK,EAAhC,iBAAiB;QACD,eAAe,EAA/B,MAAM;QACU,UAAU,EAA1B,MAAM;QACU,cAAc,EAA9B,MAAM;QACyD,aAAa,EAA5E,OAAO,6BAA6B,EAAE,eAAe;QAErC,MAAM,EAAtB,MAAM;QAE+D,KAAK,EAA1E,OAAO,mCAAmC,EAAE,eAAe;QAExC,SAAS;QACX,kBAAkB,EAAnC,OAAO;QAEU,cAAc,EAA/B,OAAO;QAEiC,QAAQ,EAAhD;YAAC,MAAM,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC;QAEL,YAAY,EAArC,eAAe;QACU,eAAe,EAAxC,eAAe;QACC,QAAQ,EAAxB,MAAM;aAmOhB;IAqhBD,gBAcC;;CACJ;mCA17CY,OAAO,4BAA4B,EAAE,oBAAoB;yBACzD,OAAO,iEAAiE,EAAE,UAAU;gCACpF,OAAO,8BAA8B,EAAE,uBAAuB,GAAC,OAAO,2BAA2B,EAAE,oBAAoB"}
@@ -142,7 +142,7 @@ const SAMPLING_RADIANCE_TILES_PER_ROW_RECIPROCAL = PROBE_SAMPLING_STRUCT.get("ra
142
142
  * stacked along z: the slot of the point's probe, or none. Allocated whole, since the lattice follows
143
143
  * from the structure alone.
144
144
  * - a slot each: a state of two words, the kind and updates and then where relocation moved it
145
- * (`PROBE_CLIPMAP.js`), a 48-byte record (`PROBE_RECORD_STRUCT`), an octahedral radiance tile of
145
+ * (`PROBE_CLIPMAP.js`), a 64-byte record (`PROBE_RECORD_STRUCT`), an octahedral radiance tile of
146
146
  * {@link radiance_resolution}² texels and a depth-moment tile of {@link depth_resolution}², in two 2-D
147
147
  * tile atlases. The depth tile has a one-texel skirt, which the pick's bilinear tap reads; the radiance
148
148
  * tile has one where {@link radiance_skirt}, for the specular's tap, and none where nothing samples it.
@@ -422,9 +422,9 @@ export class GPUProbeClipmap {
422
422
  /** The ray counts' scan's, which names its buffers its own way. */
423
423
  #ray_scan_bindings = { scan_in: null, scan_out: null, spine: null, command: null };
424
424
 
425
- #lifetime_data = { counters: -1, stbn: -1, want_depth: -1, want_normal: -1 };
425
+ #lifetime_data = { counters: -1, want_depth: -1, want_normal: -1 };
426
426
 
427
- #update_data = { counters: -1, bricks: -1, world_cluster_lookup: -1, world_cluster_data: -1 };
427
+ #update_data = { counters: -1, bricks: -1, world_cluster_lookup: -1, world_cluster_data: -1, exposure: -1 };
428
428
 
429
429
  /** The frame's wants. @type {ProbeClipmapWants|null} */
430
430
  #wants = null;
@@ -764,7 +764,6 @@ export class GPUProbeClipmap {
764
764
  * @param {Object} options
765
765
  * @param {FrameGraph} options.graph
766
766
  * @param {ProbeClipmapWants} options.wants who wants the frame's probes
767
- * @param {*} options.stbn the 2-channel spatio-temporal blue noise, `STATIC_GRAPHICS_ENGINE_ASSETS.stbn_vec2`
768
767
  * @param {number} options.response_frames frames over which a re-sampled neighbour's history goes stale, τ
769
768
  * @param {number} options.ray_budget rays a frame
770
769
  * @param {number} options.rays_per_probe rays an update, R: the frame updates ⌊ray_budget / R⌋ probes at most
@@ -783,11 +782,13 @@ export class GPUProbeClipmap {
783
782
  * bricks' cascades, which the hits' local lights come from
784
783
  * @param {GPUProbeClipmap} options.bounce_first the clipmap a hit takes its next bounce from first
785
784
  * @param {GPUProbeClipmap} options.bounce_fallback the clipmap it takes it from where the first has no probe
785
+ * @param {number} options.exposure the graph handle of the factor the display multiplies radiance by ahead of its
786
+ * tone curve, a single f32, as the last frame was shown: the exposure the probes' estimators state their
787
+ * thresholds in
786
788
  */
787
- graph_update({ graph, wants, stbn, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, card_rows, history_resampling, ray_resampling, clusters, bounce_first, bounce_fallback }) {
789
+ graph_update({ graph, wants, response_frames, ray_budget, rays_per_probe, brick_clipmap, bricks, scene, card_rows, history_resampling, ray_resampling, clusters, bounce_first, bounce_fallback, exposure }) {
788
790
  assert.defined(graph, 'graph');
789
791
  assert.defined(wants, 'wants');
790
- assert.defined(stbn, 'stbn');
791
792
  assert.isFinite(response_frames, 'response_frames');
792
793
  assert.greaterThan(response_frames, 0, 'response_frames');
793
794
  assert.isPositiveInteger(rays_per_probe, 'rays_per_probe');
@@ -803,6 +804,7 @@ export class GPUProbeClipmap {
803
804
  assert.isNonNegativeInteger(clusters.data, 'clusters.data');
804
805
  assert.defined(bounce_first, 'bounce_first');
805
806
  assert.defined(bounce_fallback, 'bounce_fallback');
807
+ assert.isNonNegativeInteger(exposure, 'exposure');
806
808
  assert.equal(this.#placed_frame, this.#frame, 'windows placed this frame: place() or place_within() first');
807
809
  assert.notOk(this.#destroyed, 'destroyed');
808
810
 
@@ -971,7 +973,6 @@ export class GPUProbeClipmap {
971
973
  const pass = graph.add(`${this.label} Lifetime`, data, this.#execute_lifetime);
972
974
 
973
975
  data.counters = pass.write(graph_import_buffer(graph, this.#counters, `${this.label} counters`));
974
- data.stbn = stbn;
975
976
 
976
977
  wants.graph_declare(pass, data);
977
978
 
@@ -985,6 +986,7 @@ export class GPUProbeClipmap {
985
986
  update_data.bricks = update.read(bricks);
986
987
  update_data.world_cluster_lookup = update.read(clusters.lookup);
987
988
  update_data.world_cluster_data = update.read(clusters.data);
989
+ update_data.exposure = update.read(exposure);
988
990
 
989
991
  update.make_side_effect();
990
992
 
@@ -1191,8 +1193,6 @@ export class GPUProbeClipmap {
1191
1193
  command_offset: 4 * PROBE_DISPATCH_ACTIVE,
1192
1194
  });
1193
1195
 
1194
- b.tSTBN_vec2 = data.stbn;
1195
-
1196
1196
  // the frame's wants, into the wanted bits and list
1197
1197
  const want = this.#want_bindings;
1198
1198
 
@@ -1420,6 +1420,7 @@ export class GPUProbeClipmap {
1420
1420
  this.write_sampling_bindings(b);
1421
1421
  b.probe_resamples = this.#resamples;
1422
1422
  b.probe_estimators = this.#estimators;
1423
+ b.probe_exposure = resources.get(data.exposure);
1423
1424
 
1424
1425
  if (this.#history_resampling) {
1425
1426
  b.settings = this.#resample_settings;
@@ -195,6 +195,18 @@ export const PROBE_RELOCATION_STEPS: number;
195
195
  * @type {number}
196
196
  */
197
197
  export const PROBE_RAY_ORIGIN_JITTER: number;
198
+ /**
199
+ * The stream of a ray's noise (`probe_clipmap_ray_noise`) that jitters its direction inside its texel.
200
+ * @type {number}
201
+ */
202
+ export const PROBE_RAY_NOISE_JITTER: number;
203
+ /**
204
+ * The stream of a ray's noise that picks the probes at its hit for the next bounce. It is drawn apart from
205
+ * the jitter, which places the hit: a weighted pick is unbiased only when its noise is independent of the
206
+ * weights.
207
+ * @type {number}
208
+ */
209
+ export const PROBE_RAY_NOISE_PICK: number;
198
210
  /**
199
211
  * A miss's depth sample, and the most any sample is, in spacings: the farthest a cage tests a probe's depth,
200
212
  * (1 + {@link PROBE_RELOCATION_LIMIT})·√3 (D9). A biased point lies within a spacing of the corner's lattice
@@ -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":"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"}
1
+ {"version":3,"file":"PROBE_CLIPMAP.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/global_illumination/probe_clipmap/probe/PROBE_CLIPMAP.js"],"names":[],"mappings":"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"}
@@ -229,6 +229,20 @@ export const PROBE_RELOCATION_STEPS = 3;
229
229
  */
230
230
  export const PROBE_RAY_ORIGIN_JITTER = 1 / 16;
231
231
 
232
+ /**
233
+ * The stream of a ray's noise (`probe_clipmap_ray_noise`) that jitters its direction inside its texel.
234
+ * @type {number}
235
+ */
236
+ export const PROBE_RAY_NOISE_JITTER = 0x510E527F;
237
+
238
+ /**
239
+ * The stream of a ray's noise that picks the probes at its hit for the next bounce. It is drawn apart from
240
+ * the jitter, which places the hit: a weighted pick is unbiased only when its noise is independent of the
241
+ * weights.
242
+ * @type {number}
243
+ */
244
+ export const PROBE_RAY_NOISE_PICK = 0x9B05688C;
245
+
232
246
  /**
233
247
  * A miss's depth sample, and the most any sample is, in spacings: the farthest a cage tests a probe's depth,
234
248
  * (1 + {@link PROBE_RELOCATION_LIMIT})·√3 (D9). A biased point lies within a spacing of the corner's lattice