@woosh/meep-engine 3.46.0 → 3.49.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 (827) hide show
  1. package/build/bundle-worker-terrain.js +1 -1
  2. package/editor/actions/concrete/TransformModifyAction.d.ts.map +1 -1
  3. package/editor/actions/concrete/TransformModifyAction.js +10 -2
  4. package/editor/ecs/component/FieldDescriptor.js +15 -0
  5. package/editor/ecs/component/createObjectEditor.js +41 -12
  6. package/editor/ecs/component/editors/ecs/Transform64Editor.d.ts.map +1 -1
  7. package/editor/ecs/component/editors/ecs/Transform64Editor.js +77 -70
  8. package/editor/particles/effect/ParticleReferenceSimulation.d.ts +1 -2
  9. package/editor/particles/effect/ParticleReferenceSimulation.d.ts.map +1 -1
  10. package/editor/particles/effect/ParticleReferenceSimulation.js +2 -4
  11. package/editor/tools/TransformToolV2.d.ts.map +1 -1
  12. package/editor/tools/TransformToolV2.js +4 -0
  13. package/editor/tools/v2/TransformControls.d.ts.map +1 -1
  14. package/editor/tools/v2/TransformControls.js +7 -0
  15. package/editor/view/ecs/EntityEditor.d.ts.map +1 -1
  16. package/editor/view/ecs/EntityEditor.js +4 -2
  17. package/editor/view/particles/effect/ParticleGraphEditorView.js +1 -1
  18. package/package.json +1 -1
  19. package/src/core/collection/array/array_insert_at.d.ts +16 -0
  20. package/src/core/collection/array/array_insert_at.d.ts.map +1 -0
  21. package/src/core/collection/array/array_insert_at.js +32 -0
  22. package/src/core/collection/array/array_remove_at.d.ts +15 -0
  23. package/src/core/collection/array/array_remove_at.d.ts.map +1 -0
  24. package/src/core/collection/array/array_remove_at.js +30 -0
  25. package/src/core/geom/3d/quaternion/quat3_look_rotation.d.ts +37 -0
  26. package/src/core/geom/3d/quaternion/quat3_look_rotation.d.ts.map +1 -0
  27. package/src/core/geom/3d/quaternion/quat3_look_rotation.js +172 -0
  28. package/src/core/geom/Quaternion.d.ts +1 -0
  29. package/src/core/geom/Quaternion.d.ts.map +1 -1
  30. package/src/core/geom/Quaternion.js +12 -48
  31. package/src/engine/Engine.d.ts.map +1 -1
  32. package/src/engine/Engine.js +9 -4
  33. package/src/engine/ecs/async/WORKER_SYSTEM_PLAN.md +27 -11
  34. package/src/engine/ecs/storage/populateEngineSerializationRegistry.d.ts.map +1 -1
  35. package/src/engine/ecs/storage/populateEngineSerializationRegistry.js +21 -0
  36. package/src/engine/ecs/transform/t64_look_rotation.d.ts +4 -4
  37. package/src/engine/ecs/transform/t64_look_rotation.d.ts.map +1 -1
  38. package/src/engine/ecs/transform/t64_look_rotation.js +7 -18
  39. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.d.ts.map +1 -1
  40. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraControllerSystem.js +30 -1
  41. package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts +2 -2
  42. package/src/engine/graphics/ecs/particles/ParticleEffect.d.ts.map +1 -1
  43. package/src/engine/graphics/ecs/particles/ParticleEffect.js +7 -7
  44. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts +8 -0
  45. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.d.ts.map +1 -1
  46. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationAdapter.js +11 -3
  47. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts +26 -0
  48. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.d.ts.map +1 -0
  49. package/src/engine/graphics/ecs/particles/ParticleEffectSerializationUpgrader_1_2.js +91 -0
  50. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts +6 -0
  51. package/src/engine/graphics3/GPUParticleEmitterSystem.d.ts.map +1 -1
  52. package/src/engine/graphics3/GPUParticleEmitterSystem.js +72 -29
  53. package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
  54. package/src/engine/graphics3/GraphicsEngine.js +8 -1
  55. package/src/engine/graphics3/ParticipatingMedia.d.ts +84 -1
  56. package/src/engine/graphics3/ParticipatingMedia.d.ts.map +1 -1
  57. package/src/engine/graphics3/ParticipatingMedia.js +139 -5
  58. package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.d.ts +6 -2
  59. package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.d.ts.map +1 -1
  60. package/src/engine/graphics3/ParticipatingMediaSerializationAdapter.js +29 -4
  61. package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.d.ts +10 -0
  62. package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.d.ts.map +1 -0
  63. package/src/engine/graphics3/ParticipatingMediaSerializationUpgrader_0_1.js +38 -0
  64. package/src/engine/graphics3/ParticipatingMediaSystem.d.ts.map +1 -1
  65. package/src/engine/graphics3/ParticipatingMediaSystem.js +46 -3
  66. package/src/engine/input/devices/KeyboardDevice.d.ts +1 -0
  67. package/src/engine/input/devices/KeyboardDevice.d.ts.map +1 -1
  68. package/src/engine/input/devices/KeyboardDevice.js +7 -6
  69. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.d.ts.map +1 -1
  70. package/src/engine/navigation/ecs/path_following/PathFollowingSystem.js +15 -2
  71. package/src/engine/network/CONGESTION_CONTROL.md +9 -9
  72. package/src/engine/network/MESSAGE_TRANSPORT.md +364 -0
  73. package/src/engine/network/NetworkSession.d.ts +47 -16
  74. package/src/engine/network/NetworkSession.d.ts.map +1 -1
  75. package/src/engine/network/NetworkSession.js +556 -292
  76. package/src/engine/network/README.md +104 -28
  77. package/src/engine/network/SMOOTHNESS_DESIGN.md +13 -5
  78. package/src/engine/network/diagnostics/BandwidthMeter.d.ts +1 -1
  79. package/src/engine/network/diagnostics/BandwidthMeter.js +1 -1
  80. package/src/engine/network/orchestrator/HostJoin.d.ts +111 -0
  81. package/src/engine/network/orchestrator/HostJoin.d.ts.map +1 -0
  82. package/src/engine/network/orchestrator/HostJoin.js +271 -0
  83. package/src/engine/network/orchestrator/NetworkPeer.d.ts +151 -112
  84. package/src/engine/network/orchestrator/NetworkPeer.d.ts.map +1 -1
  85. package/src/engine/network/orchestrator/NetworkPeer.js +450 -499
  86. package/src/engine/network/orchestrator/PendingSlices.d.ts +30 -0
  87. package/src/engine/network/orchestrator/PendingSlices.d.ts.map +1 -0
  88. package/src/engine/network/orchestrator/PendingSlices.js +83 -0
  89. package/src/engine/network/orchestrator/ReliableFrames.d.ts +34 -0
  90. package/src/engine/network/orchestrator/ReliableFrames.d.ts.map +1 -0
  91. package/src/engine/network/orchestrator/ReliableFrames.js +96 -0
  92. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts +77 -10
  93. package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
  94. package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +236 -61
  95. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts +59 -23
  96. package/src/engine/network/orchestrator/ServerAuthoritativeServer.d.ts.map +1 -1
  97. package/src/engine/network/orchestrator/ServerAuthoritativeServer.js +213 -198
  98. package/src/engine/network/replication/Replicator.d.ts +15 -4
  99. package/src/engine/network/replication/Replicator.d.ts.map +1 -1
  100. package/src/engine/network/replication/Replicator.js +57 -17
  101. package/src/engine/network/sim/ActionLog.d.ts +32 -5
  102. package/src/engine/network/sim/ActionLog.d.ts.map +1 -1
  103. package/src/engine/network/sim/ActionLog.js +47 -5
  104. package/src/engine/network/sim/SimActionExecutor.d.ts +42 -2
  105. package/src/engine/network/sim/SimActionExecutor.d.ts.map +1 -1
  106. package/src/engine/network/sim/SimActionExecutor.js +100 -4
  107. package/src/engine/network/sim/Snapshotter.d.ts +12 -0
  108. package/src/engine/network/sim/Snapshotter.d.ts.map +1 -1
  109. package/src/engine/network/sim/Snapshotter.js +43 -0
  110. package/src/engine/network/state/Baseline.d.ts +1 -1
  111. package/src/engine/network/state/Baseline.js +1 -1
  112. package/src/engine/network/state/FrameBufferRing.d.ts +25 -6
  113. package/src/engine/network/state/FrameBufferRing.d.ts.map +1 -1
  114. package/src/engine/network/state/FrameBufferRing.js +51 -6
  115. package/src/engine/network/state/InputRing.d.ts +4 -0
  116. package/src/engine/network/state/InputRing.d.ts.map +1 -1
  117. package/src/engine/network/state/InputRing.js +7 -0
  118. package/src/engine/network/state/RecordArrivalRing.d.ts +57 -0
  119. package/src/engine/network/state/RecordArrivalRing.d.ts.map +1 -0
  120. package/src/engine/network/state/RecordArrivalRing.js +144 -0
  121. package/src/engine/network/transport/DeferredTransport.d.ts.map +1 -1
  122. package/src/engine/network/transport/DeferredTransport.js +1 -0
  123. package/src/engine/network/transport/LoopbackTransport.d.ts.map +1 -1
  124. package/src/engine/network/transport/LoopbackTransport.js +4 -2
  125. package/src/engine/network/transport/Transport.d.ts +7 -0
  126. package/src/engine/network/transport/Transport.d.ts.map +1 -1
  127. package/src/engine/network/transport/Transport.js +8 -0
  128. package/src/engine/network/transport/adapters/NodeUDPTransport.d.ts.map +1 -1
  129. package/src/engine/network/transport/adapters/NodeUDPTransport.js +20 -5
  130. package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.d.ts.map +1 -1
  131. package/src/engine/network/transport/adapters/WebRTCDataChannelTransport.js +8 -0
  132. package/src/engine/network/transport/adapters/WebTransportTransport.d.ts.map +1 -1
  133. package/src/engine/network/transport/adapters/WebTransportTransport.js +6 -0
  134. package/src/engine/network/transport/connection/Connection.d.ts +191 -0
  135. package/src/engine/network/transport/connection/Connection.d.ts.map +1 -0
  136. package/src/engine/network/transport/connection/Connection.js +1262 -0
  137. package/src/engine/network/transport/connection/RangeSet.d.ts +94 -0
  138. package/src/engine/network/transport/connection/RangeSet.d.ts.map +1 -0
  139. package/src/engine/network/transport/connection/RangeSet.js +260 -0
  140. package/src/engine/network/transport/connection/RxStream.d.ts +48 -0
  141. package/src/engine/network/transport/connection/RxStream.d.ts.map +1 -0
  142. package/src/engine/network/transport/connection/RxStream.js +211 -0
  143. package/src/engine/network/transport/connection/TxStream.d.ts +90 -0
  144. package/src/engine/network/transport/connection/TxStream.d.ts.map +1 -0
  145. package/src/engine/network/transport/connection/TxStream.js +243 -0
  146. package/src/engine/network/transport/connection/bytes_copy.d.ts +17 -0
  147. package/src/engine/network/transport/connection/bytes_copy.d.ts.map +1 -0
  148. package/src/engine/network/transport/connection/bytes_copy.js +34 -0
  149. package/src/engine/network/transport/connection/varint.d.ts +46 -0
  150. package/src/engine/network/transport/connection/varint.d.ts.map +1 -0
  151. package/src/engine/network/transport/connection/varint.js +107 -0
  152. package/src/engine/physics/cloth/MEASUREMENTS.md +354 -0
  153. package/src/engine/physics/cloth/PLAN.md +85 -5
  154. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts +0 -12
  155. package/src/engine/physics/cloth/ecs/ClothInstance.d.ts.map +1 -1
  156. package/src/engine/physics/cloth/ecs/ClothInstance.js +0 -13
  157. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts +2 -1
  158. package/src/engine/physics/cloth/ecs/ClothSystem.d.ts.map +1 -1
  159. package/src/engine/physics/cloth/ecs/ClothSystem.js +7 -1
  160. package/src/engine/physics/cloth/ecs/ClothWorld.d.ts.map +1 -1
  161. package/src/engine/physics/cloth/ecs/ClothWorld.js +4 -15
  162. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts +2 -1
  163. package/src/engine/physics/cloth/ecs/WorkerClothSystem.d.ts.map +1 -1
  164. package/src/engine/physics/cloth/ecs/WorkerClothSystem.js +6 -1
  165. package/src/engine/physics/cloth/ecs/cloth_build_rows.d.ts.map +1 -1
  166. package/src/engine/physics/cloth/ecs/cloth_build_rows.js +20 -10
  167. package/src/engine/physics/cloth/playground/collide.html +5 -3
  168. package/src/engine/physics/cloth/playground/collide_main.js +14 -13
  169. package/src/engine/physics/cloth/solver/ClothState.d.ts +30 -2
  170. package/src/engine/physics/cloth/solver/ClothState.d.ts.map +1 -1
  171. package/src/engine/physics/cloth/solver/ClothState.js +62 -4
  172. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts +11 -3
  173. package/src/engine/physics/cloth/solver/cloth_self_find.d.ts.map +1 -1
  174. package/src/engine/physics/cloth/solver/cloth_self_find.js +52 -11
  175. package/src/engine/physics/cloth/solver/cloth_self_radius.d.ts +42 -0
  176. package/src/engine/physics/cloth/solver/cloth_self_radius.d.ts.map +1 -0
  177. package/src/engine/physics/cloth/solver/cloth_self_radius.js +64 -0
  178. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts +99 -24
  179. package/src/engine/physics/cloth/solver/cloth_solver_constants.d.ts.map +1 -1
  180. package/src/engine/physics/cloth/solver/cloth_solver_constants.js +102 -25
  181. package/src/engine/physics/cloth/solver/cloth_step.d.ts +5 -1
  182. package/src/engine/physics/cloth/solver/cloth_step.d.ts.map +1 -1
  183. package/src/engine/physics/cloth/solver/cloth_step.js +13 -3
  184. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts +0 -1
  185. package/src/engine/physics/cloth/solver/cloth_step_instance.d.ts.map +1 -1
  186. package/src/engine/physics/cloth/solver/cloth_step_instance.js +12 -14
  187. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts +23 -4
  188. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.d.ts.map +1 -1
  189. package/src/engine/physics/cloth/solver/constraint/cloth_contact_row.js +36 -8
  190. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.d.ts.map +1 -1
  191. package/src/engine/physics/cloth/solver/constraint/cloth_self_row.js +4 -2
  192. package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
  193. package/src/engine/sound/ecs/audio/AudioEmitter.d.ts +38 -7
  194. package/src/engine/sound/ecs/audio/AudioEmitter.d.ts.map +1 -1
  195. package/src/engine/sound/ecs/audio/AudioEmitter.js +35 -7
  196. package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.d.ts.map +1 -1
  197. package/src/engine/sound/ecs/audio/AudioEmitterSerializationAdapter.js +5 -1
  198. package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.d.ts +18 -0
  199. package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.d.ts.map +1 -0
  200. package/src/engine/sound/ecs/audio/AudioEmitterSerializationUpgrader_0_1.js +48 -0
  201. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts +12 -2
  202. package/src/engine/sound/ecs/audio/AudioEmitterSystem.d.ts.map +1 -1
  203. package/src/engine/sound/ecs/audio/AudioEmitterSystem.js +173 -9
  204. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts +9 -3
  205. package/src/engine/sound/ecs/audio/LiveEmitterSet.d.ts.map +1 -1
  206. package/src/engine/sound/ecs/audio/LiveEmitterSet.js +28 -8
  207. package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts +8 -0
  208. package/src/engine/sound/ecs/trigger/AudioEventTrigger.d.ts.map +1 -1
  209. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationAdapter.d.ts.map +1 -1
  210. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationAdapter.js +5 -1
  211. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.d.ts +18 -0
  212. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.d.ts.map +1 -0
  213. package/src/engine/sound/ecs/trigger/AudioEventTriggerSerializationUpgrader_0_1.js +51 -0
  214. package/src/engine/sound/ecs/trigger/AudioEventTriggerSystem.d.ts.map +1 -1
  215. package/src/engine/sound/ecs/trigger/AudioEventTriggerSystem.js +15 -1
  216. package/src/engine/sound/sopra/README.md +768 -644
  217. package/src/engine/sound/sopra/SopraEngine.d.ts +104 -8
  218. package/src/engine/sound/sopra/SopraEngine.d.ts.map +1 -1
  219. package/src/engine/sound/sopra/SopraEngine.js +327 -12
  220. package/src/engine/sound/sopra/definition/EventDescription.d.ts +28 -2
  221. package/src/engine/sound/sopra/definition/EventDescription.d.ts.map +1 -1
  222. package/src/engine/sound/sopra/definition/EventDescription.js +55 -5
  223. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts +10 -0
  224. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.d.ts.map +1 -1
  225. package/src/engine/sound/sopra/definition/EventDescriptionSerializationAdapter.js +77 -55
  226. package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.d.ts +31 -0
  227. package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.d.ts.map +1 -0
  228. package/src/engine/sound/sopra/definition/EventDescriptionSerializationUpgrader_0_1.js +75 -0
  229. package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.d.ts +38 -9
  230. package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.d.ts.map +1 -1
  231. package/src/engine/sound/sopra/definition/effect/AbstractAudioEffect.js +34 -5
  232. package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts +7 -2
  233. package/src/engine/sound/sopra/definition/effect/CompressorEffect.d.ts.map +1 -1
  234. package/src/engine/sound/sopra/definition/effect/CompressorEffect.js +137 -122
  235. package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts +3 -1
  236. package/src/engine/sound/sopra/definition/effect/EqEffect.d.ts.map +1 -1
  237. package/src/engine/sound/sopra/definition/effect/EqEffect.js +146 -131
  238. package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts +1 -0
  239. package/src/engine/sound/sopra/definition/effect/ReverbEffect.d.ts.map +1 -1
  240. package/src/engine/sound/sopra/definition/effect/ReverbEffect.js +6 -1
  241. package/src/engine/sound/sopra/runtime/BusGraph.d.ts +44 -2
  242. package/src/engine/sound/sopra/runtime/BusGraph.d.ts.map +1 -1
  243. package/src/engine/sound/sopra/runtime/BusGraph.js +83 -43
  244. package/src/engine/sound/sopra/runtime/EffectChain.d.ts +96 -0
  245. package/src/engine/sound/sopra/runtime/EffectChain.d.ts.map +1 -0
  246. package/src/engine/sound/sopra/runtime/EffectChain.js +286 -0
  247. package/src/engine/sound/sopra/runtime/EffectParamOverrides.d.ts +123 -0
  248. package/src/engine/sound/sopra/runtime/EffectParamOverrides.d.ts.map +1 -0
  249. package/src/engine/sound/sopra/runtime/EffectParamOverrides.js +320 -0
  250. package/src/engine/sound/sopra/runtime/EventInstance.d.ts +55 -5
  251. package/src/engine/sound/sopra/runtime/EventInstance.d.ts.map +1 -1
  252. package/src/engine/sound/sopra/runtime/EventInstance.js +201 -26
  253. package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.d.ts +2 -1
  254. package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.d.ts.map +1 -1
  255. package/src/engine/sound/sopra/serialization/populateSopraSerializationRegistry.js +6 -1
  256. package/src/engine/sound/sopra/serialization/sopraSerializationHarness.d.ts +15 -0
  257. package/src/engine/sound/sopra/serialization/sopraSerializationHarness.d.ts.map +1 -1
  258. package/src/engine/sound/sopra/serialization/sopraSerializationHarness.js +32 -0
  259. package/src/engine/sound/sopra/util/MockAudioContext.d.ts.map +1 -1
  260. package/src/engine/sound/sopra/util/MockAudioContext.js +3 -0
  261. package/src/engine/sound/sopra/util/fadeOutAndStop.d.ts +13 -3
  262. package/src/engine/sound/sopra/util/fadeOutAndStop.d.ts.map +1 -1
  263. package/src/engine/sound/sopra/util/fadeOutAndStop.js +25 -13
  264. package/src/shade/RENDERER_CONTRACT.md +6 -3
  265. package/src/shade/device/SHADE_DEVICE_FLOOR.d.ts +24 -0
  266. package/src/shade/device/SHADE_DEVICE_FLOOR.d.ts.map +1 -0
  267. package/src/shade/device/SHADE_DEVICE_FLOOR.js +34 -0
  268. package/src/shade/device/ShadeDeviceFailure.d.ts +12 -5
  269. package/src/shade/device/ShadeDeviceFailure.d.ts.map +1 -1
  270. package/src/shade/device/ShadeDeviceFailure.js +17 -8
  271. package/src/shade/device/ShadeDeviceFailureReason.d.ts +1 -1
  272. package/src/shade/device/ShadeDeviceFailureReason.js +2 -2
  273. package/src/shade/device/mock/SoftwareGPUDevice.d.ts +15 -0
  274. package/src/shade/device/mock/SoftwareGPUDevice.d.ts.map +1 -1
  275. package/src/shade/device/mock/SoftwareGPUDevice.js +21 -0
  276. package/src/shade/device/pipeline/ComputePipelineManager.d.ts +20 -0
  277. package/src/shade/device/pipeline/ComputePipelineManager.d.ts.map +1 -1
  278. package/src/shade/device/pipeline/ComputePipelineManager.js +80 -6
  279. package/src/shade/device/pipeline/PipelineEnquiry.d.ts +52 -0
  280. package/src/shade/device/pipeline/PipelineEnquiry.d.ts.map +1 -0
  281. package/src/shade/device/pipeline/PipelineEnquiry.js +63 -0
  282. package/src/shade/device/pipeline/RenderPipelineManager.d.ts +21 -0
  283. package/src/shade/device/pipeline/RenderPipelineManager.d.ts.map +1 -1
  284. package/src/shade/device/pipeline/RenderPipelineManager.js +84 -4
  285. package/src/shade/device/shade_device_floor_unmet.d.ts +13 -0
  286. package/src/shade/device/shade_device_floor_unmet.d.ts.map +1 -0
  287. package/src/shade/device/shade_device_floor_unmet.js +32 -0
  288. package/src/shade/playground/contact_shadows/ContactShadowLab.d.ts +137 -0
  289. package/src/shade/playground/contact_shadows/ContactShadowLab.d.ts.map +1 -0
  290. package/src/shade/playground/contact_shadows/ContactShadowLab.js +654 -0
  291. package/src/shade/playground/contact_shadows/README.md +126 -0
  292. package/src/shade/playground/contact_shadows/index.html +191 -0
  293. package/src/shade/playground/contact_shadows/main.d.ts +2 -0
  294. package/src/shade/playground/contact_shadows/main.d.ts.map +1 -0
  295. package/src/shade/playground/contact_shadows/main.js +888 -0
  296. package/src/shade/playground/contact_shadows/scenes.d.ts +48 -0
  297. package/src/shade/playground/contact_shadows/scenes.d.ts.map +1 -0
  298. package/src/shade/playground/contact_shadows/scenes.js +620 -0
  299. package/src/shade/playground/contact_shadows/shader_contact_lab_composite.d.ts +36 -0
  300. package/src/shade/playground/contact_shadows/shader_contact_lab_composite.d.ts.map +1 -0
  301. package/src/shade/playground/contact_shadows/shader_contact_lab_composite.js +245 -0
  302. package/src/shade/playground/contact_shadows/shader_contact_lab_reference.d.ts +15 -0
  303. package/src/shade/playground/contact_shadows/shader_contact_lab_reference.d.ts.map +1 -0
  304. package/src/shade/playground/contact_shadows/shader_contact_lab_reference.js +120 -0
  305. package/src/shade/playground/contact_shadows/shader_contact_lab_stats.d.ts +55 -0
  306. package/src/shade/playground/contact_shadows/shader_contact_lab_stats.d.ts.map +1 -0
  307. package/src/shade/playground/contact_shadows/shader_contact_lab_stats.js +216 -0
  308. package/src/shade/playground/contact_shadows/shader_contact_lab_view.d.ts +20 -0
  309. package/src/shade/playground/contact_shadows/shader_contact_lab_view.d.ts.map +1 -0
  310. package/src/shade/playground/contact_shadows/shader_contact_lab_view.js +114 -0
  311. package/src/shade/playground/contact_shadows/shader_contact_shadow_march.d.ts +11 -0
  312. package/src/shade/playground/contact_shadows/shader_contact_shadow_march.d.ts.map +1 -0
  313. package/src/shade/playground/contact_shadows/shader_contact_shadow_march.js +90 -0
  314. package/src/shade/playground/contact_shadows/textures.d.ts +16 -0
  315. package/src/shade/playground/contact_shadows/textures.d.ts.map +1 -0
  316. package/src/shade/playground/contact_shadows/textures.js +123 -0
  317. package/src/shade/playground/particle_ecs/README.md +1 -1
  318. package/src/shade/playground/particle_ecs/effects/flame.json +1932 -1881
  319. package/src/shade/playground/particle_ecs/effects/smoke.json +99 -1
  320. package/src/shade/playground/particle_ecs/effects/soot.json +152 -145
  321. package/src/shade/playground/tonemap_sdr/README.md +90 -0
  322. package/src/shade/playground/tonemap_sdr/ToneMapCompare.d.ts +105 -0
  323. package/src/shade/playground/tonemap_sdr/ToneMapCompare.d.ts.map +1 -0
  324. package/src/shade/playground/tonemap_sdr/ToneMapCompare.js +380 -0
  325. package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.d.ts +32 -0
  326. package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.d.ts.map +1 -0
  327. package/src/shade/playground/tonemap_sdr/chunk_tonemap_gt7_sdr_reference.js +104 -0
  328. package/src/shade/playground/tonemap_sdr/index.html +90 -0
  329. package/src/shade/playground/tonemap_sdr/main.d.ts +2 -0
  330. package/src/shade/playground/tonemap_sdr/main.d.ts.map +1 -0
  331. package/src/shade/playground/tonemap_sdr/main.js +306 -0
  332. package/src/shade/playground/tonemap_sdr/scenes.d.ts +26 -0
  333. package/src/shade/playground/tonemap_sdr/scenes.d.ts.map +1 -0
  334. package/src/shade/playground/tonemap_sdr/scenes.js +404 -0
  335. package/src/shade/playground/volumetrics_froxel/main.d.ts.map +1 -1
  336. package/src/shade/playground/volumetrics_froxel/main.js +85 -4
  337. package/src/shade/playground/water_refraction/README.md +26 -18
  338. package/src/shade/playground/water_refraction/index.html +1 -1
  339. package/src/shade/renderer/Renderer.d.ts +37 -3
  340. package/src/shade/renderer/Renderer.d.ts.map +1 -1
  341. package/src/shade/renderer/Renderer.js +237 -67
  342. package/src/shade/renderer/ShadeToneMappingMode.d.ts +14 -0
  343. package/src/shade/renderer/ShadeToneMappingMode.d.ts.map +1 -0
  344. package/src/shade/renderer/ShadeToneMappingMode.js +30 -0
  345. package/src/shade/renderer/animation/GPUAnimationManager.d.ts +9 -0
  346. package/src/shade/renderer/animation/GPUAnimationManager.d.ts.map +1 -1
  347. package/src/shade/renderer/animation/GPUAnimationManager.js +14 -0
  348. package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.d.ts.map +1 -1
  349. package/src/shade/renderer/animation/skinning/shader_meshlet_apply_skinning.js +5 -3
  350. package/src/shade/renderer/buffer/GPUBufferAllocator.d.ts.map +1 -1
  351. package/src/shade/renderer/buffer/GPUBufferAllocator.js +9 -0
  352. package/src/shade/renderer/buffer/buffer_pool_ops.d.ts +21 -12
  353. package/src/shade/renderer/buffer/buffer_pool_ops.d.ts.map +1 -1
  354. package/src/shade/renderer/buffer/buffer_pool_ops.js +18 -19
  355. package/src/shade/renderer/buffer/table/GPUDatabase.d.ts +7 -0
  356. package/src/shade/renderer/buffer/table/GPUDatabase.d.ts.map +1 -1
  357. package/src/shade/renderer/buffer/table/GPUDatabase.js +12 -0
  358. package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts +8 -0
  359. package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.d.ts.map +1 -1
  360. package/src/shade/renderer/buffer/table/single/GPUSingleTypeTable.js +12 -0
  361. package/src/shade/renderer/camera/GPUCameraContext.d.ts.map +1 -1
  362. package/src/shade/renderer/camera/GPUCameraContext.js +19 -8
  363. package/src/shade/renderer/deferred/chunk_read_gBuffer_material.d.ts.map +1 -1
  364. package/src/shade/renderer/deferred/chunk_read_gBuffer_material.js +4 -0
  365. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.d.ts.map +1 -1
  366. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct.js +4 -0
  367. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.d.ts.map +1 -1
  368. package/src/shade/renderer/deferred/chunk_shade_standard_material_direct_restir.js +4 -0
  369. package/src/shade/renderer/deferred/shader_deferred_main.d.ts.map +1 -1
  370. package/src/shade/renderer/deferred/shader_deferred_main.js +3 -0
  371. package/src/shade/renderer/deferred/shader_tonemap_HDR.d.ts +6 -0
  372. package/src/shade/renderer/deferred/shader_tonemap_HDR.d.ts.map +1 -1
  373. package/src/shade/renderer/deferred/shader_tonemap_HDR.js +13 -3
  374. package/src/shade/renderer/deferred/shader_tonemap_HDR_none.d.ts +9 -0
  375. package/src/shade/renderer/deferred/shader_tonemap_HDR_none.d.ts.map +1 -0
  376. package/src/shade/renderer/deferred/shader_tonemap_HDR_none.js +63 -0
  377. package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.d.ts +10 -0
  378. package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.d.ts.map +1 -0
  379. package/src/shade/renderer/deferred/shader_tonemap_HDR_pbr_neutral.js +87 -0
  380. package/src/shade/renderer/deferred/shader_tonemap_LDR.d.ts +6 -0
  381. package/src/shade/renderer/deferred/shader_tonemap_LDR.d.ts.map +1 -1
  382. package/src/shade/renderer/deferred/shader_tonemap_LDR.js +23 -5
  383. package/src/shade/renderer/deferred/shader_tonemap_LDR_none.d.ts +9 -0
  384. package/src/shade/renderer/deferred/shader_tonemap_LDR_none.d.ts.map +1 -0
  385. package/src/shade/renderer/deferred/shader_tonemap_LDR_none.js +68 -0
  386. package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.d.ts +10 -0
  387. package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.d.ts.map +1 -0
  388. package/src/shade/renderer/deferred/shader_tonemap_LDR_pbr_neutral.js +73 -0
  389. package/src/shade/renderer/geometry/meshlet/MeshletBatch.d.ts.map +1 -1
  390. package/src/shade/renderer/geometry/meshlet/MeshletBatch.js +58 -9
  391. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts +35 -25
  392. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.d.ts.map +1 -1
  393. package/src/shade/renderer/geometry/sdf/GPUGeometrySDFManager.js +97 -196
  394. package/src/shade/renderer/geometry/sdf/shader_build_sdf.d.ts.map +1 -1
  395. package/src/shade/renderer/geometry/sdf/shader_build_sdf.js +121 -129
  396. package/src/shade/renderer/global_illumination/brick4/gpu/bake/brick4_bake_basic.d.ts.map +1 -1
  397. package/src/shade/renderer/global_illumination/brick4/gpu/bake/brick4_bake_basic.js +3 -0
  398. package/src/shade/renderer/global_illumination/brick4/gpu/bake/shader_brick4_bake_probes.d.ts.map +1 -1
  399. package/src/shade/renderer/global_illumination/brick4/gpu/bake/shader_brick4_bake_probes.js +4 -0
  400. package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.d.ts.map +1 -1
  401. package/src/shade/renderer/global_illumination/brick4/gpu/draw/shader_brick4_indirect_lighting.js +4 -0
  402. package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.d.ts.map +1 -1
  403. package/src/shade/renderer/global_illumination/lpv/bake/GPULightProbeVolumeRenderer.js +3 -0
  404. package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.d.ts.map +1 -1
  405. package/src/shade/renderer/global_illumination/lpv/deprecated/probe_trace_compute_shader_code.js +4 -0
  406. package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.d.ts.map +1 -1
  407. package/src/shade/renderer/global_illumination/probe/octahedral/graph_sample_light_probes.js +4 -0
  408. package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.d.ts.map +1 -1
  409. package/src/shade/renderer/global_illumination/shader_resolve_indirect_lighting.js +4 -0
  410. package/src/shade/renderer/gpu_primitive/bvh/GPU_BVH_BUILD_PLAN.md +131 -1
  411. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.d.ts +7 -0
  412. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.d.ts.map +1 -1
  413. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_delta.js +45 -38
  414. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.d.ts +2 -0
  415. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.d.ts.map +1 -1
  416. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_determine_range.js +81 -79
  417. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.d.ts +2 -0
  418. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.d.ts.map +1 -1
  419. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_find_split.js +5 -3
  420. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.d.ts +21 -0
  421. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.d.ts.map +1 -0
  422. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_internal_children.js +42 -0
  423. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.d.ts +19 -0
  424. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.d.ts.map +1 -0
  425. package/src/shade/renderer/gpu_primitive/bvh/chunk_bvh_morton_code.js +44 -0
  426. package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.d.ts +23 -5
  427. package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.d.ts.map +1 -1
  428. package/src/shade/renderer/gpu_primitive/bvh/graph_bvh_build_lbvh.js +139 -23
  429. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.d.ts +25 -0
  430. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.d.ts.map +1 -0
  431. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_build_single_workgroup.js +179 -0
  432. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.d.ts +2 -2
  433. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.d.ts.map +1 -1
  434. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_emit_hierarchy.js +7 -16
  435. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.d.ts +3 -4
  436. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.d.ts.map +1 -1
  437. package/src/shade/renderer/gpu_primitive/bvh/shader_bvh_morton.js +6 -23
  438. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts +11 -0
  439. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.d.ts.map +1 -1
  440. package/src/shade/renderer/gpu_primitive/indirect/IndirectComputeCommandBuildPass.js +14 -3
  441. package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.d.ts +10 -0
  442. package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.d.ts.map +1 -1
  443. package/src/shade/renderer/gpu_primitive/indirect/build_indirect_draw_command.js +13 -3
  444. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts +10 -0
  445. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.d.ts.map +1 -1
  446. package/src/shade/renderer/gpu_primitive/prefix_sum/v1/graph_prefix_scan_csdldf.js +14 -0
  447. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.d.ts +26 -0
  448. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.d.ts.map +1 -0
  449. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_comparator.js +52 -0
  450. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.d.ts +32 -0
  451. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.d.ts.map +1 -0
  452. package/src/shade/renderer/gpu_primitive/sort/chunk_sort_bitonic_workgroup.js +89 -0
  453. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts +10 -0
  454. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.d.ts.map +1 -1
  455. package/src/shade/renderer/gpu_primitive/sort/graph_radix_sort.js +20 -1
  456. package/src/shade/renderer/gpu_primitive/test/gpu_test.d.ts.map +1 -1
  457. package/src/shade/renderer/gpu_primitive/test/gpu_test.js +8 -11
  458. package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts +10 -0
  459. package/src/shade/renderer/hiz/HierarchicalZBuffer.d.ts.map +1 -1
  460. package/src/shade/renderer/hiz/HierarchicalZBuffer.js +294 -281
  461. package/src/shade/renderer/light/GPULightCollection.d.ts +8 -0
  462. package/src/shade/renderer/light/GPULightCollection.d.ts.map +1 -1
  463. package/src/shade/renderer/light/GPULightCollection.js +18 -1
  464. package/src/shade/renderer/light/cluster/cull/graph_cull_lights.d.ts +8 -0
  465. package/src/shade/renderer/light/cluster/cull/graph_cull_lights.d.ts.map +1 -1
  466. package/src/shade/renderer/light/cluster/cull/graph_cull_lights.js +234 -218
  467. package/src/shade/renderer/light/cluster/graph_assign_clsuters.d.ts +7 -0
  468. package/src/shade/renderer/light/cluster/graph_assign_clsuters.d.ts.map +1 -1
  469. package/src/shade/renderer/light/cluster/graph_assign_clsuters.js +13 -0
  470. package/src/shade/renderer/light/cluster/graph_build_light_clusters.d.ts +7 -0
  471. package/src/shade/renderer/light/cluster/graph_build_light_clusters.d.ts.map +1 -1
  472. package/src/shade/renderer/light/cluster/graph_build_light_clusters.js +16 -2
  473. package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts +10 -0
  474. package/src/shade/renderer/light/environment/execute_filter_environment_map.d.ts.map +1 -1
  475. package/src/shade/renderer/light/environment/execute_filter_environment_map.js +13 -0
  476. package/src/shade/renderer/lightmap/GPULightMap.d.ts.map +1 -1
  477. package/src/shade/renderer/lightmap/GPULightMap.js +3 -0
  478. package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.d.ts.map +1 -1
  479. package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_irradiance_flat.js +4 -0
  480. package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.d.ts.map +1 -1
  481. package/src/shade/renderer/lightmap/bake/shader_lightmap_viz_to_sh.js +4 -0
  482. package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
  483. package/src/shade/renderer/material/GPUMaterialManager.d.ts +16 -4
  484. package/src/shade/renderer/material/GPUMaterialManager.d.ts.map +1 -1
  485. package/src/shade/renderer/material/GPUMaterialManager.js +38 -8
  486. package/src/shade/renderer/particles/DESIGN.md +49 -7
  487. package/src/shade/renderer/particles/ORIENTATION_PLAN_2026_10_15.md +453 -0
  488. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts +5 -1
  489. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.d.ts.map +1 -1
  490. package/src/shade/renderer/particles/data/PARTICLE_EMITTER_STRUCT.js +13 -5
  491. package/src/shade/renderer/particles/data/particle_emitter_record.js +2 -2
  492. package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.d.ts.map +1 -1
  493. package/src/shade/renderer/particles/graph/groups/particle_builtin_groups.js +12 -0
  494. package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.d.ts +60 -0
  495. package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.d.ts.map +1 -1
  496. package/src/shade/renderer/particles/graph/groups/particle_groups_geometry.js +156 -0
  497. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts +2 -2
  498. package/src/shade/renderer/particles/runtime/ParticleEmitter.d.ts.map +1 -1
  499. package/src/shade/renderer/particles/runtime/ParticleEmitter.js +8 -8
  500. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.d.ts.map +1 -1
  501. package/src/shade/renderer/particles/shaders/chunk_particle_billboard_vertex.js +6 -4
  502. package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts +7 -6
  503. package/src/shade/renderer/particles/shaders/chunk_particle_render_math.d.ts.map +1 -1
  504. package/src/shade/renderer/particles/shaders/chunk_particle_render_math.js +91 -58
  505. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.d.ts.map +1 -1
  506. package/src/shade/renderer/path_tracer/accumulating/AccumulatingPathTracer.js +10 -0
  507. package/src/shade/renderer/path_tracer/accumulating/shader_accumulating_path_tracer.d.ts.map +1 -1
  508. package/src/shade/renderer/path_tracer/accumulating/shader_accumulating_path_tracer.js +5 -1
  509. package/src/shade/renderer/path_tracer/graph_path_trace_scene.d.ts.map +1 -1
  510. package/src/shade/renderer/path_tracer/graph_path_trace_scene.js +6 -0
  511. package/src/shade/renderer/pool/TransientResourcePool.d.ts +24 -0
  512. package/src/shade/renderer/pool/TransientResourcePool.d.ts.map +1 -1
  513. package/src/shade/renderer/pool/TransientResourcePool.js +41 -10
  514. package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.d.ts +7 -0
  515. package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.d.ts.map +1 -1
  516. package/src/shade/renderer/postprocess/bloom/graph_postprocess_bloom.js +18 -0
  517. package/src/shade/renderer/postprocess/denoise/LigmaDenoiser.d.ts.map +1 -1
  518. package/src/shade/renderer/postprocess/denoise/LigmaDenoiser.js +1 -0
  519. package/src/shade/renderer/postprocess/denoise/shader_temporal_reprojection_luma.d.ts.map +1 -1
  520. package/src/shade/renderer/postprocess/denoise/shader_temporal_reprojection_luma.js +6 -4
  521. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts +11 -0
  522. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.d.ts.map +1 -1
  523. package/src/shade/renderer/postprocess/eye/GPUCameraExposureManager.js +16 -0
  524. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts +10 -0
  525. package/src/shade/renderer/postprocess/gtao/GTAO.d.ts.map +1 -1
  526. package/src/shade/renderer/postprocess/gtao/GTAO.js +16 -0
  527. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.d.ts.map +1 -1
  528. package/src/shade/renderer/postprocess/gtao/fragment_shader_gtao.js +32 -10
  529. package/src/shade/renderer/postprocess/nss/NSS.d.ts +1 -1
  530. package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_temporal_accumulate.d.ts.map +1 -1
  531. package/src/shade/renderer/postprocess/ssr/reproject/chunk_ssr_temporal_accumulate.js +3 -0
  532. package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.d.ts.map +1 -1
  533. package/src/shade/renderer/postprocess/ssr/resolve/build_ssr_resolve_shader.js +6 -3
  534. package/src/shade/renderer/postprocess/taa/TAA.d.ts +12 -0
  535. package/src/shade/renderer/postprocess/taa/TAA.d.ts.map +1 -1
  536. package/src/shade/renderer/postprocess/taa/TAA.js +15 -0
  537. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts +7 -0
  538. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.d.ts.map +1 -1
  539. package/src/shade/renderer/postprocess/velocity/graph_add_per_object_velocity.js +13 -0
  540. package/src/shade/renderer/rasterize/TemplatePassDescriptor.d.ts +31 -3
  541. package/src/shade/renderer/rasterize/TemplatePassDescriptor.d.ts.map +1 -1
  542. package/src/shade/renderer/rasterize/TemplatePassDescriptor.js +79 -4
  543. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts +17 -0
  544. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.d.ts.map +1 -1
  545. package/src/shade/renderer/rasterize/bucket/graph_meshlets_rasterize_by_bucket.js +35 -4
  546. package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.d.ts +7 -0
  547. package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.d.ts.map +1 -1
  548. package/src/shade/renderer/rasterize/compute/graph_mesh_frustum_cull.js +182 -169
  549. package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.d.ts +10 -0
  550. package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.d.ts.map +1 -1
  551. package/src/shade/renderer/rasterize/expand/bucket/mesh/graph_meshes_classify_buckets.js +20 -1
  552. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts +10 -0
  553. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.d.ts.map +1 -1
  554. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_extract_meshlets_from_bucket.js +18 -1
  555. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.d.ts +10 -0
  556. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.d.ts.map +1 -1
  557. package/src/shade/renderer/rasterize/expand/bucket/meshlet/graph_sort_meshlets_by_bucket_id.js +20 -1
  558. package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.d.ts +7 -0
  559. package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.d.ts.map +1 -1
  560. package/src/shade/renderer/rasterize/expand/graph_mesh_filter_one_way.js +187 -170
  561. package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.d.ts +10 -0
  562. package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.d.ts.map +1 -1
  563. package/src/shade/renderer/rasterize/expand/graph_meshlets_filter_one_way.js +19 -1
  564. package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts +13 -0
  565. package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.d.ts.map +1 -1
  566. package/src/shade/renderer/rasterize/expand/graph_meshlets_rasterize.js +25 -1
  567. package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts +10 -0
  568. package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.d.ts.map +1 -1
  569. package/src/shade/renderer/rasterize/expand/mesh/graph_expand_meshes_to_meshlets.js +20 -0
  570. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.d.ts.map +1 -1
  571. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_brick4.js +6 -0
  572. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.d.ts.map +1 -1
  573. package/src/shade/renderer/rasterize/forward/chunk_forward_shade_standard_fragment_ibl.js +6 -0
  574. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts +3 -2
  575. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.d.ts.map +1 -1
  576. package/src/shade/renderer/rasterize/native/avboit/AVBOITSideChannel.js +3 -2
  577. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts +7 -2
  578. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.d.ts.map +1 -1
  579. package/src/shade/renderer/rasterize/native/avboit/graph_rasterize_meshes_transparent_avboit.js +12 -4
  580. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_brick4.d.ts.map +1 -1
  581. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_brick4.js +4 -3
  582. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_ibl.d.ts.map +1 -1
  583. package/src/shade/renderer/rasterize/native/avboit/shader_avboit_draw_ibl.js +4 -3
  584. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts +2 -1
  585. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.d.ts.map +1 -1
  586. package/src/shade/renderer/rasterize/native/oit/graph_rasterize_meshes_transparent_oit.js +11 -3
  587. package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.d.ts.map +1 -1
  588. package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments.js +4 -3
  589. package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments_ibl.d.ts.map +1 -1
  590. package/src/shade/renderer/rasterize/native/oit/shader_oit_resolve_moments_ibl.js +4 -3
  591. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts +15 -0
  592. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.d.ts.map +1 -1
  593. package/src/shade/renderer/rasterize/standard/graph_rasterize_partial_opaque.js +35 -2
  594. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts +14 -0
  595. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.d.ts.map +1 -1
  596. package/src/shade/renderer/rasterize/standard/graph_rasterize_remaining_opaque.js +32 -4
  597. package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.d.ts +17 -0
  598. package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.d.ts.map +1 -1
  599. package/src/shade/renderer/rasterize/standard/graph_rasterize_scene.js +34 -4
  600. package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts +5 -3
  601. package/src/shade/renderer/restir/di/chunk_restir_resolve.d.ts.map +1 -1
  602. package/src/shade/renderer/restir/di/chunk_restir_resolve.js +8 -3
  603. package/src/shade/renderer/restir/di/graph_restir_di.d.ts.map +1 -1
  604. package/src/shade/renderer/restir/di/graph_restir_di.js +1 -0
  605. package/src/shade/renderer/restir/di/shader_restir_di_resolve.d.ts.map +1 -1
  606. package/src/shade/renderer/restir/di/shader_restir_di_resolve.js +5 -1
  607. package/src/shade/renderer/restir/reservoir/shader.d.ts.map +1 -1
  608. package/src/shade/renderer/restir/reservoir/shader.js +7 -4
  609. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts +7 -0
  610. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.d.ts.map +1 -1
  611. package/src/shade/renderer/scene/GPUInstancesAccelerationStructure.js +13 -1
  612. package/src/shade/renderer/scene/GPUSceneContext.d.ts +10 -0
  613. package/src/shade/renderer/scene/GPUSceneContext.d.ts.map +1 -1
  614. package/src/shade/renderer/scene/GPUSceneContext.js +19 -0
  615. package/src/shade/renderer/scene/SceneManager.d.ts +9 -0
  616. package/src/shade/renderer/scene/SceneManager.d.ts.map +1 -1
  617. package/src/shade/renderer/scene/SceneManager.js +11 -0
  618. package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.d.ts +11 -0
  619. package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.d.ts.map +1 -1
  620. package/src/shade/renderer/scene/hierarchy/graph_nodes_update_transform_hierarchy.js +17 -0
  621. package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts +11 -0
  622. package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.d.ts.map +1 -1
  623. package/src/shade/renderer/scene/hierarchy/graph_scene_update_transform_hierarchy.js +18 -1
  624. package/src/shade/renderer/shader/ComputeShader.d.ts +12 -0
  625. package/src/shade/renderer/shader/ComputeShader.d.ts.map +1 -1
  626. package/src/shade/renderer/shader/ComputeShader.js +71 -2
  627. package/src/shade/renderer/shader/ImageShader.d.ts +27 -8
  628. package/src/shade/renderer/shader/ImageShader.d.ts.map +1 -1
  629. package/src/shade/renderer/shader/ImageShader.js +299 -218
  630. package/src/shade/renderer/shader/ShaderDescriptor.d.ts +21 -0
  631. package/src/shade/renderer/shader/ShaderDescriptor.d.ts.map +1 -1
  632. package/src/shade/renderer/shader/ShaderDescriptor.js +71 -1
  633. package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.d.ts +17 -0
  634. package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.d.ts.map +1 -0
  635. package/src/shade/renderer/shader/chunk/camera/chunk_project_view_position_from_depth.js +45 -0
  636. package/src/shade/renderer/shader/chunk/camera/chunk_screen_coordinate_to_view.js +3 -3
  637. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.d.ts +1 -1
  638. package/src/shade/renderer/shader/chunk/color/iCtCp/chunk_eotf_st2084.js +62 -62
  639. package/src/shade/renderer/shader/chunk/color/tonemap/HDR_TONE_MAPPING_FORMS_BRIEF_2026_10_16.md +318 -0
  640. package/src/shade/renderer/shader/chunk/color/tonemap/SDR_TONE_MAPPING_BRIEF_2026_10_16.md +237 -0
  641. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts +17 -0
  642. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.d.ts.map +1 -0
  643. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_PAPER_WHITE_NITS.js +22 -0
  644. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.d.ts +14 -1
  645. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.d.ts.map +1 -1
  646. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_khronos_pbr.js +28 -15
  647. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts +12 -0
  648. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.d.ts.map +1 -1
  649. package/src/shade/renderer/shader/chunk/color/tonemap/gt7/chunk_tonemap_gt7.js +128 -110
  650. package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.d.ts +20 -0
  651. package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.d.ts.map +1 -0
  652. package/src/shade/renderer/shader/chunk/geometry/ray/chunk_offset_ray_from_depth.js +33 -0
  653. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts +4 -0
  654. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.d.ts.map +1 -1
  655. package/src/shade/renderer/shader/chunk/light/chunk_compute_multiscattering_specular.js +12 -1
  656. package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.d.ts.map +1 -1
  657. package/src/shade/renderer/shader/chunk/material/MATERIAL_SHADING_INFO_STRUCT.js +7 -0
  658. package/src/shade/renderer/shader/chunk/material/MULTISCATTER.md +108 -0
  659. package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.d.ts.map +1 -1
  660. package/src/shade/renderer/shader/chunk/material/chunk_compute_indirect_specular.js +23 -4
  661. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts +18 -0
  662. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.d.ts.map +1 -0
  663. package/src/shade/renderer/shader/chunk/material/chunk_re_direct_multiscatter.js +56 -0
  664. package/src/shade/renderer/shader/chunk/material/chunk_re_indirect_specular_physical.d.ts.map +1 -1
  665. package/src/shade/renderer/shader/chunk/material/chunk_re_indirect_specular_physical.js +2 -0
  666. package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.d.ts +43 -0
  667. package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.d.ts.map +1 -0
  668. package/src/shade/renderer/shader/chunk/screen_space/chunk_screen_space_linear_ray.js +319 -0
  669. package/src/shade/renderer/shader/compiler/CodeChunk.d.ts +33 -0
  670. package/src/shade/renderer/shader/compiler/CodeChunk.d.ts.map +1 -1
  671. package/src/shade/renderer/shader/compiler/CodeChunk.js +140 -0
  672. package/src/shade/renderer/shader/compiler/CodeChunkChoice.d.ts +74 -0
  673. package/src/shade/renderer/shader/compiler/CodeChunkChoice.d.ts.map +1 -0
  674. package/src/shade/renderer/shader/compiler/CodeChunkChoice.js +166 -0
  675. package/src/shade/renderer/shader/compiler/SHADER_SWITCH_PROPOSAL_2026_10_16.md +680 -0
  676. package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts +86 -0
  677. package/src/shade/renderer/shader/compiler/ShaderSwitch.d.ts.map +1 -0
  678. package/src/shade/renderer/shader/compiler/ShaderSwitch.js +178 -0
  679. package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts +67 -0
  680. package/src/shade/renderer/shader/compiler/ShaderSwitchSet.d.ts.map +1 -0
  681. package/src/shade/renderer/shader/compiler/ShaderSwitchSet.js +205 -0
  682. package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.d.ts +14 -0
  683. package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.d.ts.map +1 -0
  684. package/src/shade/renderer/shadow/contact/CONTACT_SHADOW_WAVE_SIZE.js +13 -0
  685. package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.d.ts +65 -0
  686. package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.d.ts.map +1 -0
  687. package/src/shade/renderer/shadow/contact/ContactShadowDispatchList.js +252 -0
  688. package/src/shade/renderer/shadow/contact/FINDINGS.md +413 -0
  689. package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.d.ts +29 -0
  690. package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.d.ts.map +1 -0
  691. package/src/shade/renderer/shadow/contact/chunk_contact_shadow_wavefront_extents.js +105 -0
  692. package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.d.ts +29 -0
  693. package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.d.ts.map +1 -0
  694. package/src/shade/renderer/shadow/contact/graph_contact_shadow_linear.js +39 -0
  695. package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.d.ts +29 -0
  696. package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.d.ts.map +1 -0
  697. package/src/shade/renderer/shadow/contact/graph_contact_shadow_wavefront.js +92 -0
  698. package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.d.ts +29 -0
  699. package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.d.ts.map +1 -0
  700. package/src/shade/renderer/shadow/contact/shader_contact_shadow_linear.js +128 -0
  701. package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.d.ts +52 -0
  702. package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.d.ts.map +1 -0
  703. package/src/shade/renderer/shadow/contact/shader_contact_shadow_wavefront.js +358 -0
  704. package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.d.ts +10 -0
  705. package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.d.ts.map +1 -0
  706. package/src/shade/renderer/shadow/map/ShadowDirectionalTechnique.js +12 -0
  707. package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.d.ts +13 -0
  708. package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.d.ts.map +1 -0
  709. package/src/shade/renderer/shadow/map/shader/SHADOW_DIRECTIONAL_TECHNIQUE.js +14 -0
  710. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.d.ts +14 -8
  711. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.d.ts.map +1 -1
  712. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional.js +20 -86
  713. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts +14 -0
  714. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.d.ts.map +1 -0
  715. package/src/shade/renderer/shadow/map/shader/chunk_shadowmap_sample_directional_cascades.js +79 -0
  716. package/src/shade/renderer/shadow/ray/shader_ray_shadow_code.d.ts.map +1 -1
  717. package/src/shade/renderer/shadow/ray/shader_ray_shadow_code.js +12 -12
  718. package/src/shade/renderer/shadow/ray/staged/gen/shader_generate_rays.d.ts.map +1 -1
  719. package/src/shade/renderer/shadow/ray/staged/gen/shader_generate_rays.js +153 -151
  720. package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.d.ts +13 -0
  721. package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.d.ts.map +1 -0
  722. package/src/shade/renderer/shadow/vsm/shader/chunk_shadowmap_sample_directional_virtual.js +48 -0
  723. package/src/shade/renderer/texture/GPUTextureContext.d.ts +10 -0
  724. package/src/shade/renderer/texture/GPUTextureContext.d.ts.map +1 -1
  725. package/src/shade/renderer/texture/GPUTextureContext.js +24 -0
  726. package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.d.ts +219 -0
  727. package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.d.ts.map +1 -0
  728. package/src/shade/renderer/texture/atlas/GPUTileAtlas3D.js +671 -0
  729. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts +26 -2
  730. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.d.ts.map +1 -1
  731. package/src/shade/renderer/volumetrics/GPUSceneVolumetrics.js +108 -4
  732. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts +5 -1
  733. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.d.ts.map +1 -1
  734. package/src/shade/renderer/volumetrics/GPUViewVolumetrics.js +6 -0
  735. package/src/shade/renderer/volumetrics/NOTES.md +50 -0
  736. package/src/shade/renderer/volumetrics/PARTICIPATING_MEDIA_VOLUME_STRUCT.d.ts.map +1 -1
  737. package/src/shade/renderer/volumetrics/PARTICIPATING_MEDIA_VOLUME_STRUCT.js +30 -1
  738. package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.d.ts +51 -13
  739. package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.d.ts.map +1 -1
  740. package/src/shade/renderer/volumetrics/ParticipatingMediaVolume.js +98 -13
  741. package/src/shade/renderer/volumetrics/SceneVolumetrics.d.ts +9 -0
  742. package/src/shade/renderer/volumetrics/SceneVolumetrics.d.ts.map +1 -1
  743. package/src/shade/renderer/volumetrics/SceneVolumetrics.js +78 -68
  744. package/src/shade/renderer/volumetrics/VOLUMETRIC_NOISE_PLAN_2026_10_15.md +326 -0
  745. package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.d.ts +7 -4
  746. package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.d.ts.map +1 -1
  747. package/src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.js +21 -9
  748. package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.d.ts +19 -0
  749. package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.d.ts.map +1 -0
  750. package/src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.js +53 -0
  751. package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.d.ts +12 -3
  752. package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.d.ts.map +1 -1
  753. package/src/shade/renderer/volumetrics/chunk_volumetrics_sample_froxel_extinction.js +85 -48
  754. package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts +4 -1
  755. package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.d.ts.map +1 -1
  756. package/src/shade/renderer/volumetrics/graph_build_froxel_irradiance.js +4 -1
  757. package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts +4 -1
  758. package/src/shade/renderer/volumetrics/graph_build_volumetrics.d.ts.map +1 -1
  759. package/src/shade/renderer/volumetrics/graph_build_volumetrics.js +21 -1
  760. package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.d.ts +98 -0
  761. package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.d.ts.map +1 -0
  762. package/src/shade/renderer/volumetrics/noise/PARTICIPATING_MEDIA_NOISE.js +115 -0
  763. package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.d.ts +9 -0
  764. package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.d.ts.map +1 -0
  765. package/src/shade/renderer/volumetrics/noise/VOLUMETRICS_NOISE_TILE_BAKE_SETTINGS_STRUCT.js +24 -0
  766. package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.d.ts +27 -0
  767. package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.d.ts.map +1 -0
  768. package/src/shade/renderer/volumetrics/noise/bake_volumetrics_noise_tile.js +91 -0
  769. package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.d.ts +35 -0
  770. package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.d.ts.map +1 -0
  771. package/src/shade/renderer/volumetrics/noise/chunk_participating_media_noise.js +92 -0
  772. package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.d.ts +10 -0
  773. package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.d.ts.map +1 -0
  774. package/src/shade/renderer/volumetrics/noise/shader_volumetrics_noise_tile_bake.js +121 -0
  775. package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.d.ts.map +1 -1
  776. package/src/shade/renderer/volumetrics/shader_volumetrics_build_participating_media.js +38 -3
  777. package/src/shade/renderer/volumetrics/shader_volumetrics_build_sun_shadow_volume.d.ts.map +1 -1
  778. package/src/shade/renderer/volumetrics/shader_volumetrics_build_sun_shadow_volume.js +311 -290
  779. package/src/shade/renderer/volumetrics/volumetrics_position_world_to_froxel_uvw.d.ts.map +1 -1
  780. package/src/shade/renderer/volumetrics/volumetrics_position_world_to_froxel_uvw.js +28 -49
  781. package/src/shade/renderer/water/GPUWaterRenderer.d.ts +3 -1
  782. package/src/shade/renderer/water/GPUWaterRenderer.d.ts.map +1 -1
  783. package/src/shade/renderer/water/GPUWaterRenderer.js +24 -18
  784. package/src/shade/renderer/water/chunk_water_transport.d.ts +0 -1
  785. package/src/shade/renderer/water/chunk_water_transport.d.ts.map +1 -1
  786. package/src/shade/renderer/water/chunk_water_transport.js +0 -17
  787. package/src/shade/renderer/water/shader_water.d.ts +4 -2
  788. package/src/shade/renderer/water/shader_water.d.ts.map +1 -1
  789. package/src/shade/renderer/water/shader_water.js +27 -16
  790. package/src/shade/renderer/water/shader_water_avboit.d.ts +0 -4
  791. package/src/shade/renderer/water/shader_water_avboit.d.ts.map +1 -1
  792. package/src/shade/renderer/water/shader_water_avboit.js +0 -63
  793. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.d.ts.map +1 -1
  794. package/src/shade/wgsl/emulator/WGSLJavaScriptCompiler.js +43 -9
  795. package/src/view/graphics/GraphicsContextFailureView.d.ts +1 -2
  796. package/src/view/graphics/GraphicsContextFailureView.d.ts.map +1 -1
  797. package/src/view/graphics/GraphicsContextFailureView.js +1 -2
  798. package/src/engine/network/transport/Channel.d.ts +0 -85
  799. package/src/engine/network/transport/Channel.d.ts.map +0 -1
  800. package/src/engine/network/transport/Channel.js +0 -336
  801. package/src/engine/network/transport/ReliableCommandPipeline.d.ts +0 -155
  802. package/src/engine/network/transport/ReliableCommandPipeline.d.ts.map +0 -1
  803. package/src/engine/network/transport/ReliableCommandPipeline.js +0 -335
  804. package/src/engine/network/transport/fragments/FragmentAssembler.d.ts +0 -105
  805. package/src/engine/network/transport/fragments/FragmentAssembler.d.ts.map +0 -1
  806. package/src/engine/network/transport/fragments/FragmentAssembler.js +0 -350
  807. package/src/engine/network/transport/fragments/FragmentRetention.d.ts +0 -103
  808. package/src/engine/network/transport/fragments/FragmentRetention.d.ts.map +0 -1
  809. package/src/engine/network/transport/fragments/FragmentRetention.js +0 -191
  810. package/src/engine/network/transport/fragments/fragment_send.d.ts +0 -61
  811. package/src/engine/network/transport/fragments/fragment_send.d.ts.map +0 -1
  812. package/src/engine/network/transport/fragments/fragment_send.js +0 -157
  813. package/src/engine/network/transport/fragments/packet_size.d.ts +0 -99
  814. package/src/engine/network/transport/fragments/packet_size.d.ts.map +0 -1
  815. package/src/engine/network/transport/fragments/packet_size.js +0 -107
  816. package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.d.ts +0 -6
  817. package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.d.ts.map +0 -1
  818. package/src/shade/renderer/shader/chunk/color/sRGB/chunk_RRTAndODTFit.js +0 -16
  819. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.d.ts +0 -7
  820. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.d.ts.map +0 -1
  821. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_aces.js +0 -46
  822. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.d.ts +0 -10
  823. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.d.ts.map +0 -1
  824. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_agx.js +0 -127
  825. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.d.ts +0 -7
  826. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.d.ts.map +0 -1
  827. package/src/shade/renderer/shader/chunk/color/tonemap/chunk_tonemap_pbr_neutral.js +0 -39
