@onerjs/core 8.31.9 → 8.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (371) hide show
  1. package/Audio/Interfaces/ISoundOptions.d.ts +1 -1
  2. package/Audio/Interfaces/ISoundOptions.js.map +1 -1
  3. package/Audio/audioEngine.d.ts +3 -4
  4. package/Audio/audioEngine.js +9 -6
  5. package/Audio/audioEngine.js.map +1 -1
  6. package/Audio/sound.d.ts +33 -54
  7. package/Audio/sound.js +450 -718
  8. package/Audio/sound.js.map +1 -1
  9. package/AudioV2/abstractAudio/abstractAudioOutNode.d.ts +1 -1
  10. package/AudioV2/abstractAudio/abstractAudioOutNode.js +1 -1
  11. package/AudioV2/abstractAudio/abstractAudioOutNode.js.map +1 -1
  12. package/AudioV2/abstractAudio/abstractSound.d.ts +1 -1
  13. package/AudioV2/abstractAudio/abstractSound.js +2 -2
  14. package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
  15. package/AudioV2/abstractAudio/abstractSoundSource.d.ts +11 -3
  16. package/AudioV2/abstractAudio/abstractSoundSource.js +37 -1
  17. package/AudioV2/abstractAudio/abstractSoundSource.js.map +1 -1
  18. package/AudioV2/abstractAudio/audioBus.d.ts +8 -3
  19. package/AudioV2/abstractAudio/audioBus.js +24 -1
  20. package/AudioV2/abstractAudio/audioBus.js.map +1 -1
  21. package/AudioV2/abstractAudio/staticSound.d.ts +1 -1
  22. package/AudioV2/abstractAudio/staticSound.js +2 -2
  23. package/AudioV2/abstractAudio/staticSound.js.map +1 -1
  24. package/AudioV2/abstractAudio/streamingSound.d.ts +1 -1
  25. package/AudioV2/abstractAudio/streamingSound.js +2 -2
  26. package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
  27. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.d.ts +1 -1
  28. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js +3 -0
  29. package/AudioV2/abstractAudio/subNodes/abstractAudioSubGraph.js.map +1 -1
  30. package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.d.ts +1 -0
  31. package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.js +1 -0
  32. package/AudioV2/abstractAudio/subNodes/spatialAudioSubNode.js.map +1 -1
  33. package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.d.ts +12 -2
  34. package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.js +2 -0
  35. package/AudioV2/abstractAudio/subProperties/abstractSpatialAudio.js.map +1 -1
  36. package/AudioV2/abstractAudio/subProperties/spatialAudio.d.ts +6 -0
  37. package/AudioV2/abstractAudio/subProperties/spatialAudio.js +25 -0
  38. package/AudioV2/abstractAudio/subProperties/spatialAudio.js.map +1 -1
  39. package/AudioV2/webAudio/components/webAudioParameterComponent.js +2 -2
  40. package/AudioV2/webAudio/components/webAudioParameterComponent.js.map +1 -1
  41. package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.d.ts +3 -0
  42. package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js +14 -17
  43. package/AudioV2/webAudio/subNodes/spatialWebAudioSubNode.js.map +1 -1
  44. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js +1 -0
  45. package/AudioV2/webAudio/subNodes/webAudioBusAndSoundSubGraph.js.map +1 -1
  46. package/AudioV2/webAudio/subProperties/spatialWebAudio.js +1 -0
  47. package/AudioV2/webAudio/subProperties/spatialWebAudio.js.map +1 -1
  48. package/AudioV2/webAudio/webAudioBus.d.ts +2 -7
  49. package/AudioV2/webAudio/webAudioBus.js +4 -24
  50. package/AudioV2/webAudio/webAudioBus.js.map +1 -1
  51. package/AudioV2/webAudio/webAudioEngine.js +1 -0
  52. package/AudioV2/webAudio/webAudioEngine.js.map +1 -1
  53. package/AudioV2/webAudio/webAudioSoundSource.d.ts +2 -7
  54. package/AudioV2/webAudio/webAudioSoundSource.js +3 -24
  55. package/AudioV2/webAudio/webAudioSoundSource.js.map +1 -1
  56. package/AudioV2/webAudio/webAudioStaticSound.d.ts +3 -7
  57. package/AudioV2/webAudio/webAudioStaticSound.js +13 -26
  58. package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
  59. package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -7
  60. package/AudioV2/webAudio/webAudioStreamingSound.js +6 -23
  61. package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
  62. package/Behaviors/Cameras/autoRotationBehavior.d.ts +4 -0
  63. package/Behaviors/Cameras/autoRotationBehavior.js +7 -0
  64. package/Behaviors/Cameras/autoRotationBehavior.js.map +1 -1
  65. package/Behaviors/Cameras/bouncingBehavior.d.ts +5 -0
  66. package/Behaviors/Cameras/bouncingBehavior.js +8 -0
  67. package/Behaviors/Cameras/bouncingBehavior.js.map +1 -1
  68. package/Behaviors/Cameras/framingBehavior.d.ts +4 -0
  69. package/Behaviors/Cameras/framingBehavior.js +7 -0
  70. package/Behaviors/Cameras/framingBehavior.js.map +1 -1
  71. package/Behaviors/Cameras/interpolatingBehavior.d.ts +7 -2
  72. package/Behaviors/Cameras/interpolatingBehavior.js +12 -4
  73. package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
  74. package/Behaviors/Meshes/attachToBoxBehavior.d.ts +5 -0
  75. package/Behaviors/Meshes/attachToBoxBehavior.js +8 -1
  76. package/Behaviors/Meshes/attachToBoxBehavior.js.map +1 -1
  77. package/Behaviors/Meshes/baseSixDofDragBehavior.d.ts +5 -2
  78. package/Behaviors/Meshes/baseSixDofDragBehavior.js +8 -0
  79. package/Behaviors/Meshes/baseSixDofDragBehavior.js.map +1 -1
  80. package/Behaviors/Meshes/fadeInOutBehavior.d.ts +5 -0
  81. package/Behaviors/Meshes/fadeInOutBehavior.js +6 -0
  82. package/Behaviors/Meshes/fadeInOutBehavior.js.map +1 -1
  83. package/Behaviors/Meshes/handConstraintBehavior.d.ts +5 -0
  84. package/Behaviors/Meshes/handConstraintBehavior.js +8 -0
  85. package/Behaviors/Meshes/handConstraintBehavior.js.map +1 -1
  86. package/Behaviors/Meshes/multiPointerScaleBehavior.d.ts +5 -0
  87. package/Behaviors/Meshes/multiPointerScaleBehavior.js +8 -0
  88. package/Behaviors/Meshes/multiPointerScaleBehavior.js.map +1 -1
  89. package/Behaviors/Meshes/pointerDragBehavior.d.ts +1 -1
  90. package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
  91. package/Behaviors/Meshes/sixDofDragBehavior.js +1 -1
  92. package/Behaviors/Meshes/sixDofDragBehavior.js.map +1 -1
  93. package/Behaviors/Meshes/surfaceMagnetismBehavior.d.ts +5 -0
  94. package/Behaviors/Meshes/surfaceMagnetismBehavior.js +7 -0
  95. package/Behaviors/Meshes/surfaceMagnetismBehavior.js.map +1 -1
  96. package/Behaviors/behavior.d.ts +4 -0
  97. package/Behaviors/behavior.js.map +1 -1
  98. package/Cameras/arcRotateCamera.js +4 -5
  99. package/Cameras/arcRotateCamera.js.map +1 -1
  100. package/Cameras/geospatialCamera.d.ts +4 -5
  101. package/Cameras/geospatialCamera.js +42 -29
  102. package/Cameras/geospatialCamera.js.map +1 -1
  103. package/Cameras/geospatialCameraMovement.js +1 -1
  104. package/Cameras/geospatialCameraMovement.js.map +1 -1
  105. package/Compute/computeEffect.js +5 -1
  106. package/Compute/computeEffect.js.map +1 -1
  107. package/Compute/computeShader.d.ts +4 -0
  108. package/Compute/computeShader.js +9 -3
  109. package/Compute/computeShader.js.map +1 -1
  110. package/Debug/debugLayer.d.ts +1 -1
  111. package/Debug/debugLayer.js.map +1 -1
  112. package/Engines/abstractEngine.d.ts +2 -2
  113. package/Engines/abstractEngine.js +2 -2
  114. package/Engines/abstractEngine.js.map +1 -1
  115. package/Engines/thinEngine.js +1 -1
  116. package/Engines/thinEngine.js.map +1 -1
  117. package/Engines/webgpuEngine.js +8 -9
  118. package/Engines/webgpuEngine.js.map +1 -1
  119. package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.d.ts +74 -0
  120. package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.js +179 -0
  121. package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.js.map +1 -0
  122. package/FrameGraph/Node/Blocks/index.d.ts +2 -0
  123. package/FrameGraph/Node/Blocks/index.js +2 -0
  124. package/FrameGraph/Node/Blocks/index.js.map +1 -1
  125. package/FrameGraph/Node/Blocks/lightingVolumeBlock.d.ts +43 -0
  126. package/FrameGraph/Node/Blocks/lightingVolumeBlock.js +93 -0
  127. package/FrameGraph/Node/Blocks/lightingVolumeBlock.js.map +1 -0
  128. package/FrameGraph/Passes/renderPass.js +2 -2
  129. package/FrameGraph/Passes/renderPass.js.map +1 -1
  130. package/FrameGraph/Tasks/Layers/baseLayerTask.d.ts +2 -0
  131. package/FrameGraph/Tasks/Layers/baseLayerTask.js +6 -0
  132. package/FrameGraph/Tasks/Layers/baseLayerTask.js.map +1 -1
  133. package/FrameGraph/Tasks/Layers/glowLayerTask.d.ts +1 -0
  134. package/FrameGraph/Tasks/Layers/glowLayerTask.js +3 -0
  135. package/FrameGraph/Tasks/Layers/glowLayerTask.js.map +1 -1
  136. package/FrameGraph/Tasks/Layers/highlightLayerTask.d.ts +1 -0
  137. package/FrameGraph/Tasks/Layers/highlightLayerTask.js +3 -0
  138. package/FrameGraph/Tasks/Layers/highlightLayerTask.js.map +1 -1
  139. package/FrameGraph/Tasks/Misc/computeShaderTask.d.ts +1 -0
  140. package/FrameGraph/Tasks/Misc/computeShaderTask.js +3 -0
  141. package/FrameGraph/Tasks/Misc/computeShaderTask.js.map +1 -1
  142. package/FrameGraph/Tasks/Misc/cullObjectsTask.d.ts +1 -0
  143. package/FrameGraph/Tasks/Misc/cullObjectsTask.js +3 -0
  144. package/FrameGraph/Tasks/Misc/cullObjectsTask.js.map +1 -1
  145. package/FrameGraph/Tasks/Misc/executeTask.d.ts +1 -0
  146. package/FrameGraph/Tasks/Misc/executeTask.js +3 -0
  147. package/FrameGraph/Tasks/Misc/executeTask.js.map +1 -1
  148. package/FrameGraph/Tasks/Misc/lightingVolumeTask.d.ts +32 -0
  149. package/FrameGraph/Tasks/Misc/lightingVolumeTask.js +63 -0
  150. package/FrameGraph/Tasks/Misc/lightingVolumeTask.js.map +1 -0
  151. package/FrameGraph/Tasks/PostProcesses/anaglyphTask.d.ts +1 -0
  152. package/FrameGraph/Tasks/PostProcesses/anaglyphTask.js +3 -0
  153. package/FrameGraph/Tasks/PostProcesses/anaglyphTask.js.map +1 -1
  154. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.d.ts +1 -0
  155. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js +3 -0
  156. package/FrameGraph/Tasks/PostProcesses/blackAndWhiteTask.js.map +1 -1
  157. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.d.ts +1 -0
  158. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js +3 -0
  159. package/FrameGraph/Tasks/PostProcesses/bloomMergeTask.js.map +1 -1
  160. package/FrameGraph/Tasks/PostProcesses/bloomTask.d.ts +1 -0
  161. package/FrameGraph/Tasks/PostProcesses/bloomTask.js +3 -0
  162. package/FrameGraph/Tasks/PostProcesses/bloomTask.js.map +1 -1
  163. package/FrameGraph/Tasks/PostProcesses/blurTask.d.ts +1 -0
  164. package/FrameGraph/Tasks/PostProcesses/blurTask.js +3 -0
  165. package/FrameGraph/Tasks/PostProcesses/blurTask.js.map +1 -1
  166. package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.d.ts +1 -0
  167. package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.js +3 -0
  168. package/FrameGraph/Tasks/PostProcesses/chromaticAberrationTask.js.map +1 -1
  169. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.d.ts +1 -0
  170. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js +3 -0
  171. package/FrameGraph/Tasks/PostProcesses/circleOfConfusionTask.js.map +1 -1
  172. package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.d.ts +1 -0
  173. package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.js +3 -0
  174. package/FrameGraph/Tasks/PostProcesses/colorCorrectionTask.js.map +1 -1
  175. package/FrameGraph/Tasks/PostProcesses/convolutionTask.d.ts +1 -0
  176. package/FrameGraph/Tasks/PostProcesses/convolutionTask.js +3 -0
  177. package/FrameGraph/Tasks/PostProcesses/convolutionTask.js.map +1 -1
  178. package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.d.ts +1 -0
  179. package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.js +3 -0
  180. package/FrameGraph/Tasks/PostProcesses/customPostProcessTask.js.map +1 -1
  181. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.d.ts +1 -0
  182. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js +3 -0
  183. package/FrameGraph/Tasks/PostProcesses/depthOfFieldBlurTask.js.map +1 -1
  184. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.d.ts +1 -0
  185. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js +3 -0
  186. package/FrameGraph/Tasks/PostProcesses/depthOfFieldMergeTask.js.map +1 -1
  187. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.d.ts +1 -0
  188. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js +3 -0
  189. package/FrameGraph/Tasks/PostProcesses/depthOfFieldTask.js.map +1 -1
  190. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.d.ts +1 -0
  191. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js +3 -0
  192. package/FrameGraph/Tasks/PostProcesses/extractHighlightsTask.js.map +1 -1
  193. package/FrameGraph/Tasks/PostProcesses/filterTask.d.ts +1 -0
  194. package/FrameGraph/Tasks/PostProcesses/filterTask.js +3 -0
  195. package/FrameGraph/Tasks/PostProcesses/filterTask.js.map +1 -1
  196. package/FrameGraph/Tasks/PostProcesses/fxaaTask.d.ts +1 -0
  197. package/FrameGraph/Tasks/PostProcesses/fxaaTask.js +3 -0
  198. package/FrameGraph/Tasks/PostProcesses/fxaaTask.js.map +1 -1
  199. package/FrameGraph/Tasks/PostProcesses/grainTask.d.ts +1 -0
  200. package/FrameGraph/Tasks/PostProcesses/grainTask.js +3 -0
  201. package/FrameGraph/Tasks/PostProcesses/grainTask.js.map +1 -1
  202. package/FrameGraph/Tasks/PostProcesses/imageProcessingTask.d.ts +1 -0
  203. package/FrameGraph/Tasks/PostProcesses/imageProcessingTask.js +3 -0
  204. package/FrameGraph/Tasks/PostProcesses/imageProcessingTask.js.map +1 -1
  205. package/FrameGraph/Tasks/PostProcesses/motionBlurTask.d.ts +1 -0
  206. package/FrameGraph/Tasks/PostProcesses/motionBlurTask.js +3 -0
  207. package/FrameGraph/Tasks/PostProcesses/motionBlurTask.js.map +1 -1
  208. package/FrameGraph/Tasks/PostProcesses/passTask.d.ts +2 -0
  209. package/FrameGraph/Tasks/PostProcesses/passTask.js +6 -0
  210. package/FrameGraph/Tasks/PostProcesses/passTask.js.map +1 -1
  211. package/FrameGraph/Tasks/PostProcesses/postProcessTask.d.ts +3 -2
  212. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js +3 -0
  213. package/FrameGraph/Tasks/PostProcesses/postProcessTask.js.map +1 -1
  214. package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.d.ts +1 -0
  215. package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.js +3 -0
  216. package/FrameGraph/Tasks/PostProcesses/screenSpaceCurvatureTask.js.map +1 -1
  217. package/FrameGraph/Tasks/PostProcesses/sharpenTask.d.ts +1 -0
  218. package/FrameGraph/Tasks/PostProcesses/sharpenTask.js +3 -0
  219. package/FrameGraph/Tasks/PostProcesses/sharpenTask.js.map +1 -1
  220. package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.d.ts +1 -0
  221. package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.js +3 -0
  222. package/FrameGraph/Tasks/PostProcesses/ssao2BlurTask.js.map +1 -1
  223. package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.d.ts +1 -0
  224. package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js +3 -0
  225. package/FrameGraph/Tasks/PostProcesses/ssao2RenderingPipelineTask.js.map +1 -1
  226. package/FrameGraph/Tasks/PostProcesses/ssao2Task.d.ts +1 -0
  227. package/FrameGraph/Tasks/PostProcesses/ssao2Task.js +3 -0
  228. package/FrameGraph/Tasks/PostProcesses/ssao2Task.js.map +1 -1
  229. package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.d.ts +1 -0
  230. package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.js +3 -0
  231. package/FrameGraph/Tasks/PostProcesses/ssrBlurTask.js.map +1 -1
  232. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.d.ts +1 -0
  233. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js +3 -0
  234. package/FrameGraph/Tasks/PostProcesses/ssrRenderingPipelineTask.js.map +1 -1
  235. package/FrameGraph/Tasks/PostProcesses/ssrTask.d.ts +1 -0
  236. package/FrameGraph/Tasks/PostProcesses/ssrTask.js +3 -0
  237. package/FrameGraph/Tasks/PostProcesses/ssrTask.js.map +1 -1
  238. package/FrameGraph/Tasks/PostProcesses/taaTask.d.ts +1 -0
  239. package/FrameGraph/Tasks/PostProcesses/taaTask.js +3 -0
  240. package/FrameGraph/Tasks/PostProcesses/taaTask.js.map +1 -1
  241. package/FrameGraph/Tasks/PostProcesses/tonemapTask.d.ts +1 -0
  242. package/FrameGraph/Tasks/PostProcesses/tonemapTask.js +3 -0
  243. package/FrameGraph/Tasks/PostProcesses/tonemapTask.js.map +1 -1
  244. package/FrameGraph/Tasks/PostProcesses/volumetricLightingBlendVolumeTask.d.ts +31 -0
  245. package/FrameGraph/Tasks/PostProcesses/volumetricLightingBlendVolumeTask.js +60 -0
  246. package/FrameGraph/Tasks/PostProcesses/volumetricLightingBlendVolumeTask.js.map +1 -0
  247. package/FrameGraph/Tasks/PostProcesses/volumetricLightingTask.d.ts +93 -0
  248. package/FrameGraph/Tasks/PostProcesses/volumetricLightingTask.js +183 -0
  249. package/FrameGraph/Tasks/PostProcesses/volumetricLightingTask.js.map +1 -0
  250. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.d.ts +1 -0
  251. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js +3 -0
  252. package/FrameGraph/Tasks/Rendering/csmShadowGeneratorTask.js.map +1 -1
  253. package/FrameGraph/Tasks/Rendering/geometryRendererTask.d.ts +1 -0
  254. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js +3 -0
  255. package/FrameGraph/Tasks/Rendering/geometryRendererTask.js.map +1 -1
  256. package/FrameGraph/Tasks/Rendering/objectRendererTask.d.ts +1 -0
  257. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +4 -1
  258. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  259. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.d.ts +1 -0
  260. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js +3 -0
  261. package/FrameGraph/Tasks/Rendering/shadowGeneratorTask.js.map +1 -1
  262. package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.d.ts +1 -0
  263. package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.js +3 -0
  264. package/FrameGraph/Tasks/Rendering/utilityLayerRendererTask.js.map +1 -1
  265. package/FrameGraph/Tasks/Texture/clearTextureTask.d.ts +1 -0
  266. package/FrameGraph/Tasks/Texture/clearTextureTask.js +4 -1
  267. package/FrameGraph/Tasks/Texture/clearTextureTask.js.map +1 -1
  268. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.d.ts +1 -0
  269. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js +3 -0
  270. package/FrameGraph/Tasks/Texture/copyToBackbufferColorTask.js.map +1 -1
  271. package/FrameGraph/Tasks/Texture/copyToTextureTask.d.ts +1 -0
  272. package/FrameGraph/Tasks/Texture/copyToTextureTask.js +21 -4
  273. package/FrameGraph/Tasks/Texture/copyToTextureTask.js.map +1 -1
  274. package/FrameGraph/Tasks/Texture/generateMipMapsTask.d.ts +1 -0
  275. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js +3 -0
  276. package/FrameGraph/Tasks/Texture/generateMipMapsTask.js.map +1 -1
  277. package/FrameGraph/frameGraphRenderContext.d.ts +3 -2
  278. package/FrameGraph/frameGraphRenderContext.js +14 -5
  279. package/FrameGraph/frameGraphRenderContext.js.map +1 -1
  280. package/FrameGraph/frameGraphTask.d.ts +5 -0
  281. package/FrameGraph/frameGraphTask.js +11 -2
  282. package/FrameGraph/frameGraphTask.js.map +1 -1
  283. package/FrameGraph/index.d.ts +2 -0
  284. package/FrameGraph/index.js +2 -0
  285. package/FrameGraph/index.js.map +1 -1
  286. package/Helpers/sceneHelpers.js +1 -1
  287. package/Helpers/sceneHelpers.js.map +1 -1
  288. package/Lights/index.d.ts +1 -0
  289. package/Lights/index.js +1 -0
  290. package/Lights/index.js.map +1 -1
  291. package/Lights/lightingVolume.d.ts +95 -0
  292. package/Lights/lightingVolume.js +536 -0
  293. package/Lights/lightingVolume.js.map +1 -0
  294. package/Loading/Plugins/babylonFileLoader.js.map +1 -1
  295. package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +7 -0
  296. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +21 -5
  297. package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
  298. package/Materials/floatingOriginMatrixOverrides.js +6 -5
  299. package/Materials/floatingOriginMatrixOverrides.js.map +1 -1
  300. package/Materials/uniformBuffer.d.ts +1 -0
  301. package/Materials/uniformBuffer.js +8 -1
  302. package/Materials/uniformBuffer.js.map +1 -1
  303. package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +5 -2
  304. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +138 -45
  305. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  306. package/Meshes/geometry.d.ts +2 -1
  307. package/Meshes/geometry.js +6 -2
  308. package/Meshes/geometry.js.map +1 -1
  309. package/Meshes/mesh.d.ts +2 -1
  310. package/Meshes/mesh.js +4 -3
  311. package/Meshes/mesh.js.map +1 -1
  312. package/Particles/Node/Blocks/Update/updateFlowMapBlock.d.ts +9 -1
  313. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js +8 -0
  314. package/Particles/Node/Blocks/Update/updateFlowMapBlock.js.map +1 -1
  315. package/Particles/Node/Blocks/Update/updateNoiseBlock.d.ts +39 -0
  316. package/Particles/Node/Blocks/Update/updateNoiseBlock.js +102 -0
  317. package/Particles/Node/Blocks/Update/updateNoiseBlock.js.map +1 -0
  318. package/Particles/Node/Blocks/index.d.ts +1 -0
  319. package/Particles/Node/Blocks/index.js +1 -0
  320. package/Particles/Node/Blocks/index.js.map +1 -1
  321. package/Particles/Node/Blocks/particleSourceTextureBlock.d.ts +9 -5
  322. package/Particles/Node/Blocks/particleSourceTextureBlock.js +31 -13
  323. package/Particles/Node/Blocks/particleSourceTextureBlock.js.map +1 -1
  324. package/Particles/Node/nodeParticleSystemSet.helper.js +39 -21
  325. package/Particles/Node/nodeParticleSystemSet.helper.js.map +1 -1
  326. package/Particles/particle.d.ts +2 -2
  327. package/Particles/particle.js +4 -2
  328. package/Particles/particle.js.map +1 -1
  329. package/Particles/thinParticleSystem.d.ts +1 -1
  330. package/Particles/thinParticleSystem.function.js +2 -2
  331. package/Particles/thinParticleSystem.function.js.map +1 -1
  332. package/Particles/thinParticleSystem.js.map +1 -1
  333. package/Physics/v2/characterController.d.ts +42 -2
  334. package/Physics/v2/characterController.js +140 -46
  335. package/Physics/v2/characterController.js.map +1 -1
  336. package/Shaders/gaussianSplatting.vertex.js +2 -2
  337. package/Shaders/gaussianSplatting.vertex.js.map +1 -1
  338. package/Shaders/volumetricLightingBlendVolume.fragment.d.ts +5 -0
  339. package/Shaders/volumetricLightingBlendVolume.fragment.js +21 -0
  340. package/Shaders/volumetricLightingBlendVolume.fragment.js.map +1 -0
  341. package/Shaders/volumetricLightingRenderVolume.fragment.d.ts +7 -0
  342. package/Shaders/volumetricLightingRenderVolume.fragment.js +25 -0
  343. package/Shaders/volumetricLightingRenderVolume.fragment.js.map +1 -0
  344. package/Shaders/volumetricLightingRenderVolume.vertex.d.ts +9 -0
  345. package/Shaders/volumetricLightingRenderVolume.vertex.js +18 -0
  346. package/Shaders/volumetricLightingRenderVolume.vertex.js.map +1 -0
  347. package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
  348. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  349. package/ShadersWGSL/gaussianSplattingDepth.fragment.d.ts +0 -1
  350. package/ShadersWGSL/gaussianSplattingDepth.fragment.js +0 -2
  351. package/ShadersWGSL/gaussianSplattingDepth.fragment.js.map +1 -1
  352. package/ShadersWGSL/lightingVolume.compute.d.ts +5 -0
  353. package/ShadersWGSL/lightingVolume.compute.js +33 -0
  354. package/ShadersWGSL/lightingVolume.compute.js.map +1 -0
  355. package/ShadersWGSL/volumetricLightingBlendVolume.fragment.d.ts +5 -0
  356. package/ShadersWGSL/volumetricLightingBlendVolume.fragment.js +22 -0
  357. package/ShadersWGSL/volumetricLightingBlendVolume.fragment.js.map +1 -0
  358. package/ShadersWGSL/volumetricLightingRenderVolume.fragment.d.ts +7 -0
  359. package/ShadersWGSL/volumetricLightingRenderVolume.fragment.js +27 -0
  360. package/ShadersWGSL/volumetricLightingRenderVolume.fragment.js.map +1 -0
  361. package/ShadersWGSL/volumetricLightingRenderVolume.vertex.d.ts +7 -0
  362. package/ShadersWGSL/volumetricLightingRenderVolume.vertex.js +17 -0
  363. package/ShadersWGSL/volumetricLightingRenderVolume.vertex.js.map +1 -0
  364. package/States/IStencilState.d.ts +48 -2
  365. package/States/IStencilState.js.map +1 -1
  366. package/States/alphaCullingState.d.ts +1 -0
  367. package/States/alphaCullingState.js +3 -0
  368. package/States/alphaCullingState.js.map +1 -1
  369. package/package.json +1 -1
  370. package/scene.js +6 -4
  371. package/scene.js.map +1 -1
