@woosh/meep-engine 3.78.0 → 3.78.1

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 (190) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/package.json +1 -1
  4. package/src/engine/graphics3/GraphicsEngine.d.ts +19 -1
  5. package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
  6. package/src/engine/graphics3/GraphicsEngine.js +24 -2
  7. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  8. package/src/engine/physics/cloth/solver/cloth_step.js +4 -1
  9. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +36 -2
  10. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
  11. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +60 -3
  12. package/src/shade/device/pipeline/ComputePipelineManager.d.ts +8 -0
  13. package/src/shade/device/pipeline/ComputePipelineManager.d.ts.map +1 -1
  14. package/src/shade/device/pipeline/ComputePipelineManager.js +18 -0
  15. package/src/shade/device/pipeline/RenderPipelineManager.d.ts +8 -0
  16. package/src/shade/device/pipeline/RenderPipelineManager.d.ts.map +1 -1
  17. package/src/shade/device/pipeline/RenderPipelineManager.js +17 -0
  18. package/src/shade/playground/avboit_footprint/index.html +20 -0
  19. package/src/shade/playground/avboit_footprint/main.d.ts +2 -0
  20. package/src/shade/playground/avboit_footprint/main.d.ts.map +1 -0
  21. package/src/shade/playground/avboit_footprint/main.js +428 -0
  22. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  23. package/src/shade/playground/probe_clipmap/main.js +7 -3
  24. package/src/shade/playground/screen_probes/main.d.ts.map +1 -1
  25. package/src/shade/playground/screen_probes/main.js +7 -3
  26. package/src/shade/renderer/Renderer.d.ts +18 -8
  27. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  28. package/src/shade/renderer/Renderer.js +201 -16
  29. package/src/shade/renderer/RendererConfiguration.d.ts +95 -0
  30. package/src/shade/renderer/RendererConfiguration.d.ts.map +1 -0
  31. package/src/shade/renderer/RendererConfiguration.js +119 -0
  32. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +8 -0
  33. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  34. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +34 -0
  35. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +7 -0
  36. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -1
  37. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +15 -0
  38. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +10 -2
  39. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  40. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +37 -3
  41. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +6 -0
  42. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  43. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +31 -0
  44. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +7 -0
  45. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
  46. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +20 -0
  47. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +8 -0
  48. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
  49. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +14 -0
  50. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts +7 -0
  51. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts.map +1 -1
  52. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js +13 -0
  53. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +6 -0
  54. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -1
  55. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +9 -0
  56. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +11 -0
  57. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  58. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +71 -1
  59. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts +6 -0
  60. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts.map +1 -1
  61. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js +9 -0
  62. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts +6 -0
  63. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts.map +1 -1
  64. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js +9 -0
  65. package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts +6 -0
  66. package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts.map +1 -1
  67. package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.js +13 -0
  68. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +9 -0
  69. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -1
  70. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +47 -0
  71. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +6 -0
  72. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
  73. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +17 -0
  74. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +8 -0
  75. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  76. package/src/shade/renderer/particles/GPUParticleSystem.js +20 -1
  77. package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts +6 -0
  78. package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts.map +1 -1
  79. package/src/shade/renderer/particles/bounds/graph_particle_bounds.js +11 -1
  80. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +6 -0
  81. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
  82. package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +15 -0
  83. package/src/shade/renderer/particles/graph_particles.d.ts +8 -0
  84. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  85. package/src/shade/renderer/particles/graph_particles.js +28 -3
  86. package/src/shade/renderer/particles/graph_particles_avboit.d.ts +7 -0
  87. package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
  88. package/src/shade/renderer/particles/graph_particles_avboit.js +14 -0
  89. package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
  90. package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +5 -7
  91. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +7 -0
  92. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
  93. package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +15 -0
  94. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts +6 -0
  95. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
  96. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +16 -2
  97. package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts +6 -0
  98. package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts.map +1 -1
  99. package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.js +9 -0
  100. package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts +11 -0
  101. package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts.map +1 -1
  102. package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.js +10 -0
  103. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +6 -0
  104. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
  105. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +10 -1
  106. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +7 -0
  107. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts.map +1 -1
  108. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +21 -0
  109. package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts +7 -0
  110. package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts.map +1 -1
  111. package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.js +11 -1
  112. package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts +9 -0
  113. package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts.map +1 -1
  114. package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.js +29 -0
  115. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts +6 -0
  116. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts.map +1 -1
  117. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.js +13 -1
  118. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts +6 -0
  119. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts.map +1 -1
  120. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.js +11 -0
  121. package/src/shade/renderer/postprocess/nss/NSS.d.ts +9 -0
  122. package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
  123. package/src/shade/renderer/postprocess/nss/NSS.js +33 -18
  124. package/src/shade/renderer/postprocess/ssr/SSR.d.ts +8 -0
  125. package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
  126. package/src/shade/renderer/postprocess/ssr/SSR.js +42 -2
  127. package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts +6 -0
  128. package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts.map +1 -1
  129. package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.js +10 -0
  130. package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts +6 -0
  131. package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts.map +1 -1
  132. package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.js +11 -0
  133. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts +8 -0
  134. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  135. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +27 -3
  136. package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts +6 -0
  137. package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts.map +1 -1
  138. package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js +10 -0
  139. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +5 -4
  140. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
  141. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +5 -4
  142. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.d.ts +3 -3
  143. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.js +3 -3
  144. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts.map +1 -1
  145. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js +5 -7
  146. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts.map +1 -1
  147. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js +5 -7
  148. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts +34 -0
  149. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts.map +1 -0
  150. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.js +42 -0
  151. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts +5 -4
  152. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts.map +1 -1
  153. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js +8 -7
  154. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts +2 -2
  155. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts.map +1 -1
  156. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.js +4 -5
  157. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +9 -0
  158. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
  159. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +18 -0
  160. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +9 -0
  161. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
  162. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +15 -0
  163. package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +6 -0
  164. package/src/shade/renderer/restir/di/ReSTIRDI.d.ts.map +1 -1
  165. package/src/shade/renderer/restir/di/ReSTIRDI.js +10 -1
  166. package/src/shade/renderer/restir/di/graph_restir_di.d.ts +9 -0
  167. package/src/shade/renderer/restir/di/graph_restir_di.d.ts.map +1 -1
  168. package/src/shade/renderer/restir/di/graph_restir_di.js +19 -1
  169. package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts +6 -0
  170. package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts.map +1 -1
  171. package/src/shade/renderer/restir/di/graph_restir_di_denoise.js +9 -0
  172. package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts +7 -0
  173. package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts.map +1 -1
  174. package/src/shade/renderer/scene/movers/graph_scene_movers.js +11 -0
  175. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +10 -0
  176. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  177. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +25 -1
  178. package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts +7 -0
  179. package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts.map +1 -1
  180. package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.js +14 -0
  181. package/src/shade/renderer/text/shaders/shader_text_avboit.d.ts.map +1 -1
  182. package/src/shade/renderer/text/shaders/shader_text_avboit.js +5 -7
  183. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +9 -1
  184. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
  185. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +16 -1
  186. package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
  187. package/src/shade/renderer/water/shader_water_avboit.js +16 -13
  188. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts +0 -33
  189. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts.map +0 -1
  190. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.js +0 -45