@@ -20,6 +20,15 @@ export class SceneVolumetrics {
20
20
  */
21
21
  volumes: ParticipatingMediaVolume[];
22
22
  version: number;
23
+ /**
24
+ * The wind every volume's noise scrolls with, metres a second along the world axes. Each
25
+ * volume feels it through its own `noise_wind_factor` and adds its own velocity; the fold is
26
+ * `ParticipatingMediaSystem`'s, once a frame, and the result is a scroll phase on the volume —
27
+ * this number itself never reaches the GPU.
28
+ *
29
+ * @type {number[]}
30
+ */
31
+ wind: number[];
23
32
  /**
24
33
  *
25
34
  * @param {ParticipatingMediaVolume} volume
@@ -1 +1 @@
1
- {"version":3,"file":"SceneVolumetrics.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/SceneVolumetrics.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;GAWG;AACH;IACI;;;OAGG;IACH,SAFU,wBAAwB,EAAE,CAEvB;IAEb,gBAAY;IAEZ;;;OAGG;IACH,YAFW,wBAAwB,QAQlC;IAED;;;;;OAKG;IACH,eAHW,wBAAwB,GACtB,OAAO,CAenB;IAED;;;;;OAKG;IACH,mBAEC;CACJ;uCAlEY,OAAO,+BAA+B,EAAE,wBAAwB"}
1
+ {"version":3,"file":"SceneVolumetrics.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/SceneVolumetrics.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;GAWG;AACH;IACI;;;OAGG;IACH,SAFU,wBAAwB,EAAE,CAEvB;IAEb,gBAAY;IAEZ;;;;;;;OAOG;IACH,MAFU,MAAM,EAAE,CAED;IAEjB;;;OAGG;IACH,YAFW,wBAAwB,QAQlC;IAED;;;;;OAKG;IACH,eAHW,wBAAwB,GACtB,OAAO,CAenB;IAED;;;;;OAKG;IACH,mBAEC;CACJ;uCA5EY,OAAO,+BAA+B,EAAE,wBAAwB"}
@@ -1,68 +1,78 @@
1
- /**
2
- * @typedef {import("./ParticipatingMediaVolume.js").ParticipatingMediaVolume} ParticipatingMediaVolume
3
- */
4
-
5
- /**
6
- * Every participating medium in a scene, and a counter saying whether the GPU's copy is stale.
7
- *
8
- * **The version is the whole synchronisation protocol.** {@link GPUSceneVolumetrics} repacks the
9
- * entire table whenever the number moves and does nothing at all when it does not, so a volume
10
- * changed without moving the counter renders with the values it was last uploaded with — the CPU
11
- * object holds the new density, reads back correctly, and only the picture is stale. Anything that
12
- * writes into a volume in place therefore has to say so; see {@link invalidate}.
13
- *
14
- * **Volumes are packed by array index**, so removing one renumbers the rest. That is free here
15
- * because the upload is all-or-nothing, and it is the reason no volume carries a slot number.
16
- */
17
- export class SceneVolumetrics {
18
- /**
19
- *
20
- * @type {ParticipatingMediaVolume[]}
21
- */
22
- volumes = [];
23
-
24
- version = 0;
25
-
26
- /**
27
- *
28
- * @param {ParticipatingMediaVolume} volume
29
- */
30
- add(volume) {
31
-
32
- this.volumes.push(volume);
33
-
34
- this.version++;
35
-
36
- }
37
-
38
- /**
39
- * Take a volume back out.
40
- *
41
- * @param {ParticipatingMediaVolume} volume
42
- * @returns {boolean} true if it was there to be removed
43
- */
44
- remove(volume) {
45
-
46
- const index = this.volumes.indexOf(volume);
47
-
48
- if (index === -1) {
49
- return false;
50
- }
51
-
52
- this.volumes.splice(index, 1);
53
-
54
- this.version++;
55
-
56
- return true;
57
- }
58
-
59
- /**
60
- * Say that a volume already in the scene has been written into.
61
- *
62
- * Adding and removing move the version by themselves; changing a volume in place is invisible
63
- * from here, and this is how such a change reaches the GPU.
64
- */
65
- invalidate() {
66
- this.version++;
67
- }
68
- }
1
+ /**
2
+ * @typedef {import("./ParticipatingMediaVolume.js").ParticipatingMediaVolume} ParticipatingMediaVolume
3
+ */
4
+
5
+ /**
6
+ * Every participating medium in a scene, and a counter saying whether the GPU's copy is stale.
7
+ *
8
+ * **The version is the whole synchronisation protocol.** {@link GPUSceneVolumetrics} repacks the
9
+ * entire table whenever the number moves and does nothing at all when it does not, so a volume
10
+ * changed without moving the counter renders with the values it was last uploaded with — the CPU
11
+ * object holds the new density, reads back correctly, and only the picture is stale. Anything that
12
+ * writes into a volume in place therefore has to say so; see {@link invalidate}.
13
+ *
14
+ * **Volumes are packed by array index**, so removing one renumbers the rest. That is free here
15
+ * because the upload is all-or-nothing, and it is the reason no volume carries a slot number.
16
+ */
17
+ export class SceneVolumetrics {
18
+ /**
19
+ *
20
+ * @type {ParticipatingMediaVolume[]}
21
+ */
22
+ volumes = [];
23
+
24
+ version = 0;
25
+
26
+ /**
27
+ * The wind every volume's noise scrolls with, metres a second along the world axes. Each
28
+ * volume feels it through its own `noise_wind_factor` and adds its own velocity; the fold is
29
+ * `ParticipatingMediaSystem`'s, once a frame, and the result is a scroll phase on the volume —
30
+ * this number itself never reaches the GPU.
31
+ *
32
+ * @type {number[]}
33
+ */
34
+ wind = [0, 0, 0];
35
+
36
+ /**
37
+ *
38
+ * @param {ParticipatingMediaVolume} volume
39
+ */
40
+ add(volume) {
41
+
42
+ this.volumes.push(volume);
43
+
44
+ this.version++;
45
+
46
+ }
47
+
48
+ /**
49
+ * Take a volume back out.
50
+ *
51
+ * @param {ParticipatingMediaVolume} volume
52
+ * @returns {boolean} true if it was there to be removed
53
+ */
54
+ remove(volume) {
55
+
56
+ const index = this.volumes.indexOf(volume);
57
+
58
+ if (index === -1) {
59
+ return false;
60
+ }
61
+
62
+ this.volumes.splice(index, 1);
63
+
64
+ this.version++;
65
+
66
+ return true;
67
+ }
68
+
69
+ /**
70
+ * Say that a volume already in the scene has been written into.
71
+ *
72
+ * Adding and removing move the version by themselves; changing a volume in place is invisible
73
+ * from here, and this is how such a change reaches the GPU.
74
+ */
75
+ invalidate() {
76
+ this.version++;
77
+ }
78
+ }
@@ -0,0 +1,326 @@
1
+ # Noise for participating-media volumes — design brief, 2026-10-15
2
+
3
+ Status: **revision (c), built.** Written against the tree at 59861de99; the implementation is what
4
+ the tree beside this file holds, and `NOTES.md` (2026-10-15) has the device numbers. Revisions (a)
5
+ and (b) proposed a procedural field and then a texture with a stack of phases; Alex's answers
6
+ (§6) settled on one static texture per slot in a general 3-D tile atlas, evolution by scrolling and
7
+ a domain warp, no stacks, no clock. §4 and §5 describe what was built; §7 is what was left open.
8
+
9
+ The ask: noise-modulated density on `ParticipatingMedia` volumes with a simple API and a cost that
10
+ stays flat. The starting concept was a fixed number of octaves of 4-D noise, sampled in world
11
+ space, with a per-volume scale and temporal rate, a per-volume lerp between uniform and noisy so one
12
+ shader path serves both, and a global wind vector.
13
+
14
+ ## 1. What the tree had
15
+
16
+ Facts, read from the sources, each of which shaped the design.
17
+
18
+ **The volume model is a unit box posed by a matrix, carrying `density`, a particle spec, and an
19
+ edge fade.** `PARTICIPATING_MEDIA_VOLUME_STRUCT` was `particle_spec`, `transform`,
20
+ `transform_inverse`, `fade_distance`, `density` — a row in the scene database, rows packed from 0
21
+ and rewritten whole whenever `SceneVolumetrics.version` moves. The renderer-side
22
+ `ParticipatingMediaVolume` carried six dead stub fields (`noise_scale/amplitude/offset/velocity/
23
+ evolution_speed`, `time`) from an older version of this very concept; nothing read them. Deleted.
24
+
25
+ **The froxel density pass had no sample point.** `shader_volumetrics_build_participating_media`
26
+ runs a 16×16 workgroup per z-slice over `ceil(w/16) × ceil(h/16) × 64` froxels — 120×68×64 =
27
+ 522,240 at 1080p, 2,073,600 at 2160p. Per froxel it builds the slab's world frustum (the z edges
28
+ carry the per-column jitter), then for every volume row: reject on `aabb3_intersects_frustum`,
29
+ estimate `frustum_unit_box_coverage` (8 three-plane intersections), evaluate the edge fade at the
30
+ midpoint of the centre ray's intersection with the box, and accumulate `density × coverage × fade`.
31
+ The density was a slab average, never a value at a point. Adding noise meant choosing a point, and
32
+ the rule from 2026-10-09 applies — a froxel's value is evaluated at a per-frame jittered point,
33
+ never a fixed lattice, or a large particle reading the volume shows the lattice as seams.
34
+
35
+ **The lighting pass reads the density textures at a jittered point and the TAA integrates it.**
36
+ STBN at the `(37, 71)` decorrelation offset, the 3-D TAA at 0.95, about 39 effective frames,
37
+ reprojected by camera motion only. A density field that moves in world space is averaged over the
38
+ window, not reprojected.
39
+
40
+ **Nothing downstream re-evaluates the volumes.** The sun's optical-depth cascades and the
41
+ local-light march both read `tParticipatingMedia1`, the froxel extinction texture. Noise costs once,
42
+ in the density pass, never per shadow step.
43
+
44
+ **The path tracer evaluates the volumes analytically and needs a majorant.**
45
+ `participating_media_volume_density_at(volume, p)` is bounded above by `density`, and
46
+ `chunk_medium_volumes`'s piece majorant is `Σ density × extinction`. The noise had to be a factor
47
+ in [0, 1], applied inside that one function, or the null-collision estimator goes biased.
48
+
49
+ **psrdnoise was in the tree with a GPU consumer already.** `chunk_psrdnoise3(x, period, alpha)`
50
+ tiles at any integer period up to 289 on each axis. That property is what makes the bake exact:
51
+ each octave gets an integer period across the tile, so each tiles on its own.
52
+
53
+ **There was a 3-D slot atlas, a slot allocator, and a texture that resizes with its contents.**
54
+ `GPUGeometrySDFManager` packs 50³ SDF slots into one 3-D texture and grows; `PageSlotAllocator` is
55
+ an O(1) free list; `GPUTextureContext.resize(…, true)` copies the old extent across. None was a
56
+ general tile atlas. The 2-D terrain atlas is a rect packer for arbitrary patches, a different thing.
57
+ Brixelizer carries its own 8³ brick SDF atlas (the FFX port) and was left alone, as asked.
58
+
59
+ **WebGPU has no bindless and no compressed 3-D textures.** A per-volume texture is an atlas or
60
+ nothing, and the atlas is `r8unorm`: BC4 is 2-D only there. And no `r8unorm` storage texture in
61
+ core WebGPU, which is why the bake writes a byte block into a storage buffer and copies it in.
62
+
63
+ **Froxels are long in z.** On the 64-slice log curve a slab is ≈16% of its depth (≈8 m at 50 m,
64
+ ≈79 m at 500 m); a 16-px tile at 1080p is ≈1.4% of depth across. Features finer than the slab are
65
+ averaged by the jitter and the TAA into a lower-contrast mean, so distant fog goes uniform on its own.
66
+
67
+ ## 2. What the field ships
68
+
69
+ Tagged **VERIFIED** where the slides or source were read, **SECONDARY** where only documentation
70
+ or a search summary was, **NOT RE-READ** where the material exists but was not opened.
71
+
72
+ **Smolder — IO Interactive, 007 First Light, SIGGRAPH 2026 Advances (VERIFIED, slides + notes).**
73
+ Not a noise system: a per-pixel raymarcher over baked animated density (OpenVDB frames in a custom
74
+ sparse brick format, 4³ bricks stored 5³, 4 bits a voxel), 4-moment volumetric shadows on async
75
+ compute, segment-based overlap culling (4 volumes), an adaptive lighting rate. No temporal
76
+ filtering inside, blue noise per pixel, FSR's reactive mask. The density lookup "was only a small
77
+ fraction" of the per-sample cost; and the one thing they refused was a fallback that makes artists
78
+ "author content twice". 450 volumes shipped. Slides:
79
+ `advances.realtimerendering.com/s2026/content/AlexanderMueller_Smolder_Siggraph26.pdf`.
80
+
81
+ **Enshrouded — Keen Games, GPC 2025 "The fog is lifting" (VERIFIED, slides).** A froxel volume
82
+ (160×90×64, to 10 km, temporally accumulated on the populate pass only) for atmosphere, weather and
83
+ VFX-injected box volumes — `densityTexture, uvOffset, uvScale, density, falloff, …` — and a
84
+ half-resolution ray march for the dense shroud over a world voxel volume (16³ tiles with a
85
+ "half voxel border on each side for seamless trilinear filtering"). **Detail noise is baked**:
86
+ Nubis-Cubed "Curly-Alligator" and "Alligator" types, "tileable, 128x128x128 four channels
87
+ uncompressed", eroding density at ray-march samples. Slides on
88
+ `static.graphicsprogrammingconference.com/public/2025/talks/the-fog-is-lifting-volumetric-rendering-enshrouded/`.
89
+ The GPC 2024 talk (Lukas Feller, linked at the top of `NOTES.md`) is video only.
90
+
91
+ **Assassin's Creed 4 — Wronski, SIGGRAPH 2014 (VERIFIED).** "Just one octave of Perlin noise that
92
+ is animated by wind. We tried using multiple octaves, but in the end difference was rather subtle
93
+ for added cost." Density and lighting 0.43 ms on PS4 at 160×90×64.
94
+
95
+ **Bevy `scrolling_fog` (VERIFIED, source).** A repeating 3-D noise texture, a
96
+ `density_texture_offset` the app advances on the CPU by `velocity × dt`, jitter under TAA.
97
+
98
+ **Godot 4 FogMaterial (SECONDARY).** A static 3-D `density_texture` in clamped local box space,
99
+ height falloff, edge fade; animation needs a custom shader. **Unity HDRP (SECONDARY):** 3-D mask
100
+ texture, scroll speed and tiling per axis. **Unreal 5.4 (VERIFIED, local source):** local fog
101
+ volumes are analytic (radial + exponential height, no noise); froxel fog density comes from
102
+ Volume-domain materials evaluated per froxel at a jittered slice depth. **Frostbite 2015, RDR2
103
+ 2019, Nubis Cubed 2023 (NOT RE-READ):** PPTX only, or cited through Enshrouded.
104
+
105
+ **The pattern.** Froxel fog ships one or two octaves of 3-D noise scrolled by wind, or a baked
106
+ tileable 3-D texture eroding a density; hero effects are baked animated voxels. The 3-D texture is
107
+ the universal artist hook, and 128³ is the size the two most recent references use.
108
+
109
+ ## 3. What it costs
110
+
111
+ Per (froxel, volume) the noise is two trilinear `r8unorm` taps into an atlas of a few MiB (one tap
112
+ when `noise_warp == 0`) plus ~25 scalar ops of coordinate arithmetic, against the ~300 ops the
113
+ coverage estimator already spends per volume in the same loop. Paid only inside `aabb_intersects`;
114
+ a froxel with no volume pays nothing, and a volume at `noise_strength == 0` branches around it
115
+ uniformly, so a scene with no noisy volume costs what it did before. The device numbers, taken by
116
+ the paired protocol in `volumetrics_froxel/measure.js` at 2160p, are in `NOTES.md` (2026-10-15).
117
+
118
+ ## 4. The concept, item by item, as built
119
+
120
+ **Fixed number of octaves — 3, baked into the default tile.** Lacunarity 2, gain 0.5, three
121
+ octaves of `psrdnoise3` at integer periods 4, 8 and 16 lattice units across the content, each
122
+ offset by a constant times its index so the doubled lattices do not sit on the base one's corners.
123
+ The finest octave is 8 texels a wavelength in a 128³ tile. At runtime the octave count is not a
124
+ parameter: it is whatever the texture holds, and a user tile may hold one or ten at the same cost.
125
+
126
+ **4-D noise — dropped (F1), on Alex's call.** "3-D preserves mass/volume better perceptually; 4-D
127
+ is great for variation but with discrete samples not worth it, blurrier borders for little benefit
128
+ and 2x taps." No phase stack either, for memory. The evolution is **scroll plus a domain warp**: a
129
+ second tap of the same tile at half frequency and its own, slower scroll displaces the base lookup
130
+ along a fixed oblique direction by `noise_warp` tile units times how far the warp value sits from
131
+ its mean. As the two scrolls slide against each other (ratio 0.37) the base field changes shape in
132
+ place. `noise_warp == 0` is one tap and a field that only slides.
133
+
134
+ **Time tick / supplied time — no clock at all.** The scroll is a **phase on the volume**, two
135
+ `[0, 1)³` offsets (`noise_offset`, `noise_warp_offset`) advanced once a frame by
136
+ `participating_media_volume_advance_noise(volume, velocity, dt)` in f64 and wrapped there — a
137
+ running sum, so a change of wind never jumps the field and a session running for days never grows
138
+ a number. `ParticipatingMediaSystem.update(dt)` is the caller for an ECS scene; a playground calls
139
+ it from its loop. Not called, the field stands still, which is what an accumulating reference
140
+ wants. The GPU never multiplies a velocity by a time.
141
+
142
+ **Temporal scale per volume — became `noise_warp`.** A rate had no meaning without a 4th
143
+ dimension; the warp amount is the knob that sets how much the field changes shape as it moves.
144
+
145
+ **World-space sampling — kept, with repeat.** The tile repeats every `noise_scale` metres along
146
+ each world axis; `fract` folds the world position onto the tile. Neighbouring volumes with the same
147
+ settings share one continuous field, and a volume carried by a moving entity has the world's fog
148
+ flow through it. User tiles must tile seamlessly; the engine's does by construction.
149
+
150
+ **Noise scale per volume — one scalar, metres per tile repeat.** `noise_scale`, default 32 m,
151
+ which with the default tile's four base features puts them 8 m apart and the finest octave at 2 m.
152
+
153
+ **Lerp between noisy and uniform — `noise_strength ∈ [0, 1]`, blending to the texture's [0, 1]
154
+ value.** `density(p) = density × fade(p) × mix(1, tile(p), strength)`. Bounded by `density`, so the
155
+ tracer's majorant, the ray spans and the froxel coverage arithmetic are untouched. The remap that
156
+ shapes the wisps — `smoothstep(−0.6, 0.6, fBm)`, psrdnoise's fBm sits in about ±0.7 — is baked, so
157
+ the texture *is* the multiplier and a user tile is one too, with nothing more to say.
158
+
159
+ **Uniform path.** `noise_strength == 0` branches around the taps inside the volume loop: a property
160
+ of the volume, identical for every thread, so a uniform branch and not a variant.
161
+
162
+ **Global wind — `SceneVolumetrics.wind`, felt per medium.** Per Alex's F7: effective velocity
163
+ `= wind × noise_wind_factor + noise_velocity`, two explicit fields on the component, folded by the
164
+ system into the phase. The row carries phases only.
165
+
166
+ **Where the froxel pass evaluates it.** Once per froxel, before the volume loop, a world point
167
+ inside the slab at an STBN jitter with a **third** decorrelation offset `(53, 97)` — the aerial pass
168
+ owns zero and the lighting pass `(37, 71)`, and two passes drawing the same number lock their
169
+ nuisance variables together, which biases the estimate and no TAA window recovers it. Per volume
170
+ inside `aabb_intersects`, the multiplier at that point scales the slab's weight. The slab's z jitter
171
+ is already per frame, so the point moves on all three axes.
172
+
173
+ **Band limiting — none (F2).** No mips (a one-texel skirt is wrong from level 1 down, and the
174
+ tracer samples one level anyway), no octave skipping; the texture is band-limited at its texel and
175
+ the jitter plus the TAA average the froxel.
176
+
177
+ **What the path tracer gets.** The same `participating_media_volume_density_at`, which now needs
178
+ `tParticipatingMediaNoise` and `sParticipatingMediaNoise` bound by every shader that imports it:
179
+ the accumulating tracer, `graph_path_trace_scene`, the Brick4 probe bake, both lightmap viz bakes
180
+ and the deprecated LPV trace all declare and bind them.
181
+
182
+ **The TAA envelope — a stated limit.** At 0.95 the history spans ≈39 frames, 0.65 s at 60 Hz; a
183
+ feature scrolls `|v| × 0.65 s` inside that window. Wind at a few m/s on 8 m features is fine; 10 m/s
184
+ on 2 m features is mush, and a history reprojected by the scroll is a separate piece of work.
185
+
186
+ ## 5. The design, in one place
187
+
188
+ ### 5.1 `GPUTileAtlas3D` — general, one instance for the volumetrics
189
+
190
+ `shade/renderer/texture/atlas/GPUTileAtlas3D.js`. One 3-D `GPUTextureContext` of one format, cut
191
+ into tiles of `content_size + 2·border` texels, slots linear (x fastest, z slowest), handed out by
192
+ a free list that reuses the most recently freed slot first.
193
+
194
+ - `new GPUTileAtlas3D({ device, format, content_size, border, slots_x, slots_y, capacity, usage, label })`,
195
+ every argument required. `slots_x`/`slots_y` are the starting footprint; `capacity` is rounded
196
+ up to whole z layers of it. `usage` is how the clients bind the texture (`TEXTURE_BINDING`,
197
+ `STORAGE_BINDING`); the atlas adds the `COPY_DST | COPY_SRC` its writes and grows need (added
198
+ 2026-10-16 for the SDF manager, whose build stores into its tiles).
199
+ - `allocate()` returns a slot and, when none is free, **grows the texture by a layer**, copying the
200
+ old extent across (`resize(…, true)`; x and y do not change, so every tile keeps its origin).
201
+ **Once z is at `maxTextureDimension3D` it widens instead** (2026-10-16, Alex's design): the
202
+ smaller of x and y doubles (x on a tie, capped at the device), the layers halve (+1 for the slot
203
+ being allocated), and every tile handed out is copied — in runs along x, a whole old row per
204
+ copy when a side doubles — to where its slot sits under the new footprint, through
205
+ `GPUTextureContext.replace`. A slot keeps its index and texels; its origin moves. Rare and as
206
+ costly as a full copy. The ceiling is `capacity_limit`, the device's limit in tiles cubed; past
207
+ it, `allocate` throws with the numbers. `free(slot)`, `is_live(slot)`, `live_count`.
208
+ - `write(slot, content)` takes `content_size³` texels and builds the skirt on the host
209
+ (`tile_atlas_bordered_block`, pure and exported: the skirt is the content wrapped) in one
210
+ `writeTexture`. `copy_from_buffer(encoder, slot, buffer, offset, bytes_per_row)` lands a whole
211
+ bordered tile a device producer wrote, rows padded to the copy alignment.
212
+ - `slot_origin(slot, out)` is the same arithmetic in JS and WGSL.
213
+ - A grow replaces the `GPUTexture` and a widen moves every tile; take a view, the footprint or an
214
+ origin after allocating, never across an `allocate`. The frame graph imports the texture per
215
+ frame and the noise shader takes the footprint from `textureDimensions`, so the passes are fine
216
+ by construction.
217
+
218
+ The volumetrics instance (`PARTICIPATING_MEDIA_NOISE.js`): `r8unorm`, content 128, border 1
219
+ (tile 130), footprint 2×1, capacity 2 — the engine's tile and one spare, 4.4 MB — growing by 2
220
+ slots (4.4 MB) a layer to 30 on a 2048-limit device, then widening. Per scene, on `GPUSceneVolumetrics.noise_atlas`:
221
+ a volume names its tile by slot and the volumes are the scene's.
222
+
223
+ `GPUGeometrySDFManager` is the second instance (G4, 2026-10-16): `r32float`, content 50, border 0
224
+ (every reader loads inside its tile and clamps the far tap to the last texel, and a wrapped skirt
225
+ would be wrong for a distance field anyway), starting footprint 4×4 — the 16 slots it started with,
226
+ and its smallest growth step — to 40 layers (640 slots, 320 MB) on a 2048-limit device, then
227
+ widening to 8×4×21 and on. A slot is its geometry's id, so it claims slots in order and frees none.
228
+ Brixelizer's atlas is not migrated.
229
+
230
+ ### 5.2 The engine's default tile — slot 0, baked on first update
231
+
232
+ `shader_volumetrics_noise_tile_bake` + `bake_volumetrics_noise_tile`: a compute dispatch over the
233
+ whole 130³ tile — skirt included, by wrapping the texel index, the same rule the host applies — into
234
+ a transient storage buffer of 256-byte rows, four `r8unorm` texels a word, then
235
+ `copyBufferToTexture` into the slot, in one command stream. Three octaves at periods 4/8/16,
236
+ `features` 4, remap baked. Runs once, from `GPUSceneVolumetrics.update` the first time it is
237
+ called (a bake needs a command stream and the constructor has none). Deterministic, so the
238
+ emulator bakes small tiles in `shader_volumetrics_noise_tile_bake.spec.js`.
239
+
240
+ ### 5.3 The API
241
+
242
+ ECS, flat on `ParticipatingMedia`:
243
+
244
+ noise_strength = 0 // [0, 1]; 0 = uniform, nothing evaluated
245
+ noise_scale = 32 // metres per tile repeat (default tile: 8 m base features)
246
+ noise_warp = 0.1 // tile units the warp may displace by; 0 = one tap, slide only
247
+ noise_velocity = [0,0,0] // m/s, the medium's own motion, added to the wind
248
+ noise_wind_factor = 1 // how much of the scene wind it feels
249
+ noise_texture = 0 // atlas slot; 0 = the engine's
250
+
251
+ Scene: `SceneVolumetrics.wind` (m/s). Tiles: `GPUSceneVolumetrics.noise_atlas` —
252
+ `allocate()`, `write(slot, Uint8Array(128³))`, `free(slot)`.
253
+
254
+ Renderer-side `ParticipatingMediaVolume`: `noise_strength`, `noise_scale`, `noise_warp`,
255
+ `noise_slot`, and the phase state `noise_offset`, `noise_warp_offset`, advanced by
256
+ `participating_media_volume_advance_noise(volume, velocity_m_s, dt_s)`, which returns whether
257
+ anything moved.
258
+
259
+ GPU row, appended to `PARTICIPATING_MEDIA_VOLUME_STRUCT`: `noise_offset: vec3f`,
260
+ `noise_warp_offset: vec3f`, `noise_slot: u32`, `noise_strength: f32`, `noise_inverse_scale: f32`,
261
+ `noise_warp: f32`. Packed by `GPUSceneVolumetrics` whenever the version moves — which, while any
262
+ volume's phase moves, is every frame (tens of rows).
263
+
264
+ Serialization: `ParticipatingMediaSerializationAdapter` version 1 (eighteen doubles),
265
+ `ParticipatingMediaSerializationUpgrader_0_1` fills a version-0 save with the defaults.
266
+
267
+ ### 5.4 The shader
268
+
269
+ `chunk_participating_media_noise`, bound as `tParticipatingMediaNoise` (`texture_3d<f32>`) with
270
+ `sParticipatingMediaNoise` (linear, clamped — the wrap is the skirt's and `fract`'s, never the
271
+ sampler's, which would wrap the whole atlas):
272
+
273
+ tap(slot, u): cell = (slot mod sx, (slot / sx) mod sy, slot / (sx·sy)), sx/sy from textureDimensions
274
+ texel = cell·130 + 1 + fract(u)·128; sample at texel / atlas_size
275
+ multiplier(volume, p):
276
+ base = p · noise_inverse_scale; u = base + noise_offset
277
+ if noise_warp > 0: w = tap(slot, base·0.5 + noise_warp_offset)
278
+ u += (w − 0.5) · noise_warp · (0.6, 0.48, −0.64)
279
+ return mix(1, tap(slot, u), noise_strength)
280
+
281
+ `participating_media_volume_density_at` multiplies it in under `if (noise_strength > 0)`.
282
+
283
+ ### 5.5 Specs
284
+
285
+ `GPUTileAtlas3D.spec.js` (slots, placement, skirt, growth with tiles preserved — read back off the
286
+ software device — the limit, formats); `shader_volumetrics_noise_tile_bake.spec.js` (emulator: skirt
287
+ = content wrapped, range, periodicity of the field across the content, padding words untouched,
288
+ octaves and features, determinism, the octave ceiling, WGSL validity);
289
+ `chunk_participating_media_noise.spec.js` (emulator, hand-built atlas: texel centres, wrap, the
290
+ skirt blend and never the next slot, strength, scale, scroll, the warp's displacement in closed
291
+ form, the density function bounded); `ParticipatingMediaVolume.spec.js` (the advance: units,
292
+ wrap, continuity, a week of frames); `GPUSceneVolumetrics.spec.js` and
293
+ `GPUViewVolumetrics.passes.spec.js` (unchanged, now encoding the atlas); the ECS `*.noise.spec.js`
294
+ trio (component JSON/equality, adapter round trip and the 0→1 upgrade, the system's fold and
295
+ per-frame invalidation).
296
+
297
+ ## 6. The forks, as answered
298
+
299
+ Revision (a): **F1** flow noise — yes in principle, then ditched with the texture pivot (§4).
300
+ **F2** octave band-limiting — "with textures insignificant", dropped. **F3** [0, 1] multiplier —
301
+ "absolutely". **F4** CPU-side wrapped phase — fine, "a mod on the CPU". **F5** scalar scale — fine.
302
+ **F6** delete the stubs — yes. **F7** per-volume velocity additive plus a multiplier on the wind —
303
+ yes: `noise_velocity`, `noise_wind_factor`.
304
+
305
+ Revision (b): **G1** no stacks — "one static texture, temporal variation via domain warping and
306
+ scrolling"; built as scroll + warp. **G2** 128³ — yes. **G3** general atlas from day one — yes.
307
+ **G4** migrating the SDF manager — a follow-up; Brixelizer left alone or promoted out of its FFX
308
+ naming, not built on. **G5** world-space repeat only — yes. **G6** automatic growth — "house style";
309
+ 16 slots was fine, 2 was chosen as the first layer since a layer is 4.4 MB and growth is automatic.
310
+ **G7** `r8unorm` — yes.
311
+
312
+ ## 7. Open, by measurement or by later ask
313
+
314
+ - The repeat distance is `noise_scale`; at 32 m on a wide bank seen from above it may read as a
315
+ lattice. The fix, if it shows, is a user tile with more features or a larger scale — no code.
316
+ - A per-volume `contrast`, a local clamped sampling mode (a texture that *is* the shape), exponential
317
+ height falloff, and history reprojected by the scroll: each a one-field or one-pass addition the
318
+ layout leaves room for, none asked for.
319
+ - The froxel-versus-tracer parity check for a noisy volume was not run on the device this pass;
320
+ both paths read one function and the chunk spec pins the function.
321
+
322
+ ## 8. Not verified this pass
323
+
324
+ RDR2's and Frostbite's fog-density slides (PPTX only). Nubis Cubed's noise authoring (cited
325
+ through Enshrouded). The GPC 2024 Enshrouded talk (video only). The contrast dip of a phase
326
+ crossfade, which the no-stacks decision made moot.
@@ -3,10 +3,13 @@
3
3
  * through, where the froxel volumetrics discretize.
4
4
  *
5
5
  * - `participating_media_volume_density_at` is the volume's particle density at a world position:
6
- * `density` times its edge fade, zero outside its box. The fade is the per-axis smoothstep over
7
- * `fade_distance` (in world units, unaffected by scale) that `compute_volume_fade_factor` evaluates
8
- * at a froxel's midpoint; here it is the field itself. Bounded above by `density`, so
9
- * `density * extinction` majorizes the volume anywhere in it.
6
+ * `density` times its edge fade times its noise, zero outside its box. The fade is the per-axis
7
+ * smoothstep over `fade_distance` (in world units, unaffected by scale) that
8
+ * `compute_volume_fade_factor` evaluates at a froxel's midpoint; here it is the field itself. The
9
+ * noise is `chunk_participating_media_noise`'s [0, 1] multiplier from the volumetrics noise
10
+ * atlas, which an importing shader therefore binds as `tParticipatingMediaNoise` with
11
+ * `sParticipatingMediaNoise`. Bounded above by `density`, so `density * extinction` majorizes
12
+ * the volume anywhere in it.
10
13
  * - `participating_media_volume_span` is where a ray is inside the box, as distances along it,
11
14
  * clipped to `[0, t_max]`; empty (`y <= x`) when it misses. The direction need not be unit
12
15
  * length, and the distances are in its units: the local direction is not renormalized.
@@ -1 +1 @@
1
- {"version":3,"file":"chunk_participating_media_volume_sample.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.js"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;GAiBG;AACH,sDAFU,SAAS,CAgDjB;0BAnEwB,iCAAiC"}
1
+ {"version":3,"file":"chunk_participating_media_volume_sample.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/chunk_participating_media_volume_sample.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,sDAFU,SAAS,CAwDjB;0BA/EwB,iCAAiC"}
@@ -1,6 +1,7 @@
1
1
  import { chunk_aabb3_slab_span } from "../shader/chunk/geometry/aabb3/chunk_aabb3_slab_span.js";
2
2
  import { chunk_mat4_extract_scale } from "../shader/chunk/geometry/mat4/chunk_mat4_extract_scale.js";
3
3
  import { CodeChunk } from "../shader/compiler/CodeChunk.js";
4
+ import { chunk_participating_media_noise } from "./noise/chunk_participating_media_noise.js";
4
5
  import { PARTICIPATING_MEDIA_VOLUME_STRUCT } from "./PARTICIPATING_MEDIA_VOLUME_STRUCT.js";
5
6
 
6
7
  /**
@@ -8,10 +9,13 @@ import { PARTICIPATING_MEDIA_VOLUME_STRUCT } from "./PARTICIPATING_MEDIA_VOLUME_
8
9
  * through, where the froxel volumetrics discretize.
9
10
  *
10
11
  * - `participating_media_volume_density_at` is the volume's particle density at a world position:
11
- * `density` times its edge fade, zero outside its box. The fade is the per-axis smoothstep over
12
- * `fade_distance` (in world units, unaffected by scale) that `compute_volume_fade_factor` evaluates
13
- * at a froxel's midpoint; here it is the field itself. Bounded above by `density`, so
14
- * `density * extinction` majorizes the volume anywhere in it.
12
+ * `density` times its edge fade times its noise, zero outside its box. The fade is the per-axis
13
+ * smoothstep over `fade_distance` (in world units, unaffected by scale) that
14
+ * `compute_volume_fade_factor` evaluates at a froxel's midpoint; here it is the field itself. The
15
+ * noise is `chunk_participating_media_noise`'s [0, 1] multiplier from the volumetrics noise
16
+ * atlas, which an importing shader therefore binds as `tParticipatingMediaNoise` with
17
+ * `sParticipatingMediaNoise`. Bounded above by `density`, so `density * extinction` majorizes
18
+ * the volume anywhere in it.
15
19
  * - `participating_media_volume_span` is where a ray is inside the box, as distances along it,
16
20
  * clipped to `[0, t_max]`; empty (`y <= x`) when it misses. The direction need not be unit
17
21
  * length, and the distances are in its units: the local direction is not renormalized.
@@ -32,14 +36,21 @@ fn participating_media_volume_density_at(volume: ${PARTICIPATING_MEDIA_VOLUME_ST
32
36
  return 0.0;
33
37
  }
34
38
 
35
- if (volume.fade_distance <= 0.001) {
36
- return volume.density;
39
+ var density = volume.density;
40
+
41
+ if (volume.fade_distance > 0.001) {
42
+ let to_edge_world = to_edge_local * mat4_extract_scale(volume.transform);
43
+ let fade = smoothstep(vec3<f32>(0.0), vec3<f32>(volume.fade_distance), to_edge_world);
44
+
45
+ density *= fade.x * fade.y * fade.z;
37
46
  }
38
47
 
39
- let to_edge_world = to_edge_local * mat4_extract_scale(volume.transform);
40
- let fade = smoothstep(vec3<f32>(0.0), vec3<f32>(volume.fade_distance), to_edge_world);
48
+ // a property of the volume, so every thread agrees: a uniform branch, not a variant
49
+ if (volume.noise_strength > 0.0) {
50
+ density *= participating_media_noise_multiplier(volume, position);
51
+ }
41
52
 
42
- return volume.density * fade.x * fade.y * fade.z;
53
+ return density;
43
54
  }
44
55
 
45
56
  fn participating_media_volume_span(
@@ -66,5 +77,6 @@ fn participating_media_volume_span(
66
77
  PARTICIPATING_MEDIA_VOLUME_STRUCT.declaration_chunk,
67
78
  chunk_aabb3_slab_span,
68
79
  chunk_mat4_extract_scale,
80
+ chunk_participating_media_noise,
69
81
  ]
70
82
  );
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Froxel-grid texture coordinates of a point given as its clip position and its planar view depth.
3
+ *
4
+ * The second half of {@link volumetrics_position_world_to_froxel_uvw}, for a caller that already
5
+ * has those two: a march along a straight line, where both are affine in the line parameter and
6
+ * cost two `fma` per sample, a vec4 and a scalar, instead of two matrix products (see
7
+ * {@link chunk_volumetrics_sample_froxel_extinction}).
8
+ *
9
+ * `content_offset` is {@link chunk_volumetrics_froxel_content_offset} of the grid's slice scale. It
10
+ * depends on nothing but the grid, so a march evaluates it once and passes it in. Evaluated per
11
+ * sample, it is an `exp` and three divides that the compiler leaves inside the loop.
12
+ *
13
+ * NOTE: we don't clamp final slice coordinate, this is intentional, we let the linear texture sampler take care of that.
14
+ * See {@link build_light_cluster_parameters}
15
+ * @type {CodeChunk}
16
+ */
17
+ export const chunk_volumetrics_froxel_uvw_from_clip: CodeChunk;
18
+ import { CodeChunk } from "../shader/compiler/CodeChunk.js";
19
+ //# sourceMappingURL=chunk_volumetrics_froxel_uvw_from_clip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk_volumetrics_froxel_uvw_from_clip.d.ts","sourceRoot":"","sources":["../../../../../src/shade/renderer/volumetrics/chunk_volumetrics_froxel_uvw_from_clip.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;GAeG;AACH,qDAFU,SAAS,CAmCjB;0BAnDwB,iCAAiC"}