@woosh/meep-engine 3.75.0 → 3.77.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/editor/particles/effect/ParticleReferenceSimulation.d.ts +11 -0
  2. package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
  3. package/editor/particles/effect/ParticleReferenceSimulation.js +14 -0
  4. package/editor/view/particles/effect/ParticleGraphEditorView.js +1 -1
  5. package/package.json +1 -1
  6. package/src/engine/asset/GameAssetType.d.ts +1 -0
  7. package/src/engine/asset/GameAssetType.js +5 -1
  8. package/src/engine/asset/loaders/GroomAssetLoader.d.ts +33 -0
  9. package/src/engine/asset/loaders/GroomAssetLoader.d.ts.map +1 -0
  10. package/src/engine/asset/loaders/GroomAssetLoader.js +113 -0
  11. package/src/engine/graphics/ecs/hair/Hair.d.ts +54 -0
  12. package/src/engine/graphics/ecs/hair/Hair.d.ts.map +1 -0
  13. package/src/engine/graphics/ecs/hair/Hair.js +70 -0
  14. package/src/engine/graphics/ecs/hair/HairDynamics.d.ts +63 -0
  15. package/src/engine/graphics/ecs/hair/HairDynamics.d.ts.map +1 -0
  16. package/src/engine/graphics/ecs/hair/HairDynamics.js +82 -0
  17. package/src/engine/graphics/hair/Groom.d.ts +175 -0
  18. package/src/engine/graphics/hair/Groom.d.ts.map +1 -0
  19. package/src/engine/graphics/hair/Groom.js +249 -0
  20. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts +50 -0
  21. package/src/engine/graphics/hair/GroomSerializationAdapter.d.ts.map +1 -0
  22. package/src/engine/graphics/hair/GroomSerializationAdapter.js +150 -0
  23. package/src/engine/graphics/hair/GroomSerializationUpgrader_0_1.d.ts +8 -0
  24. package/src/engine/graphics/hair/GroomSerializationUpgrader_0_1.d.ts.map +1 -0
  25. package/src/engine/graphics/hair/GroomSerializationUpgrader_0_1.js +31 -0
  26. package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts +85 -0
  27. package/src/engine/graphics/hair/groom_bind_to_mesh.d.ts.map +1 -0
  28. package/src/engine/graphics/hair/groom_bind_to_mesh.js +216 -0
  29. package/src/engine/graphics/hair/groom_build_group.d.ts +90 -0
  30. package/src/engine/graphics/hair/groom_build_group.d.ts.map +1 -0
  31. package/src/engine/graphics/hair/groom_build_group.js +496 -0
  32. package/src/engine/graphics/hair/groom_build_guides.d.ts +43 -0
  33. package/src/engine/graphics/hair/groom_build_guides.d.ts.map +1 -0
  34. package/src/engine/graphics/hair/groom_build_guides.js +267 -0
  35. package/src/engine/graphics/hair/groom_generate_scalp.d.ts +29 -0
  36. package/src/engine/graphics/hair/groom_generate_scalp.d.ts.map +1 -0
  37. package/src/engine/graphics/hair/groom_generate_scalp.js +184 -0
  38. package/src/engine/graphics/hair/groom_rank_order.d.ts +15 -0
  39. package/src/engine/graphics/hair/groom_rank_order.d.ts.map +1 -0
  40. package/src/engine/graphics/hair/groom_rank_order.js +53 -0
  41. package/src/engine/graphics/hair/groom_root_spacing.d.ts +14 -0
  42. package/src/engine/graphics/hair/groom_root_spacing.d.ts.map +1 -0
  43. package/src/engine/graphics/hair/groom_root_spacing.js +253 -0
  44. package/src/engine/graphics3/HairColliderSystem.d.ts +59 -0
  45. package/src/engine/graphics3/HairColliderSystem.d.ts.map +1 -0
  46. package/src/engine/graphics3/HairColliderSystem.js +270 -0
  47. package/src/engine/graphics3/HairSystem.d.ts +119 -0
  48. package/src/engine/graphics3/HairSystem.d.ts.map +1 -0
  49. package/src/engine/graphics3/HairSystem.js +722 -0
  50. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  51. package/src/shade/assets/textures/hair_scattering.bin +0 -0
  52. package/src/shade/device/pipeline/PipelineEnquiry.d.ts +11 -0
  53. package/src/shade/device/pipeline/PipelineEnquiry.d.ts.map +1 -1
  54. package/src/shade/device/pipeline/PipelineEnquiry.js +13 -0
  55. package/src/shade/playground/hair/index.html +50 -0
  56. package/src/shade/playground/hair/main.d.ts +2 -0
  57. package/src/shade/playground/hair/main.d.ts.map +1 -0
  58. package/src/shade/playground/hair/main.js +297 -0
  59. package/src/shade/playground/hair_skinned/index.html +192 -0
  60. package/src/shade/playground/hair_skinned/main.d.ts +7 -0
  61. package/src/shade/playground/hair_skinned/main.d.ts.map +1 -0
  62. package/src/shade/playground/hair_skinned/main.js +481 -0
  63. package/src/shade/playground/hair_skinned/skinned_hair.d.ts +49 -0
  64. package/src/shade/playground/hair_skinned/skinned_hair.d.ts.map +1 -0
  65. package/src/shade/playground/hair_skinned/skinned_hair.js +362 -0
  66. package/src/shade/playground/screen_probes/README.md +54 -0
  67. package/src/shade/playground/screen_probes/index.html +271 -0
  68. package/src/shade/playground/screen_probes/main.d.ts +8 -0
  69. package/src/shade/playground/screen_probes/main.d.ts.map +1 -0
  70. package/src/shade/playground/screen_probes/main.js +527 -0
  71. package/src/shade/playground/sparks/README.md +36 -0
  72. package/src/shade/playground/sparks/index.html +145 -0
  73. package/src/shade/playground/sparks/main.d.ts +7 -0
  74. package/src/shade/playground/sparks/main.d.ts.map +1 -0
  75. package/src/shade/playground/sparks/main.js +312 -0
  76. package/src/shade/playground/sparks/sparks_effect.d.ts +72 -0
  77. package/src/shade/playground/sparks/sparks_effect.d.ts.map +1 -0
  78. package/src/shade/playground/sparks/sparks_effect.js +180 -0
  79. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  80. package/src/shade/renderer/Renderer.js +72 -11
  81. package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.d.ts +6 -0
  82. package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.d.ts.map +1 -1
  83. package/src/shade/renderer/STATIC_GRAPHICS_ENGINE_ASSETS.js +10 -0
  84. package/src/shade/renderer/acoustics/GPUAcousticLattice.d.ts +1 -1
  85. package/src/shade/renderer/acoustics/GPUAcousticProbes.d.ts +1 -1
  86. package/src/shade/renderer/acoustics/GPUAcoustics.d.ts +1 -1
  87. package/src/shade/renderer/animation/GPUAnimationManager.d.ts +3 -2
  88. package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
  89. package/src/shade/renderer/animation/GPUAnimationManager.js +74 -3
  90. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts +13 -3
  91. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.d.ts.map +1 -1
  92. package/src/shade/renderer/animation/skinning/GPUMeshSkinningContext.js +16 -5
  93. package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.js +8 -8
  94. package/src/shade/renderer/deferred/chunk_read_gBuffer_material.d.ts.map +1 -1
  95. package/src/shade/renderer/deferred/chunk_read_gBuffer_material.js +3 -1
  96. package/src/shade/renderer/deferred/chunk_shade_direct_lights.d.ts +23 -0
  97. package/src/shade/renderer/deferred/chunk_shade_direct_lights.d.ts.map +1 -0
  98. package/src/shade/renderer/deferred/chunk_shade_direct_lights.js +111 -0
  99. package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts +19 -6
  100. package/src/shade/renderer/deferred/chunk_shade_directional_lights.d.ts.map +1 -1
  101. package/src/shade/renderer/deferred/chunk_shade_directional_lights.js +30 -21
  102. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts +12 -22
  103. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts.map +1 -1
  104. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.js +20 -100
  105. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.d.ts.map +1 -1
  106. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js +6 -4
  107. package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.d.ts +15 -0
  108. package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.d.ts.map +1 -0
  109. package/src/shade/renderer/deferred/chunk_standard_material_direct_light_lobe.js +47 -0
  110. package/src/shade/renderer/extension/ShadowAtlas.d.ts +75 -0
  111. package/src/shade/renderer/extension/ShadowAtlas.d.ts.map +1 -0
  112. package/src/shade/renderer/extension/ShadowAtlas.js +133 -0
  113. package/src/shade/renderer/extension/ViewLighting.d.ts +101 -0
  114. package/src/shade/renderer/extension/ViewLighting.d.ts.map +1 -0
  115. package/src/shade/renderer/extension/ViewLighting.js +168 -0
  116. package/src/shade/renderer/fluid/GPUFluidCascade.d.ts +3 -3
  117. package/src/shade/renderer/fluid/GPUFluidCascadeStack.d.ts +1 -1
  118. package/src/shade/renderer/fluid/forcing/GPUFluidForcing.d.ts +7 -7
  119. package/src/shade/renderer/fluid/pressure/GPUFluidPressureSolve.d.ts +1 -1
  120. package/src/shade/renderer/fluid/query/GPUFluidQueries.d.ts +1 -1
  121. package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.d.ts.map +1 -1
  122. package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js +3 -1
  123. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts +37 -7
  124. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.d.ts.map +1 -1
  125. package/src/shade/renderer/global_illumination/probe_clipmap/brick/GPUSceneBrickClipmap.js +132 -8
  126. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts +3 -1
  127. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.d.ts.map +1 -1
  128. package/src/shade/renderer/global_illumination/probe_clipmap/brick/chunk_brick_clipmap_trace.js +6 -2
  129. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.d.ts.map +1 -1
  130. package/src/shade/renderer/global_illumination/probe_clipmap/probe/shader_probe_clipmap_indirect_lighting.js +3 -1
  131. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts +15 -7
  132. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.d.ts.map +1 -1
  133. package/src/shade/renderer/global_illumination/screen_probe/GPUScreenProbeGI.js +40 -9
  134. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts +23 -0
  135. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.d.ts.map +1 -1
  136. package/src/shade/renderer/global_illumination/screen_probe/SCREEN_PROBE.js +26 -0
  137. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.d.ts +1 -0
  138. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeDebugView.js +6 -0
  139. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts +13 -1
  140. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.d.ts.map +1 -1
  141. package/src/shade/renderer/global_illumination/screen_probe/ScreenProbeSettings.js +23 -1
  142. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.d.ts.map +1 -1
  143. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe.js +2 -0
  144. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts +29 -0
  145. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.d.ts.map +1 -0
  146. package/src/shade/renderer/global_illumination/screen_probe/chunk_screen_probe_rough_specular.js +102 -0
  147. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts +8 -1
  148. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.d.ts.map +1 -1
  149. package/src/shade/renderer/global_illumination/screen_probe/graph_screen_probe_debug_view.js +27 -1
  150. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts +4 -1
  151. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.d.ts.map +1 -1
  152. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_gather.js +4 -1
  153. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts +11 -5
  154. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.d.ts.map +1 -1
  155. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_indirect_lighting.js +28 -10
  156. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts +36 -2
  157. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.d.ts.map +1 -1
  158. package/src/shade/renderer/global_illumination/screen_probe/shader_screen_probe_resolve.js +149 -4
  159. package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.d.ts.map +1 -1
  160. package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.js +3 -1
  161. package/src/shade/renderer/global_illumination/sharc/sharc_constants.d.ts +0 -18
  162. package/src/shade/renderer/global_illumination/sharc/sharc_constants.d.ts.map +1 -1
  163. package/src/shade/renderer/global_illumination/sharc/sharc_constants.js +1 -21
  164. package/src/shade/renderer/hair/GPUHairSystem.d.ts +278 -0
  165. package/src/shade/renderer/hair/GPUHairSystem.d.ts.map +1 -0
  166. package/src/shade/renderer/hair/GPUHairSystem.js +2263 -0
  167. package/src/shade/renderer/hair/HAIR.d.ts +121 -0
  168. package/src/shade/renderer/hair/HAIR.d.ts.map +1 -0
  169. package/src/shade/renderer/hair/HAIR.js +136 -0
  170. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts +17 -0
  171. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.d.ts.map +1 -0
  172. package/src/shade/renderer/hair/HAIR_DATABASE_SPEC.js +104 -0
  173. package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.d.ts +15 -0
  174. package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.d.ts.map +1 -0
  175. package/src/shade/renderer/hair/HAIR_FRAME_STRUCTS.js +70 -0
  176. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts +139 -0
  177. package/src/shade/renderer/hair/HAIR_SIMULATION.d.ts.map +1 -0
  178. package/src/shade/renderer/hair/HAIR_SIMULATION.js +160 -0
  179. package/src/shade/renderer/hair/HairFrame.d.ts +41 -0
  180. package/src/shade/renderer/hair/HairFrame.d.ts.map +1 -0
  181. package/src/shade/renderer/hair/HairFrame.js +76 -0
  182. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts +42 -0
  183. package/src/shade/renderer/hair/chunk_hair_bsdf.d.ts.map +1 -0
  184. package/src/shade/renderer/hair/chunk_hair_bsdf.js +170 -0
  185. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts +37 -0
  186. package/src/shade/renderer/hair/chunk_hair_dual_scattering.d.ts.map +1 -0
  187. package/src/shade/renderer/hair/chunk_hair_dual_scattering.js +158 -0
  188. package/src/shade/renderer/hair/chunk_hair_guide.d.ts +59 -0
  189. package/src/shade/renderer/hair/chunk_hair_guide.d.ts.map +1 -0
  190. package/src/shade/renderer/hair/chunk_hair_guide.js +179 -0
  191. package/src/shade/renderer/hair/chunk_hair_pixel.d.ts +32 -0
  192. package/src/shade/renderer/hair/chunk_hair_pixel.d.ts.map +1 -0
  193. package/src/shade/renderer/hair/chunk_hair_pixel.js +116 -0
  194. package/src/shade/renderer/hair/chunk_hair_strand.d.ts +40 -0
  195. package/src/shade/renderer/hair/chunk_hair_strand.d.ts.map +1 -0
  196. package/src/shade/renderer/hair/chunk_hair_strand.js +85 -0
  197. package/src/shade/renderer/hair/chunk_hair_volume.d.ts +32 -0
  198. package/src/shade/renderer/hair/chunk_hair_volume.d.ts.map +1 -0
  199. package/src/shade/renderer/hair/chunk_hair_volume.js +115 -0
  200. package/src/shade/renderer/hair/hair_id_draw.d.ts +24 -0
  201. package/src/shade/renderer/hair/hair_id_draw.d.ts.map +1 -0
  202. package/src/shade/renderer/hair/hair_id_draw.js +135 -0
  203. package/src/shade/renderer/hair/hair_lighting.d.ts +53 -0
  204. package/src/shade/renderer/hair/hair_lighting.d.ts.map +1 -0
  205. package/src/shade/renderer/hair/hair_lighting.js +279 -0
  206. package/src/shade/renderer/hair/hair_scattering_lut.d.ts +75 -0
  207. package/src/shade/renderer/hair/hair_scattering_lut.d.ts.map +1 -0
  208. package/src/shade/renderer/hair/hair_scattering_lut.js +271 -0
  209. package/src/shade/renderer/hair/hair_shadow_draw.d.ts +32 -0
  210. package/src/shade/renderer/hair/hair_shadow_draw.d.ts.map +1 -0
  211. package/src/shade/renderer/hair/hair_shadow_draw.js +123 -0
  212. package/src/shade/renderer/hair/hair_stamp.d.ts +33 -0
  213. package/src/shade/renderer/hair/hair_stamp.d.ts.map +1 -0
  214. package/src/shade/renderer/hair/hair_stamp.js +175 -0
  215. package/src/shade/renderer/hair/shader_hair_classes.d.ts +22 -0
  216. package/src/shade/renderer/hair/shader_hair_classes.d.ts.map +1 -0
  217. package/src/shade/renderer/hair/shader_hair_classes.js +90 -0
  218. package/src/shade/renderer/hair/shader_hair_cull.d.ts +37 -0
  219. package/src/shade/renderer/hair/shader_hair_cull.d.ts.map +1 -0
  220. package/src/shade/renderer/hair/shader_hair_cull.js +251 -0
  221. package/src/shade/renderer/hair/shader_hair_lod.d.ts +39 -0
  222. package/src/shade/renderer/hair/shader_hair_lod.d.ts.map +1 -0
  223. package/src/shade/renderer/hair/shader_hair_lod.js +362 -0
  224. package/src/shade/renderer/hair/shader_hair_roots.d.ts +36 -0
  225. package/src/shade/renderer/hair/shader_hair_roots.d.ts.map +1 -0
  226. package/src/shade/renderer/hair/shader_hair_roots.js +261 -0
  227. package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts +44 -0
  228. package/src/shade/renderer/hair/shader_hair_shadow_list.d.ts.map +1 -0
  229. package/src/shade/renderer/hair/shader_hair_shadow_list.js +240 -0
  230. package/src/shade/renderer/hair/shader_hair_simulate.d.ts +55 -0
  231. package/src/shade/renderer/hair/shader_hair_simulate.d.ts.map +1 -0
  232. package/src/shade/renderer/hair/shader_hair_simulate.js +563 -0
  233. package/src/shade/renderer/hair/shader_hair_volume.d.ts +28 -0
  234. package/src/shade/renderer/hair/shader_hair_volume.d.ts.map +1 -0
  235. package/src/shade/renderer/hair/shader_hair_volume.js +154 -0
  236. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  237. package/src/shade/renderer/loader/usd/usd_build_scene.d.ts +31 -0
  238. package/src/shade/renderer/loader/usd/usd_build_scene.d.ts.map +1 -1
  239. package/src/shade/renderer/loader/usd/usd_build_scene.js +36 -21
  240. package/src/shade/renderer/loader/usd/usd_groom_extension.d.ts +65 -0
  241. package/src/shade/renderer/loader/usd/usd_groom_extension.d.ts.map +1 -0
  242. package/src/shade/renderer/loader/usd/usd_groom_extension.js +470 -0
  243. package/src/shade/renderer/particles/GPUParticleSystem.d.ts +8 -0
  244. package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
  245. package/src/shade/renderer/particles/GPUParticleSystem.js +28 -0
  246. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.d.ts.map +1 -1
  247. package/src/shade/renderer/particles/graph/ParticleNodeRegistry.js +22 -0
  248. package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.d.ts.map +1 -1
  249. package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.js +4 -0
  250. package/src/shade/renderer/particles/graph/groups/particle_groups_scene.d.ts +32 -0
  251. package/src/shade/renderer/particles/graph/groups/particle_groups_scene.d.ts.map +1 -0
  252. package/src/shade/renderer/particles/graph/groups/particle_groups_scene.js +80 -0
  253. package/src/shade/renderer/particles/graph/particle_node_parameters.d.ts.map +1 -1
  254. package/src/shade/renderer/particles/graph/particle_node_parameters.js +1 -0
  255. package/src/shade/renderer/particles/graph/particle_node_presentation.d.ts.map +1 -1
  256. package/src/shade/renderer/particles/graph/particle_node_presentation.js +12 -0
  257. package/src/shade/renderer/particles/graph_particles.d.ts +5 -1
  258. package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
  259. package/src/shade/renderer/particles/graph_particles.js +18 -3
  260. package/src/shade/renderer/particles/isa/InstructionStream.d.ts +25 -0
  261. package/src/shade/renderer/particles/isa/InstructionStream.d.ts.map +1 -1
  262. package/src/shade/renderer/particles/isa/InstructionStream.js +25 -0
  263. package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts +9 -0
  264. package/src/shade/renderer/particles/isa/ParticleVMISA.d.ts.map +1 -1
  265. package/src/shade/renderer/particles/isa/ParticleVMISA.js +20 -0
  266. package/src/shade/renderer/particles/isa/particle_program_reads_scene_sdf.d.ts +9 -0
  267. package/src/shade/renderer/particles/isa/particle_program_reads_scene_sdf.d.ts.map +1 -0
  268. package/src/shade/renderer/particles/isa/particle_program_reads_scene_sdf.js +29 -0
  269. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts +2 -1
  270. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.d.ts.map +1 -1
  271. package/src/shade/renderer/particles/optimizer/particle_program_equivalence.js +27 -5
  272. package/src/shade/renderer/particles/optimizer/particle_program_fuzz.js +1 -1
  273. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.d.ts.map +1 -1
  274. package/src/shade/renderer/particles/optimizer/particle_vm_semantics.js +5 -0
  275. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +7 -0
  276. package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
  277. package/src/shade/renderer/particles/runtime/EmitterRegistry.js +10 -0
  278. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +5 -0
  279. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
  280. package/src/shade/renderer/particles/runtime/ParticleEmitter.js +5 -0
  281. package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts +8 -0
  282. package/src/shade/renderer/particles/runtime/ProgramHeap.d.ts.map +1 -1
  283. package/src/shade/renderer/particles/runtime/ProgramHeap.js +25 -0
  284. package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts +1 -1
  285. package/src/shade/renderer/particles/shaders/shader_particle_emit.d.ts.map +1 -1
  286. package/src/shade/renderer/particles/shaders/shader_particle_emit.js +9 -3
  287. package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.d.ts.map +1 -1
  288. package/src/shade/renderer/particles/shaders/shader_particle_emit_wide.js +4 -2
  289. package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts +2 -2
  290. package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
  291. package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +10 -4
  292. package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.d.ts.map +1 -1
  293. package/src/shade/renderer/particles/shaders/shader_particle_simulate_wide.js +4 -2
  294. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts +14 -1
  295. package/src/shade/renderer/particles/vm/ParticleVMReference.d.ts.map +1 -1
  296. package/src/shade/renderer/particles/vm/ParticleVMReference.js +34 -1
  297. package/src/shade/renderer/particles/vm/chunk_particle_vm.d.ts.map +1 -1
  298. package/src/shade/renderer/particles/vm/chunk_particle_vm.js +10 -0
  299. package/src/shade/renderer/particles/vm/chunk_particle_vm_scene_sdf.d.ts +39 -0
  300. package/src/shade/renderer/particles/vm/chunk_particle_vm_scene_sdf.d.ts.map +1 -0
  301. package/src/shade/renderer/particles/vm/chunk_particle_vm_scene_sdf.js +90 -0
  302. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts +4 -1
  303. package/src/shade/renderer/particles/warmup/graph_particle_warmup.d.ts.map +1 -1
  304. package/src/shade/renderer/particles/warmup/graph_particle_warmup.js +14 -2
  305. package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.d.ts +1 -1
  306. package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.d.ts.map +1 -1
  307. package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance.js +9 -3
  308. package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.d.ts.map +1 -1
  309. package/src/shade/renderer/particles/warmup/shader_particle_warmup_advance_wide.js +4 -2
  310. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.d.ts.map +1 -1
  311. package/src/shade/renderer/path_tracer/shader/chunk_sample_material_data.js +4 -1
  312. package/src/shade/renderer/path_tracer/shader/chunk_shading_closure_from_material_data.d.ts.map +1 -1
  313. package/src/shade/renderer/path_tracer/shader/chunk_shading_closure_from_material_data.js +3 -1
  314. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  315. package/src/shade/renderer/postprocess/ssr/SSR.d.ts +4 -1
  316. package/src/shade/renderer/postprocess/ssr/SSR.d.ts.map +1 -1
  317. package/src/shade/renderer/postprocess/ssr/SSR.js +9 -0
  318. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts +16 -1
  319. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.d.ts.map +1 -1
  320. package/src/shade/renderer/postprocess/ssr/resolve/chunk_ssr_sample_radiance.js +47 -3
  321. package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.d.ts.map +1 -1
  322. package/src/shade/renderer/postprocess/ssr/resolve/ssr_resolve_shader.js +5 -3
  323. package/src/shade/renderer/postprocess/ssr/ssr_combine_shader.d.ts.map +1 -1
  324. package/src/shade/renderer/postprocess/ssr/ssr_combine_shader.js +6 -5
  325. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts +7 -4
  326. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts.map +1 -1
  327. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js +26 -16
  328. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.d.ts.map +1 -1
  329. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment.js +5 -2
  330. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.d.ts.map +1 -1
  331. package/src/shade/renderer/rasterize/native/avboit/avboit_draw_fragment_body.js +5 -0
  332. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.d.ts.map +1 -1
  333. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_splat.js +4 -1
  334. package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.d.ts.map +1 -1
  335. package/src/shade/renderer/rasterize/native/oit/oit_resolve_fragment_body.js +5 -1
  336. package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.d.ts.map +1 -1
  337. package/src/shade/renderer/rasterize/native/oit/shader_oit_generate_moments.js +7 -4
  338. package/src/shade/renderer/scene/GPUSceneContext.d.ts +7 -0
  339. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  340. package/src/shade/renderer/scene/GPUSceneContext.js +18 -0
  341. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts +13 -8
  342. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.d.ts.map +1 -1
  343. package/src/shade/renderer/shader/chunk/brdf/chunk_shadowed_F90.js +18 -14
  344. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts +3 -2
  345. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts.map +1 -1
  346. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.js +12 -4
  347. package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.d.ts.map +1 -1
  348. package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js +1 -0
  349. package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.js +1 -1
  350. package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.d.ts +16 -0
  351. package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.d.ts.map +1 -0
  352. package/src/shade/renderer/shader/chunk/material/chunk_metalness_to_specular_F90.js +25 -0
  353. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +2 -2
  354. package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance_gradient.d.ts +20 -0
  355. package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance_gradient.d.ts.map +1 -0
  356. package/src/shade/renderer/shader/chunk/sdf/chunk_shape_record_signed_distance_gradient.js +134 -0
  357. package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts +1 -1
  358. package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts +1 -1
  359. package/src/shade/renderer/shader/resource/ShaderResourceDescriptor.d.ts +1 -1
  360. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts +15 -0
  361. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.d.ts.map +1 -1
  362. package/src/shade/renderer/shadow/map/GPUSceneShadowmapContext.js +69 -0
  363. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_directional_atlas_casters.d.ts +10 -0
  364. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_directional_atlas_casters.d.ts.map +1 -0
  365. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_directional_atlas_casters.js +22 -0
  366. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.d.ts +2 -2
  367. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_point2.js +2 -2
  368. package/src/shade/renderer/water/query/GPUWaterQueries.d.ts +1 -1
  369. package/src/shade/renderer/wind/GPUSceneWind.d.ts +1 -1