@@ -1,3 +1,12 @@
1
+ /**
2
+ * Offer the pipelines {@link graph_restir_di} dispatches — see {@link PipelineEnquiry}. The two arguments are the
3
+ * ones it takes, and say whether the denoiser's is among them.
4
+ *
5
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
6
+ * @param {boolean} denoise_enabled
7
+ * @param {number} denoise_iterations
8
+ */
9
+ export function enquire_restir_di_pipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry, denoise_enabled: boolean, denoise_iterations: number): void;
1
10
  /**
2
11
  * FrameGraph wiring for ReSTIR DI, three compute passes (each within the default
3
12
  * maxStorageBuffersPerShaderStage of 10):
@@ -1 +1 @@
1
- {"version":3,"file":"graph_restir_di.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/restir/di/graph_restir_di.js"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,+RAFa,MAAM,CAuLlB"}
1
+ {"version":3,"file":"graph_restir_di.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/restir/di/graph_restir_di.js"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,qDAJW,OAAO,6CAA6C,EAAE,eAAe,mBACrE,OAAO,sBACP,MAAM,QAUhB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,+RAFa,MAAM,CAuLlB"}
@@ -3,11 +3,29 @@ import { TextureResourceDescriptor } from "../../../device/graph/TextureResource
3
3
  import { RTXDI_PackedReservoir } from "../reservoir/RTXDI_PackedReservoir.js";
4
4
  import { STATIC_GRAPHICS_ENGINE_ASSETS } from "../../STATIC_GRAPHICS_ENGINE_ASSETS.js";
5
5
  import { graph_import_buffer } from "../../shader/graph/graph_import_buffer.js";
6
- import { graph_restir_di_denoise } from "./graph_restir_di_denoise.js";
6
+ import { enquire_restir_di_denoise_pipelines, graph_restir_di_denoise } from "./graph_restir_di_denoise.js";
7
7
  import { shader_restir_di_resample } from "./shader_restir_di_resample.js";
8
8
  import { shader_restir_di_resolve } from "./shader_restir_di_resolve.js";
9
9
  import { shader_restir_di_spatial } from "./shader_restir_di_spatial.js";
10
10
 
11
+ /**
12
+ * Offer the pipelines {@link graph_restir_di} dispatches — see {@link PipelineEnquiry}. The two arguments are the
13
+ * ones it takes, and say whether the denoiser's is among them.
14
+ *
15
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
16
+ * @param {boolean} denoise_enabled
17
+ * @param {number} denoise_iterations
18
+ */
19
+ export function enquire_restir_di_pipelines(enquiry, denoise_enabled, denoise_iterations) {
20
+ enquiry.compute.push(shader_restir_di_resample.pipeline);
21
+ enquiry.compute.push(shader_restir_di_spatial.pipeline);
22
+ enquiry.compute.push(shader_restir_di_resolve.pipeline);
23
+
24
+ if (denoise_enabled && denoise_iterations > 0) {
25
+ enquire_restir_di_denoise_pipelines(enquiry);
26
+ }
27
+ }
28
+
11
29
  /**
12
30
  * FrameGraph wiring for ReSTIR DI, three compute passes (each within the default
13
31
  * maxStorageBuffersPerShaderStage of 10):
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Offer the pipeline {@link graph_restir_di_denoise} dispatches — see {@link PipelineEnquiry}.
3
+ *
4
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
5
+ */
6
+ export function enquire_restir_di_denoise_pipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry): void;
1
7
  /**
2
8
  * Edge-aware à-trous denoise of the ReSTIR DI radiance: `iterations` passes with
3
9
  * step sizes 1, 2, 4, … (AMD shadow-denoiser cadence), each a fresh transient the
@@ -1 +1 @@
1
- {"version":3,"file":"graph_restir_di_denoise.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/restir/di/graph_restir_di_denoise.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;GAcG;AACH;IAR8B,KAAK;IACD,IAAI;IACZ,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;IACU,UAAU,GAA1B,MAAM;IACJ,MAAM,CAuDlB"}
1
+ {"version":3,"file":"graph_restir_di_denoise.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/restir/di/graph_restir_di_denoise.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,6DAFW,OAAO,6CAA6C,EAAE,eAAe,QAI/E;AAED;;;;;;;;;;;;;;GAcG;AACH;IAR8B,KAAK;IACD,IAAI;IACZ,KAAK,EAApB,MAAM;IACS,KAAK,EAApB,MAAM;IACS,MAAM,EAArB,MAAM;IACU,UAAU,GAA1B,MAAM;IACJ,MAAM,CAuDlB"}
@@ -1,6 +1,15 @@
1
1
  import { TextureResourceDescriptor } from "../../../device/graph/TextureResourceDescriptor.js";
2
2
  import { shader_restir_di_denoise } from "./shader_restir_di_denoise.js";
3
3
 
4
+ /**
5
+ * Offer the pipeline {@link graph_restir_di_denoise} dispatches — see {@link PipelineEnquiry}.
6
+ *
7
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
8
+ */
9
+ export function enquire_restir_di_denoise_pipelines(enquiry) {
10
+ enquiry.compute.push(shader_restir_di_denoise.pipeline);
11
+ }
12
+
4
13
  /**
5
14
  * Edge-aware à-trous denoise of the ReSTIR DI radiance: `iterations` passes with
6
15
  * step sizes 1, 2, 4, … (AMD shadow-denoiser cadence), each a fresh transient the
@@ -3,6 +3,13 @@
3
3
  * @typedef {import("../GPUSceneContext.js").GPUSceneContext} GPUSceneContext
4
4
  * @typedef {import("./SceneMoverTracker.js").SceneMoverTracker} SceneMoverTracker
5
5
  */
6
+ /**
7
+ * Offer the pipelines {@link graph_scene_movers} dispatches — see {@link PipelineEnquiry}. For whoever reads the
8
+ * mover list: a frame with no reader culls the pass, and draws with neither.
9
+ *
10
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
11
+ */
12
+ export function enquire_scene_movers_pipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry): void;
6
13
  /**
7
14
  * Record the scene's mover list for a frame (`SceneMovers`, {@link SCENE_MOVERS_BYTE_SIZE} bytes):
8
15
  * every mesh row against the box it had last frame ({@link shader_scene_movers}), and every skinned
@@ -1 +1 @@
1
- {"version":3,"file":"graph_scene_movers.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/scene/movers/graph_scene_movers.js"],"names":[],"mappings":"AAOA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAL+B,KAAK,EAAzB,UAAU;IACe,KAAK,EAA9B,eAAe;IACY,OAAO,EAAlC,iBAAiB;IACf,MAAM,CAmFlB;yBAzGY,OAAO,8DAA8D,EAAE,UAAU;8BACjF,OAAO,uBAAuB,EAAE,eAAe;gCAC/C,OAAO,wBAAwB,EAAE,iBAAiB"}
1
+ {"version":3,"file":"graph_scene_movers.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/scene/movers/graph_scene_movers.js"],"names":[],"mappings":"AAOA;;;;GAIG;AAEH;;;;;GAKG;AACH,wDAFW,OAAO,6CAA6C,EAAE,eAAe,QAK/E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAL+B,KAAK,EAAzB,UAAU;IACe,KAAK,EAA9B,eAAe;IACY,OAAO,EAAlC,iBAAiB;IACf,MAAM,CAmFlB;yBApHY,OAAO,8DAA8D,EAAE,UAAU;8BACjF,OAAO,uBAAuB,EAAE,eAAe;gCAC/C,OAAO,wBAAwB,EAAE,iBAAiB"}
@@ -11,6 +11,17 @@ import { shader_scene_skinned_movers } from "./shader_scene_skinned_movers.js";
11
11
  * @typedef {import("./SceneMoverTracker.js").SceneMoverTracker} SceneMoverTracker
12
12
  */
