@woosh/meep-engine 3.77.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 (227) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -1
  3. package/package.json +3 -2
  4. package/src/engine/EngineHarness.d.ts +4 -6
  5. package/src/engine/EngineHarness.d.ts.map +1 -1
  6. package/src/engine/EngineHarness.js +11 -19
  7. package/src/engine/graphics3/GraphicsEngine.d.ts +19 -1
  8. package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
  9. package/src/engine/graphics3/GraphicsEngine.js +24 -2
  10. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  11. package/src/engine/physics/cloth/solver/cloth_step.js +4 -1
  12. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +36 -2
  13. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
  14. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +60 -3
  15. package/src/engine/sound/sopra/runtime/EventInstance.d.ts +0 -1
  16. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  17. package/src/engine/sound/sopra/runtime/EventInstance.js +0 -1
  18. package/src/shade/device/pipeline/ComputePipelineManager.d.ts +8 -0
  19. package/src/shade/device/pipeline/ComputePipelineManager.d.ts.map +1 -1
  20. package/src/shade/device/pipeline/ComputePipelineManager.js +18 -0
  21. package/src/shade/device/pipeline/RenderPipelineManager.d.ts +8 -0
  22. package/src/shade/device/pipeline/RenderPipelineManager.d.ts.map +1 -1
  23. package/src/shade/device/pipeline/RenderPipelineManager.js +17 -0
  24. package/src/shade/playground/avboit_footprint/index.html +20 -0
  25. package/src/shade/playground/avboit_footprint/main.d.ts +2 -0
  26. package/src/shade/playground/avboit_footprint/main.d.ts.map +1 -0
  27. package/src/shade/playground/avboit_footprint/main.js +428 -0
  28. package/src/shade/playground/probe_clipmap/main.d.ts.map +1 -1
  29. package/src/shade/playground/probe_clipmap/main.js +7 -3
  30. package/src/shade/playground/screen_probes/main.d.ts.map +1 -1
  31. package/src/shade/playground/screen_probes/main.js +7 -3
  32. package/src/shade/renderer/Renderer.d.ts +18 -8
  33. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  34. package/src/shade/renderer/Renderer.js +201 -16
  35. package/src/shade/renderer/RendererConfiguration.d.ts +95 -0
  36. package/src/shade/renderer/RendererConfiguration.d.ts.map +1 -0
  37. package/src/shade/renderer/RendererConfiguration.js +119 -0
  38. package/src/shade/renderer/extension/ShadowAtlas.d.ts +4 -2
  39. package/src/shade/renderer/extension/ShadowAtlas.d.ts.map +1 -1
  40. package/src/shade/renderer/extension/ShadowAtlas.js +4 -2
  41. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +8 -0
  42. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  43. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +34 -0
  44. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts +7 -0
  45. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.d.ts.map +1 -1
  46. package/src/shade/renderer/geometry/sdf/surface/GPUMeshSurfaceCaches.js +15 -0
  47. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts +10 -2
  48. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.d.ts.map +1 -1
  49. package/src/shade/renderer/global_illumination/probe_clipmap/GPUProbeClipmapGI.js +37 -3
  50. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts +6 -0
  51. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.d.ts.map +1 -1
  52. package/src/shade/renderer/global_illumination/probe_clipmap/ProbeClipmapSettings.js +31 -0
  53. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts +7 -0
  54. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.d.ts.map +1 -1
  55. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUBrickClipmap.js +20 -0
  56. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +8 -0
  57. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
  58. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +14 -0
  59. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts +7 -0
  60. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.d.ts.map +1 -1
  61. package/src/shade/renderer/global_illumination/probe_clipmap/brick/mesh/MeshSDFBrickProvider.js +13 -0
  62. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts +6 -0
  63. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.d.ts.map +1 -1
  64. package/src/shade/renderer/global_illumination/probe_clipmap/material/GPUBrickMaterial.js +9 -0
  65. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts +11 -0
  66. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.d.ts.map +1 -1
  67. package/src/shade/renderer/global_illumination/probe_clipmap/probe/GPUProbeClipmap.js +71 -1
  68. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts +6 -0
  69. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.d.ts.map +1 -1
  70. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapHitWants.js +9 -0
  71. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts +6 -0
  72. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.d.ts.map +1 -1
  73. package/src/shade/renderer/global_illumination/probe_clipmap/probe/ProbeClipmapScreenWants.js +9 -0
  74. package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts +6 -0
  75. package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.d.ts.map +1 -1
  76. package/src/shade/renderer/global_illumination/probe_clipmap/probe/graph_probe_clipmap_want_meshlets.js +13 -0
  77. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +9 -0
  78. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -1
  79. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +47 -0
  80. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +6 -0
  81. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
  82. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +17 -0
  83. package/src/shade/renderer/hair/hair_shadow_draw.d.ts +2 -2
  84. package/src/shade/renderer/hair/hair_shadow_draw.js +2 -2
  85. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +8 -0
  86. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  87. package/src/shade/renderer/particles/GPUParticleSystem.js +20 -1
  88. package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts +6 -0
  89. package/src/shade/renderer/particles/bounds/graph_particle_bounds.d.ts.map +1 -1
  90. package/src/shade/renderer/particles/bounds/graph_particle_bounds.js +11 -1
  91. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +6 -0
  92. package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -1
  93. package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +15 -0
  94. package/src/shade/renderer/particles/graph_particles.d.ts +8 -0
  95. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  96. package/src/shade/renderer/particles/graph_particles.js +28 -3
  97. package/src/shade/renderer/particles/graph_particles_avboit.d.ts +7 -0
  98. package/src/shade/renderer/particles/graph_particles_avboit.d.ts.map +1 -1
  99. package/src/shade/renderer/particles/graph_particles_avboit.js +14 -0
  100. package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.d.ts.map +1 -1
  101. package/src/shade/renderer/particles/shaders/shader_particle_avboit_draw.js +5 -7
  102. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +7 -0
  103. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
  104. package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +15 -0
  105. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts +6 -0
  106. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
  107. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +16 -2
  108. package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts +6 -0
  109. package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.d.ts.map +1 -1
  110. package/src/shade/renderer/path_tracer/accumulating/graph_float32rgba_to_float16rgba.js +9 -0
  111. package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts +11 -0
  112. package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.d.ts.map +1 -1
  113. package/src/shade/renderer/path_tracer/accumulating/graph_flood_fill.js +10 -0
  114. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts +6 -0
  115. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.d.ts.map +1 -1
  116. package/src/shade/renderer/postprocess/dof/gather/DepthOfFieldU.js +10 -1
  117. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts +7 -0
  118. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.d.ts.map +1 -1
  119. package/src/shade/renderer/postprocess/dof/gather/graph_postprocess_dof2.js +21 -0
  120. package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts +7 -0
  121. package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.d.ts.map +1 -1
  122. package/src/shade/renderer/postprocess/dof/raymarch/DepthOfField.js +11 -1
  123. package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts +9 -0
  124. package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.d.ts.map +1 -1
  125. package/src/shade/renderer/postprocess/dof/raymarch/graph_postprocess_dof.js +29 -0
  126. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts +6 -0
  127. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.d.ts.map +1 -1
  128. package/src/shade/renderer/postprocess/motion_blur/MotionBlur.js +13 -1
  129. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts +6 -0
  130. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.d.ts.map +1 -1
  131. package/src/shade/renderer/postprocess/motion_blur/graph_postprocess_motion_blur.js +11 -0
  132. package/src/shade/renderer/postprocess/nss/NSS.d.ts +9 -0
  133. package/src/shade/renderer/postprocess/nss/NSS.d.ts.map +1 -1
  134. package/src/shade/renderer/postprocess/nss/NSS.js +33 -18
  135. package/src/shade/renderer/postprocess/ssr/SSR.d.ts +8 -0
  136. package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
  137. package/src/shade/renderer/postprocess/ssr/SSR.js +42 -2
  138. package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts +6 -0
  139. package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.d.ts.map +1 -1
  140. package/src/shade/renderer/postprocess/ssr/ssr_graph_denoise_tiles.js +10 -0
  141. package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts +6 -0
  142. package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.d.ts.map +1 -1
  143. package/src/shade/renderer/postprocess/ssr/ssr_graph_prefilter_color.js +11 -0
  144. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts +8 -0
  145. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.d.ts.map +1 -1
  146. package/src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js +27 -3
  147. package/src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.d.ts +7 -4
  148. package/src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.d.ts.map +1 -1
  149. package/src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.js +66 -14
  150. package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts +6 -0
  151. package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.d.ts.map +1 -1
  152. package/src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js +10 -0
  153. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +5 -4
  154. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
  155. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +5 -4
  156. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.d.ts +3 -3
  157. package/src/shade/renderer/rasterize/native/avboit/AVBOIT_CONSTANTS.js +3 -3
  158. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts.map +1 -1
  159. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js +5 -7
  160. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.d.ts.map +1 -1
  161. package/src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js +5 -7
  162. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts +34 -0
  163. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.d.ts.map +1 -0
  164. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.js +42 -0
  165. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts +5 -4
  166. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.d.ts.map +1 -1
  167. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js +8 -7
  168. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts +2 -2
  169. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.d.ts.map +1 -1
  170. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_sample_transmittance.js +4 -5
  171. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +9 -0
  172. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
  173. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +18 -0
  174. package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts +20 -0
  175. package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.d.ts.map +1 -0
  176. package/src/shade/renderer/rasterize/native/depth/shadow_cascade_rasterization_pass_descriptor.js +149 -0
  177. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.d.ts +8 -0
  178. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.d.ts.map +1 -1
  179. package/src/shade/renderer/rasterize/native/depth/shadow_rasterization_alpha_tested_pass_descriptor.js +100 -33
  180. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +9 -0
  181. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
  182. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +15 -0
  183. package/src/shade/renderer/rasterize/native/rasterization_shader_resources.d.ts +11 -0
  184. package/src/shade/renderer/rasterize/native/rasterization_shader_resources.d.ts.map +1 -1
  185. package/src/shade/renderer/rasterize/native/rasterization_shader_resources.js +24 -11
  186. package/src/shade/renderer/restir/di/ReSTIRDI.d.ts +6 -0
  187. package/src/shade/renderer/restir/di/ReSTIRDI.d.ts.map +1 -1
  188. package/src/shade/renderer/restir/di/ReSTIRDI.js +10 -1
  189. package/src/shade/renderer/restir/di/graph_restir_di.d.ts +9 -0
  190. package/src/shade/renderer/restir/di/graph_restir_di.d.ts.map +1 -1
  191. package/src/shade/renderer/restir/di/graph_restir_di.js +19 -1
  192. package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts +6 -0
  193. package/src/shade/renderer/restir/di/graph_restir_di_denoise.d.ts.map +1 -1
  194. package/src/shade/renderer/restir/di/graph_restir_di_denoise.js +9 -0
  195. package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts +7 -0
  196. package/src/shade/renderer/scene/movers/graph_scene_movers.d.ts.map +1 -1
  197. package/src/shade/renderer/scene/movers/graph_scene_movers.js +11 -0
  198. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_vertex_normal.d.ts +13 -0
  199. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_vertex_normal.d.ts.map +1 -0
  200. package/src/shade/renderer/shader/chunk/geometry/meshlet/chunk_read_meshlet_vertex_normal.js +42 -0
  201. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +10 -0
  202. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  203. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +39 -6
  204. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts +34 -0
  205. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.d.ts.map +1 -0
  206. package/src/shade/renderer/shadow/map/shader/chunk_sample_shadowmap_cascade.js +106 -0
  207. package/src/shade/renderer/shadow/map/shader/chunk_shadow_cascade_caster_position.d.ts +16 -0
  208. package/src/shade/renderer/shadow/map/shader/chunk_shadow_cascade_caster_position.d.ts.map +1 -0
  209. package/src/shade/renderer/shadow/map/shader/chunk_shadow_cascade_caster_position.js +50 -0
  210. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts +25 -0
  211. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.d.ts.map +1 -0
  212. package/src/shade/renderer/shadow/map/shader/chunk_shadow_caster_depth_bias.js +42 -0
  213. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts +1 -1
  214. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.js +5 -5
  215. package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts +7 -0
  216. package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.d.ts.map +1 -1
  217. package/src/shade/renderer/shadow/vsm/graph_vsm_feedback.js +14 -0
  218. package/src/shade/renderer/text/shaders/shader_text_avboit.d.ts.map +1 -1
  219. package/src/shade/renderer/text/shaders/shader_text_avboit.js +5 -7
  220. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts +9 -1
  221. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.d.ts.map +1 -1
  222. package/src/shade/renderer/volumetrics/irradiance_clipmap/GPUIrradianceClipmap.js +16 -1
  223. package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
  224. package/src/shade/renderer/water/shader_water_avboit.js +16 -13
  225. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts +0 -33
  226. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.d.ts.map +0 -1
  227. package/src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_bias.js +0 -45