@@ -19,7 +19,7 @@ const shader = `#include<__decl__gaussianSplattingVertex>
19
19
  #include<fogVertexDeclaration>
20
20
  #include<logDepthDeclaration>
21
21
  #include<helperFunctions>
22
- uniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform float kernelSize;uniform vec3 eyePosition;uniform vec3 viewDirectionFactor;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;
22
+ uniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform float kernelSize;uniform vec3 eyePosition;uniform vec3 viewDirectionFactor;uniform float alpha;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;
23
23
  #if SH_DEGREE>0
24
24
  uniform highp usampler2D shTexture0;
25
25
  #endif
@@ -35,7 +35,7 @@ void main () {float splatIndex=getSplatIndex(int(position.z+0.5));Splat splat=re
35
35
  #if SH_DEGREE>0
36
36
  mat3 worldRot=mat3(world);mat3 normWorldRot=inverseMat3(worldRot);vec3 dir=normalize(normWorldRot*(worldPos.xyz-eyePosition));dir*=viewDirectionFactor;vColor.xyz=splat.color.xyz+computeSH(splat,dir);
37
37
  #endif
38
- gl_Position=gaussianSplatting(position.xy,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);
38
+ vColor.w*=alpha;gl_Position=gaussianSplatting(position.xy,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);
39
39
  #include<clipPlaneVertex>
40
40
  #include<fogVertex>
41
41
  #include<logDepthVertex>
@@ -1 +1 @@
1
- {"version":3,"file":"gaussianSplatting.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/gaussianSplatting.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,qDAAqD,CAAC;AAC7D,OAAO,kDAAkD,CAAC;AAC1D,OAAO,6CAA6C,CAAC;AACrD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,iCAAiC,CAAC;AAEzC,MAAM,IAAI,GAAG,+BAA+B,CAAC;AAC7C,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Bd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/gaussianSplattingVertexDeclaration\";\nimport \"./ShadersInclude/gaussianSplattingUboDeclaration\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"./ShadersInclude/fogVertexDeclaration\";\nimport \"./ShadersInclude/logDepthDeclaration\";\nimport \"./ShadersInclude/helperFunctions\";\nimport \"./ShadersInclude/gaussianSplatting\";\nimport \"./ShadersInclude/clipPlaneVertex\";\nimport \"./ShadersInclude/fogVertex\";\nimport \"./ShadersInclude/logDepthVertex\";\n\nconst name = \"gaussianSplattingVertexShader\";\nconst shader = `#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\n#include<helperFunctions>\nuniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform float kernelSize;uniform vec3 eyePosition;uniform vec3 viewDirectionFactor;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;\n#if SH_DEGREE>0\nuniform highp usampler2D shTexture0;\n#endif\n#if SH_DEGREE>1\nuniform highp usampler2D shTexture1;\n#endif\n#if SH_DEGREE>2\nuniform highp usampler2D shTexture2;\n#endif\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplatting>\nvoid main () {float splatIndex=getSplatIndex(int(position.z+0.5));Splat splat=readSplat(splatIndex);vec3 covA=splat.covA.xyz;vec3 covB=vec3(splat.covA.w,splat.covB.xy);vec4 worldPos=world*vec4(splat.center.xyz,1.0);vColor=splat.color;vPosition=position.xy;\n#if SH_DEGREE>0\nmat3 worldRot=mat3(world);mat3 normWorldRot=inverseMat3(worldRot);vec3 dir=normalize(normWorldRot*(worldPos.xyz-eyePosition));dir*=viewDirectionFactor;vColor.xyz=splat.color.xyz+computeSH(splat,dir);\n#endif\ngl_Position=gaussianSplatting(position.xy,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const gaussianSplattingVertexShader = { name, shader };\n"]}
1
+ {"version":3,"file":"gaussianSplatting.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/gaussianSplatting.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,qDAAqD,CAAC;AAC7D,OAAO,kDAAkD,CAAC;AAC1D,OAAO,6CAA6C,CAAC;AACrD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,iCAAiC,CAAC;AAEzC,MAAM,IAAI,GAAG,+BAA+B,CAAC;AAC7C,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6Bd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/gaussianSplattingVertexDeclaration\";\nimport \"./ShadersInclude/gaussianSplattingUboDeclaration\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"./ShadersInclude/fogVertexDeclaration\";\nimport \"./ShadersInclude/logDepthDeclaration\";\nimport \"./ShadersInclude/helperFunctions\";\nimport \"./ShadersInclude/gaussianSplatting\";\nimport \"./ShadersInclude/clipPlaneVertex\";\nimport \"./ShadersInclude/fogVertex\";\nimport \"./ShadersInclude/logDepthVertex\";\n\nconst name = \"gaussianSplattingVertexShader\";\nconst shader = `#include<__decl__gaussianSplattingVertex>\n#ifdef LOGARITHMICDEPTH\n#extension GL_EXT_frag_depth : enable\n#endif\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\n#include<helperFunctions>\nuniform vec2 invViewport;uniform vec2 dataTextureSize;uniform vec2 focal;uniform float kernelSize;uniform vec3 eyePosition;uniform vec3 viewDirectionFactor;uniform float alpha;uniform sampler2D covariancesATexture;uniform sampler2D covariancesBTexture;uniform sampler2D centersTexture;uniform sampler2D colorsTexture;\n#if SH_DEGREE>0\nuniform highp usampler2D shTexture0;\n#endif\n#if SH_DEGREE>1\nuniform highp usampler2D shTexture1;\n#endif\n#if SH_DEGREE>2\nuniform highp usampler2D shTexture2;\n#endif\nvarying vec4 vColor;varying vec2 vPosition;\n#include<gaussianSplatting>\nvoid main () {float splatIndex=getSplatIndex(int(position.z+0.5));Splat splat=readSplat(splatIndex);vec3 covA=splat.covA.xyz;vec3 covB=vec3(splat.covA.w,splat.covB.xy);vec4 worldPos=world*vec4(splat.center.xyz,1.0);vColor=splat.color;vPosition=position.xy;\n#if SH_DEGREE>0\nmat3 worldRot=mat3(world);mat3 normWorldRot=inverseMat3(worldRot);vec3 dir=normalize(normWorldRot*(worldPos.xyz-eyePosition));dir*=viewDirectionFactor;vColor.xyz=splat.color.xyz+computeSH(splat,dir);\n#endif\nvColor.w*=alpha;gl_Position=gaussianSplatting(position.xy,worldPos.xyz,vec2(1.,1.),covA,covB,world,view,projection);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const gaussianSplattingVertexShader = { name, shader };\n"]}
@@ -0,0 +1,5 @@
1
+ /** @internal */
2
+ export declare const volumetricLightingBlendVolumePixelShader: {
3
+ name: string;
4
+ shader: string;
5
+ };
@@ -0,0 +1,21 @@
1
+ // Do not edit.
2
+ import { ShaderStore } from "../Engines/shaderStore.js";
3
+ const name = "volumetricLightingBlendVolumePixelShader";
4
+ const shader = `varying vec2 vUV;uniform sampler2D textureSampler;uniform sampler2D depthSampler;uniform mat4 invProjection;uniform vec2 outputTextureSize;
5
+ #ifdef USE_EXTINCTION
6
+ uniform vec3 extinction;
7
+ #endif
8
+ #define CUSTOM_FRAGMENT_DEFINITIONS
9
+ void main(void) {gl_FragColor=texture2D(textureSampler,vUV);
10
+ #ifdef USE_EXTINCTION
11
+ float depth=texelFetch(depthSampler,ivec2(gl_FragCoord.xy),0).r;vec4 ndc=vec4((gl_FragCoord.xy/outputTextureSize)*2.-1.,depth*2.-1.,1.0);vec4 viewPos=invProjection*ndc;viewPos=viewPos/viewPos.w;float eyeDist=length(viewPos);gl_FragColor2=vec4(exp(-extinction*eyeDist),1.0);
12
+ #endif
13
+ }
14
+ `;
15
+ // Sideeffect
16
+ if (!ShaderStore.ShadersStore[name]) {
17
+ ShaderStore.ShadersStore[name] = shader;
18
+ }
19
+ /** @internal */
20
+ export const volumetricLightingBlendVolumePixelShader = { name, shader };
21
+ //# sourceMappingURL=volumetricLightingBlendVolume.fragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volumetricLightingBlendVolume.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/volumetricLightingBlendVolume.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,0CAA0C,CAAC;AACxD,MAAM,MAAM,GAAG;;;;;;;;;;CAUd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,wCAAwC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"volumetricLightingBlendVolumePixelShader\";\nconst shader = `varying vec2 vUV;uniform sampler2D textureSampler;uniform sampler2D depthSampler;uniform mat4 invProjection;uniform vec2 outputTextureSize;\n#ifdef USE_EXTINCTION\nuniform vec3 extinction;\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\nvoid main(void) {gl_FragColor=texture2D(textureSampler,vUV);\n#ifdef USE_EXTINCTION\nfloat depth=texelFetch(depthSampler,ivec2(gl_FragCoord.xy),0).r;vec4 ndc=vec4((gl_FragCoord.xy/outputTextureSize)*2.-1.,depth*2.-1.,1.0);vec4 viewPos=invProjection*ndc;viewPos=viewPos/viewPos.w;float eyeDist=length(viewPos);gl_FragColor2=vec4(exp(-extinction*eyeDist),1.0);\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const volumetricLightingBlendVolumePixelShader = { name, shader };\n"]}
@@ -0,0 +1,7 @@
1
+ import "./ShadersInclude/sceneFragmentDeclaration.js";
2
+ import "./ShadersInclude/sceneUboDeclaration.js";
3
+ /** @internal */
4
+ export declare const volumetricLightingRenderVolumePixelShader: {
5
+ name: string;
6
+ shader: string;
7
+ };
@@ -0,0 +1,25 @@
1
+ // Do not edit.
2
+ import { ShaderStore } from "../Engines/shaderStore.js";
3
+ import "./ShadersInclude/sceneFragmentDeclaration.js";
4
+ import "./ShadersInclude/sceneUboDeclaration.js";
5
+ const name = "volumetricLightingRenderVolumePixelShader";
6
+ const shader = `#include<__decl__sceneFragment>
7
+ uniform mat4 invViewProjection;uniform vec3 lightDir;
8
+ uniform vec2 outputTextureSize;uniform vec4 extinctionPhaseG;uniform vec3 lightPower;uniform vec2 textureRatio;uniform sampler2D depthTexture;varying vec4 vWorldPos;float henyeyGreenstein(float g,float cosTheta) {float denom=1.0+g*g-2.0*g*cosTheta;return 1.0/(4.0*3.14159265)*(1.0-g*g)/(denom*sqrt(max(denom,0.0)));}
9
+ vec3 integrateDirectional(float eyeDist,vec3 viewDir,vec3 lightDir) {float phaseG=extinctionPhaseG.w;
10
+ #ifdef USE_EXTINCTION
11
+ vec3 extinction=extinctionPhaseG.xyz;return henyeyGreenstein(phaseG,dot(viewDir,lightDir))*(vec3(1.0)-exp(-extinction*eyeDist))/extinction;
12
+ #else
13
+ return vec3(henyeyGreenstein(phaseG,dot(viewDir,lightDir)))*vec3(eyeDist);
14
+ #endif
15
+ }
16
+ void main(void) {float depth=texelFetch(depthTexture,ivec2(gl_FragCoord.xy*textureRatio),0).r;vec4 worldPos=vWorldPos;if (gl_FragCoord.z>depth) {vec4 ndc=vec4((gl_FragCoord.xy/outputTextureSize)*2.0-1.0,depth*2.0-1.0,1.0);worldPos=invViewProjection*ndc;worldPos=worldPos/worldPos.w;}
17
+ vec3 viewDir=worldPos.xyz-vEyePosition.xyz;float eyeDist=length(viewDir);viewDir=viewDir/eyeDist;float fSign=gl_FrontFacing ? 1.0 : -1.0;vec3 integral=integrateDirectional(eyeDist,-viewDir,lightDir);gl_FragColor=vec4(lightPower*integral*fSign,1.0);}
18
+ `;
19
+ // Sideeffect
20
+ if (!ShaderStore.ShadersStore[name]) {
21
+ ShaderStore.ShadersStore[name] = shader;
22
+ }
23
+ /** @internal */
24
+ export const volumetricLightingRenderVolumePixelShader = { name, shader };
25
+ //# sourceMappingURL=volumetricLightingRenderVolume.fragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volumetricLightingRenderVolume.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/volumetricLightingRenderVolume.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,2CAA2C,CAAC;AACnD,OAAO,sCAAsC,CAAC;AAE9C,MAAM,IAAI,GAAG,2CAA2C,CAAC;AACzD,MAAM,MAAM,GAAG;;;;;;;;;;;;CAYd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,yCAAyC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/sceneFragmentDeclaration\";\nimport \"./ShadersInclude/sceneUboDeclaration\";\n\nconst name = \"volumetricLightingRenderVolumePixelShader\";\nconst shader = `#include<__decl__sceneFragment>\nuniform mat4 invViewProjection;uniform vec3 lightDir; \nuniform vec2 outputTextureSize;uniform vec4 extinctionPhaseG;uniform vec3 lightPower;uniform vec2 textureRatio;uniform sampler2D depthTexture;varying vec4 vWorldPos;float henyeyGreenstein(float g,float cosTheta) {float denom=1.0+g*g-2.0*g*cosTheta;return 1.0/(4.0*3.14159265)*(1.0-g*g)/(denom*sqrt(max(denom,0.0)));}\nvec3 integrateDirectional(float eyeDist,vec3 viewDir,vec3 lightDir) {float phaseG=extinctionPhaseG.w;\n#ifdef USE_EXTINCTION\nvec3 extinction=extinctionPhaseG.xyz;return henyeyGreenstein(phaseG,dot(viewDir,lightDir))*(vec3(1.0)-exp(-extinction*eyeDist))/extinction;\n#else\nreturn vec3(henyeyGreenstein(phaseG,dot(viewDir,lightDir)))*vec3(eyeDist);\n#endif\n}\nvoid main(void) {float depth=texelFetch(depthTexture,ivec2(gl_FragCoord.xy*textureRatio),0).r;vec4 worldPos=vWorldPos;if (gl_FragCoord.z>depth) {vec4 ndc=vec4((gl_FragCoord.xy/outputTextureSize)*2.0-1.0,depth*2.0-1.0,1.0);worldPos=invViewProjection*ndc;worldPos=worldPos/worldPos.w;}\nvec3 viewDir=worldPos.xyz-vEyePosition.xyz;float eyeDist=length(viewDir);viewDir=viewDir/eyeDist;float fSign=gl_FrontFacing ? 1.0 : -1.0;vec3 integral=integrateDirectional(eyeDist,-viewDir,lightDir);gl_FragColor=vec4(lightPower*integral*fSign,1.0);}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const volumetricLightingRenderVolumePixelShader = { name, shader };\n"]}
@@ -0,0 +1,9 @@
1
+ import "./ShadersInclude/sceneVertexDeclaration.js";
2
+ import "./ShadersInclude/sceneUboDeclaration.js";
3
+ import "./ShadersInclude/meshVertexDeclaration.js";
4
+ import "./ShadersInclude/meshUboDeclaration.js";
5
+ /** @internal */
6
+ export declare const volumetricLightingRenderVolumeVertexShader: {
7
+ name: string;
8
+ shader: string;
9
+ };
@@ -0,0 +1,18 @@
1
+ // Do not edit.
2
+ import { ShaderStore } from "../Engines/shaderStore.js";
3
+ import "./ShadersInclude/sceneVertexDeclaration.js";
4
+ import "./ShadersInclude/sceneUboDeclaration.js";
5
+ import "./ShadersInclude/meshVertexDeclaration.js";
6
+ import "./ShadersInclude/meshUboDeclaration.js";
7
+ const name = "volumetricLightingRenderVolumeVertexShader";
8
+ const shader = `#include<__decl__sceneVertex>
9
+ #include<__decl__meshVertex>
10
+ attribute vec3 position;varying vec4 vWorldPos;void main(void) {vec4 worldPos=world*vec4(position,1.0);vWorldPos=worldPos;gl_Position=viewProjection*worldPos;}
11
+ `;
12
+ // Sideeffect
13
+ if (!ShaderStore.ShadersStore[name]) {
14
+ ShaderStore.ShadersStore[name] = shader;
15
+ }
16
+ /** @internal */
17
+ export const volumetricLightingRenderVolumeVertexShader = { name, shader };
18
+ //# sourceMappingURL=volumetricLightingRenderVolume.vertex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volumetricLightingRenderVolume.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/Shaders/volumetricLightingRenderVolume.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,yCAAyC,CAAC;AACjD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,wCAAwC,CAAC;AAChD,OAAO,qCAAqC,CAAC;AAE7C,MAAM,IAAI,GAAG,4CAA4C,CAAC;AAC1D,MAAM,MAAM,GAAG;;;CAGd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;IAClC,WAAW,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAC5C,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/sceneVertexDeclaration\";\nimport \"./ShadersInclude/sceneUboDeclaration\";\nimport \"./ShadersInclude/meshVertexDeclaration\";\nimport \"./ShadersInclude/meshUboDeclaration\";\n\nconst name = \"volumetricLightingRenderVolumeVertexShader\";\nconst shader = `#include<__decl__sceneVertex>\n#include<__decl__meshVertex>\nattribute vec3 position;varying vec4 vWorldPos;void main(void) {vec4 worldPos=world*vec4(position,1.0);vWorldPos=worldPos;gl_Position=viewProjection*worldPos;}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStore[name]) {\n ShaderStore.ShadersStore[name] = shader;\n}\n/** @internal */\nexport const volumetricLightingRenderVolumeVertexShader = { name, shader };\n"]}
@@ -17,7 +17,7 @@ const shader = `#include<sceneUboDeclaration>
17
17
  #include<clipPlaneVertexDeclaration>
18
18
  #include<fogVertexDeclaration>
19
19
  #include<logDepthDeclaration>
20
- attribute splatIndex0: vec4f;attribute splatIndex1: vec4f;attribute splatIndex2: vec4f;attribute splatIndex3: vec4f;attribute position: vec3f;uniform invViewport: vec2f;uniform dataTextureSize: vec2f;uniform focal: vec2f;uniform kernelSize: f32;uniform eyePosition: vec3f;uniform viewDirectionFactor: vec3f;var covariancesATexture: texture_2d<f32>;var covariancesBTexture: texture_2d<f32>;var centersTexture: texture_2d<f32>;var colorsTexture: texture_2d<f32>;
20
+ attribute splatIndex0: vec4f;attribute splatIndex1: vec4f;attribute splatIndex2: vec4f;attribute splatIndex3: vec4f;attribute position: vec3f;uniform invViewport: vec2f;uniform dataTextureSize: vec2f;uniform focal: vec2f;uniform kernelSize: f32;uniform eyePosition: vec3f;uniform viewDirectionFactor: vec3f;uniform alpha: f32;var covariancesATexture: texture_2d<f32>;var covariancesBTexture: texture_2d<f32>;var centersTexture: texture_2d<f32>;var colorsTexture: texture_2d<f32>;
21
21
  #if SH_DEGREE>0
22
22
  var shTexture0: texture_2d<u32>;
23
23
  #endif
@@ -32,9 +32,9 @@ varying vColor: vec4f;varying vPosition: vec2f;
32
32
  @vertex
33
33
  fn main(input : VertexInputs)->FragmentInputs {let splatIndex: f32=getSplatIndex(i32(input.position.z+0.5),input.splatIndex0,input.splatIndex1,input.splatIndex2,input.splatIndex3);var splat: Splat=readSplat(splatIndex,uniforms.dataTextureSize);var covA: vec3f=splat.covA.xyz;var covB: vec3f=vec3f(splat.covA.w,splat.covB.xy);let worldPos: vec4f=mesh.world*vec4f(splat.center.xyz,1.0);vertexOutputs.vPosition=input.position.xy;
34
34
  #if SH_DEGREE>0
35
- let worldRot: mat3x3f= mat3x3f(mesh.world[0].xyz,mesh.world[1].xyz,mesh.world[2].xyz);let normWorldRot: mat3x3f=inverseMat3(worldRot);var dir: vec3f=normalize(normWorldRot*(worldPos.xyz-uniforms.eyePosition.xyz));dir*=uniforms.viewDirectionFactor;vertexOutputs.vColor=vec4f(splat.color.xyz+computeSH(splat,dir),splat.color.w);
35
+ let worldRot: mat3x3f= mat3x3f(mesh.world[0].xyz,mesh.world[1].xyz,mesh.world[2].xyz);let normWorldRot: mat3x3f=inverseMat3(worldRot);var dir: vec3f=normalize(normWorldRot*(worldPos.xyz-uniforms.eyePosition.xyz));dir*=uniforms.viewDirectionFactor;vertexOutputs.vColor=vec4f(splat.color.xyz+computeSH(splat,dir),splat.color.w*uniforms.alpha);
36
36
  #else
37
- vertexOutputs.vColor=splat.color;
37
+ vertexOutputs.vColor=vec4f(splat.color.xyz,splat.color.w*uniforms.alpha);
38
38
  #endif
39
39
  vertexOutputs.position=gaussianSplatting(input.position.xy,worldPos.xyz,vec2f(1.0,1.0),covA,covB,mesh.world,scene.view,scene.projection,uniforms.focal,uniforms.invViewport,uniforms.kernelSize);
40
40
  #include<clipPlaneVertex>
@@ -1 +1 @@
1
- {"version":3,"file":"gaussianSplatting.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/gaussianSplatting.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,6CAA6C,CAAC;AACrD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,iCAAiC,CAAC;AAEzC,MAAM,IAAI,GAAG,+BAA+B,CAAC;AAC7C,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Bd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/sceneUboDeclaration\";\nimport \"./ShadersInclude/meshUboDeclaration\";\nimport \"./ShadersInclude/helperFunctions\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"./ShadersInclude/fogVertexDeclaration\";\nimport \"./ShadersInclude/logDepthDeclaration\";\nimport \"./ShadersInclude/gaussianSplatting\";\nimport \"./ShadersInclude/clipPlaneVertex\";\nimport \"./ShadersInclude/fogVertex\";\nimport \"./ShadersInclude/logDepthVertex\";\n\nconst name = \"gaussianSplattingVertexShader\";\nconst shader = `#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n#include<helperFunctions>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute splatIndex0: vec4f;attribute splatIndex1: vec4f;attribute splatIndex2: vec4f;attribute splatIndex3: vec4f;attribute position: vec3f;uniform invViewport: vec2f;uniform dataTextureSize: vec2f;uniform focal: vec2f;uniform kernelSize: f32;uniform eyePosition: vec3f;uniform viewDirectionFactor: vec3f;var covariancesATexture: texture_2d<f32>;var covariancesBTexture: texture_2d<f32>;var centersTexture: texture_2d<f32>;var colorsTexture: texture_2d<f32>;\n#if SH_DEGREE>0\nvar shTexture0: texture_2d<u32>;\n#endif\n#if SH_DEGREE>1\nvar shTexture1: texture_2d<u32>;\n#endif\n#if SH_DEGREE>2\nvar shTexture2: texture_2d<u32>;\n#endif\nvarying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplatting>\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {let splatIndex: f32=getSplatIndex(i32(input.position.z+0.5),input.splatIndex0,input.splatIndex1,input.splatIndex2,input.splatIndex3);var splat: Splat=readSplat(splatIndex,uniforms.dataTextureSize);var covA: vec3f=splat.covA.xyz;var covB: vec3f=vec3f(splat.covA.w,splat.covB.xy);let worldPos: vec4f=mesh.world*vec4f(splat.center.xyz,1.0);vertexOutputs.vPosition=input.position.xy;\n#if SH_DEGREE>0\nlet worldRot: mat3x3f= mat3x3f(mesh.world[0].xyz,mesh.world[1].xyz,mesh.world[2].xyz);let normWorldRot: mat3x3f=inverseMat3(worldRot);var dir: vec3f=normalize(normWorldRot*(worldPos.xyz-uniforms.eyePosition.xyz));dir*=uniforms.viewDirectionFactor;vertexOutputs.vColor=vec4f(splat.color.xyz+computeSH(splat,dir),splat.color.w);\n#else\nvertexOutputs.vColor=splat.color;\n#endif\nvertexOutputs.position=gaussianSplatting(input.position.xy,worldPos.xyz,vec2f(1.0,1.0),covA,covB,mesh.world,scene.view,scene.projection,uniforms.focal,uniforms.invViewport,uniforms.kernelSize);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const gaussianSplattingVertexShaderWGSL = { name, shader };\n"]}
1
+ {"version":3,"file":"gaussianSplatting.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/gaussianSplatting.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,6CAA6C,CAAC;AACrD,OAAO,uCAAuC,CAAC;AAC/C,OAAO,sCAAsC,CAAC;AAC9C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,kCAAkC,CAAC;AAC1C,OAAO,4BAA4B,CAAC;AACpC,OAAO,iCAAiC,CAAC;AAEzC,MAAM,IAAI,GAAG,+BAA+B,CAAC;AAC7C,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Bd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/sceneUboDeclaration\";\nimport \"./ShadersInclude/meshUboDeclaration\";\nimport \"./ShadersInclude/helperFunctions\";\nimport \"./ShadersInclude/clipPlaneVertexDeclaration\";\nimport \"./ShadersInclude/fogVertexDeclaration\";\nimport \"./ShadersInclude/logDepthDeclaration\";\nimport \"./ShadersInclude/gaussianSplatting\";\nimport \"./ShadersInclude/clipPlaneVertex\";\nimport \"./ShadersInclude/fogVertex\";\nimport \"./ShadersInclude/logDepthVertex\";\n\nconst name = \"gaussianSplattingVertexShader\";\nconst shader = `#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\n#include<helperFunctions>\n#include<clipPlaneVertexDeclaration>\n#include<fogVertexDeclaration>\n#include<logDepthDeclaration>\nattribute splatIndex0: vec4f;attribute splatIndex1: vec4f;attribute splatIndex2: vec4f;attribute splatIndex3: vec4f;attribute position: vec3f;uniform invViewport: vec2f;uniform dataTextureSize: vec2f;uniform focal: vec2f;uniform kernelSize: f32;uniform eyePosition: vec3f;uniform viewDirectionFactor: vec3f;uniform alpha: f32;var covariancesATexture: texture_2d<f32>;var covariancesBTexture: texture_2d<f32>;var centersTexture: texture_2d<f32>;var colorsTexture: texture_2d<f32>;\n#if SH_DEGREE>0\nvar shTexture0: texture_2d<u32>;\n#endif\n#if SH_DEGREE>1\nvar shTexture1: texture_2d<u32>;\n#endif\n#if SH_DEGREE>2\nvar shTexture2: texture_2d<u32>;\n#endif\nvarying vColor: vec4f;varying vPosition: vec2f;\n#include<gaussianSplatting>\n@vertex\nfn main(input : VertexInputs)->FragmentInputs {let splatIndex: f32=getSplatIndex(i32(input.position.z+0.5),input.splatIndex0,input.splatIndex1,input.splatIndex2,input.splatIndex3);var splat: Splat=readSplat(splatIndex,uniforms.dataTextureSize);var covA: vec3f=splat.covA.xyz;var covB: vec3f=vec3f(splat.covA.w,splat.covB.xy);let worldPos: vec4f=mesh.world*vec4f(splat.center.xyz,1.0);vertexOutputs.vPosition=input.position.xy;\n#if SH_DEGREE>0\nlet worldRot: mat3x3f= mat3x3f(mesh.world[0].xyz,mesh.world[1].xyz,mesh.world[2].xyz);let normWorldRot: mat3x3f=inverseMat3(worldRot);var dir: vec3f=normalize(normWorldRot*(worldPos.xyz-uniforms.eyePosition.xyz));dir*=uniforms.viewDirectionFactor;vertexOutputs.vColor=vec4f(splat.color.xyz+computeSH(splat,dir),splat.color.w*uniforms.alpha);\n#else\nvertexOutputs.vColor=vec4f(splat.color.xyz,splat.color.w*uniforms.alpha);\n#endif\nvertexOutputs.position=gaussianSplatting(input.position.xy,worldPos.xyz,vec2f(1.0,1.0),covA,covB,mesh.world,scene.view,scene.projection,uniforms.focal,uniforms.invViewport,uniforms.kernelSize);\n#include<clipPlaneVertex>\n#include<fogVertex>\n#include<logDepthVertex>\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const gaussianSplattingVertexShaderWGSL = { name, shader };\n"]}
@@ -1,5 +1,4 @@
1
1
  import "./ShadersInclude/gaussianSplattingFragmentDeclaration.js";