13
13
 
14
+ /**
15
+ * Offer the pipelines {@link graph_scene_movers} dispatches — see {@link PipelineEnquiry}. For whoever reads the
16
+ * mover list: a frame with no reader culls the pass, and draws with neither.
17
+ *
18
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
19
+ */
20
+ export function enquire_scene_movers_pipelines(enquiry) {
21
+ enquiry.compute.push(shader_scene_movers.pipeline);
22
+ enquiry.compute.push(shader_scene_skinned_movers.pipeline);
23
+ }
24
+
14
25
  /**
15
26
  * Record the scene's mover list for a frame (`SceneMovers`, {@link SCENE_MOVERS_BYTE_SIZE} bytes):
16
27
  * every mesh row against the box it had last frame ({@link shader_scene_movers}), and every skinned
@@ -10,6 +10,16 @@ export class GPUSceneShadowmapContext {
10
10
  * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
11
11
  */
12
12
  static enquirePipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry): void;
13
+ /**
14
+ * Offer the pipelines that follow from how a context is set — see {@link PipelineEnquiry}: the point lights'
15
+ * remap into the atlas, by which generator makes their faces, and the feedback of virtual shadow maps. Beside
16
+ * {@link enquirePipelines}, which offers what every setting shares.
17
+ *
18
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
19
+ * @param {boolean} use_tetrahedron_point_shadows as {@link use_tetrahedron_point_shadows} will be set
20
+ * @param {boolean} use_virtual_shadow_maps as {@link use_virtual_shadow_maps} will be set
21
+ */
22
+ static enquireSettingPipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry, use_tetrahedron_point_shadows: boolean, use_virtual_shadow_maps: boolean): void;
13
23
  /**
14
24
  *
15
25
  * @param {GraphicsContext} graphics
@@ -1 +1 @@
1
- {"version":3,"file":"GPUSceneShadowmapContext.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js"],"names":[],"mappings":"AAsKA;;GAEG;AACH;IACI;;;;;;OAMG;IACH,iCAFW,OAAO,6CAA6C,EAAE,eAAe,QAQ/E;IA+aD;;;;;;;;OAQG;IACH,sBAPW,eAAe,aACf,eAAe,SAGf,kBAAkB,EAiE5B;IApfD,2BAAwG;IAExG;;;OAGG;IACH,SAFU,iBAAiB,CAEnB;IAQR;;;;;;;;OAQG;IACH,qBAFU,WAAW,CAED;IAsCpB;;;;;;;;OAQG;IACH,SAFU,OAAO,CAEF;IAEf;;;;;;;;;;OAUG;IACH,+BAFU,OAAO,CAEqB;IAEtC;;;;;;OAMG;IACH,yBAFU,OAAO,CAEe;IAehC;;;;;OAKG;IACH,mCAIC;IAjBD;;OAEG;IACH,kCAEC;IAcD;;;;;OAKG;IACH,kBAFU,MAAM,CAEK;IAiBrB;;;;OAIG;IACH,uCAMC;IAlBD;;OAEG;IACH,sCAEC;IA6BD;;;;OAIG;IACH,uCAMC;IAlBD;;OAEG;IACH,sCAEC;IA6BD;;;;OAIG;IACH,4CAKC;IAjBD;;OAEG;IACH,2CAEC;IA2BD;;;;;OAKG;IACH,wCAKC;IAlBD;;OAEG;IACH,uCAEC;IA4BD;;;;;;;;OAQG;IACH,6BAIC;IApBD;;OAEG;IACH,4BAEC;IA0CD;;;;OAIG;IACH,6BAIC;IAhBD;;OAEG;IACH,4BAEC;IA2FD;;OAEG;IACH,iCAEC;IAED;;;;;;OAMG;IACH,oCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAoGD;;;;;OAKG;IACH,4BAMC;IA2MD;;;;;;;;;;;;OAYG;IACH;QAN+B,KAAK,EAAzB,UAAU;QACqD,IAAI,EAAnE,OAAO,8BAA8B,EAAE,cAAc;QACrC,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;aA+BhB;IAiMD;;;;;;;OAOG;IACH,eAFa,OAAO,gCAAgC,EAAE,eAAe,EAAE,CA6CtE;IAED;;;;OAIG;IACH,+BAEC;IASD;;;;OAIG;IACH,eAHW,KAAK,GACH,SAAS,GAAC,SAAS,CAI/B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,6BAPW,MAAM,SAEN,eAAe,eACf,MAAM,mBACN,UAAU,MAAM,CAAC,QA0G3B;IA2GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,kBAFW,sBAAsB,QA0FhC;IA0bD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,kBALa,OAAO,CAsTnB;IAED;;;;;;;;;;OAUG;IACH,iBALW,MAAM,SACN,MAAM,GACJ,KAAK,CAejB;IA2DD,gBAiBC;;CACJ;qCAx0EY,OAAO,2CAA2C,EAAE,sBAAsB;8BAC1E,OAAO,0BAA0B,EAAE,eAAe;qBAClD,OAAO,wBAAwB,EAAE,MAAM;iCACvC,OAAO,mCAAmC,EAAE,kBAAkB;oBAC9D,OAAO,4BAA4B,EAAE,KAAK;8BAC1C,OAAO,gCAAgC,EAAE,eAAe;wBACxD,OAAO,gBAAgB,EAAE,SAAS;8BAClC,OAAO,oDAAoD,EAAE,eAAe;oCAtFrD,+DAA+D;kCAuBjE,oCAAoC;4BAI1C,2BAA2B;2BA1B5B,8DAA8D;kBAFvE,wCAAwC"}
1
+ {"version":3,"file":"GPUSceneShadowmapContext.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js"],"names":[],"mappings":"AAsKA;;GAEG;AACH;IACI;;;;;;OAMG;IACH,iCAFW,OAAO,6CAA6C,EAAE,eAAe,QAQ/E;IAED;;;;;;;;OAQG;IACH,wCAJW,OAAO,6CAA6C,EAAE,eAAe,iCACrE,OAAO,2BACP,OAAO,QAejB;IA+aD;;;;;;;;OAQG;IACH,sBAPW,eAAe,aACf,eAAe,SAGf,kBAAkB,EAiE5B;IApfD,2BAAwG;IAExG;;;OAGG;IACH,SAFU,iBAAiB,CAEnB;IAQR;;;;;;;;OAQG;IACH,qBAFU,WAAW,CAED;IAsCpB;;;;;;;;OAQG;IACH,SAFU,OAAO,CAEF;IAEf;;;;;;;;;;OAUG;IACH,+BAFU,OAAO,CAEqB;IAEtC;;;;;;OAMG;IACH,yBAFU,OAAO,CAEe;IAehC;;;;;OAKG;IACH,mCAIC;IAjBD;;OAEG;IACH,kCAEC;IAcD;;;;;OAKG;IACH,kBAFU,MAAM,CAEK;IAiBrB;;;;OAIG;IACH,uCAMC;IAlBD;;OAEG;IACH,sCAEC;IA6BD;;;;OAIG;IACH,uCAMC;IAlBD;;OAEG;IACH,sCAEC;IA6BD;;;;OAIG;IACH,4CAKC;IAjBD;;OAEG;IACH,2CAEC;IA2BD;;;;;OAKG;IACH,wCAKC;IAlBD;;OAEG;IACH,uCAEC;IA4BD;;;;;;;;OAQG;IACH,6BAIC;IApBD;;OAEG;IACH,4BAEC;IA0CD;;;;OAIG;IACH,6BAIC;IAhBD;;OAEG;IACH,4BAEC;IA2FD;;OAEG;IACH,iCAEC;IAED;;;;;;OAMG;IACH,oCAEC;IAED;;;;;OAKG;IACH,oCAEC;IAoGD;;;;;OAKG;IACH,4BAMC;IA2MD;;;;;;;;;;;;OAYG;IACH;QAN+B,KAAK,EAAzB,UAAU;QACqD,IAAI,EAAnE,OAAO,8BAA8B,EAAE,cAAc;QACrC,KAAK,EAArB,MAAM;QACU,MAAM,EAAtB,MAAM;aA+BhB;IAiMD;;;;;;;OAOG;IACH,eAFa,OAAO,gCAAgC,EAAE,eAAe,EAAE,CA6CtE;IAED;;;;OAIG;IACH,+BAEC;IASD;;;;OAIG;IACH,eAHW,KAAK,GACH,SAAS,GAAC,SAAS,CAI/B;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACH,6BAPW,MAAM,SAEN,eAAe,eACf,MAAM,mBACN,UAAU,MAAM,CAAC,QA0G3B;IA2GD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA+BG;IACH,kBAFW,sBAAsB,QA0FhC;IA0bD;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,kBALa,OAAO,CAsTnB;IAED;;;;;;;;;;OAUG;IACH,iBALW,MAAM,SACN,MAAM,GACJ,KAAK,CAejB;IA2DD,gBAiBC;;CACJ;qCAh2EY,OAAO,2CAA2C,EAAE,sBAAsB;8BAC1E,OAAO,0BAA0B,EAAE,eAAe;qBAClD,OAAO,wBAAwB,EAAE,MAAM;iCACvC,OAAO,mCAAmC,EAAE,kBAAkB;oBAC9D,OAAO,4BAA4B,EAAE,KAAK;8BAC1C,OAAO,gCAAgC,EAAE,eAAe;wBACxD,OAAO,gBAAgB,EAAE,SAAS;8BAClC,OAAO,oDAAoD,EAAE,eAAe;oCAtFrD,+DAA+D;kCAuBjE,oCAAoC;4BAI1C,2BAA2B;2BA1B5B,8DAA8D;kBAFvE,wCAAwC"}
@@ -75,7 +75,7 @@ import { DEFAULT_VSM_PAGE_BUDGET } from "../vsm/DEFAULT_VSM_PAGE_BUDGET.js";
75
75
  import { DEFAULT_VSM_LOW_LOAD_FACTOR } from "../vsm/DEFAULT_VSM_LOW_LOAD_FACTOR.js";
76
76
  import { DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS } from "../vsm/DEFAULT_VSM_MAX_DYNAMIC_LOD_BIAS.js";
77
77
  import { DEFAULT_VSM_MAX_LOAD_FACTOR } from "../vsm/DEFAULT_VSM_MAX_LOAD_FACTOR.js";
78
- import { graph_vsm_feedback } from "../vsm/graph_vsm_feedback.js";
78
+ import { enquire_vsm_feedback_pipelines, graph_vsm_feedback } from "../vsm/graph_vsm_feedback.js";
79
79
  import { VirtualShadowMap } from "../vsm/VirtualShadowMap.js";
80
80
  import { VSM_DEFAULT_REQUEST_CAPACITY } from "../vsm/VSM_FEEDBACK_LAYOUT.js";
81
81
  import { VSM_SLOT_EMPTY } from "../vsm/VSM_SLOT_STRUCT.js";
@@ -183,6 +183,30 @@ export class GPUSceneShadowmapContext {
183
183
  enquire_texture_fill_rectangle_depth_pipeline(enquiry);
184
184
  }
185
185
 
186
+ /**
187
+ * Offer the pipelines that follow from how a context is set — see {@link PipelineEnquiry}: the point lights'
188
+ * remap into the atlas, by which generator makes their faces, and the feedback of virtual shadow maps. Beside
189
+ * {@link enquirePipelines}, which offers what every setting shares.
190
+ *
191
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
192
+ * @param {boolean} use_tetrahedron_point_shadows as {@link use_tetrahedron_point_shadows} will be set
193
+ * @param {boolean} use_virtual_shadow_maps as {@link use_virtual_shadow_maps} will be set
194
+ */
195
+ static enquireSettingPipelines(enquiry, use_tetrahedron_point_shadows, use_virtual_shadow_maps) {
196
+ assert.isBoolean(use_tetrahedron_point_shadows, 'use_tetrahedron_point_shadows');
197
+ assert.isBoolean(use_virtual_shadow_maps, 'use_virtual_shadow_maps');
198
+
199
+ enquiry.render.push(
200
+ use_tetrahedron_point_shadows
201
+ ? shader_shadowmap_remap_tetrahedron_to_octahedral.pipeline
202
+ : shader_shadowmap_remap_cube_to_octahedral.pipeline
203
+ );
204
+
205
+ if (use_virtual_shadow_maps) {
206
+ enquire_vsm_feedback_pipelines(enquiry);
207
+ }
208
+ }
209
+
186
210
  atlas = new MaxRectanglesPacker(DEFAULT_SHADOWMAP_ATLAS_RESOLUTION, DEFAULT_SHADOWMAP_ATLAS_RESOLUTION);