@@ -210,8 +210,9 @@ export class GPUMeshSkinningContext {
210
210
  #dispatch_lookup_capacity = 0;
211
211
 
212
212
  /**
213
- * Side-buffer holding the previous-frame mesh-local skinned
214
- * positions for every clone meshlet's vertices. Laid out as
213
+ * Side-buffer holding where every clone meshlet's vertices stood
214
+ * a frame ago, in the space {@link prev_positions_buffer}
215
+ * states. Laid out as
215
216
  * tightly-packed `vec3<f32>` (3 × u32 words, f32 bit pattern)
216
217
  * per vertex; each clone meshlet owns a contiguous slice of
217
218
  * `vertex_count` vec3s starting at the offset recorded in
@@ -339,9 +340,19 @@ export class GPUMeshSkinningContext {
339
340
  }
340
341
 
341
342
  /**
342
- * Side-buffer of previous-frame mesh-local skinned positions for
343
- * the velocity post-pass. `null` until the first skinning binding
344
- * has been registered.
343
+ * Side-buffer of every clone vertex posed by the animation
344
+ * manager's `prev_skin_matrices_buffer`, for the velocity
345
+ * post-pass. `null` until the first skinning binding has been
346
+ * registered.
347
+ *
348
+ * The positions are in the mesh node's space of the **current**
349
+ * frame: the previous skin matrices are blended under this
350
+ * frame's `inverse(node.global)`, as the current ones are for the
351
+ * clone itself. A reader takes one to the world by the node's
352
+ * current `global`, and has where the vertex stood a frame ago —
353
+ * or where it stands now, on a frame the manager seeded
354
+ * "previous" from "current" for the skin, which reads as no
355
+ * motion.
345
356
  *
346
357
  * @returns {GPUBuffer|null}
347
358
  */
@@ -58,7 +58,7 @@ resources.createGroup()
58
58
  .addStorageBuffer('skinning_bindings', WebGPUArray.from(SKINNING_BINDING_STRUCT), false)
59
59
  .addStorageBuffer('dispatch_lookup', WebGPUArray.from(u32), false)
60
60
  // Per-meshlet base u32-word offset into the side-buffer that
61
- // holds previous-frame mesh-local positions. Sentinel
61
+ // holds where each vertex stood a frame ago. Sentinel
62
62
  // `0xFFFFFFFF` for non-clone meshlets — those skip the
63
63
  // prev-position write entirely, since the velocity post-pass
64
64
  // will fall back to per-object math for them.
@@ -259,23 +259,23 @@ fn main(
259
259
  meshlet_data[clone_pos_addr + 1u] = bitcast<u32>(p_skinned.y);
260
260
  meshlet_data[clone_pos_addr + 2u] = bitcast<u32>(p_skinned.z);
261
261
 
262
- // Previous-frame mesh-local position: same dual-quat math,
262
+ // Where the vertex stood a frame ago: same dual-quat math,
263
263
  // but driven by prev_skin_matrices instead of skin_matrices.
264
264
  // Written to the side-buffer at the per-meshlet base
265
265
  // offset + v * 3 u32 words. The velocity post-pass reads
266
266
  // these to interpolate per-vertex skin deformation across
267
- // the rasterized triangle (vs. just the rigid mesh.global
268
- // → mesh.prev_global delta that Stage 1's path captures).
267
+ // the rasterized triangle.
269
268
  //
270
269
  // Skipping the write when there's no slot for this meshlet
271
270
  // (non-clone — shouldn't be hit by this shader's dispatch
272
271
  // set, but the guard is cheap). The dual-quat build is
273
272
  // also skipped to save the per-joint work.
274
273
  if has_prev_positions {
275
- // Mesh-local for the same reason the current-frame
276
- // position is — the velocity pass reads these through
277
- // the same rasterizer transform, so the space they live
278
- // in has to match.
274
+ // In the mesh node's space of THIS frame, the same one
275
+ // the current-frame position is in: the previous skin
276
+ // matrices under this frame's inverse(mesh.global). A
277
+ // reader takes it to the world by this frame's
278
+ // mesh.global.
279
279
  let prev_dq_blend = skin_blend_mesh_local(
280
280
  inv_mesh_world,
281
281
  prev_skin_matrices[skin_base + j0],
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_read_gBuffer_material.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_read_gBuffer_material.js"],"names":[],"mappings":"AAUA,oDAwDE;0BA3DwB,iCAAiC"}
1
+ {"version":3,"file":"chunk_read_gBuffer_material.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_read_gBuffer_material.js"],"names":[],"mappings":"AAWA,oDAyDE;0BA5DwB,iCAAiC"}
@@ -4,6 +4,7 @@ import { chunk_rgbe9995_decode } from "../shader/chunk/color/rgbe9995/chunk_rgbe
4
4
  import { chunk_decode_g_buffer_metalness } from "../shader/chunk/material/chunk_decode_g_buffer_metalness.js";
5
5
  import { chunk_decode_g_buffer_roughness } from "../shader/chunk/material/chunk_decode_g_buffer_roughness.js";
6
6
  import { chunk_metalness_to_specular_color } from "../shader/chunk/material/chunk_metalness_to_specular_color.js";
7
+ import { chunk_metalness_to_specular_F90 } from "../shader/chunk/material/chunk_metalness_to_specular_F90.js";
7
8
  import { MATERIAL_SHADING_INFO_STRUCT } from "../shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js";
8
9
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
9
10
  import { GBUFFER_ALBEDO_RESOURCE, GBUFFER_EMISSIVE_RESOURCE, GBUFFER_PBR_RESOURCE } from "./GBUFFER_RESOURCES.js";
@@ -48,7 +49,7 @@ fn read_gBuffer_material(
48
49
  material.roughness = max(f_roughness, ${BSDF_ROUGHNESS_MINIMUM});
49
50
 
50
51
  material.specularF0 = metalness_to_specular_color(f_metalness, albedo);
51
- material.specularF90 = 1.0;
52
+ material.specularF90 = metalness_to_specular_F90(f_metalness, albedo);
52
53
  material.specularF0_dielectric = vec3(MIN_DIELECTRICS_F0);
53
54
  material.specularF0_metal = albedo;
54
55
 
@@ -59,6 +60,7 @@ fn read_gBuffer_material(
59
60
  `, [
60
61
  MATERIAL_SHADING_INFO_STRUCT.declaration_chunk,
61
62
  chunk_metalness_to_specular_color,
63
+ chunk_metalness_to_specular_F90,
62
64
  chunk_MIN_DIELECTRICS_F0,
63
65
  chunk_decode_g_buffer_roughness,
64
66
  chunk_decode_g_buffer_metalness,
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Every light that reaches a point: each occupied directional light, then every point and spot light of the froxel
3
+ * cluster the point falls in, each shadow-mapped at the point and handed to the including shader's lobe:
4
+ *
5
+ * ```wgsl
6
+ * fn shade_direct_lights(context: ptr<function, DirectLightContext>, position: vec3f, view_direction: vec3f,
7
+ * coord: vec2f, view_depth: f32)
8
+ * ```
9
+ *
10
+ * `coord` is the pixel and `view_depth` the planar view depth the cluster is looked up by. The lobe, its context and
11
+ * the normal the shadows are taken along are the including shader's, by name, as {@link chunk_shade_directional_lights}
12
+ * describes. A point or spot light that its shadow hides entirely is not handed on.
13
+ *
14
+ * **Every light the cell lists is handed on; there is no budget.** A surface's direct light changes at the pixel, and
15
+ * stopping part-way through the list would keep a different set in each of two neighbouring cells, which list
16
+ * different lights, and step at their shared edge. So the cost follows the scene: a point shades as many point and
17
+ * spot lights as its cell lists, each with its shadow map.
18
+ *
19
+ * @type {CodeChunk}
20
+ */
21
+ export const chunk_shade_direct_lights: CodeChunk;
22
+ import { CodeChunk } from "../shader/compiler/CodeChunk.js";
23
+ //# sourceMappingURL=chunk_shade_direct_lights.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk_shade_direct_lights.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_shade_direct_lights.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wCAFU,SAAS,CA4EjB;0BAnGwB,iCAAiC"}
@@ -0,0 +1,111 @@
1
+ import { chunk_light_cluster_counts } from "../light/cluster/chunk_light_cluster_counts.js";
2
+ import { chunk_light_cluster_metadata_by_position } from "../light/cluster/chunk_light_cluster_metadata_by_position.js";
3
+ import { LIGHT_CLUSTER_DATA_RESOURCE } from "../light/cluster/LIGHT_CLUSTER_RESOURCES.js";
4
+ import { LIGHT_DATA_RESOURCE } from "../light/LIGHT_DATA_RESOURCE.js";
5
+ import { chunk_get_point_light_info_by_index } from "../shader/chunk/light/io/chunk_get_point_light_info_by_index.js";
6
+ import { chunk_get_spot_light_info_by_index } from "../shader/chunk/light/io/chunk_get_spot_light_info_by_index.js";
7
+ import { INCIDENT_LIGHT_STRUCT } from "../shader/chunk/light/INCIDENT_LIGHT_STRUCT.js";
8
+ import { CodeChunk } from "../shader/compiler/CodeChunk.js";
9
+ import { chunk_shadowmap_get_light_visibility } from "../shadow/map/shader/chunk_shadowmap_get_light_visibility.js";
10
+ import { VIEW_RESOURCE } from "../view/VIEW_RESOURCE.js";
11
+ import { chunk_shade_directional_lights } from "./chunk_shade_directional_lights.js";
12
+
13
+ /**
14
+ * Every light that reaches a point: each occupied directional light, then every point and spot light of the froxel
15
+ * cluster the point falls in, each shadow-mapped at the point and handed to the including shader's lobe:
16
+ *
17
+ * ```wgsl
18
+ * fn shade_direct_lights(context: ptr<function, DirectLightContext>, position: vec3f, view_direction: vec3f,
19
+ * coord: vec2f, view_depth: f32)
20
+ * ```
21
+ *
22
+ * `coord` is the pixel and `view_depth` the planar view depth the cluster is looked up by. The lobe, its context and
23
+ * the normal the shadows are taken along are the including shader's, by name, as {@link chunk_shade_directional_lights}
24
+ * describes. A point or spot light that its shadow hides entirely is not handed on.
25
+ *
26
+ * **Every light the cell lists is handed on; there is no budget.** A surface's direct light changes at the pixel, and
27
+ * stopping part-way through the list would keep a different set in each of two neighbouring cells, which list
28
+ * different lights, and step at their shared edge. So the cost follows the scene: a point shades as many point and
29
+ * spot lights as its cell lists, each with its shadow map.
30
+ *
31
+ * @type {CodeChunk}
32
+ */
33
+ export const chunk_shade_direct_lights = CodeChunk.from(
34
+ //language=WGSL
35
+ `
36
+ fn shade_direct_lights(
37
+ context: ptr<function, DirectLightContext>,
38
+ position: vec3<f32>,
39
+ view_direction: vec3<f32>,
40
+ coord: vec2<f32>,
41
+ view_depth: f32,
42
+ ) {
43
+ shade_directional_lights(context, position, view_direction);
44
+
45
+ // Process local lights (point, then spot)
46
+ let cluster_metadata = light_cluster_metadata_by_position(
47
+ coord.xy,
48
+ view_depth,
49
+ vec2(view.width, view.height)
50
+ );
51
+
52
+ let cluster_offset = cluster_metadata.offset;
53
+ let point_count = light_cluster_count_point(cluster_metadata.counts);
54
+ let spot_count = light_cluster_count_spot(cluster_metadata.counts);
55
+
56
+ for (var i = 0u; i < point_count; i++) {
57
+ let light_index = cluster_data[cluster_offset + i];
58
+
59
+ var direct_light = get_point_light_info_by_index(&light_data, light_index, position);
60
+
61
+ let visibility = shadowmap_get_point_light_visibility(
62
+ &light_data,
63
+ light_index,
64
+ position,
65
+ direct_light_visibility_normal(context, direct_light)
66
+ );
67
+
68
+ direct_light.color *= visibility;
69
+
70
+ if (all(direct_light.color == vec3(0.0))) {
71
+ continue;
72
+ }
73
+
74
+ direct_light_lobe(context, direct_light, false);
75
+ }
76
+
77
+ for (var j = 0u; j < spot_count; j++) {
78
+ let light_index = cluster_data[cluster_offset + point_count + j];
79
+
80
+ var direct_light = get_spot_light_info_by_index(&light_data, light_index, position);
81
+
82
+ let visibility = shadowmap_get_spot_light_visibility(
83
+ &light_data,
84
+ light_index,
85
+ position,
86
+ direct_light_visibility_normal(context, direct_light)
87
+ );
88
+
89
+ direct_light.color *= visibility;
90
+
91
+ if (all(direct_light.color == vec3(0.0))) {
92
+ continue;
93
+ }
94
+
95
+ direct_light_lobe(context, direct_light, true);
96
+ }
97
+ }
98
+ `, [
99
+ INCIDENT_LIGHT_STRUCT.declaration_chunk,
100
+ chunk_shade_directional_lights,
101
+ chunk_light_cluster_metadata_by_position,
102
+ chunk_light_cluster_counts,
103
+ chunk_get_point_light_info_by_index,
104
+ chunk_get_spot_light_info_by_index,
105
+ chunk_shadowmap_get_light_visibility,
106
+ ]
107
+ );
108
+
109
+ chunk_shade_direct_lights.requireResource(LIGHT_CLUSTER_DATA_RESOURCE);
110
+ chunk_shade_direct_lights.requireResource(LIGHT_DATA_RESOURCE);
111
+ chunk_shade_direct_lights.requireResource(VIEW_RESOURCE);
@@ -1,11 +1,24 @@
1
1
  /**
2
- * Accumulate direct lighting from all occupied directional lights (max 32,
3
- * enforced by GPULightCollection) into `reflected_light`, using the CSM shadow
4
- * atlas for visibility.
2
+ * Every occupied directional light (at most 32, enforced by GPULightCollection), shadow-mapped at a point and
3
+ * handed to the including shader's lobe:
5
4
  *
6
- * Shared by the brute-force deferred shading path and the ReSTIR DI variant —
7
- * directional lights stay on the cascaded-shadow-map path in both, so the loop
8
- * lives here once.
5
+ * ```wgsl
6
+ * fn shade_directional_lights(context: ptr<function, DirectLightContext>, position: vec3f, view_direction: vec3f)
7
+ * ```
8
+ *
9
+ * The lobe is the including shader's, by name. It defines:
10
+ *
11
+ * - `struct DirectLightContext`, whatever the lobe reads and accumulates into;
12
+ * - `fn direct_light_lobe(context: ptr<function, DirectLightContext>, light: IncidentLight, atlas_casters: bool)`,
13
+ * given each light with its colour already multiplied by the light's shadow visibility at `position`, and
14
+ * whether that shadow holds the casters drawn through `ShadowAtlas`: a directional light's cascades and a spot
15
+ * light's map do, a virtual shadow map and a point light's do not;
16
+ * - `fn direct_light_visibility_normal(context: ptr<function, DirectLightContext>, light: IncidentLight) -> vec3f`,
17
+ * the normal the shadow lookup offsets along and culls back faces by: a light behind it is not visible. A lobe
18
+ * lit from every side (a strand) answers the light's own direction, which culls nothing and offsets nothing.
19
+ *
20
+ * Linked by the clustered and the ReSTIR direct shading alike, through {@link chunk_shade_direct_lights} for the
21
+ * former; the standard material's lobe is `chunk_standard_material_direct_light_lobe`.
9
22
  *
10
23
  * @type {CodeChunk}
11
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_shade_directional_lights.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_shade_directional_lights.js"],"names":[],"mappings":"AAcA;;;;;;;;;;GAUG;AACH,6CAFU,SAAS,CAuCjB;0BApDwB,iCAAiC"}
1
+ {"version":3,"file":"chunk_shade_directional_lights.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_shade_directional_lights.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,6CAFU,SAAS,CAqCjB;0BAhEwB,iCAAiC"}
@@ -4,22 +4,33 @@ import {
4
4
  import {
5
5
  chunk_get_directional_light_info_by_index
6
6
  } from "../shader/chunk/light/io/chunk_get_directional_light_info_by_index.js";
7
- import { REFLECTED_LIGHT_STRUCT } from "../shader/chunk/light/REFLECTED_LIGHT_STRUCT.js";
8
- import { chunk_re_direct_physical } from "../shader/chunk/material/chunk_re_direct_physical.js";
9
- import { GEOMETRIC_SHADING_INFO_STRUCT } from "../shader/chunk/material/GEOMETRIC_SHADING_INFO_STRUCT.js";
10
- import { MATERIAL_SHADING_INFO_STRUCT } from "../shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js";
7
+ import { INCIDENT_LIGHT_STRUCT } from "../shader/chunk/light/INCIDENT_LIGHT_STRUCT.js";
11
8
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
9
+ import { chunk_shadowmap_directional_atlas_casters } from "../shadow/map/shader/chunk_shadowmap_directional_atlas_casters.js";
12
10
  import { chunk_shadowmap_get_light_visibility } from "../shadow/map/shader/chunk_shadowmap_get_light_visibility.js";
13
11
  import { LIGHT_DATA_RESOURCE } from "../light/LIGHT_DATA_RESOURCE.js";
14
12
 
15
13
  /**
16
- * Accumulate direct lighting from all occupied directional lights (max 32,
17
- * enforced by GPULightCollection) into `reflected_light`, using the CSM shadow
18
- * atlas for visibility.
14
+ * Every occupied directional light (at most 32, enforced by GPULightCollection), shadow-mapped at a point and
15
+ * handed to the including shader's lobe:
19
16
  *
20
- * Shared by the brute-force deferred shading path and the ReSTIR DI variant —
21
- * directional lights stay on the cascaded-shadow-map path in both, so the loop
22
- * lives here once.
17
+ * ```wgsl
18
+ * fn shade_directional_lights(context: ptr<function, DirectLightContext>, position: vec3f, view_direction: vec3f)
19
+ * ```
20
+ *
21
+ * The lobe is the including shader's, by name. It defines:
22
+ *
23
+ * - `struct DirectLightContext`, whatever the lobe reads and accumulates into;
24
+ * - `fn direct_light_lobe(context: ptr<function, DirectLightContext>, light: IncidentLight, atlas_casters: bool)`,
25
+ * given each light with its colour already multiplied by the light's shadow visibility at `position`, and
26
+ * whether that shadow holds the casters drawn through `ShadowAtlas`: a directional light's cascades and a spot
27
+ * light's map do, a virtual shadow map and a point light's do not;
28
+ * - `fn direct_light_visibility_normal(context: ptr<function, DirectLightContext>, light: IncidentLight) -> vec3f`,
29
+ * the normal the shadow lookup offsets along and culls back faces by: a light behind it is not visible. A lobe
30
+ * lit from every side (a strand) answers the light's own direction, which culls nothing and offsets nothing.
31
+ *
32
+ * Linked by the clustered and the ReSTIR direct shading alike, through {@link chunk_shade_direct_lights} for the
33
+ * former; the standard material's lobe is `chunk_standard_material_direct_light_lobe`.
23
34
  *
24
35
  * @type {CodeChunk}
25
36
  */
@@ -27,9 +38,9 @@ export const chunk_shade_directional_lights = CodeChunk.from(
27
38
  //language=WGSL
28
39
  `
29
40
  fn shade_directional_lights(
30
- material: ${MATERIAL_SHADING_INFO_STRUCT.wgsl_ref},
31
- geometry: ${GEOMETRIC_SHADING_INFO_STRUCT.wgsl_ref},
32
- reflected_light: ptr<function, ${REFLECTED_LIGHT_STRUCT.wgsl_ref}>,
41
+ context: ptr<function, DirectLightContext>,
42
+ position: vec3<f32>,
43
+ view_direction: vec3<f32>,
33
44
  ) {
34
45
  var directional_bits = directional_lights_iteration_mask(&light_data);
35
46
  while (directional_bits != 0u) {
@@ -41,24 +52,22 @@ fn shade_directional_lights(
41
52
  let visibility = shadowmap_get_directional_light_visibility(
42
53
  &light_data,
43
54
  directional_index,
44
- geometry.position,
45
- geometry.view_direction,
46
- geometry.shading_normal
55
+ position,
56
+ view_direction,
57
+ direct_light_visibility_normal(context, direct_light)
47
58
  );
48
59
 
49
60
  direct_light.color *= visibility;
50
61
 
51
- re_direct_physical(direct_light, geometry, material, reflected_light);
62
+ direct_light_lobe(context, direct_light, SHADOWMAP_DIRECTIONAL_ATLAS_CASTERS);
52
63
  }
53
64
  }
54
65
  `, [
55
- REFLECTED_LIGHT_STRUCT.declaration_chunk,
56
- GEOMETRIC_SHADING_INFO_STRUCT.declaration_chunk,
57
- MATERIAL_SHADING_INFO_STRUCT.declaration_chunk,
58
- chunk_re_direct_physical,
66
+ INCIDENT_LIGHT_STRUCT.declaration_chunk,
59
67
  chunk_get_directional_light_info_by_index,
60
68
  chunk_directional_lights_iteration_mask,
61
69
  chunk_shadowmap_get_light_visibility,
70
+ chunk_shadowmap_directional_atlas_casters,
62
71
  ]
63
72
  );
64
73
 
@@ -1,29 +1,19 @@
1
1
  /**
2
- * Brute-force direct shading of a standard material: every occupied directional light through the
3
- * shared CSM helper, then a per-pixel loop over every point and spot light in the froxel cluster, each
4
- * shadow-mapped.
2
+ * Brute-force direct shading of a standard material: every light that reaches the point
3
+ * ({@link chunk_shade_direct_lights}: each occupied directional light, then every point and spot light in the froxel
4
+ * cluster, each shadow-mapped) through the standard material's lobe, then the multiple-scattering compensation and
5
+ * the emission.
5
6
  *
6
- * **One chunk, linked by both the deferred and the forward paths.** `shader_deferred_main` links it
7
- * (through the `_heavy` alias next door) and so does
8
- * `chunk_forward_shade_standard_fragment`. It used to exist twice under this one
9
- * WGSL function name, with the cluster metadata lookup, the point loop, the spot loop and the
10
- * emissive sum character-identical between the two and only the directional half differing: this copy
11
- * re-inlined `chunk_shade_directional_lights`' body where the other called it. Two files one edit away
12
- * from shading the same scene differently depending on which of them the pass reached.
7
+ * **One chunk, linked by both the deferred and the forward paths.** `shader_deferred_main` links it (through the
8
+ * `_deferred` choice next door) and so does `chunk_forward_shade_standard_fragment`, so two passes one edit apart
9
+ * cannot shade the same scene differently.
13
10
  *
14
- * The ReSTIR DI variant ({@link chunk_shade_standard_material_direct_restir}) is a genuinely different
15
- * function — it replaces the cluster loop with one resampled, ray-traced sample — and stays separate.
16
- * The deferred pass links one of the two by a shader switch
17
- * (`chunk_shade_standard_material_direct_deferred`), not via a runtime branch.
11
+ * The ReSTIR DI variant ({@link chunk_shade_standard_material_direct_restir}) is a genuinely different function — it
12
+ * replaces the cluster loop with one resampled, ray-traced sample — and stays separate. The deferred pass links one
13
+ * of the two by a shader switch (`chunk_shade_standard_material_direct_deferred`), not via a runtime branch.
18
14
  *
19
- * **Every light the cell lists is shaded; there is no budget.** A surface's direct light changes at the
20
- * pixel, and stopping part-way through the list would keep a different set in each of two neighbouring
21
- * cells, which list different lights, and step at their shared edge. So the cost follows the scene: a
22
- * pixel shades as many point and spot lights as its cell lists, each with its shadow map.
23
- *
24
- * A note carried by the inlined copy, kept because it is still true and now has nowhere else to sit:
25
- * a screen-space ray-trace for directional visibility would be wanted on the deferred path only, and
26
- * adding it means splitting these paths again deliberately rather than by accident.
15
+ * A screen-space ray-trace for directional visibility would be wanted on the deferred path only, and adding it means
16
+ * splitting these paths again deliberately rather than by accident.
27
17
  *
28
18
  * @type {CodeChunk}
29
19
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_shade_standard_material_direct.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_shade_standard_material_direct.js"],"names":[],"mappings":"AAgBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,mDAFU,SAAS,CA0FjB;0BA5HwB,iCAAiC"}
1
+ {"version":3,"file":"chunk_shade_standard_material_direct.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_shade_standard_material_direct.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;;;;;GAkBG;AACH,mDAFU,SAAS,CAgCjB;0BArDwB,iCAAiC"}
@@ -1,45 +1,27 @@
1
- import { chunk_light_cluster_counts } from "../light/cluster/chunk_light_cluster_counts.js";
2
- import { chunk_light_cluster_metadata_by_position } from "../light/cluster/chunk_light_cluster_metadata_by_position.js";
3
- import { chunk_get_point_light_info_by_index } from "../shader/chunk/light/io/chunk_get_point_light_info_by_index.js";
4
- import { chunk_get_spot_light_info_by_index } from "../shader/chunk/light/io/chunk_get_spot_light_info_by_index.js";
5
1
  import { REFLECTED_LIGHT_STRUCT } from "../shader/chunk/light/REFLECTED_LIGHT_STRUCT.js";
6
2
  import { chunk_re_direct_multiscatter } from "../shader/chunk/material/chunk_re_direct_multiscatter.js";
7
- import { chunk_re_direct_physical } from "../shader/chunk/material/chunk_re_direct_physical.js";
8
3
  import { GEOMETRIC_SHADING_INFO_STRUCT } from "../shader/chunk/material/GEOMETRIC_SHADING_INFO_STRUCT.js";
9
4
  import { MATERIAL_SHADING_INFO_STRUCT } from "../shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js";
10
5
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
11
- import { chunk_shadowmap_get_light_visibility } from "../shadow/map/shader/chunk_shadowmap_get_light_visibility.js";
12
- import { chunk_shade_directional_lights } from "./chunk_shade_directional_lights.js";
13
- import { LIGHT_CLUSTER_DATA_RESOURCE } from "../light/cluster/LIGHT_CLUSTER_RESOURCES.js";
14
- import { LIGHT_DATA_RESOURCE } from "../light/LIGHT_DATA_RESOURCE.js";
15
- import { VIEW_RESOURCE } from "../view/VIEW_RESOURCE.js";
6
+ import { chunk_shade_direct_lights } from "./chunk_shade_direct_lights.js";
7
+ import { chunk_standard_material_direct_light_lobe } from "./chunk_standard_material_direct_light_lobe.js";
16
8
 
17
9
  /**
18
- * Brute-force direct shading of a standard material: every occupied directional light through the
19
- * shared CSM helper, then a per-pixel loop over every point and spot light in the froxel cluster, each
20
- * shadow-mapped.
10
+ * Brute-force direct shading of a standard material: every light that reaches the point
11
+ * ({@link chunk_shade_direct_lights}: each occupied directional light, then every point and spot light in the froxel
12
+ * cluster, each shadow-mapped) through the standard material's lobe, then the multiple-scattering compensation and
13
+ * the emission.
21
14
  *
22
- * **One chunk, linked by both the deferred and the forward paths.** `shader_deferred_main` links it
23
- * (through the `_heavy` alias next door) and so does
24
- * `chunk_forward_shade_standard_fragment`. It used to exist twice under this one
25
- * WGSL function name, with the cluster metadata lookup, the point loop, the spot loop and the
26
- * emissive sum character-identical between the two and only the directional half differing: this copy
27
- * re-inlined `chunk_shade_directional_lights`' body where the other called it. Two files one edit away
28
- * from shading the same scene differently depending on which of them the pass reached.
15
+ * **One chunk, linked by both the deferred and the forward paths.** `shader_deferred_main` links it (through the
16
+ * `_deferred` choice next door) and so does `chunk_forward_shade_standard_fragment`, so two passes one edit apart
17
+ * cannot shade the same scene differently.
29
18
  *
30
- * The ReSTIR DI variant ({@link chunk_shade_standard_material_direct_restir}) is a genuinely different
31
- * function — it replaces the cluster loop with one resampled, ray-traced sample — and stays separate.
32
- * The deferred pass links one of the two by a shader switch
33
- * (`chunk_shade_standard_material_direct_deferred`), not via a runtime branch.
19
+ * The ReSTIR DI variant ({@link chunk_shade_standard_material_direct_restir}) is a genuinely different function — it
20
+ * replaces the cluster loop with one resampled, ray-traced sample — and stays separate. The deferred pass links one
21
+ * of the two by a shader switch (`chunk_shade_standard_material_direct_deferred`), not via a runtime branch.
34
22
  *
35
- * **Every light the cell lists is shaded; there is no budget.** A surface's direct light changes at the
36
- * pixel, and stopping part-way through the list would keep a different set in each of two neighbouring
37
- * cells, which list different lights, and step at their shared edge. So the cost follows the scene: a
38
- * pixel shades as many point and spot lights as its cell lists, each with its shadow map.
39
- *
40
- * A note carried by the inlined copy, kept because it is still true and now has nowhere else to sit:
41
- * a screen-space ray-trace for directional visibility would be wanted on the deferred path only, and
42
- * adding it means splitting these paths again deliberately rather than by accident.
23
+ * A screen-space ray-trace for directional visibility would be wanted on the deferred path only, and adding it means
24
+ * splitting these paths again deliberately rather than by accident.
43
25
  *
44
26
  * @type {CodeChunk}
45
27
  */
@@ -53,68 +35,15 @@ fn shade_standard_material_direct(
53
35
  view_depth: f32,
54
36
  ) -> vec3<f32>{
55
37
 
56
- var reflected_light : ${REFLECTED_LIGHT_STRUCT.wgsl_ref};
57
-
58
- shade_directional_lights(material, geometry, &reflected_light);
59
-
60
- // Process local lights (point, then spot)
61
- let cluster_metadata = light_cluster_metadata_by_position(
62
- coord.xy,
63
- view_depth,
64
- vec2(view.width, view.height)
65
- );
66
-
67
- let cluster_offset = cluster_metadata.offset;
68
- let point_count = light_cluster_count_point(cluster_metadata.counts);
69
- let spot_count = light_cluster_count_spot(cluster_metadata.counts);
70
-
71
- for (var i = 0u; i < point_count; i++) {
72
- let light_index = cluster_data[cluster_offset + i];
73
-
74
- var direct_light = get_point_light_info_by_index(&light_data, light_index, geometry.position);
75
-
76
- let visibility = shadowmap_get_point_light_visibility(
77
- &light_data,
78
- light_index,
79
- geometry.position,
80
- geometry.shading_normal
81
- );
82
-
83
- direct_light.color *= visibility;
38
+ var context = DirectLightContext(material, geometry, ${REFLECTED_LIGHT_STRUCT.wgsl_ref}());
84
39
 
85
- if (all(direct_light.color == vec3(0.0))) {
86
- continue;
87
- }
40
+ shade_direct_lights(&context, geometry.position, geometry.view_direction, coord, view_depth);
88
41
 
89
- re_direct_physical(direct_light, geometry, material, &reflected_light);
90
- }
91
-
92
- for (var j = 0u; j < spot_count; j++) {
93
- let light_index = cluster_data[cluster_offset + point_count + j];
94
-
95
- var direct_light = get_spot_light_info_by_index(&light_data, light_index, geometry.position);
96
-
97
- let visibility = shadowmap_get_spot_light_visibility(
98
- &light_data,
99
- light_index,
100
- geometry.position,
101
- geometry.shading_normal
102
- );
103
-
104
- direct_light.color *= visibility;
105
-
106
- if (all(direct_light.color == vec3(0.0))) {
107
- continue;
108
- }
109
-
110
- re_direct_physical(direct_light, geometry, material, &reflected_light);
111
- }
112
-
113
- re_direct_multiscatter(geometry, material, &reflected_light);
42
+ re_direct_multiscatter(geometry, material, &context.reflected);
114
43
 
115
44
  var total_emissive_radiance = vec3(material.emissive);
116
45
 
117
- let outgoing_light = reflected_light.diffuse + reflected_light.specular + total_emissive_radiance;
46
+ let outgoing_light = context.reflected.diffuse + context.reflected.specular + total_emissive_radiance;
118
47
 
119
48
  return outgoing_light;
120
49
  }
@@ -122,17 +51,8 @@ fn shade_standard_material_direct(
122
51
  REFLECTED_LIGHT_STRUCT.declaration_chunk,
123
52
  GEOMETRIC_SHADING_INFO_STRUCT.declaration_chunk,
124
53
  MATERIAL_SHADING_INFO_STRUCT.declaration_chunk,
125
- chunk_re_direct_physical,
54
+ chunk_standard_material_direct_light_lobe,
55
+ chunk_shade_direct_lights,
126
56
  chunk_re_direct_multiscatter,
127
- chunk_light_cluster_metadata_by_position,
128
- chunk_light_cluster_counts,
129
- chunk_get_point_light_info_by_index,
130
- chunk_get_spot_light_info_by_index,
131
- chunk_shade_directional_lights,
132
- chunk_shadowmap_get_light_visibility,
133
57
  ]
134
58
  );
135
-
136
- chunk_shade_standard_material_direct.requireResource(LIGHT_CLUSTER_DATA_RESOURCE);
137
- chunk_shade_standard_material_direct.requireResource(LIGHT_DATA_RESOURCE);
138
- chunk_shade_standard_material_direct.requireResource(VIEW_RESOURCE);
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_shade_standard_material_direct_restir.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AACH,0DAFU,SAAS,CAgCjB;0BA/CwB,iCAAiC"}
1
+ {"version":3,"file":"chunk_shade_standard_material_direct_restir.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js"],"names":[],"mappings":"AASA;;;;;;;;;;;;GAYG;AACH,0DAFU,SAAS,CAiCjB;0BAjDwB,iCAAiC"}
@@ -4,6 +4,7 @@ import { GEOMETRIC_SHADING_INFO_STRUCT } from "../shader/chunk/material/GEOMETRI
4
4
  import { MATERIAL_SHADING_INFO_STRUCT } from "../shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js";
5
5
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
6
6
  import { chunk_shade_directional_lights } from "./chunk_shade_directional_lights.js";
7
+ import { chunk_standard_material_direct_light_lobe } from "./chunk_standard_material_direct_light_lobe.js";
7
8
  import { RESTIR_RADIANCE_RESOURCE } from "../restir/di/RESTIR_RADIANCE_RESOURCE.js";
8
9
 
9
10
  /**
@@ -29,23 +30,24 @@ fn shade_standard_material_direct(
29
30
  view_depth: f32,
30
31
  ) -> vec3<f32>{
31
32
 
32
- var reflected_light : ${REFLECTED_LIGHT_STRUCT.wgsl_ref};
33
+ var context = DirectLightContext(material, geometry, ${REFLECTED_LIGHT_STRUCT.wgsl_ref}());
33
34
 
34
- shade_directional_lights(material, geometry, &reflected_light);
35
+ shade_directional_lights(&context, geometry.position, geometry.view_direction);
35
36
 
36
- re_direct_multiscatter(geometry, material, &reflected_light);
37
+ re_direct_multiscatter(geometry, material, &context.reflected);
37
38
 
38
39
  // ReSTIR-resolved point + spot direct lighting (already visibility-tested).
39
40
  let restir_radiance = textureLoad(tRestirRadiance, vec2<u32>(coord), 0).rgb;
40
41
 
41
42
  let total_emissive_radiance = vec3(material.emissive);
42
43
 
43
- return reflected_light.diffuse + reflected_light.specular + total_emissive_radiance + restir_radiance;
44
+ return context.reflected.diffuse + context.reflected.specular + total_emissive_radiance + restir_radiance;
44
45
  }
45
46
  `, [
46
47
  REFLECTED_LIGHT_STRUCT.declaration_chunk,
47
48
  GEOMETRIC_SHADING_INFO_STRUCT.declaration_chunk,
48
49
  MATERIAL_SHADING_INFO_STRUCT.declaration_chunk,
50
+ chunk_standard_material_direct_light_lobe,
49
51
  chunk_shade_directional_lights,
50
52
  chunk_re_direct_multiscatter,
51
53
  ]
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The standard material's lobe for the direct-light loops ({@link chunk_shade_direct_lights},
3
+ * `chunk_shade_directional_lights`): its context carries the material and the geometry at the shaded point and
4
+ * accumulates the reflected light, and each light goes through `re_direct_physical`. Shadows are taken along the
5
+ * shading normal.
6
+ *
7
+ * ```wgsl
8
+ * struct DirectLightContext { material: MaterialShadingInfo, geometry: GeometricShadingInfo, reflected: ReflectedLight }
9
+ * ```
10
+ *
11
+ * @type {CodeChunk}
12
+ */
13
+ export const chunk_standard_material_direct_light_lobe: CodeChunk;
14
+ import { CodeChunk } from "../shader/compiler/CodeChunk.js";
15
+ //# sourceMappingURL=chunk_standard_material_direct_light_lobe.d.ts.map