@@ -1 +1 @@
1
- {"version":3,"file":"prepare_meshlet_draw_commands_by_material.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js"],"names":[],"mappings":"AAmCA;;;;;;;;;;;;;;;;;GAiBG;AACH,0LAJa;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAAC,wBAAwB,EAAE,MAAM,CAAA;CAAC,CAmWnH"}
1
+ {"version":3,"file":"prepare_meshlet_draw_commands_by_material.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/bucket/prepare_meshlet_draw_commands_by_material.js"],"names":[],"mappings":"AAwCA;;;;;;GAMG;AACH,qFAFW,OAAO,6CAA6C,EAAE,eAAe,QAY/E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,0LAJa;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAAC,wBAAwB,EAAE,MAAM,CAAA;CAAC,CAmWnH"}
@@ -8,6 +8,7 @@ import {
8
8
  cpu_hash_table_word_count
9
9
  } from "../../gpu_primitive/hash_table/cpu_build_hash_table.js";
10
10
  import {
11
+ enquire_prefix_scan_csdldf_pipelines,
11
12
  graph_prefix_scan_csdldf,
12
13
  prefix_scan_csdldf_output_descriptor
13
14
  } from "../../gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js";
@@ -19,10 +20,14 @@ import { graph_record_stat } from "../../util/graph_record_stat.js";
19
20
  import {
20
21
  build_indirect_compute_dispatch_command,
21
22
  graph_build_indirect_dispatch_command,
22
- INDIRECT_COMPUTE_COMMAND_DESCRIPTOR
23
+ INDIRECT_COMPUTE_COMMAND_DESCRIPTOR,
24
+ indirect_compute_dispatch_command_pipeline
23
25
  } from "../../gpu_primitive/indirect/IndirectComputeCommandBuildPass.js";