187
211
 
188
212
  /**
@@ -1,3 +1,10 @@
1
+ /**
2
+ * Offer the pipelines {@link graph_vsm_feedback} dispatches — see {@link PipelineEnquiry}. The scene's mover list
3
+ * it reads is recorded with pipelines of its own, for whoever turns virtual shadow maps on to offer beside these.
4
+ *
5
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
6
+ */
7
+ export function enquire_vsm_feedback_pipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry): void;
1
8
  /**
2
9
  * Record a frame's virtual shadow map feedback into the `Shading` graph, once the main view's depth
3
10
  * exists, and read it back.
@@ -1 +1 @@
1
- {"version":3,"file":"graph_vsm_feedback.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shadow/vsm/graph_vsm_feedback.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAP+B,KAAK;IACsC,IAAI,EAAnE,OAAO,8BAA8B,EAAE,cAAc;IACrC,KAAK,EAArB,MAAM;IACsB,IAAI,EAAhC,kBAAkB;IACF,MAAM,EAAtB,MAAM;IACe,cAAc;SAwB7C;AApDD;;;;;;GAMG;AACH,sCAFU,MAAM,CAEyB"}
1
+ {"version":3,"file":"graph_vsm_feedback.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/shadow/vsm/graph_vsm_feedback.js"],"names":[],"mappings":"AAiBA;;;;;GAKG;AACH,wDAFW,OAAO,6CAA6C,EAAE,eAAe,QAQ/E;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IAP+B,KAAK;IACsC,IAAI,EAAnE,OAAO,8BAA8B,EAAE,cAAc;IACrC,KAAK,EAArB,MAAM;IACsB,IAAI,EAAhC,kBAAkB;IACF,MAAM,EAAtB,MAAM;IACe,cAAc;SAwB7C;AAlED;;;;;;GAMG;AACH,sCAFU,MAAM,CAEyB"}
@@ -15,6 +15,20 @@ import { vsm_feedback_word_count } from "./VSM_FEEDBACK_LAYOUT.js";
15
15
  */