2
- import "./ShadersInclude/shadowMapFragmentExtraDeclaration.js";
3
2
  /** @internal */
4
3
  export declare const gaussianSplattingDepthPixelShaderWGSL: {
5
4
  name: string;
@@ -1,10 +1,8 @@
1
1
  // Do not edit.
2
2
  import { ShaderStore } from "../Engines/shaderStore.js";
3
3
  import "./ShadersInclude/gaussianSplattingFragmentDeclaration.js";
4
- import "./ShadersInclude/shadowMapFragmentExtraDeclaration.js";
5
4
  const name = "gaussianSplattingDepthPixelShader";
6
5
  const shader = `#include<gaussianSplattingFragmentDeclaration>
7
- #include<shadowMapFragmentExtraDeclaration>
8
6
  varying vPosition: vec2f;varying vColor: vec4f;fn checkDiscard(inPosition: vec2f,inColor: vec4f)->vec4f {var A : f32=-dot(inPosition,inPosition);var alpha : f32=exp(A)*inColor.a;
9
7
  #if defined(SM_SOFTTRANSPARENTSHADOW) && SM_SOFTTRANSPARENTSHADOW==1
10
8
  if (A<-4.) {discard;}
@@ -1 +1 @@
1
- {"version":3,"file":"gaussianSplattingDepth.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/gaussianSplattingDepth.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,uDAAuD,CAAC;AAC/D,OAAO,oDAAoD,CAAC;AAE5D,MAAM,IAAI,GAAG,mCAAmC,CAAC;AACjD,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;CAgBd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/gaussianSplattingFragmentDeclaration\";\nimport \"./ShadersInclude/shadowMapFragmentExtraDeclaration\";\n\nconst name = \"gaussianSplattingDepthPixelShader\";\nconst shader = `#include<gaussianSplattingFragmentDeclaration>\n#include<shadowMapFragmentExtraDeclaration>\nvarying vPosition: vec2f;varying vColor: vec4f;fn checkDiscard(inPosition: vec2f,inColor: vec4f)->vec4f {var A : f32=-dot(inPosition,inPosition);var alpha : f32=exp(A)*inColor.a;\n#if defined(SM_SOFTTRANSPARENTSHADOW) && SM_SOFTTRANSPARENTSHADOW==1\nif (A<-4.) {discard;}\n#else\nif (A<-1.) {discard;}\n#endif\nreturn vec4f(inColor.rgb,alpha);}\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=checkDiscard(fragmentInputs.vPosition,fragmentInputs.vColor);\n#if defined(SM_SOFTTRANSPARENTSHADOW) && SM_SOFTTRANSPARENTSHADOW==1\nvar alpha : f32=fragmentOutputs.color.a;\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const gaussianSplattingDepthPixelShaderWGSL = { name, shader };\n"]}
1
+ {"version":3,"file":"gaussianSplattingDepth.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/gaussianSplattingDepth.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,uDAAuD,CAAC;AAE/D,MAAM,IAAI,GAAG,mCAAmC,CAAC;AACjD,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;CAed,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,qCAAqC,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/gaussianSplattingFragmentDeclaration\";\n\nconst name = \"gaussianSplattingDepthPixelShader\";\nconst shader = `#include<gaussianSplattingFragmentDeclaration>\nvarying vPosition: vec2f;varying vColor: vec4f;fn checkDiscard(inPosition: vec2f,inColor: vec4f)->vec4f {var A : f32=-dot(inPosition,inPosition);var alpha : f32=exp(A)*inColor.a;\n#if defined(SM_SOFTTRANSPARENTSHADOW) && SM_SOFTTRANSPARENTSHADOW==1\nif (A<-4.) {discard;}\n#else\nif (A<-1.) {discard;}\n#endif\nreturn vec4f(inColor.rgb,alpha);}\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=checkDiscard(fragmentInputs.vPosition,fragmentInputs.vColor);\n#if defined(SM_SOFTTRANSPARENTSHADOW) && SM_SOFTTRANSPARENTSHADOW==1\nvar alpha : f32=fragmentOutputs.color.a;\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const gaussianSplattingDepthPixelShaderWGSL = { name, shader };\n"]}
@@ -0,0 +1,5 @@
1
+ /** @internal */
2
+ export declare const lightingVolumeComputeShaderWGSL: {
3
+ name: string;
4
+ shader: string;
5
+ };
@@ -0,0 +1,33 @@
1
+ // Do not edit.
2
+ import { ShaderStore } from "../Engines/shaderStore.js";
3
+ const name = "lightingVolumeComputeShader";
4
+ const shader = `struct Params {invViewProjMatrix: mat4x4f,
5
+ invViewMatrix: mat4x4f,
6
+ startVertexIndex: u32,
7
+ step: f32,
8
+ tesselation: u32,
9
+ orthoMin: vec3f,
10
+ orthoMax: vec3f,};@group(0) @binding(0) var shadowMap : texture_2d<f32>;@group(0) @binding(1) var<uniform> params : Params;@group(0) @binding(2) var<storage,read_write> positions : array<f32>;@compute @workgroup_size(8,8,1)
11
+ fn updateFarPlaneVertices(@builtin(global_invocation_id) global_id : vec3u) {let coord=global_id.xy;
12
+ #ifdef KEEP_EDGES
13
+ if (any(coord>=vec2u(params.tesselation)) || any(coord<=vec2u(0))) {
14
+ #else
15
+ if (any(coord>vec2u(params.tesselation))) {
16
+ #endif
17
+ return;}
18
+ let stepY=floor(params.step*f32(coord.y));let depthCoord=vec2u(u32(floor(f32(coord.x)*params.step)),u32(stepY));var depth=textureLoad(shadowMap,depthCoord,0).r;
19
+ #ifdef MOVE_FAR_DEPTH_TO_NEAR
20
+ if (depth==1.0) {depth=0.0;}
21
+ #endif
22
+ let halfTesselation=f32(params.tesselation>>1);let ndc=vec4f((f32(coord.x)-halfTesselation)/halfTesselation,(f32(coord.y)-halfTesselation)/halfTesselation,depth,1.0);var worldCoords=params.invViewProjMatrix*ndc;let idx=params.startVertexIndex+(coord.y*(params.tesselation+1)+coord.x)*3;positions[idx]=worldCoords.x/worldCoords.w;positions[idx+1]=worldCoords.y/worldCoords.w;positions[idx+2]=worldCoords.z/worldCoords.w;}
23
+ @compute @workgroup_size(32,1,1)
24
+ fn updatePlaneVertices(@builtin(global_invocation_id) global_id : vec3u) {_=shadowMap;let uindex=global_id.x;let index=f32(uindex);if (uindex>params.tesselation) {return;}
25
+ let step=(params.orthoMax.xy-params.orthoMin.xy)/vec2f(f32(params.tesselation));var vr=params.invViewMatrix*vec4f(params.orthoMax.x,params.orthoMin.y+step.y*index,params.orthoMin.z,1.0);vr=vr/vr.w;positions[uindex*3+0]=vr.x;positions[uindex*3+1]=vr.y;positions[uindex*3+2]=vr.z;var vl=params.invViewMatrix*vec4f(params.orthoMin.x,params.orthoMin.y+step.y*index,params.orthoMin.z,1.0);vl=vl/vl.w;positions[uindex*3+0+(params.tesselation+1)*3]=vl.x;positions[uindex*3+1+(params.tesselation+1)*3]=vl.y;positions[uindex*3+2+(params.tesselation+1)*3]=vl.z;var vb=params.invViewMatrix*vec4f(params.orthoMin.x+step.x*index,params.orthoMin.y,params.orthoMin.z,1.0);vb=vb/vb.w;positions[uindex*3+0+(params.tesselation+1)*6]=vb.x;positions[uindex*3+1+(params.tesselation+1)*6]=vb.y;positions[uindex*3+2+(params.tesselation+1)*6]=vb.z;var vt=params.invViewMatrix*vec4f(params.orthoMin.x+step.x*index,params.orthoMax.y,params.orthoMin.z,1.0);vt=vt/vt.w;positions[uindex*3+0+(params.tesselation+1)*9]=vt.x;positions[uindex*3+1+(params.tesselation+1)*9]=vt.y;positions[uindex*3+2+(params.tesselation+1)*9]=vt.z;}
26
+ `;
27
+ // Sideeffect
28
+ if (!ShaderStore.ShadersStoreWGSL[name]) {
29
+ ShaderStore.ShadersStoreWGSL[name] = shader;
30
+ }
31
+ /** @internal */
32
+ export const lightingVolumeComputeShaderWGSL = { name, shader };
33
+ //# sourceMappingURL=lightingVolume.compute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lightingVolume.compute.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/lightingVolume.compute.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,6BAA6B,CAAC;AAC3C,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;CAsBd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,+BAA+B,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"lightingVolumeComputeShader\";\nconst shader = `struct Params {invViewProjMatrix: mat4x4f,\ninvViewMatrix: mat4x4f,\nstartVertexIndex: u32,\nstep: f32,\ntesselation: u32,\northoMin: vec3f,\northoMax: vec3f,};@group(0) @binding(0) var shadowMap : texture_2d<f32>;@group(0) @binding(1) var<uniform> params : Params;@group(0) @binding(2) var<storage,read_write> positions : array<f32>;@compute @workgroup_size(8,8,1)\nfn updateFarPlaneVertices(@builtin(global_invocation_id) global_id : vec3u) {let coord=global_id.xy;\n#ifdef KEEP_EDGES\nif (any(coord>=vec2u(params.tesselation)) || any(coord<=vec2u(0))) {\n#else\nif (any(coord>vec2u(params.tesselation))) {\n#endif\nreturn;}\nlet stepY=floor(params.step*f32(coord.y));let depthCoord=vec2u(u32(floor(f32(coord.x)*params.step)),u32(stepY));var depth=textureLoad(shadowMap,depthCoord,0).r;\n#ifdef MOVE_FAR_DEPTH_TO_NEAR\nif (depth==1.0) {depth=0.0;}\n#endif\nlet halfTesselation=f32(params.tesselation>>1);let ndc=vec4f((f32(coord.x)-halfTesselation)/halfTesselation,(f32(coord.y)-halfTesselation)/halfTesselation,depth,1.0);var worldCoords=params.invViewProjMatrix*ndc;let idx=params.startVertexIndex+(coord.y*(params.tesselation+1)+coord.x)*3;positions[idx]=worldCoords.x/worldCoords.w;positions[idx+1]=worldCoords.y/worldCoords.w;positions[idx+2]=worldCoords.z/worldCoords.w;}\n@compute @workgroup_size(32,1,1)\nfn updatePlaneVertices(@builtin(global_invocation_id) global_id : vec3u) {_=shadowMap;let uindex=global_id.x;let index=f32(uindex);if (uindex>params.tesselation) {return;}\nlet step=(params.orthoMax.xy-params.orthoMin.xy)/vec2f(f32(params.tesselation));var vr=params.invViewMatrix*vec4f(params.orthoMax.x,params.orthoMin.y+step.y*index,params.orthoMin.z,1.0);vr=vr/vr.w;positions[uindex*3+0]=vr.x;positions[uindex*3+1]=vr.y;positions[uindex*3+2]=vr.z;var vl=params.invViewMatrix*vec4f(params.orthoMin.x,params.orthoMin.y+step.y*index,params.orthoMin.z,1.0);vl=vl/vl.w;positions[uindex*3+0+(params.tesselation+1)*3]=vl.x;positions[uindex*3+1+(params.tesselation+1)*3]=vl.y;positions[uindex*3+2+(params.tesselation+1)*3]=vl.z;var vb=params.invViewMatrix*vec4f(params.orthoMin.x+step.x*index,params.orthoMin.y,params.orthoMin.z,1.0);vb=vb/vb.w;positions[uindex*3+0+(params.tesselation+1)*6]=vb.x;positions[uindex*3+1+(params.tesselation+1)*6]=vb.y;positions[uindex*3+2+(params.tesselation+1)*6]=vb.z;var vt=params.invViewMatrix*vec4f(params.orthoMin.x+step.x*index,params.orthoMax.y,params.orthoMin.z,1.0);vt=vt/vt.w;positions[uindex*3+0+(params.tesselation+1)*9]=vt.x;positions[uindex*3+1+(params.tesselation+1)*9]=vt.y;positions[uindex*3+2+(params.tesselation+1)*9]=vt.z;}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const lightingVolumeComputeShaderWGSL = { name, shader };\n"]}
@@ -0,0 +1,5 @@
1
+ /** @internal */
2
+ export declare const volumetricLightingBlendVolumePixelShaderWGSL: {
3
+ name: string;
4
+ shader: string;
5
+ };
@@ -0,0 +1,22 @@
1
+ // Do not edit.
2
+ import { ShaderStore } from "../Engines/shaderStore.js";
3
+ const name = "volumetricLightingBlendVolumePixelShader";
4
+ const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;var depthSampler: texture_2d<f32>;uniform invProjection: mat4x4<f32>;uniform outputTextureSize: vec2f;
5
+ #ifdef USE_EXTINCTION
6
+ uniform extinction: vec3f;
7
+ #endif
8
+ #define CUSTOM_FRAGMENT_DEFINITIONS
9
+ @fragment
10
+ fn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,input.vUV);
11
+ #ifdef USE_EXTINCTION
12
+ let depth=textureLoad(depthSampler,vec2u(fragmentInputs.position.xy),0).r;let ndc=vec4f((fragmentInputs.position.xy/uniforms.outputTextureSize)*2.-1.,depth,1.0);var viewPos=uniforms.invProjection*ndc;viewPos=viewPos/viewPos.w;let eyeDist=length(viewPos);fragmentOutputs.color2=vec4f(exp(-uniforms.extinction*eyeDist),1.0);
13
+ #endif
14
+ }
15
+ `;
16
+ // Sideeffect
17
+ if (!ShaderStore.ShadersStoreWGSL[name]) {
18
+ ShaderStore.ShadersStoreWGSL[name] = shader;
19
+ }
20
+ /** @internal */
21
+ export const volumetricLightingBlendVolumePixelShaderWGSL = { name, shader };
22
+ //# sourceMappingURL=volumetricLightingBlendVolume.fragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volumetricLightingBlendVolume.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/volumetricLightingBlendVolume.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErD,MAAM,IAAI,GAAG,0CAA0C,CAAC;AACxD,MAAM,MAAM,GAAG;;;;;;;;;;;CAWd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\n\nconst name = \"volumetricLightingBlendVolumePixelShader\";\nconst shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;var depthSampler: texture_2d<f32>;uniform invProjection: mat4x4<f32>;uniform outputTextureSize: vec2f;\n#ifdef USE_EXTINCTION\nuniform extinction: vec3f;\n#endif\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {fragmentOutputs.color=textureSample(textureSampler,textureSamplerSampler,input.vUV);\n#ifdef USE_EXTINCTION\nlet depth=textureLoad(depthSampler,vec2u(fragmentInputs.position.xy),0).r;let ndc=vec4f((fragmentInputs.position.xy/uniforms.outputTextureSize)*2.-1.,depth,1.0);var viewPos=uniforms.invProjection*ndc;viewPos=viewPos/viewPos.w;let eyeDist=length(viewPos);fragmentOutputs.color2=vec4f(exp(-uniforms.extinction*eyeDist),1.0);\n#endif\n}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const volumetricLightingBlendVolumePixelShaderWGSL = { name, shader };\n"]}
@@ -0,0 +1,7 @@
1
+ import "./ShadersInclude/sceneUboDeclaration.js";
2
+ import "./ShadersInclude/meshUboDeclaration.js";
3
+ /** @internal */
4
+ export declare const volumetricLightingRenderVolumePixelShaderWGSL: {
5
+ name: string;
6
+ shader: string;
7
+ };
@@ -0,0 +1,27 @@
1
+ // Do not edit.
2
+ import { ShaderStore } from "../Engines/shaderStore.js";
3
+ import "./ShadersInclude/sceneUboDeclaration.js";
4
+ import "./ShadersInclude/meshUboDeclaration.js";
5
+ const name = "volumetricLightingRenderVolumePixelShader";
6
+ const shader = `#include<sceneUboDeclaration>
7
+ #include<meshUboDeclaration>
8
+ uniform invViewProjection: mat4x4<f32>;uniform lightDir: vec3f;
9
+ uniform outputTextureSize: vec2f;uniform extinctionPhaseG: vec4f;uniform lightPower: vec3f;uniform textureRatio: vec2f;var depthTexture: texture_2d<f32>;varying vWorldPos: vec4f;fn henyeyGreenstein(g: f32,cosTheta: f32)->f32 {let denom=1+g*g-2*g*cosTheta;return 1.0/(4.0*3.14159265)*(1.0-g*g)/(denom*sqrt(max(denom,0.0)));}
10
+ fn integrateDirectional(eyeDist: f32,viewDir: vec3f,lightDir: vec3f)->vec3f {let phaseG=uniforms.extinctionPhaseG.w;
11
+ #ifdef USE_EXTINCTION
12
+ let extinction=uniforms.extinctionPhaseG.xyz;return henyeyGreenstein(phaseG,dot(viewDir,lightDir))*(vec3f(1.0)-exp(-extinction*eyeDist))/extinction;
13
+ #else
14
+ return vec3f(henyeyGreenstein(phaseG,dot(viewDir,lightDir)))*vec3f(eyeDist);
15
+ #endif
16
+ }
17
+ @fragment
18
+ fn main(input: FragmentInputs)->FragmentOutputs {let depth=textureLoad(depthTexture,vec2u(fragmentInputs.position.xy*uniforms.textureRatio),0).r;var worldPos=fragmentInputs.vWorldPos;if (fragmentInputs.position.z>depth) {let ndc=vec4f((fragmentInputs.position.xy/uniforms.outputTextureSize)*2.-1.,depth,1.0);worldPos=uniforms.invViewProjection*ndc;worldPos=worldPos/worldPos.w;}
19
+ var viewDir=worldPos.xyz-scene.vEyePosition.xyz;let eyeDist=length(viewDir);viewDir=viewDir/eyeDist;let fSign=select(-1.0,1.0,fragmentInputs.frontFacing);let integral=integrateDirectional(eyeDist,-viewDir,uniforms.lightDir);fragmentOutputs.color=vec4f(uniforms.lightPower*integral*fSign,1.0);}
20
+ `;
21
+ // Sideeffect
22
+ if (!ShaderStore.ShadersStoreWGSL[name]) {
23
+ ShaderStore.ShadersStoreWGSL[name] = shader;
24
+ }
25
+ /** @internal */
26
+ export const volumetricLightingRenderVolumePixelShaderWGSL = { name, shader };
27
+ //# sourceMappingURL=volumetricLightingRenderVolume.fragment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volumetricLightingRenderVolume.fragment.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/volumetricLightingRenderVolume.fragment.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,qCAAqC,CAAC;AAE7C,MAAM,IAAI,GAAG,2CAA2C,CAAC;AACzD,MAAM,MAAM,GAAG;;;;;;;;;;;;;;CAcd,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,6CAA6C,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/sceneUboDeclaration\";\nimport \"./ShadersInclude/meshUboDeclaration\";\n\nconst name = \"volumetricLightingRenderVolumePixelShader\";\nconst shader = `#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nuniform invViewProjection: mat4x4<f32>;uniform lightDir: vec3f; \nuniform outputTextureSize: vec2f;uniform extinctionPhaseG: vec4f;uniform lightPower: vec3f;uniform textureRatio: vec2f;var depthTexture: texture_2d<f32>;varying vWorldPos: vec4f;fn henyeyGreenstein(g: f32,cosTheta: f32)->f32 {let denom=1+g*g-2*g*cosTheta;return 1.0/(4.0*3.14159265)*(1.0-g*g)/(denom*sqrt(max(denom,0.0)));}\nfn integrateDirectional(eyeDist: f32,viewDir: vec3f,lightDir: vec3f)->vec3f {let phaseG=uniforms.extinctionPhaseG.w;\n#ifdef USE_EXTINCTION\nlet extinction=uniforms.extinctionPhaseG.xyz;return henyeyGreenstein(phaseG,dot(viewDir,lightDir))*(vec3f(1.0)-exp(-extinction*eyeDist))/extinction;\n#else\nreturn vec3f(henyeyGreenstein(phaseG,dot(viewDir,lightDir)))*vec3f(eyeDist);\n#endif\n}\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {let depth=textureLoad(depthTexture,vec2u(fragmentInputs.position.xy*uniforms.textureRatio),0).r;var worldPos=fragmentInputs.vWorldPos;if (fragmentInputs.position.z>depth) {let ndc=vec4f((fragmentInputs.position.xy/uniforms.outputTextureSize)*2.-1.,depth,1.0);worldPos=uniforms.invViewProjection*ndc;worldPos=worldPos/worldPos.w;}\nvar viewDir=worldPos.xyz-scene.vEyePosition.xyz;let eyeDist=length(viewDir);viewDir=viewDir/eyeDist;let fSign=select(-1.0,1.0,fragmentInputs.frontFacing);let integral=integrateDirectional(eyeDist,-viewDir,uniforms.lightDir);fragmentOutputs.color=vec4f(uniforms.lightPower*integral*fSign,1.0);}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const volumetricLightingRenderVolumePixelShaderWGSL = { name, shader };\n"]}
@@ -0,0 +1,7 @@
1
+ import "./ShadersInclude/sceneUboDeclaration.js";
2
+ import "./ShadersInclude/meshUboDeclaration.js";
3
+ /** @internal */
4
+ export declare const volumetricLightingRenderVolumeVertexShaderWGSL: {
5
+ name: string;
6
+ shader: string;
7
+ };
@@ -0,0 +1,17 @@
1
+ // Do not edit.
2
+ import { ShaderStore } from "../Engines/shaderStore.js";
3
+ import "./ShadersInclude/sceneUboDeclaration.js";
4
+ import "./ShadersInclude/meshUboDeclaration.js";
5
+ const name = "volumetricLightingRenderVolumeVertexShader";
6
+ const shader = `#include<sceneUboDeclaration>
7
+ #include<meshUboDeclaration>
8
+ attribute position : vec3f;varying vWorldPos: vec4f;@vertex
9
+ fn main(input : VertexInputs)->FragmentInputs {let worldPos=mesh.world*vec4f(vertexInputs.position,1.0);vertexOutputs.vWorldPos=worldPos;vertexOutputs.position=scene.viewProjection*worldPos;}
10
+ `;
11
+ // Sideeffect
12
+ if (!ShaderStore.ShadersStoreWGSL[name]) {
13
+ ShaderStore.ShadersStoreWGSL[name] = shader;
14
+ }
15
+ /** @internal */
16
+ export const volumetricLightingRenderVolumeVertexShaderWGSL = { name, shader };
17
+ //# sourceMappingURL=volumetricLightingRenderVolume.vertex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"volumetricLightingRenderVolume.vertex.js","sourceRoot":"","sources":["../../../../dev/core/src/ShadersWGSL/volumetricLightingRenderVolume.vertex.ts"],"names":[],"mappings":"AAAA,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,sCAAsC,CAAC;AAC9C,OAAO,qCAAqC,CAAC;AAE7C,MAAM,IAAI,GAAG,4CAA4C,CAAC;AAC1D,MAAM,MAAM,GAAG;;;;CAId,CAAC;AACF,aAAa;AACb,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,CAAC;IACtC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC;AAChD,CAAC;AACD,gBAAgB;AAChB,MAAM,CAAC,MAAM,8CAA8C,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["// Do not edit.\nimport { ShaderStore } from \"../Engines/shaderStore\";\nimport \"./ShadersInclude/sceneUboDeclaration\";\nimport \"./ShadersInclude/meshUboDeclaration\";\n\nconst name = \"volumetricLightingRenderVolumeVertexShader\";\nconst shader = `#include<sceneUboDeclaration>\n#include<meshUboDeclaration>\nattribute position : vec3f;varying vWorldPos: vec4f;@vertex\nfn main(input : VertexInputs)->FragmentInputs {let worldPos=mesh.world*vec4f(vertexInputs.position,1.0);vertexOutputs.vWorldPos=worldPos;vertexOutputs.position=scene.viewProjection*worldPos;}\n`;\n// Sideeffect\nif (!ShaderStore.ShadersStoreWGSL[name]) {\n ShaderStore.ShadersStoreWGSL[name] = shader;\n}\n/** @internal */\nexport const volumetricLightingRenderVolumeVertexShaderWGSL = { name, shader };\n"]}
@@ -1,16 +1,62 @@
1
- /** @internal */
2
- export interface IStencilState {
1
+ /**
2
+ * Interface defining the properties of the stencil state.
3
+ */
4
+ export interface IStencilStateProperties {
5
+ /**
6
+ * Whether the stencil test is enabled or not.
7
+ */
3
8
  enabled: boolean;
9
+ /**
10
+ * The stencil mask to use for writing.
11
+ */
4
12
  mask: number;
13
+ /**
14
+ * The stencil mask to use for reading.
15
+ */
5
16
  funcMask: number;
17
+ /**
18
+ * The reference value to use for the stencil test.
19
+ */
6
20
  funcRef: number;
21
+ /**
22
+ * The stencil comparison function to use for front faces.
23
+ */
7
24
  func: number;
25
+ /**
26
+ * The operation to perform when both the stencil and depth tests pass for front faces.
27
+ */
8
28
  opStencilDepthPass: number;
29
+ /**
30
+ * The operation to perform when the stencil test fails for front faces.
31
+ */
9
32
  opStencilFail: number;
33
+ /**
34
+ * The operation to perform when the stencil test passes but the depth test fails for front faces.
35
+ */
10
36
  opDepthFail: number;
37
+ /**
38
+ * The stencil comparison function to use for back faces.
39
+ */
11
40
  backFunc: number;
41
+ /**
42
+ * The operation to perform when both the stencil and depth tests pass for back faces.
43
+ */
12
44
  backOpStencilDepthPass: number;
45
+ /**
46
+ * The operation to perform when the stencil test fails for back faces.
47
+ */
13
48
  backOpStencilFail: number;
49
+ /**
50
+ * The operation to perform when the stencil test passes but the depth test fails for back faces.
51
+ */
14
52
  backOpDepthFail: number;
53
+ }
54
+ /**
55
+ * Interface defining the stencil state.
56
+ */
57
+ export interface IStencilState extends IStencilStateProperties {
58
+ /**
59
+ * Resets the stencil state to default values.
60
+ */
15
61
  reset(): void;
16
62
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IStencilState.js","sourceRoot":"","sources":["../../../../dev/core/src/States/IStencilState.ts"],"names":[],"mappings":"","sourcesContent":["/** @internal */\r\nexport interface IStencilState {\r\n enabled: boolean;\r\n\r\n mask: number; // write mask\r\n funcMask: number; // read mask\r\n\r\n funcRef: number;\r\n\r\n // Front stencil operations\r\n func: number;\r\n opStencilDepthPass: number;\r\n opStencilFail: number;\r\n opDepthFail: number;\r\n\r\n // Back stencil operations\r\n backFunc: number;\r\n backOpStencilDepthPass: number;\r\n backOpStencilFail: number;\r\n backOpDepthFail: number;\r\n\r\n reset(): void;\r\n}\r\n"]}
1
+ {"version":3,"file":"IStencilState.js","sourceRoot":"","sources":["../../../../dev/core/src/States/IStencilState.ts"],"names":[],"mappings":"","sourcesContent":["/**\r\n * Interface defining the properties of the stencil state.\r\n */\r\nexport interface IStencilStateProperties {\r\n /**\r\n * Whether the stencil test is enabled or not.\r\n */\r\n enabled: boolean;\r\n\r\n /**\r\n * The stencil mask to use for writing.\r\n */\r\n mask: number; // write mask\r\n /**\r\n * The stencil mask to use for reading.\r\n */\r\n funcMask: number; // read mask\r\n\r\n /**\r\n * The reference value to use for the stencil test.\r\n */\r\n funcRef: number;\r\n\r\n // Front stencil operations\r\n /**\r\n * The stencil comparison function to use for front faces.\r\n */\r\n func: number;\r\n /**\r\n * The operation to perform when both the stencil and depth tests pass for front faces.\r\n */\r\n opStencilDepthPass: number;\r\n /**\r\n * The operation to perform when the stencil test fails for front faces.\r\n */\r\n opStencilFail: number;\r\n /**\r\n * The operation to perform when the stencil test passes but the depth test fails for front faces.\r\n */\r\n opDepthFail: number;\r\n\r\n // Back stencil operations\r\n /**\r\n * The stencil comparison function to use for back faces.\r\n */\r\n backFunc: number;\r\n /**\r\n * The operation to perform when both the stencil and depth tests pass for back faces.\r\n */\r\n backOpStencilDepthPass: number;\r\n /**\r\n * The operation to perform when the stencil test fails for back faces.\r\n */\r\n backOpStencilFail: number;\r\n /**\r\n * The operation to perform when the stencil test passes but the depth test fails for back faces.\r\n */\r\n backOpDepthFail: number;\r\n}\r\n\r\n/**\r\n * Interface defining the stencil state.\r\n */\r\nexport interface IStencilState extends IStencilStateProperties {\r\n /**\r\n * Resets the stencil state to default values.\r\n */\r\n reset(): void;\r\n}\r\n"]}
@@ -20,6 +20,7 @@ export declare class AlphaState {
20
20
  constructor(_supportBlendParametersPerTarget: boolean);
21
21
  get isDirty(): boolean;
22
22
  get alphaBlend(): boolean;
23
+ set alphaBlend(value: boolean);
23
24
  setAlphaBlend(value: boolean, targetIndex?: number): void;
24
25
  setAlphaBlendConstants(r: number, g: number, b: number, a: number): void;
25
26
  setAlphaBlendFunctionParameters(srcRGBFactor: number, dstRGBFactor: number, srcAlphaFactor: number, dstAlphaFactor: number, targetIndex?: number): void;
@@ -26,6 +26,9 @@ export class AlphaState {
26
26
  get alphaBlend() {
27
27
  return this._numTargetEnabled > 0;
28
28
  }
29
+ set alphaBlend(value) {
30
+ this.setAlphaBlend(value);
31
+ }
29
32
  setAlphaBlend(value, targetIndex = 0) {
30
33
  if (this._alphaBlend[targetIndex] === value) {
31
34
  return;