24
- import { graph_mesh_filter_one_way } from "../expand/graph_mesh_filter_one_way.js";
25
- import { graph_expand_meshes_to_meshlets } from "../expand/mesh/graph_expand_meshes_to_meshlets.js";
26
+ import { enquire_mesh_filter_one_way_pipelines, graph_mesh_filter_one_way } from "../expand/graph_mesh_filter_one_way.js";
27
+ import {
28
+ enquire_expand_meshes_to_meshlets_pipelines,
29
+ graph_expand_meshes_to_meshlets
30
+ } from "../expand/mesh/graph_expand_meshes_to_meshlets.js";
26
31
  import { graph_vgeo_expand_if_enabled } from "../../geometry/virtual/runtime/graph_vgeo_expand_if_enabled.js";
27
32
  import { RasterizationCollectionType } from "../expand/RasterizationCollectionType.js";
28
33
  import { CullPolicy } from "./construct_primitive_state.js";
@@ -33,6 +38,25 @@ import {
33
38
  import { shader_read_out_bucket } from "./shader_read_out_bucket.js";
34
39
  import { shader_sort_meshlets_by_material } from "./shader_sort_meshlets_by_material.js";
35
40
 
41
+ /**
42
+ * Offer the pipelines {@link graph_prepare_meshlet_draw_commands_by_material} dispatches — see
43
+ * {@link PipelineEnquiry}: a bucket's meshes read out, culled and expanded to meshlets, and those culled, counted
44
+ * and sorted into a draw command a material. Virtual geometry's expansion is its scenes' to offer.
45
+ *
46
+ * @param {import("../../../device/pipeline/PipelineEnquiry.js").PipelineEnquiry} enquiry
47
+ */
48
+ export function enquire_prepare_meshlet_draw_commands_by_material_pipelines(enquiry) {
49
+ enquiry.compute.push(shader_read_out_bucket.pipeline);
50
+ enquire_mesh_filter_one_way_pipelines(enquiry);
51
+ enquire_expand_meshes_to_meshlets_pipelines(enquiry);
52
+ enquiry.compute.push(indirect_compute_dispatch_command_pipeline(enquiry.device, COMPUTE_SHADER_DEFAULT_GROUP_SIZE, true));
53
+ enquiry.compute.push(shader_hzb_meshlet_filter_1way_full.pipeline);
54
+ enquiry.compute.push(shader_count_meshlets_by_material.pipeline);
55
+ enquire_prefix_scan_csdldf_pipelines(enquiry);
56
+ enquiry.compute.push(shader_sort_meshlets_by_material.pipeline);
57
+ enquiry.compute.push(shader_make_meshlet_indirect_draw_commands_by_material.pipeline);
58
+ }
59
+
36
60
  /**
37
61
  *
38
62
  * @param {FrameGraph} graph
@@ -1,25 +1,28 @@
1
1
  /**
2
- * The vertex of an indexed meshlet draw.
2
+ * What a draw index of the indexed form names, and the vertex it draws.
3
3
  *
4
4
  * ```wgsl
5
+ * fn meshlet_draw_source_indexed(vertex_index: u32, instance_index: u32) -> MeshletDrawSource
5
6
  * fn meshlet_draw_vertex_indexed(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex
6
7
  * ```
7
8
  *
8
9
  * `vertex_index` is an index `shader_meshlet_draw_indices` wrote, and `instance_index` the slot of the
9
- * draw's first meshlet.
10
+ * draw's first meshlet. Every source of this form `has_area`.
10
11
  *
11
12
  * @type {CodeChunk}
12
13
  */
13
14
  export const chunk_meshlet_draw_vertex_indexed: CodeChunk;
14
15
  /**
15
- * The vertex of a meshlet draw in the corner form.
16
+ * What a draw index of the corner form names, and the vertex it draws.
16
17
  *
17
18
  * ```wgsl
19
+ * fn meshlet_draw_source_corner(vertex_index: u32, instance_index: u32) -> MeshletDrawSource
18
20
  * fn meshlet_draw_vertex_corner(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex
19
21
  * ```
20
22
  *
21
23
  * `vertex_index` is a corner and `instance_index` the meshlet's slot. A corner past the meshlet's triangles
22
- * is the zero position, so its triangle has no area.
24
+ * has no area — its source holds nothing else — and its vertex is the zero position, so its triangle has no
25
+ * area.
23
26
  *
24
27
  * @type {CodeChunk}
25
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_meshlet_draw_vertex.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.js"],"names":[],"mappings":"AA0CA;;;;;;;;;;;GAWG;AACH,gDAFU,SAAS,CA4BjB;AAEF;;;;;;;;;;;GAWG;AACH,+CAFU,SAAS,CAoCjB;0BAtHwB,oCAAoC"}
1
+ {"version":3,"file":"chunk_meshlet_draw_vertex.d.ts","sourceRoot":"","sources":["../../../../../../src/shade/renderer/rasterize/draw/chunk_meshlet_draw_vertex.js"],"names":[],"mappings":"AA4DA;;;;;;;;;;;;GAYG;AACH,gDAFU,SAAS,CAwCjB;AAEF;;;;;;;;;;;;;GAaG;AACH,+CAFU,SAAS,CAuDjB;0BA1KwB,oCAAoC"}
@@ -9,6 +9,7 @@ import {
9
9
  chunk_triangle_list_reverse_winding
10
10
  } from "../../shader/chunk/geometry/triangle/chunk_triangle_list_reverse_winding.js";
11
11
  import { CodeChunk } from "../../shader/compiler/CodeChunk.js";
12
+ import { MESHLET_METADATA_STRUCT } from "../../geometry/meshlet/encoding/MESHLET_METADATA_STRUCT.js";
12
13
  import { chunk_triangle_winding_is_reversed } from "../chunk_triangle_winding_is_reversed.js";
13
14
  import { VISIBILITY_TRIANGLE_BITS } from "../visibility/VISIBILITY_BUFFER.js";
14
15
  import {
@@ -27,6 +28,9 @@ import {
27
28
  triangle`, where the slot is the meshlet's place in the list the draw takes its meshlets from; it is right
28
29
  on the first vertex of a triangle, which is where a flat varying is taken from.
29
30
 
31
+ Each form's vertex is its source — the meshlet, the node and the vertex within the meshlet a draw index names
32
+ — put through the view: a pass that needs more of the vertex than its position reads the source instead.
33
+
30
34
  The shader binds `camera`, `scene_database`, `meshlets`, `meshlet_metadata`, `meshlet_data` and, for the
31
35
  corner form, `materials`, as `rasterization_shader_resources` declares them.
32
36
  */
@@ -40,67 +44,98 @@ struct MeshletDrawVertex {
40
44
  }
41
45
  `);
42
46
 
47
+ const chunk_meshlet_draw_source_struct = CodeChunk.from(
48
+ //language=WGSL
49
+ `
50
+ struct MeshletDrawSource {
51
+ header: ${MESHLET_METADATA_STRUCT.wgsl_ref},
52
+ node_global: mat4x4<f32>,
53
+ vertex_id: u32,
54
+ visibility: u32,
55
+ has_area: bool,
56
+ }
57
+ `, [
58
+ MESHLET_METADATA_STRUCT.declaration_chunk,
59
+ ]);
60
+
43
61
  /**
44
- * The vertex of an indexed meshlet draw.
62
+ * What a draw index of the indexed form names, and the vertex it draws.
45
63
  *
46
64
  * ```wgsl
65
+ * fn meshlet_draw_source_indexed(vertex_index: u32, instance_index: u32) -> MeshletDrawSource
47
66
  * fn meshlet_draw_vertex_indexed(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex
48
67
  * ```
49
68
  *
50
69
  * `vertex_index` is an index `shader_meshlet_draw_indices` wrote, and `instance_index` the slot of the
51
- * draw's first meshlet.
70
+ * draw's first meshlet. Every source of this form `has_area`.
52
71
  *
53
72
  * @type {CodeChunk}
54
73
  */
55
74
  export const chunk_meshlet_draw_vertex_indexed = CodeChunk.from(
56
75
  //language=WGSL
57
76
  `
58
- fn meshlet_draw_vertex_indexed(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex {
77
+ fn meshlet_draw_source_indexed(vertex_index: u32, instance_index: u32) -> MeshletDrawSource {
59
78
  let slot = instance_index + (vertex_index >> ${MESHLET_DRAW_INDEX_PLACE_SHIFT}u);
60
79
 
61
80
  let meshlet_def = meshlets.elements[slot];
62
- let meshlet_header = meshlet_metadata[meshlet_def.index];
63
81
 
64
82
  let mesh = scene_read_mesh(&scene_database, meshlet_def.mesh);
65
83
  let node = scene_read_node(&scene_database, mesh.node);
66
84
 
67
85
  let triangle_index = (vertex_index >> ${MESHLET_DRAW_INDEX_VERTEX_BITS}u) & ${2 ** MESHLET_DRAW_INDEX_TRIANGLE_BITS - 1}u;
68
86
 
69
- let geometry_position = read_meshlet_vertex_position(meshlet_header, vertex_index & ${2 ** MESHLET_DRAW_INDEX_VERTEX_BITS - 1}u);
87
+ return MeshletDrawSource(
88
+ meshlet_metadata[meshlet_def.index],
89
+ node.global,
90
+ vertex_index & ${2 ** MESHLET_DRAW_INDEX_VERTEX_BITS - 1}u,
91
+ (slot << ${VISIBILITY_TRIANGLE_BITS}u) | triangle_index,
92
+ true,
93
+ );
94
+ }
95
+
96
+ fn meshlet_draw_vertex_indexed(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex {
97
+ let source = meshlet_draw_source_indexed(vertex_index, instance_index);
98
+
99
+ let geometry_position = read_meshlet_vertex_position(source.header, source.vertex_id);
70
100
 
71
101
  return MeshletDrawVertex(
72
- camera.view_projection_matrix * node.global * vec4(geometry_position, 1.0),
73
- (slot << ${VISIBILITY_TRIANGLE_BITS}u) | triangle_index,
102
+ camera.view_projection_matrix * source.node_global * vec4(geometry_position, 1.0),
103
+ source.visibility,
74
104
  );
75
105
  }
76
106
  `, [
77
107
  chunk_meshlet_draw_vertex_struct,
108
+ chunk_meshlet_draw_source_struct,
78
109
  chunk_read_meshlet_vertex_position,
79
110
  chunk_scene_database_access,
80
111
  ]
81
112
  );
82
113
 
83
114
  /**
84
- * The vertex of a meshlet draw in the corner form.
115
+ * What a draw index of the corner form names, and the vertex it draws.
85
116
  *
86
117
  * ```wgsl
118
+ * fn meshlet_draw_source_corner(vertex_index: u32, instance_index: u32) -> MeshletDrawSource
87
119
  * fn meshlet_draw_vertex_corner(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex
88
120
  * ```
89
121
  *
90
122
  * `vertex_index` is a corner and `instance_index` the meshlet's slot. A corner past the meshlet's triangles
91
- * is the zero position, so its triangle has no area.
123
+ * has no area — its source holds nothing else — and its vertex is the zero position, so its triangle has no
124
+ * area.
92
125
  *
93
126
  * @type {CodeChunk}
94
127
  */
95
128
  export const chunk_meshlet_draw_vertex_corner = CodeChunk.from(
96
129
  //language=WGSL
97
130
  `
98
- fn meshlet_draw_vertex_corner(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex {
131
+ fn meshlet_draw_source_corner(vertex_index: u32, instance_index: u32) -> MeshletDrawSource {
132
+ var source: MeshletDrawSource;
133
+
99
134
  let meshlet_def = meshlets.elements[instance_index];
100
135
  let meshlet_header = meshlet_metadata[meshlet_def.index];
101
136
 
102
137
  if (vertex_index >= meshlet_header.primitive_count * 3u) {
103
- return MeshletDrawVertex(vec4<f32>(0.0), 0u);
138
+ return source;
104
139
  }
105
140
 
106
141
  let mesh = scene_read_mesh(&scene_database, meshlet_def.mesh);
@@ -111,15 +146,32 @@ fn meshlet_draw_vertex_corner(vertex_index: u32, instance_index: u32) -> Meshlet
111
146
  triangle_winding_is_reversed(node, materials[mesh.material].draw_side)
112
147
  );
113
148
 
114
- let geometry_position = read_meshlet_vertex_position(meshlet_header, read_meshlet_resolved_index(meshlet_header, corner));
149
+ source.header = meshlet_header;
150
+ source.node_global = node.global;
151
+ source.vertex_id = read_meshlet_resolved_index(meshlet_header, corner);
152
+ source.visibility = (instance_index << ${VISIBILITY_TRIANGLE_BITS}u) | (corner / 3u);
153
+ source.has_area = true;
154
+
155
+ return source;
156
+ }
157
+
158
+ fn meshlet_draw_vertex_corner(vertex_index: u32, instance_index: u32) -> MeshletDrawVertex {
159
+ let source = meshlet_draw_source_corner(vertex_index, instance_index);
160
+
161
+ if (!source.has_area) {
162
+ return MeshletDrawVertex(vec4<f32>(0.0), 0u);
163
+ }
164
+
165
+ let geometry_position = read_meshlet_vertex_position(source.header, source.vertex_id);
115
166
 
116
167
  return MeshletDrawVertex(
117
- camera.view_projection_matrix * node.global * vec4(geometry_position, 1.0),
118
- (instance_index << ${VISIBILITY_TRIANGLE_BITS}u) | (corner / 3u),
168
+ camera.view_projection_matrix * source.node_global * vec4(geometry_position, 1.0),
169
+ source.visibility,
119
170
  );
120
171
  }
121
172
  `, [
122
173
  chunk_meshlet_draw_vertex_struct,
174
+ chunk_meshlet_draw_source_struct,
123
175
  chunk_read_meshlet_vertex_position,
124
176
  chunk_read_meshlet_resolved_index,
125
177
  chunk_scene_database_access,
@@ -31,5 +31,11 @@ export class AVBOITSettings {
31
31
  * @type {number}
32
32
  */
33
33
  warp_steps_per_octave: number;
34
+ /**
35
+ * Take every field's value from `other`, which is left as it was. The two share nothing afterwards.
36
+ *
37
+ * @param {AVBOITSettings} other
38
+ */
39
+ copy(other: AVBOITSettings): void;
34
40
  }
35
41
  //# sourceMappingURL=AVBOITSettings.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AVBOITSettings.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH;IAEI;;;;;;;;;;;;;OAaG;IACH,mCAFU,OAAO,CAEyB;IAE1C;;;;;;OAMG;IACH,uBAFU,MAAM,CAEU;CAC7B"}
1
+ {"version":3,"file":"AVBOITSettings.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSettings.js"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH;IAEI;;;;;;;;;;;;;OAaG;IACH,mCAFU,OAAO,CAEyB;IAE1C;;;;;;OAMG;IACH,uBAFU,MAAM,CAEU;IAE1B;;;;OAIG;IACH,YAFW,cAAc,QAKxB;CACJ"}
@@ -33,4 +33,14 @@ export class AVBOITSettings {
33
33
  * @type {number}
34
34
  */
35
35
  warp_steps_per_octave = 4;
36
+
37
+ /**
38
+ * Take every field's value from `other`, which is left as it was. The two share nothing afterwards.
39
+ *
40
+ * @param {AVBOITSettings} other
41
+ */
42
+ copy(other) {
43
+ this.transmission_tint_from_base_color = other.transmission_tint_from_base_color;
44
+ this.warp_steps_per_octave = other.warp_steps_per_octave;
45
+ }
36
46
  }
@@ -96,10 +96,11 @@ export type AVBOITSideChannel = {
96
96
  /**
97
97
  * draw the
98
98
  * channel's fragments into the accumulators; returns their handles after the draw. A channel
99
- * whose fragments splat into the volume adds `avboit_footprint_bias` (of `fwidth` of the fragment's
100
- * virtual slice coordinate, taken in uniform control flow) to its lookup, as the mesh draw does, or
101
- * a surface it draws at an angle occludes itself in an 8-pixel pattern; one whose fragments write
102
- * nothing into the volume passes `0`.
99
+ * whose fragments splat into the volume looks the integral up in front of `avboit_footprint_depth` (of
100
+ * the fragment's view depth and `fwidth` of its reciprocal, taken in uniform control flow), as the mesh
101
+ * draw does, and splats at the depth under each voxel column's centre, or a surface it draws at an angle
102
+ * occludes itself in an 8-pixel pattern; one whose fragments write nothing into the volume looks in
103
+ * front of the fragment's own depth.
103
104
  * `volumetrics_irradiance` is what a fragment standing in a froxel is lit by
104
105
  * (`chunk_volumetrics_irradiance_sh`), for a channel whose fragments are lit: the renderer's
105
106
  * indirect lighting, whichever mode it runs, and the scene's lights, shadowed — lit as the
@@ -1 +1 @@
1
- {"version":3,"file":"AVBOITSideChannel.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCc,CAAC,IAAI,EAAE;QAAC,KAAK,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QACjH,QAAc,EAAE,OAAO,iCAAiC,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QACzF,aAAmB,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAChG,WAAiB,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QACvD,wBAA8B,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAC;QACjG,eAAqB,EAAE,MAAM,CAAC;QAC9B,eAAqB,EAAE,OAAO,6CAA6C,EAAE,eAAe,CAAC;QAC7F,MAAY,EAAE,OAAO,iEAAiE,EAAE,iBAAiB,CAAC;KACvG,KAAK;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC;;;;;sBAMtB,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,kBAAwB,EAAE,UAAU,MAAM,CAAC,CAAC;QAC5C,SAAe,EAAE,MAAM,CAAC;KACrB,KAAK,MAAM;;;;;;;;kBAED,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,IAAU,EAAE,MAAM,CAAC;QACnB,aAAmB,EAAE,MAAM,CAAC;QAC5B,gBAAsB,EAAE,MAAM,EAAE,CAAC;QACjC,MAAY,EAAE;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,CAAC;KACjE,KAAK;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;;;;;;;;;;;;;;iBAKhD,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,QAAc,EAAE,OAAO,iCAAiC,EAAE,cAAc,CAAC;QACzE,MAAY,EAAE,MAAM,CAAC;QACrB,aAAmB,EAAE,MAAM,CAAC;QAC5B,IAAU,EAAE,MAAM,CAAC;QACnB,QAAc,EAAE,MAAM,CAAC;QACvB,eAAqB,EAAE,MAAM,CAAC;QAC9B,oBAA0B,EAAE,MAAM,CAAC;QACnC,sBAA4B,EAAE;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC,CAAC;QACxD,YAAkB,EAAE;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAC,CAAC;KACrF,KAAK;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC;;;;;;sBAW9D,CAAC,IAAI,EAAE,OAAO,iCAAiC,EAAE,cAAc,KAAK,OAAO"}
1
+ {"version":3,"file":"AVBOITSideChannel.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAoCc,CAAC,IAAI,EAAE;QAAC,KAAK,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QACjH,QAAc,EAAE,OAAO,iCAAiC,EAAE,cAAc,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QACzF,aAAmB,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAChG,WAAiB,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QACvD,wBAA8B,EAAE,MAAM,CAAC;QAAC,oBAAoB,EAAE,MAAM,CAAC;QAAC,kBAAkB,EAAE,MAAM,CAAC;QACjG,eAAqB,EAAE,MAAM,CAAC;QAC9B,eAAqB,EAAE,OAAO,6CAA6C,EAAE,eAAe,CAAC;QAC7F,MAAY,EAAE,OAAO,iEAAiE,EAAE,iBAAiB,CAAC;KACvG,KAAK;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAC;;;;;sBAMtB,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,kBAAwB,EAAE,UAAU,MAAM,CAAC,CAAC;QAC5C,SAAe,EAAE,MAAM,CAAC;KACrB,KAAK,MAAM;;;;;;;;kBAED,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,MAAY,EAAE,MAAM,CAAC;QACrB,IAAU,EAAE,MAAM,CAAC;QACnB,aAAmB,EAAE,MAAM,CAAC;QAC5B,gBAAsB,EAAE,MAAM,EAAE,CAAC;QACjC,MAAY,EAAE;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAC,CAAC;KACjE,KAAK;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC;;;;;;;;;;;;;;;iBAKhD,CAAC,IAAI,EAAE;QACpB,KAAW,EAAE,OAAO,iEAAiE,EAAE,UAAU,CAAC;QAClG,QAAc,EAAE,OAAO,iCAAiC,EAAE,cAAc,CAAC;QACzE,MAAY,EAAE,MAAM,CAAC;QACrB,aAAmB,EAAE,MAAM,CAAC;QAC5B,IAAU,EAAE,MAAM,CAAC;QACnB,QAAc,EAAE,MAAM,CAAC;QACvB,eAAqB,EAAE,MAAM,CAAC;QAC9B,oBAA0B,EAAE,MAAM,CAAC;QACnC,sBAA4B,EAAE;YAAC,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAC,CAAC;QACxD,YAAkB,EAAE;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAC;YAAC,UAAU,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAC,CAAC;KACrF,KAAK;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAC;;;;;;sBAY9D,CAAC,IAAI,EAAE,OAAO,iCAAiC,EAAE,cAAc,KAAK,OAAO"}
@@ -80,10 +80,11 @@
80
80
  * accumulators: {color: number, norm: number, extinction: number, emission: number},
81
81
  * }) => {color: number, norm: number, extinction: number, emission: number}} avboit_draw draw the
82
82
  * channel's fragments into the accumulators; returns their handles after the draw. A channel
83
- * whose fragments splat into the volume adds `avboit_footprint_bias` (of `fwidth` of the fragment's
84
- * virtual slice coordinate, taken in uniform control flow) to its lookup, as the mesh draw does, or
85
- * a surface it draws at an angle occludes itself in an 8-pixel pattern; one whose fragments write
86
- * nothing into the volume passes `0`.
83
+ * whose fragments splat into the volume looks the integral up in front of `avboit_footprint_depth` (of
84
+ * the fragment's view depth and `fwidth` of its reciprocal, taken in uniform control flow), as the mesh
85
+ * draw does, and splats at the depth under each voxel column's centre, or a surface it draws at an angle
86
+ * occludes itself in an 8-pixel pattern; one whose fragments write nothing into the volume looks in
87
+ * front of the fragment's own depth.
87
88
  * `volumetrics_irradiance` is what a fragment standing in a froxel is lit by
88
89
  * (`chunk_volumetrics_irradiance_sh`), for a channel whose fragments are lit: the renderer's
89
90
  * indirect lighting, whichever mode it runs, and the scene's lights, shadowed — lit as the
@@ -81,9 +81,9 @@ export const AVBOIT_FIELD_BITS: number;
81
81
  * How far toward the camera, in virtual slices, the draw pass samples the integral so that a surface
82
82
  * does not occlude itself through its own linear splat. With the exclusive-prefix storage convention
83
83
  * the analytic minimum is 1.5; the deck uses 2. Events closer together than this do not occlude each
84
- * other and degrade to weighted blending. A surface tilted away from the camera adds its footprint on
85
- * top (`avboit_footprint_bias`): the base bias is for a surface splatted at its own depth, and the
86
- * draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
84
+ * other and degrade to weighted blending. A surface tilted away from the camera takes it in front of
85
+ * its footprint depth (`avboit_footprint_depth`): the base bias is for a surface splatted at its own
86
+ * depth, and the draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
87
87
  * @type {number}
88
88
  */
89
89
  export const AVBOIT_SAMPLE_BIAS_SLICES: number;
@@ -91,9 +91,9 @@ export const AVBOIT_FIELD_BITS = 10;
91
91
  * How far toward the camera, in virtual slices, the draw pass samples the integral so that a surface
92
92
  * does not occlude itself through its own linear splat. With the exclusive-prefix storage convention
93
93
  * the analytic minimum is 1.5; the deck uses 2. Events closer together than this do not occlude each
94
- * other and degrade to weighted blending. A surface tilted away from the camera adds its footprint on
95
- * top (`avboit_footprint_bias`): the base bias is for a surface splatted at its own depth, and the
96
- * draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
94
+ * other and degrade to weighted blending. A surface tilted away from the camera takes it in front of
95
+ * its footprint depth (`avboit_footprint_depth`): the base bias is for a surface splatted at its own
96
+ * depth, and the draw also reads the neighbouring voxel columns, where a tilted one was splatted nearer.
97
97
  * @type {number}
98
98
  */
99
99
  export const AVBOIT_SAMPLE_BIAS_SLICES = 2.0;
@@ -1 +1 @@
1
- {"version":3,"file":"avboit_draw_fragment_body.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wCAFU,MAAM,CAyEV;AAEN;;;GAGG;AACH,gDAFU,WAAW,CAYnB;AAEF;;;GAGG;AACH,kCAFU,qBAAqB,CAiB3B"}
1
+ {"version":3,"file":"avboit_draw_fragment_body.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wCAFU,MAAM,CAyEV;AAEN;;;GAGG;AACH,gDAFU,WAAW,CAWnB;AAEF;;;GAGG;AACH,kCAFU,qBAAqB,CAiB3B"}
@@ -5,8 +5,7 @@ import { chunk_view_mip_bias } from "../../../view/chunk_view_mip_bias.js";
5
5
  import { FORWARD_VERTEX_SHADER_STRUCT } from "../../forward/FORWARD_VERTEX_SHADER_STRUCT.js";
6
6
  import { OIT_COVERAGE_MAX } from "../oit/OIT_CONSTANTS.js";
7
7
  import { AVBOIT_EXTINCT_TRANSMITTANCE } from "./AVBOIT_CONSTANTS.js";
8
- import { chunk_avboit_view_depth_to_virtual } from "./chunk_avboit_view_depth_to_virtual.js";
9
- import { chunk_avboit_footprint_bias } from "./chunk_avboit_footprint_bias.js";
8
+ import { chunk_avboit_footprint_depth } from "./chunk_avboit_footprint_depth.js";
10
9
  import { chunk_avboit_sample_transmittance } from "./chunk_avboit_sample_transmittance.js";
11
10
  import { chunk_avboit_transmission_tint } from "./chunk_avboit_transmission_tint.js";
12
11
 
@@ -72,11 +71,11 @@ fn main(
72
71
  let frag_view_depth = get_view_space_depth(vert_adjusted.position.z, camera);
73
72
  let frag_screen_uv = vert_adjusted.position.xy / vec2<f32>(f32(view.width), f32(view.height));
74
73
 
75
- // how far the surface's own depth runs across a voxel, so it does not occlude itself through the
74
+ // the nearest the surface's own depth runs across a voxel, so it does not occlude itself through the
76
75
  // neighbouring columns; taken here, in uniform control flow, before anything can discard
77
- let footprint = avboit_footprint_bias(&warp, fwidth(avboit_view_depth_to_virtual(&warp, frag_view_depth)));
76
+ let footprint = avboit_footprint_depth(frag_view_depth, fwidth(1.0 / frag_view_depth));
78
77
 
79
- let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, frag_screen_uv, frag_view_depth, footprint);
78
+ let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, frag_screen_uv, footprint);
80
79
 
81
80
  if (all(transmittance <= vec3<f32>(${AVBOIT_EXTINCT_TRANSMITTANCE}))) {
82
81
  // nothing this fragment contributes survives what is in front of it; skip the shading
@@ -125,8 +124,7 @@ export const AVBOIT_DRAW_FRAGMENT_DEPENDENCIES = [
125
124
  chunk_get_view_space_depth,
126
125
  chunk_random_initialize,
127
126
  chunk_sample_volumetrics,
128
- chunk_avboit_view_depth_to_virtual,
129
- chunk_avboit_footprint_bias,
127
+ chunk_avboit_footprint_depth,
130
128
  chunk_avboit_sample_transmittance,
131
129
  chunk_avboit_transmission_tint,
132
130
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"avboit_unlit_draw.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js"],"names":[],"mappings":"AAiHA;;;;;;;;;;;GAWG;AACH;IAP0B,KAAK,EAApB,MAAM;IACgG,SAAS,EAA/G,OAAO,yDAAyD,EAAE,2BAA2B;IAE9E,MAAM,EAArB,MAAM;IAEJ,wBAAwB,CAoBpC;AA5HD;;;;GAIG;AACH,2CAFU,6BAA6B,CAEyC;AAahF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,+CAFU,SAAS,CAuDjB;yCA7GuC,oEAAoE;8CAI/D,2DAA2D;0BAD/E,uCAAuC"}
1
+ {"version":3,"file":"avboit_unlit_draw.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/avboit_unlit_draw.js"],"names":[],"mappings":"AA+GA;;;;;;;;;;;GAWG;AACH;IAP0B,KAAK,EAApB,MAAM;IACgG,SAAS,EAA/G,OAAO,yDAAyD,EAAE,2BAA2B;IAE9E,MAAM,EAArB,MAAM;IAEJ,wBAAwB,CAoBpC;AA3HD;;;;GAIG;AACH,2CAFU,6BAA6B,CAEyC;AAahF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,+CAFU,SAAS,CAsDjB;yCA3GuC,oEAAoE;8CAI/D,2DAA2D;0BAD/E,uCAAuC"}
@@ -11,11 +11,10 @@ import { VOLUMETRICS_METADATA_STRUCT } from "../../../volumetrics/VOLUMETRICS_ME
11
11
  import { AVBOIT_EXTINCT_TRANSMITTANCE } from "./AVBOIT_CONSTANTS.js";
12
12
  import { AVBOIT_WARP_STRUCT } from "./AVBOIT_WARP_STRUCT.js";
13
13
  import { AVBOIT_DRAW_TARGETS } from "./avboit_draw_fragment_body.js";
14
- import { chunk_avboit_footprint_bias } from "./chunk_avboit_footprint_bias.js";
14
+ import { chunk_avboit_footprint_depth } from "./chunk_avboit_footprint_depth.js";
15
15
  import { chunk_avboit_premultiplied_contribution } from "./chunk_avboit_premultiplied_contribution.js";
16
16
  import { chunk_avboit_sample_transmittance } from "./chunk_avboit_sample_transmittance.js";
17
17
  import { chunk_avboit_unlit_varyings } from "./chunk_avboit_unlit_varyings.js";
18
- import { chunk_avboit_view_depth_to_virtual } from "./chunk_avboit_view_depth_to_virtual.js";
19
18
 
20
19
  /**
21
20
  * What the unlit draw reads once per pass: the view, the warp, the integral and the fog.
@@ -68,9 +67,9 @@ struct AVBOITUnlitDrawOutput {
68
67
 
69
68
  @fragment
70
69
  fn fs_main(fragment : AVBOITUnlitVaryings) -> AVBOITUnlitDrawOutput {
71
- // a ribbon seen at an angle runs through depth across a voxel; see avboit_footprint_bias. Taken
70
+ // a ribbon seen at an angle runs through depth across a voxel; see avboit_footprint_depth. Taken
72
71
  // first, in uniform control flow
73
- let footprint = avboit_footprint_bias(&warp, fwidth(avboit_view_depth_to_virtual(&warp, fragment.view_depth)));
72
+ let footprint = avboit_footprint_depth(fragment.view_depth, fwidth(1.0 / fragment.view_depth));
74
73
 
75
74
  if (fragment.color.a <= 0.0) {
76
75
  // faded out: covers nothing, and straight alpha carries no light without coverage
@@ -79,7 +78,7 @@ fn fs_main(fragment : AVBOITUnlitVaryings) -> AVBOITUnlitDrawOutput {
79
78
 
80
79
  let screen_uv = fragment.clip.xy / vec2<f32>(f32(view.width), f32(view.height));
81
80
 
82
- let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, screen_uv, fragment.view_depth, footprint);
81
+ let transmittance = avboit_sample_transmittance(&warp, tIntegral, sLinear, screen_uv, footprint);
83
82
 
84
83
  if (all(transmittance <= vec3<f32>(${AVBOIT_EXTINCT_TRANSMITTANCE}))) {
85
84
  // nothing this fragment contributes survives what is in front of it; skip the shading
@@ -103,8 +102,7 @@ fn fs_main(fragment : AVBOITUnlitVaryings) -> AVBOITUnlitDrawOutput {
103
102
  }
104
103
  `, [
105
104
  chunk_avboit_unlit_varyings,
106
- chunk_avboit_view_depth_to_virtual,
107
- chunk_avboit_footprint_bias,
105
+ chunk_avboit_footprint_depth,
108
106
  chunk_avboit_sample_transmittance,
109
107
  chunk_sample_volumetrics,
110
108
  chunk_avboit_premultiplied_contribution,
@@ -0,0 +1,34 @@
1
+ /**
2
+ * The nearest view depth a fragment's own surface reaches within one voxel of it — the depth the
3
+ * fragment has to look the integral up in front of (`avboit_sample_transmittance`), so that its own
4
+ * surface does not occlude it through the neighbouring voxel columns. Given the fragment's view depth
5
+ * and `inverse_depth_fwidth`, its `fwidth` of `1 / z_view`, which the caller takes in the fragment
6
+ * stage, in uniform control flow.
7
+ *
8
+ * The volume is 1/8 resolution and every column holds a surface at the depth under the column's
9
+ * centre. The draw reads the four nearest columns bilinearly, up to one voxel away along each screen
10
+ * axis. On a surface tilted away from the camera, the neighbour on its near side holds the same
11
+ * surface nearer by the surface's depth change over that distance, and a fragment that looked the
12
+ * integral up at its own depth would be occluded by it — by an amount that depends on where the pixel
13
+ * sits in its voxel, so the surface stripes in an 8-pixel pattern wherever something else shares its
14
+ * pixels (ledger entry 26).
15
+ *
16
+ * `1 / z_view` is linear across the screen for a plane, as device depth is, so its `fwidth` is the
17
+ * same everywhere on the plane and `AVBOIT_VOXEL_DOWNSCALE` times it is exactly how far the plane's
18
+ * `1 / z_view` runs over one voxel along both axes. The result is the plane's own depth there, the
19
+ * nearest any column the lookup reads can hold it: nearer than the fragment, and never nearer than
20
+ * the camera.
21
+ *
22
+ * What it costs: a tilted fragment is not occluded by what lies between that depth and itself, the
23
+ * depth the volume cannot tell apart from the surface at this resolution. On screen that is a band of
24
+ * at most the lookup's own reach beside where another surface crosses this one. A surface that curves
25
+ * away faster than its plane — the last pixel of a rim — is given more than it needs.
26
+ *
27
+ * A fragment that writes nothing into the volume — an additive particle's — has nothing of its own
28
+ * there to occlude it: its footprint depth is its own depth.
29
+ *
30
+ * @type {CodeChunk}
31
+ */
32
+ export const chunk_avboit_footprint_depth: CodeChunk;
33
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
34
+ //# sourceMappingURL=chunk_avboit_footprint_depth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk_avboit_footprint_depth.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_footprint_depth.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,2CAFU,SAAS,CASjB;0BAzCwB,uCAAuC"}
@@ -0,0 +1,42 @@
1
+ import { CodeChunk } from "../../../shader/compiler/CodeChunk.js";
2
+ import { AVBOIT_VOXEL_DOWNSCALE } from "./AVBOIT_CONSTANTS.js";
3
+
4
+ /**
5
+ * The nearest view depth a fragment's own surface reaches within one voxel of it — the depth the
6
+ * fragment has to look the integral up in front of (`avboit_sample_transmittance`), so that its own
7
+ * surface does not occlude it through the neighbouring voxel columns. Given the fragment's view depth
8
+ * and `inverse_depth_fwidth`, its `fwidth` of `1 / z_view`, which the caller takes in the fragment
9
+ * stage, in uniform control flow.
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 along each screen
13
+ * axis. On a surface tilted away from the camera, the neighbour on its near side holds the same
14
+ * surface nearer by the surface's depth change over that distance, and a fragment that looked the
15
+ * integral up at its own depth would be occluded by it — by an amount that depends on where the pixel
16
+ * sits in its voxel, so the surface stripes in an 8-pixel pattern wherever something else shares its
17
+ * pixels (ledger entry 26).
18
+ *
19
+ * `1 / z_view` is linear across the screen for a plane, as device depth is, so its `fwidth` is the
20
+ * same everywhere on the plane and `AVBOIT_VOXEL_DOWNSCALE` times it is exactly how far the plane's
21
+ * `1 / z_view` runs over one voxel along both axes. The result is the plane's own depth there, the
22
+ * nearest any column the lookup reads can hold it: nearer than the fragment, and never nearer than
23
+ * the camera.
24
+ *
25
+ * What it costs: a tilted fragment is not occluded by what lies between that depth and itself, the
26
+ * depth the volume cannot tell apart from the surface at this resolution. On screen that is a band of
27
+ * at most the lookup's own reach beside where another surface crosses this one. A surface that curves
28
+ * away faster than its plane — the last pixel of a rim — is given more than it needs.
29
+ *
30
+ * A fragment that writes nothing into the volume — an additive particle's — has nothing of its own
31
+ * there to occlude it: its footprint depth is its own depth.
32
+ *
33
+ * @type {CodeChunk}
34
+ */
35
+ export const chunk_avboit_footprint_depth = CodeChunk.from(
36
+ //language=WGSL
37
+ `
38
+ fn avboit_footprint_depth(z_view: f32, inverse_depth_fwidth: f32) -> f32 {
39
+ return 1.0 / (1.0 / z_view + ${AVBOIT_VOXEL_DOWNSCALE.toFixed(1)} * inverse_depth_fwidth);
40
+ }
41
+ `
42
+ );
@@ -1,5 +1,6 @@
1
1
  /**
2
- * The normalized depth coordinate into the integral texture for a fragment at `z_view` (plan §3.8).
2
+ * The normalized depth coordinate into the integral texture for a fragment that has to look in front
3
+ * of view depth `z_front` (plan §3.8): its own depth, or its `avboit_footprint_depth`.
3
4
  *
4
5
  * The sample bias is applied in *virtual* slices before the warp: inside an occupied run that is the
5
6
  * same as biasing the physical coordinate; at the start of a run it walks into the gap before it,
@@ -10,9 +11,9 @@
10
11
  * centre `(p + 0.5) / (P + 1)`: a run boundary lands exactly on a texel and the sample is the sum of
11
12
  * the slices before it, with no share of the slice after.
12
13
  *
13
- * `footprint_bias` is added to the base bias, in the same virtual slices: what the fragment's own
14
- * surface needs on top of it not to occlude itself through the neighbouring voxel columns
15
- * (`avboit_footprint_bias`), or `0` for a surface that writes nothing into the volume.
14
+ * `z_front` is the nearest depth the fragment's own surface was written at in the voxel columns the
15
+ * lookup reads (`avboit_footprint_depth`), and the base bias is taken in front of that; for a surface
16
+ * that writes nothing into the volume it is the fragment's own depth.
16
17
  *
17
18
  * @type {CodeChunk}
18
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_avboit_integral_depth_coordinate.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;GAiBG;AACH,qDAFU,SAAS,CAgBjB;0BAtCwB,uCAAuC"}
1
+ {"version":3,"file":"chunk_avboit_integral_depth_coordinate.d.ts","sourceRoot":"","sources":["../../../../../../../src/shade/renderer/rasterize/native/avboit/chunk_avboit_integral_depth_coordinate.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;GAkBG;AACH,qDAFU,SAAS,CAgBjB;0BAvCwB,uCAAuC"}
@@ -5,7 +5,8 @@ import { chunk_avboit_view_depth_to_virtual } from "./chunk_avboit_view_depth_to
5
5
  import { chunk_avboit_warp } from "./chunk_avboit_warp.js";
6
6
 
7
7
  /**
8
- * The normalized depth coordinate into the integral texture for a fragment at `z_view` (plan §3.8).
8
+ * The normalized depth coordinate into the integral texture for a fragment that has to look in front
9
+ * of view depth `z_front` (plan §3.8): its own depth, or its `avboit_footprint_depth`.
9
10
  *
10
11
  * The sample bias is applied in *virtual* slices before the warp: inside an occupied run that is the
11
12
  * same as biasing the physical coordinate; at the start of a run it walks into the gap before it,
@@ -16,18 +17,18 @@ import { chunk_avboit_warp } from "./chunk_avboit_warp.js";
16
17
  * centre `(p + 0.5) / (P + 1)`: a run boundary lands exactly on a texel and the sample is the sum of
17
18
  * the slices before it, with no share of the slice after.
18
19
  *
19
- * `footprint_bias` is added to the base bias, in the same virtual slices: what the fragment's own
20
- * surface needs on top of it not to occlude itself through the neighbouring voxel columns
21
- * (`avboit_footprint_bias`), or `0` for a surface that writes nothing into the volume.
20
+ * `z_front` is the nearest depth the fragment's own surface was written at in the voxel columns the
21
+ * lookup reads (`avboit_footprint_depth`), and the base bias is taken in front of that; for a surface
22
+ * that writes nothing into the volume it is the fragment's own depth.
22
23
  *
23
24
  * @type {CodeChunk}
24
25
  */
25
26
  export const chunk_avboit_integral_depth_coordinate = CodeChunk.from(
26
27
  //language=WGSL
27
28
  `
28
- fn avboit_integral_depth_coordinate(warp: ptr<storage, ${AVBOIT_WARP_STRUCT.wgsl_ref}, read>, z_view: f32, footprint_bias: f32) -> f32 {
29
- let v = avboit_view_depth_to_virtual(warp, z_view);
30
- let v_biased = max(v - ${AVBOIT_SAMPLE_BIAS_SLICES} - footprint_bias, 0.0);
29
+ fn avboit_integral_depth_coordinate(warp: ptr<storage, ${AVBOIT_WARP_STRUCT.wgsl_ref}, read>, z_front: f32) -> f32 {
30
+ let v = avboit_view_depth_to_virtual(warp, z_front);
31
+ let v_biased = max(v - ${AVBOIT_SAMPLE_BIAS_SLICES}, 0.0);
31
32
  let p = avboit_warp(warp, v_biased);
32
33
  return (p + 0.5) / f32((*warp).physical_count + 1u);
33
34
  }
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * The RGB transmittance of everything in front of a fragment: a trilinear sample of the integral
3
3
  * texture at the biased, warped depth, turned back into transmittance. The draw weights a fragment's
4
- * whole contribution by it. `footprint_bias` is the fragment's `avboit_footprint_bias`, or `0` for a
5
- * surface that writes nothing into the volume; see `avboit_integral_depth_coordinate`.
4
+ * whole contribution by it. `z_front` is the fragment's `avboit_footprint_depth`, or its own view depth
5
+ * for a surface that writes nothing into the volume; see `avboit_integral_depth_coordinate`.
6
6
  *
7
7
  * @type {CodeChunk}
8
8
  */