16
16
  export const VSM_READBACKS_IN_FLIGHT = 3;
17
17
 
18
+ /**
19
+ * Offer the pipelines {@link graph_vsm_feedback} dispatches — see {@link PipelineEnquiry}. The scene's mover list
20
+ * it reads is recorded with pipelines of its own, for whoever turns virtual shadow maps on to offer beside these.
21
+ *
22
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
23
+ */
24
+ export function enquire_vsm_feedback_pipelines(enquiry) {
25
+ enquiry.compute.push(shader_vsm_stale_args.pipeline);
26
+ enquiry.compute.push(shader_vsm_stale.pipeline);
27
+ enquiry.compute.push(shader_vsm_demand.pipeline);
28
+ enquiry.compute.push(shader_vsm_gather_counts.pipeline);
29
+ enquiry.compute.push(shader_vsm_stale_compact.pipeline);
30
+ }
31
+
18
32
  /**
19
33
  * Record a frame's virtual shadow map feedback into the `Shading` graph, once the main view's depth
20
34
  * exists, and read it back.
@@ -1 +1 @@
1
- {"version":3,"file":"shader_text_avboit.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/text/shaders/shader_text_avboit.js"],"names":[],"mappings":"AAuBA;;;GAGG;AACH,2CAFU,MAAM,CAE8B;AAuH9C,4IAIG;AAEH,sEAA2D;AAE3D,yDAAyD;AACzD,wDAAyD;AAuFzD,2IAIG;AAEH,qEAAyD;AAEzD,wDAAwD;AACxD,uDAAuD;4CAxOX,sDAAsD;iCACjE,kCAAkC"}
1
+ {"version":3,"file":"shader_text_avboit.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/text/shaders/shader_text_avboit.js"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,2CAFU,MAAM,CAE8B;AAuH9C,4IAIG;AAEH,sEAA2D;AAE3D,yDAAyD;AACzD,wDAAyD;AAsFzD,2IAIG;AAEH,qEAAyD;AAEzD,wDAAwD;AACxD,uDAAuD;4CAvOX,sDAAsD;iCACjE,kCAAkC"}
@@ -8,13 +8,12 @@ import {
8
8
  AVBOIT_UNLIT_SPLAT_SAMPLES
9
9
  } from "../../rasterize/native/avboit/avboit_unlit_splat.js";
10
10
  import { chunk_avboit_coverage } from "../../rasterize/native/avboit/chunk_avboit_coverage.js";
11
- import { chunk_avboit_footprint_bias } from "../../rasterize/native/avboit/chunk_avboit_footprint_bias.js";
11
+ import { chunk_avboit_footprint_depth } from "../../rasterize/native/avboit/chunk_avboit_footprint_depth.js";
12
12
  import { chunk_avboit_premultiplied_contribution } from "../../rasterize/native/avboit/chunk_avboit_premultiplied_contribution.js";
13
13
  import { chunk_avboit_sample_transmittance } from "../../rasterize/native/avboit/chunk_avboit_sample_transmittance.js";
14
14
  import { chunk_avboit_splat_slice } from "../../rasterize/native/avboit/chunk_avboit_splat_slice.js";
15
15
  import { chunk_avboit_transmittance_to_extinction } from "../../rasterize/native/avboit/chunk_avboit_transmittance_to_extinction.js";
16
16
  import { chunk_avboit_view_depth_to_physical } from "../../rasterize/native/avboit/chunk_avboit_view_depth_to_physical.js";
17
- import { chunk_avboit_view_depth_to_virtual } from "../../rasterize/native/avboit/chunk_avboit_view_depth_to_virtual.js";
18
17
  import { AVBOIT_SPLAT_VOLUME_GROUP } from "../../rasterize/native/avboit/shader_avboit_splat.js";
19
18
  import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
20
19
  import { ShaderResourceSetDescriptor } from "../../shader/resource/ShaderResourceSetDescriptor.js";
@@ -187,8 +186,8 @@ fn vs_main(@builtin(vertex_index) vertex_index : u32, @builtin(instance_index) i
187
186
  @fragment
188
187
  fn fs_main(fragment : TextAVBOITVaryings) -> TextAVBOITDrawOutput {
189
188
  // both taken first, in uniform control flow. A text seen at an angle runs through depth across a voxel; see
190
- // avboit_footprint_bias
191
- let footprint = avboit_footprint_bias(&warp, fwidth(avboit_view_depth_to_virtual(&warp, fragment.view_depth)));
189
+ // avboit_footprint_depth
190
+ let footprint = avboit_footprint_depth(fragment.view_depth, fwidth(1.0 / fragment.view_depth));
192
191
  let pixels_per_unit = 1.0 / fwidth(fragment.position);
193
192
 
194
193
  let cover = contour_fill_coverage(
@@ -206,7 +205,7 @@ fn fs_main(fragment : TextAVBOITVaryings) -> TextAVBOITDrawOutput {
206
205
 
207
206
  let screen_uv = fragment.clip.xy / vec2<f32>(f32(view.width), f32(view.height));
208
207
 
209
- let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, screen_uv, fragment.view_depth, footprint);
208
+ let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, screen_uv, footprint);
210
209
 
211
210
  if (all(transmittance <= vec3<f32>(${AVBOIT_EXTINCT_TRANSMITTANCE}))) {
212
211
  // nothing this fragment contributes survives what is in front of it
@@ -231,8 +230,7 @@ fn fs_main(fragment : TextAVBOITVaryings) -> TextAVBOITDrawOutput {
231
230
  `, [
232
231
  chunk_text_avboit_varyings,
233
232
  chunk_contour_fill_coverage,
234
- chunk_avboit_view_depth_to_virtual,
235
- chunk_avboit_footprint_bias,
233
+ chunk_avboit_footprint_depth,
236
234
  chunk_avboit_sample_transmittance,
237
235
  chunk_sample_volumetrics,
238
236
  chunk_avboit_premultiplied_contribution,
@@ -27,6 +27,14 @@ export class GPUIrradianceClipmap {
27
27
  cell_size?: number;
28
28
  blend_skirt?: number;
29
29
  });
30
+ /**
31
+ * Offer the pipelines {@link graph_update} dispatches — see {@link PipelineEnquiry}. For whoever reads the
32
+ * clipmap: a frame nothing reads it in culls its build.
33
+ *
34
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
35
+ * @param {ShaderSwitchSet} shader_switches the renderer's, which the build is made for
36
+ */
37
+ enquirePipelines(enquiry: import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry, shader_switches: ShaderSwitchSet): void;
30
38
  /**
31
39
  * @returns {GPUTileAtlas3D}
32
40
  */
@@ -111,7 +119,7 @@ export class GPUIrradianceClipmap {
111
119
  #private;
112
120
  }
113
121
  export type GPUTextureContext = import("../../texture/GPUTextureContext.js").GPUTextureContext;
122
+ import { ShaderSwitchSet } from "../../shader/compiler/ShaderSwitchSet.js";
114
123
  import { GPUTileAtlas3D } from "../../texture/atlas/GPUTileAtlas3D.js";
115
124
  import { IrradianceCascadePlacement } from "./IrradianceCascadePlacement.js";
116
- import { ShaderSwitchSet } from "../../shader/compiler/ShaderSwitchSet.js";
117
125
  //# sourceMappingURL=GPUIrradianceClipmap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GPUIrradianceClipmap.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js"],"names":[],"mappings":"AAiDA;;;;;;;;;;;;;GAaG;AACH;IA2CI;;;;;;;OAOG;IACH;QAL4B,aAAa,GAA9B,MAAM;QAC6B,UAAU,GAA7C,MAAM,GAAC,UAAU,MAAM,CAAC;QACP,SAAS,GAA1B,MAAM;QACW,WAAW,GAA5B,MAAM;OA+DhB;IAED;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,gFAEC;IAED;;OAEG;IACH,mFAEC;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,4BAEC;IAED;;;OAGG;IACH,0BAEC;IAED;;OAEG;IACH,4CAEC;IAED;;OAEG;IACH,uBAEC;IAED;;;;;;;;OAQG;IACH,oBALW,MAAM,KACN,MAAM,KACN,MAAM,oBACN,eAAe,QAgFzB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH;QAXsG,KAAK,EAAhG,OAAO,8DAA8D,EAAE,UAAU;QACZ,MAAM,EAA3E,OAAO,kCAAkC,EAAE,gBAAgB;QACO,SAAS,EAA3E,OAAO,gCAAgC,EAAE,eAAe;QACxC,eAAe,EAA/B,MAAM;QACoB,eAAe,GAAzC,eAAe;QACuE,MAAM,GAA5F,OAAO,oDAAoD,EAAE,cAAc;QACuB,MAAM,EAAxG,OAAO,8DAA8D,EAAE,iBAAiB;QAErE,YAAY;QAC7B;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CA2ItD;IAED;;OAEG;IACH,gBAQC;;CACJ;gCAheY,OAAO,oCAAoC,EAAE,iBAAiB;+BAJ5C,uCAAuC;2CAmB3B,iCAAiC;gCAxB5C,0CAA0C"}
1
+ {"version":3,"file":"GPUIrradianceClipmap.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js"],"names":[],"mappings":"AAoDA;;;;;;;;;;;;;GAaG;AACH;IAuDI;;;;;;;OAOG;IACH;QAL4B,aAAa,GAA9B,MAAM;QAC6B,UAAU,GAA7C,MAAM,GAAC,UAAU,MAAM,CAAC;QACP,SAAS,GAA1B,MAAM;QACW,WAAW,GAA5B,MAAM;OA+DhB;IAxHD;;;;;;OAMG;IACH,0BAHW,OAAO,6CAA6C,EAAE,eAAe,mBACrE,eAAe,QAKzB;IAgHD;;OAEG;IACH,4BAEC;IAED;;OAEG;IACH,gFAEC;IAED;;OAEG;IACH,mFAEC;IAED;;OAEG;IACH,yBAEC;IAED;;OAEG;IACH,4BAEC;IAED;;;OAGG;IACH,0BAEC;IAED;;OAEG;IACH,4CAEC;IAED;;OAEG;IACH,uBAEC;IAED;;;;;;;;OAQG;IACH,oBALW,MAAM,KACN,MAAM,KACN,MAAM,oBACN,eAAe,QAgFzB;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH;QAXsG,KAAK,EAAhG,OAAO,8DAA8D,EAAE,UAAU;QACZ,MAAM,EAA3E,OAAO,kCAAkC,EAAE,gBAAgB;QACO,SAAS,EAA3E,OAAO,gCAAgC,EAAE,eAAe;QACxC,eAAe,EAA/B,MAAM;QACoB,eAAe,GAAzC,eAAe;QACuE,MAAM,GAA5F,OAAO,oDAAoD,EAAE,cAAc;QACuB,MAAM,EAAxG,OAAO,8DAA8D,EAAE,iBAAiB;QAErE,YAAY;QAC7B;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAC,CA2ItD;IAED;;OAEG;IACH,gBAQC;;CACJ;gCA5eY,OAAO,oCAAoC,EAAE,iBAAiB;gCAT3C,0CAA0C;+BAK3C,uCAAuC;2CAmB3B,iCAAiC"}
@@ -1,7 +1,10 @@
1
1
  import { assert } from "../../../../core/assert.js";
2
2
  import { fluid_cascade_ruler } from "../../fluid/fluid_cascade_ruler.js";
3
3
  import { INDIRECT_LIGHTING } from "../../INDIRECT_LIGHTING.js";
4
- import { graph_build_world_light_clusters } from "../../light/world_cluster/graph_build_world_light_clusters.js";
4
+ import {
5
+ enquire_build_world_light_clusters_pipelines,
6
+ graph_build_world_light_clusters
7
+ } from "../../light/world_cluster/graph_build_world_light_clusters.js";
5
8
  import { CLIPMAP_LEVEL_STRUCT } from "../../shader/chunk/clipmap/CLIPMAP_LEVEL_STRUCT.js";
6
9
  import { ShaderSwitchSet } from "../../shader/compiler/ShaderSwitchSet.js";
7
10
  import { graph_import_buffer } from "../../shader/graph/graph_import_buffer.js";
@@ -65,6 +68,18 @@ export class GPUIrradianceClipmap {
65
68
  /** @type {GPUDevice} */
66
69
  #device;
67
70
 
71
+ /**
72
+ * Offer the pipelines {@link graph_update} dispatches — see {@link PipelineEnquiry}. For whoever reads the
73
+ * clipmap: a frame nothing reads it in culls its build.
74
+ *
75
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
76
+ * @param {ShaderSwitchSet} shader_switches the renderer's, which the build is made for
77
+ */
78
+ enquirePipelines(enquiry, shader_switches) {
79
+ enquire_build_world_light_clusters_pipelines(enquiry);
80
+ enquiry.compute.push(shader_irradiance_clipmap_build.variant(shader_switches).pipeline);
81
+ }
82
+
68
83
  /** @type {GPUTileAtlas3D} */
69
84
  #atlas;
70
85
 
@@ -1 +1 @@
1
- {"version":3,"file":"shader_water_avboit.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/water/shader_water_avboit.js"],"names":[],"mappings":"AAkCA,mDAwBG;AAQH,+CAqCG;AAUH,4CA4BG;AAOH,uDAYG;AAOH,6CAqCG;8BA3L2B,4BAA4B;4BAC9B,0BAA0B"}
1
+ {"version":3,"file":"shader_water_avboit.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/water/shader_water_avboit.js"],"names":[],"mappings":"AAiCA,mDAwBG;AAQH,+CAyCG;AAUH,4CA4BG;AAOH,uDAYG;AAOH,6CAqCG;8BA/L2B,4BAA4B;4BAC9B,0BAA0B"}
@@ -3,7 +3,7 @@ import { chunk_sample_volumetrics } from "../deferred/chunk_sample_volumetrics.j
3
3
  import { AVBOIT_OCCUPANCY_WORDS, AVBOIT_VOXEL_DOWNSCALE } from "../rasterize/native/avboit/AVBOIT_CONSTANTS.js";
4
4
  import { AVBOIT_WARP_STRUCT } from "../rasterize/native/avboit/AVBOIT_WARP_STRUCT.js";
5
5
  import { AVBOIT_DRAW_TARGETS } from "../rasterize/native/avboit/avboit_draw_fragment_body.js";
6
- import { chunk_avboit_footprint_bias } from "../rasterize/native/avboit/chunk_avboit_footprint_bias.js";
6
+ import { chunk_avboit_footprint_depth } from "../rasterize/native/avboit/chunk_avboit_footprint_depth.js";
7
7
  import { chunk_avboit_occupancy_mark } from "../rasterize/native/avboit/chunk_avboit_occupancy_mark.js";
8
8
  import { chunk_avboit_rgb_contribution } from "../rasterize/native/avboit/chunk_avboit_rgb_contribution.js";
9
9
  import { chunk_avboit_sample_transmittance } from "../rasterize/native/avboit/chunk_avboit_sample_transmittance.js";
@@ -11,7 +11,6 @@ import { chunk_avboit_splat_slice } from "../rasterize/native/avboit/chunk_avboi
11
11
  import { chunk_avboit_split_counts } from "../rasterize/native/avboit/chunk_avboit_split_counts.js";
12
12
  import { chunk_avboit_transmittance_to_extinction } from "../rasterize/native/avboit/chunk_avboit_transmittance_to_extinction.js";
13
13
  import { chunk_avboit_view_depth_to_physical } from "../rasterize/native/avboit/chunk_avboit_view_depth_to_physical.js";
14
- import { chunk_avboit_view_depth_to_virtual } from "../rasterize/native/avboit/chunk_avboit_view_depth_to_virtual.js";
15
14
  import { AVBOIT_OCCUPANCY_SETTINGS_STRUCT } from "../rasterize/native/avboit/shader_avboit_occupancy.js";
16
15
  import { chunk_get_view_space_depth } from "../shader/chunk/depth/chunk_get_view_space_depth.js";
17
16
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
@@ -75,7 +74,8 @@ fn main(@builtin(global_invocation_id) id: vec3u) {
75
74
  let hi = min(lo + vec2u(${AVBOIT_VOXEL_DOWNSCALE}u), size);
76
75
  var total_t = vec3f(0.0);
77
76
  var samples = 0.0;
78
- var nearest = 1e30;
77
+ var wet = 0.0;
78
+ var wet_depth = 0.0;
79
79
  for (var y = lo.y; y < hi.y; y++) {
80
80
  for (var x = lo.x; x < hi.x; x++) {
81
81
  let coord = vec2u(x, y);
@@ -83,16 +83,19 @@ fn main(@builtin(global_invocation_id) id: vec3u) {
83
83
  var t = vec3f(1.0);
84
84
  if (d > 0.0) {
85
85
  t = textureLoad(transmission, coord, 0).rgb;
86
- nearest = min(nearest, get_view_space_depth(d, camera));
86
+ wet += 1.0; wet_depth += d;
87
87
  }
88
88
  total_t += t; samples += 1.0;
89
89
  }
90
90
  }
91
- if (nearest == 1e30 || samples == 0.0) { return; }
92
- // One area-averaged event, not 64 full-coverage layers. Dry samples retain T=1.
91
+ if (wet == 0.0) { return; }
92
+ // One area-averaged event, not 64 full-coverage layers. Dry samples retain T=1. It goes where every
93
+ // source's does, at the depth under the column's centre (avboit_footprint_depth): device depth is linear
94
+ // across the screen for a plane, so the wet samples' mean is the surface's depth under their centre.
95
+ let z_splat = get_view_space_depth(wet_depth / wet, camera);
93
96
  let extinction = avboit_transmittance_to_extinction(total_t / samples);
94
97
  let counts = avboit_extinction_to_counts(extinction);
95
- let p = avboit_view_depth_to_physical(&warp, nearest) - 0.5;
98
+ let p = avboit_view_depth_to_physical(&warp, z_splat) - 0.5;
96
99
  let slice = i32(floor(p));
97
100
  let upper = avboit_split_counts(counts, fract(p));
98
101
  let column = id.y * warp.voxel_width + id.x;
@@ -124,19 +127,19 @@ fn main(@builtin(position) coord: vec4f) -> WaterContribution {
124
127
  let d = textureLoad(interface_depth, pixel, 0).r;
125
128
  let z = get_view_space_depth(d, camera);
126
129
  // the water splats into the volume too, and a plane seen at an angle runs through depth across a
127
- // voxel (avboit_footprint_bias). Taken before the discard, in uniform control flow; a dry pixel's
128
- // virtual coordinate clamps, so the derivative at the shore stays finite and the cap holds it
129
- let footprint = avboit_footprint_bias(&warp, fwidth(avboit_view_depth_to_virtual(&warp, z)));
130
+ // voxel (avboit_footprint_depth). Taken before the discard, in uniform control flow; a dry pixel's
131
+ // depth is the far plane's, so the derivative at the shore stays finite
132
+ let footprint = avboit_footprint_depth(z, fwidth(1.0 / z));
130
133
  if (d <= 0.0) { discard; }
131
134
  let uv = coord.xy / vec2f(textureDimensions(interface_depth, 0));
132
- let front = avboit_sample_transmittance(&warp, tIntegral, sLinear, uv, z, footprint);
135
+ let front = avboit_sample_transmittance(&warp, tIntegral, sLinear, uv, footprint);
133
136
  let t = textureLoad(transmission, pixel, 0).rgb;
134
137
  let w = textureLoad(radiance, pixel, 0).rgb;
135
138
  let fog = sample_volumetrics(z, uv, coord.xy);
136
139
  let c = avboit_rgb_contribution(w, t, front, fog);
137
140
  return WaterContribution(c.color, c.norm, c.extinction, c.emission);
138
141
  }
139
- `, [chunk_get_view_space_depth, chunk_avboit_view_depth_to_virtual, chunk_avboit_footprint_bias,
142
+ `, [chunk_get_view_space_depth, chunk_avboit_footprint_depth,
140
143
  chunk_avboit_sample_transmittance, chunk_avboit_rgb_contribution, chunk_sample_volumetrics]),
141
144
  }), targets: AVBOIT_DRAW_TARGETS,
142
145
  });
@@ -193,7 +196,7 @@ fn main(@builtin(position) coord: vec4f) -> @location(0) vec4f {
193
196
  let z = get_view_space_depth(textureLoad(interface_depth, pixel, 0).r, camera);
194
197
  // without the draw's footprint (a derivative this switch cannot take): where the water is
195
198
  // seen at an angle this also shows it occluding itself, which the draw looks past
196
- let front = avboit_sample_transmittance(&warp, tIntegral, sLinear, uv, z, 0.0);
199
+ let front = avboit_sample_transmittance(&warp, tIntegral, sLinear, uv, z);
197
200
  color = select(front, (1.0 - t.rgb) * front, inspection.mode == 9u);
198
201
  }
199
202
  default: {}
@@ -1,33 +0,0 @@
1
- /**
2
- * How much further toward the camera, in virtual slices, a fragment has to look the integral up so
3
- * that its own surface does not occlude it through the neighbouring voxel columns — given
4
- * `virtual_fwidth`, the fragment's `fwidth` of its virtual slice coordinate
5
- * (`avboit_view_depth_to_virtual`), which the caller takes in the fragment stage.
6
- *
7
- * The volume is 1/8 resolution and every column holds a surface at the depth under the column's
8
- * centre. The draw reads the four nearest columns bilinearly, up to one voxel away. On a surface
9
- * tilted away from the camera, the neighbour on its near side holds the same surface nearer by the
10
- * surface's depth change over that distance, and once that exceeds the two-slice base bias the
11
- * surface occludes itself — by an amount that depends on where the pixel sits in its voxel, so an
12
- * overlapping layer showed 8-pixel stripes (ledger entry 26: 3–5 sRGB codes on the device at 45–60°).
13
- * A voxel's width of the surface's own depth change, `AVBOIT_VOXEL_DOWNSCALE × fwidth`, covers the
14
- * farthest column the lookup reaches. The virtual coordinate is convex along a plane seen in
15
- * perspective, so its derivative at the fragment bounds the change toward the near side.
16
- *
17
- * What it costs: a tilted fragment is not occluded by what lies within that band in front of it, the
18
- * depth the volume cannot tell apart from the surface itself at this resolution. The band is capped at
19
- * the base bias of the coarsest slicing, `V / P` base biases — the separation every surface already
20
- * has whenever the volume is full and the warp halves down to `V = P` — so where the derivative runs
21
- * away, at a silhouette or a grazing angle, the extra a fragment ignores is never more than that. The
22
- * whole reach is the base bias plus the band: at most `2 + 2 V / P` virtual slices, twice the coarsest
23
- * separation when the volume is full, about the coarsest separation at `V = 4096`. Past the cap (about
24
- * 85° at 1080p in a sparse volume) the stripes can return.
25
- *
26
- * A fragment that writes nothing into the volume — an additive particle's — has nothing of its own there
27
- * to occlude it and takes no footprint.
28
- *
29
- * @type {CodeChunk}
30
- */
31
- export const chunk_avboit_footprint_bias: CodeChunk;
32
- import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
33
- //# sourceMappingURL=chunk_avboit_footprint_bias.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunk_avboit_footprint_bias.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,0CAFU,SAAS,CAYjB;0BA5CwB,uCAAuC"}
@@ -1,45 +0,0 @@
1
- import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
2
- import { AVBOIT_SAMPLE_BIAS_SLICES, AVBOIT_VOXEL_DOWNSCALE } from "./AVBOIT_CONSTANTS.js";
3
- import { AVBOIT_WARP_STRUCT } from "./AVBOIT_WARP_STRUCT.js";
4
-
5
- /**
6
- * How much further toward the camera, in virtual slices, a fragment has to look the integral up so
7
- * that its own surface does not occlude it through the neighbouring voxel columns — given
8
- * `virtual_fwidth`, the fragment's `fwidth` of its virtual slice coordinate
9
- * (`avboit_view_depth_to_virtual`), which the caller takes in the fragment stage.
10
- *
11
- * The volume is 1/8 resolution and every column holds a surface at the depth under the column's
12
- * centre. The draw reads the four nearest columns bilinearly, up to one voxel away. On a surface
13
- * tilted away from the camera, the neighbour on its near side holds the same surface nearer by the
14
- * surface's depth change over that distance, and once that exceeds the two-slice base bias the
15
- * surface occludes itself — by an amount that depends on where the pixel sits in its voxel, so an
16
- * overlapping layer showed 8-pixel stripes (ledger entry 26: 3–5 sRGB codes on the device at 45–60°).
17
- * A voxel's width of the surface's own depth change, `AVBOIT_VOXEL_DOWNSCALE × fwidth`, covers the
18
- * farthest column the lookup reaches. The virtual coordinate is convex along a plane seen in
19
- * perspective, so its derivative at the fragment bounds the change toward the near side.
20
- *
21
- * What it costs: a tilted fragment is not occluded by what lies within that band in front of it, the
22
- * depth the volume cannot tell apart from the surface itself at this resolution. The band is capped at
23
- * the base bias of the coarsest slicing, `V / P` base biases — the separation every surface already
24
- * has whenever the volume is full and the warp halves down to `V = P` — so where the derivative runs
25
- * away, at a silhouette or a grazing angle, the extra a fragment ignores is never more than that. The
26
- * whole reach is the base bias plus the band: at most `2 + 2 V / P` virtual slices, twice the coarsest
27
- * separation when the volume is full, about the coarsest separation at `V = 4096`. Past the cap (about
28
- * 85° at 1080p in a sparse volume) the stripes can return.
29
- *
30
- * A fragment that writes nothing into the volume — an additive particle's — has nothing of its own there
31
- * to occlude it and takes no footprint.
32
- *
33
- * @type {CodeChunk}
34
- */
35
- export const chunk_avboit_footprint_bias = CodeChunk.from(
36
- //language=WGSL
37
- `
38
- fn avboit_footprint_bias(warp: ptr<storage, ${AVBOIT_WARP_STRUCT.wgsl_ref}, read>, virtual_fwidth: f32) -> f32 {
39
- let cap = ${AVBOIT_SAMPLE_BIAS_SLICES.toFixed(1)} * f32((*warp).virtual_count) / f32(max((*warp).physical_count, 1u));
40
- return min(${AVBOIT_VOXEL_DOWNSCALE.toFixed(1)} * virtual_fwidth, cap);
41
- }
42
- `, [
43
- AVBOIT_WARP_STRUCT.declaration_chunk,
44
- ]
45
- );