@luma.gl/engine 10.0.0-beta.4 → 10.0.0-rc.2

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 (473) hide show
  1. package/THIRD-PARTY-NOTICES.md +82 -0
  2. package/dist/animation/animation-track.d.ts +7 -0
  3. package/dist/animation/animation-track.d.ts.map +1 -1
  4. package/dist/animation/animation-track.js.map +1 -1
  5. package/dist/animation/node-animation-binding.cjs +1 -0
  6. package/dist/animation/node-animation-binding.d.ts +2 -1
  7. package/dist/animation/node-animation-binding.d.ts.map +1 -1
  8. package/dist/animation/node-animation-binding.js +6 -0
  9. package/dist/animation/node-animation-binding.js.map +1 -1
  10. package/dist/animation/scenegraph-gpu-animation-layout.cjs +99 -0
  11. package/dist/animation/scenegraph-gpu-animation-layout.d.ts +69 -0
  12. package/dist/animation/scenegraph-gpu-animation-layout.d.ts.map +1 -0
  13. package/dist/animation/scenegraph-gpu-animation-layout.js +90 -0
  14. package/dist/animation/scenegraph-gpu-animation-layout.js.map +1 -0
  15. package/dist/animation/scenegraph-gpu-animation.cjs +281 -0
  16. package/dist/animation/scenegraph-gpu-animation.d.ts +54 -0
  17. package/dist/animation/scenegraph-gpu-animation.d.ts.map +1 -0
  18. package/dist/animation/scenegraph-gpu-animation.js +274 -0
  19. package/dist/animation/scenegraph-gpu-animation.js.map +1 -0
  20. package/dist/arrow/arrow-picking.cjs +4 -3
  21. package/dist/arrow/arrow-picking.d.ts +15 -5
  22. package/dist/arrow/arrow-picking.d.ts.map +1 -1
  23. package/dist/arrow/arrow-picking.js +16 -5
  24. package/dist/arrow/arrow-picking.js.map +1 -1
  25. package/dist/arrow/index.cjs.map +1 -1
  26. package/dist/audio/audio-controller.cjs +6 -2
  27. package/dist/audio/audio-controller.d.ts.map +1 -1
  28. package/dist/audio/audio-controller.js +6 -2
  29. package/dist/audio/audio-controller.js.map +1 -1
  30. package/dist/audio/audio-graph.cjs +26 -2
  31. package/dist/audio/audio-graph.d.ts +9 -0
  32. package/dist/audio/audio-graph.d.ts.map +1 -1
  33. package/dist/audio/audio-graph.js +35 -10
  34. package/dist/audio/audio-graph.js.map +1 -1
  35. package/dist/dist.dev.js +1689 -1094
  36. package/dist/dist.min.js +69 -70
  37. package/dist/effects/glfx-effects.cjs +261 -0
  38. package/dist/effects/glfx-effects.d.ts +959 -0
  39. package/dist/effects/glfx-effects.d.ts.map +1 -0
  40. package/dist/effects/glfx-effects.js +200 -0
  41. package/dist/effects/glfx-effects.js.map +1 -0
  42. package/dist/effects/graph/gpu-effect-operation.cjs +402 -0
  43. package/dist/effects/graph/gpu-effect-operation.d.ts +101 -0
  44. package/dist/effects/graph/gpu-effect-operation.d.ts.map +1 -0
  45. package/dist/effects/graph/gpu-effect-operation.js +410 -0
  46. package/dist/effects/graph/gpu-effect-operation.js.map +1 -0
  47. package/dist/effects/graph/temporal-graph-history.cjs +48 -0
  48. package/dist/effects/graph/temporal-graph-history.d.ts +17 -0
  49. package/dist/effects/graph/temporal-graph-history.d.ts.map +1 -0
  50. package/dist/effects/graph/temporal-graph-history.js +30 -0
  51. package/dist/effects/graph/temporal-graph-history.js.map +1 -0
  52. package/dist/effects/index.cjs +117 -30
  53. package/dist/effects/index.cjs.map +3 -3
  54. package/dist/effects/index.d.ts +34 -18
  55. package/dist/effects/index.d.ts.map +1 -1
  56. package/dist/effects/index.js +31 -18
  57. package/dist/effects/index.js.map +1 -1
  58. package/dist/effects/passes/postprocessing/fxaa/fxaa.cjs +9 -2
  59. package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts +19 -0
  60. package/dist/effects/passes/postprocessing/fxaa/fxaa.d.ts.map +1 -1
  61. package/dist/effects/passes/postprocessing/fxaa/fxaa.js +6 -0
  62. package/dist/effects/passes/postprocessing/fxaa/fxaa.js.map +1 -1
  63. package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.cjs +9 -2
  64. package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts +41 -0
  65. package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.d.ts.map +1 -1
  66. package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js +6 -0
  67. package/dist/effects/passes/postprocessing/image-adjust-filters/tone-mapping.js.map +1 -1
  68. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.cjs +200 -13
  69. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts +992 -6
  70. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.d.ts.map +1 -1
  71. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js +199 -10
  72. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.js.map +1 -1
  73. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts +3 -3
  74. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.d.ts.map +1 -1
  75. package/dist/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.js.map +1 -1
  76. package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.cjs +41 -40
  77. package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts +116 -8
  78. package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.d.ts.map +1 -1
  79. package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js +38 -37
  80. package/dist/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.js.map +1 -1
  81. package/dist/effects/passes/screen-space/clustered-volumetric-lighting.cjs +83 -66
  82. package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts +470 -2
  83. package/dist/effects/passes/screen-space/clustered-volumetric-lighting.d.ts.map +1 -1
  84. package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js +80 -62
  85. package/dist/effects/passes/screen-space/clustered-volumetric-lighting.js.map +1 -1
  86. package/dist/effects/passes/screen-space/copy-pass.cjs +7 -0
  87. package/dist/effects/passes/screen-space/copy-pass.d.ts +1 -0
  88. package/dist/effects/passes/screen-space/copy-pass.d.ts.map +1 -1
  89. package/dist/effects/passes/screen-space/copy-pass.js +4 -0
  90. package/dist/effects/passes/screen-space/copy-pass.js.map +1 -1
  91. package/dist/effects/passes/screen-space/depth-aware-blur.cjs +14 -5
  92. package/dist/effects/passes/screen-space/depth-aware-blur.d.ts +125 -17
  93. package/dist/effects/passes/screen-space/depth-aware-blur.d.ts.map +1 -1
  94. package/dist/effects/passes/screen-space/depth-aware-blur.js +11 -3
  95. package/dist/effects/passes/screen-space/depth-aware-blur.js.map +1 -1
  96. package/dist/effects/passes/screen-space/dof.cjs +19 -3
  97. package/dist/effects/passes/screen-space/dof.d.ts +181 -0
  98. package/dist/effects/passes/screen-space/dof.d.ts.map +1 -1
  99. package/dist/effects/passes/screen-space/dof.js +17 -3
  100. package/dist/effects/passes/screen-space/dof.js.map +1 -1
  101. package/dist/effects/passes/screen-space/gtao.cjs +82 -62
  102. package/dist/effects/passes/screen-space/gtao.d.ts +608 -3
  103. package/dist/effects/passes/screen-space/gtao.d.ts.map +1 -1
  104. package/dist/effects/passes/screen-space/gtao.js +83 -60
  105. package/dist/effects/passes/screen-space/gtao.js.map +1 -1
  106. package/dist/effects/passes/screen-space/hdr-auto-exposure.cjs +103 -79
  107. package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts +225 -3
  108. package/dist/effects/passes/screen-space/hdr-auto-exposure.d.ts.map +1 -1
  109. package/dist/effects/passes/screen-space/hdr-auto-exposure.js +102 -77
  110. package/dist/effects/passes/screen-space/hdr-auto-exposure.js.map +1 -1
  111. package/dist/effects/passes/screen-space/height-fog.cjs +14 -0
  112. package/dist/effects/passes/screen-space/height-fog.d.ts +71 -0
  113. package/dist/effects/passes/screen-space/height-fog.d.ts.map +1 -1
  114. package/dist/effects/passes/screen-space/height-fog.js +16 -3
  115. package/dist/effects/passes/screen-space/height-fog.js.map +1 -1
  116. package/dist/effects/passes/screen-space/motion-blur.cjs +7 -8
  117. package/dist/effects/passes/screen-space/motion-blur.d.ts +41 -2
  118. package/dist/effects/passes/screen-space/motion-blur.d.ts.map +1 -1
  119. package/dist/effects/passes/screen-space/motion-blur.js +6 -6
  120. package/dist/effects/passes/screen-space/motion-blur.js.map +1 -1
  121. package/dist/effects/passes/screen-space/outlines.cjs +143 -18
  122. package/dist/effects/passes/screen-space/outlines.d.ts +162 -3
  123. package/dist/effects/passes/screen-space/outlines.d.ts.map +1 -1
  124. package/dist/effects/passes/screen-space/outlines.js +137 -15
  125. package/dist/effects/passes/screen-space/outlines.js.map +1 -1
  126. package/dist/effects/passes/screen-space/screen-space-global-illumination.cjs +70 -61
  127. package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts +309 -2
  128. package/dist/effects/passes/screen-space/screen-space-global-illumination.d.ts.map +1 -1
  129. package/dist/effects/passes/screen-space/screen-space-global-illumination.js +69 -59
  130. package/dist/effects/passes/screen-space/screen-space-global-illumination.js.map +1 -1
  131. package/dist/effects/passes/screen-space/screen-space-reflections.cjs +151 -83
  132. package/dist/effects/passes/screen-space/screen-space-reflections.d.ts +778 -7
  133. package/dist/effects/passes/screen-space/screen-space-reflections.d.ts.map +1 -1
  134. package/dist/effects/passes/screen-space/screen-space-reflections.js +148 -79
  135. package/dist/effects/passes/screen-space/screen-space-reflections.js.map +1 -1
  136. package/dist/effects/passes/screen-space/selection-outline.cjs +12 -2
  137. package/dist/effects/passes/screen-space/selection-outline.d.ts +44 -0
  138. package/dist/effects/passes/screen-space/selection-outline.d.ts.map +1 -1
  139. package/dist/effects/passes/screen-space/selection-outline.js +9 -0
  140. package/dist/effects/passes/screen-space/selection-outline.js.map +1 -1
  141. package/dist/effects/passes/screen-space/ssao.cjs +69 -44
  142. package/dist/effects/passes/screen-space/ssao.d.ts +648 -3
  143. package/dist/effects/passes/screen-space/ssao.d.ts.map +1 -1
  144. package/dist/effects/passes/screen-space/ssao.js +67 -42
  145. package/dist/effects/passes/screen-space/ssao.js.map +1 -1
  146. package/dist/effects/passes/screen-space/temporal-antialiasing.cjs +42 -30
  147. package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts +107 -6
  148. package/dist/effects/passes/screen-space/temporal-antialiasing.d.ts.map +1 -1
  149. package/dist/effects/passes/screen-space/temporal-antialiasing.js +40 -27
  150. package/dist/effects/passes/screen-space/temporal-antialiasing.js.map +1 -1
  151. package/dist/effects/passes/screen-space/temporal-frame.cjs +34 -0
  152. package/dist/effects/passes/screen-space/temporal-frame.d.ts +23 -0
  153. package/dist/effects/passes/screen-space/temporal-frame.d.ts.map +1 -0
  154. package/dist/effects/passes/screen-space/temporal-frame.js +16 -0
  155. package/dist/effects/passes/screen-space/temporal-frame.js.map +1 -0
  156. package/dist/effects/passes/screen-space/volumetric-fog.cjs +25 -22
  157. package/dist/effects/passes/screen-space/volumetric-fog.d.ts +161 -2
  158. package/dist/effects/passes/screen-space/volumetric-fog.d.ts.map +1 -1
  159. package/dist/effects/passes/screen-space/volumetric-fog.js +27 -21
  160. package/dist/effects/passes/screen-space/volumetric-fog.js.map +1 -1
  161. package/dist/effects/temporal-upscale/index.cjs +40 -0
  162. package/dist/effects/temporal-upscale/index.d.ts +5 -0
  163. package/dist/effects/temporal-upscale/index.d.ts.map +1 -0
  164. package/dist/effects/temporal-upscale/index.js +6 -0
  165. package/dist/effects/temporal-upscale/index.js.map +1 -0
  166. package/dist/effects/temporal-upscale/temporal-math.cjs +202 -0
  167. package/dist/effects/temporal-upscale/temporal-math.d.ts +101 -0
  168. package/dist/effects/temporal-upscale/temporal-math.d.ts.map +1 -0
  169. package/dist/effects/temporal-upscale/temporal-math.js +202 -0
  170. package/dist/effects/temporal-upscale/temporal-math.js.map +1 -0
  171. package/dist/effects/temporal-upscale/temporal-upscale-shaders.cjs +353 -0
  172. package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts +7 -0
  173. package/dist/effects/temporal-upscale/temporal-upscale-shaders.d.ts.map +1 -0
  174. package/dist/effects/temporal-upscale/temporal-upscale-shaders.js +321 -0
  175. package/dist/effects/temporal-upscale/temporal-upscale-shaders.js.map +1 -0
  176. package/dist/effects/temporal-upscale/temporal-upscaler.cjs +392 -0
  177. package/dist/effects/temporal-upscale/temporal-upscaler.d.ts +143 -0
  178. package/dist/effects/temporal-upscale/temporal-upscaler.d.ts.map +1 -0
  179. package/dist/effects/temporal-upscale/temporal-upscaler.js +385 -0
  180. package/dist/effects/temporal-upscale/temporal-upscaler.js.map +1 -0
  181. package/dist/experimental-controls.cjs +13 -3
  182. package/dist/experimental-controls.d.ts +2 -1
  183. package/dist/experimental-controls.d.ts.map +1 -1
  184. package/dist/experimental-controls.js +1 -1
  185. package/dist/experimental-controls.js.map +1 -1
  186. package/dist/experimental-materials.cjs +37 -3
  187. package/dist/experimental-materials.d.ts +2 -1
  188. package/dist/experimental-materials.d.ts.map +1 -1
  189. package/dist/experimental-materials.js +1 -1
  190. package/dist/experimental-materials.js.map +1 -1
  191. package/dist/experimental-textures.cjs +13 -3
  192. package/dist/experimental-textures.d.ts +2 -1
  193. package/dist/experimental-textures.d.ts.map +1 -1
  194. package/dist/experimental-textures.js +1 -1
  195. package/dist/experimental-textures.js.map +1 -1
  196. package/dist/experimental-webxr.cjs +17 -3
  197. package/dist/experimental-webxr.d.ts +2 -1
  198. package/dist/experimental-webxr.d.ts.map +1 -1
  199. package/dist/experimental-webxr.js +1 -1
  200. package/dist/experimental-webxr.js.map +1 -1
  201. package/dist/gltf/gltf/create-gltf-model.cjs +34 -71
  202. package/dist/gltf/gltf/create-gltf-model.d.ts +3 -0
  203. package/dist/gltf/gltf/create-gltf-model.d.ts.map +1 -1
  204. package/dist/gltf/gltf/create-gltf-model.js +40 -74
  205. package/dist/gltf/gltf/create-gltf-model.js.map +1 -1
  206. package/dist/gltf/gltf/create-scenegraph-from-gltf.cjs +46 -4
  207. package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts +9 -1
  208. package/dist/gltf/gltf/create-scenegraph-from-gltf.d.ts.map +1 -1
  209. package/dist/gltf/gltf/create-scenegraph-from-gltf.js +54 -4
  210. package/dist/gltf/gltf/create-scenegraph-from-gltf.js.map +1 -1
  211. package/dist/gltf/gltf/gltf-animated-crowd.cjs +25 -136
  212. package/dist/gltf/gltf/gltf-animated-crowd.d.ts +4 -8
  213. package/dist/gltf/gltf/gltf-animated-crowd.d.ts.map +1 -1
  214. package/dist/gltf/gltf/gltf-animated-crowd.js +27 -139
  215. package/dist/gltf/gltf/gltf-animated-crowd.js.map +1 -1
  216. package/dist/gltf/gltf/gltf-animation-nodes.cjs +84 -0
  217. package/dist/gltf/gltf/gltf-animation-nodes.d.ts +11 -0
  218. package/dist/gltf/gltf/gltf-animation-nodes.d.ts.map +1 -0
  219. package/dist/gltf/gltf/gltf-animation-nodes.js +62 -0
  220. package/dist/gltf/gltf/gltf-animation-nodes.js.map +1 -0
  221. package/dist/gltf/gltf/gltf-animator.cjs +8 -2
  222. package/dist/gltf/gltf/gltf-animator.d.ts +6 -1
  223. package/dist/gltf/gltf/gltf-animator.d.ts.map +1 -1
  224. package/dist/gltf/gltf/gltf-animator.js +10 -2
  225. package/dist/gltf/gltf/gltf-animator.js.map +1 -1
  226. package/dist/gltf/gltf/gltf-gpu-animation-controller.cjs +81 -0
  227. package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts +9 -0
  228. package/dist/gltf/gltf/gltf-gpu-animation-controller.d.ts.map +1 -0
  229. package/dist/gltf/gltf/gltf-gpu-animation-controller.js +67 -0
  230. package/dist/gltf/gltf/gltf-gpu-animation-controller.js.map +1 -0
  231. package/dist/gltf/gltf/gltf-gpu-animation.cjs +33 -28
  232. package/dist/gltf/gltf/gltf-gpu-animation.d.ts +7 -26
  233. package/dist/gltf/gltf/gltf-gpu-animation.d.ts.map +1 -1
  234. package/dist/gltf/gltf/gltf-gpu-animation.js +29 -28
  235. package/dist/gltf/gltf/gltf-gpu-animation.js.map +1 -1
  236. package/dist/gltf/index.cjs.map +3 -3
  237. package/dist/gltf/index.d.ts +2 -2
  238. package/dist/gltf/index.d.ts.map +1 -1
  239. package/dist/gltf/index.js.map +1 -1
  240. package/dist/gltf/parsers/parse-gltf.cjs +4 -2
  241. package/dist/gltf/parsers/parse-gltf.d.ts +3 -0
  242. package/dist/gltf/parsers/parse-gltf.d.ts.map +1 -1
  243. package/dist/gltf/parsers/parse-gltf.js +7 -2
  244. package/dist/gltf/parsers/parse-gltf.js.map +1 -1
  245. package/dist/graph/models/index.cjs.map +2 -2
  246. package/dist/graph/physics/index.cjs +5 -0
  247. package/dist/graph/physics/index.cjs.map +3 -3
  248. package/dist/graph/physics/index.d.ts +1 -0
  249. package/dist/graph/physics/index.d.ts.map +1 -1
  250. package/dist/graph/physics/index.js +1 -0
  251. package/dist/graph/physics/index.js.map +1 -1
  252. package/dist/graph/physics/physics-controller-geometry.cjs +21 -0
  253. package/dist/graph/physics/physics-controller-geometry.d.ts +8 -1
  254. package/dist/graph/physics/physics-controller-geometry.d.ts.map +1 -1
  255. package/dist/graph/physics/physics-controller-geometry.js +22 -0
  256. package/dist/graph/physics/physics-controller-geometry.js.map +1 -1
  257. package/dist/graph/physics/scenegraph-session.d.ts +1 -1
  258. package/dist/graph/physics/scenegraph-session.d.ts.map +1 -1
  259. package/dist/graph/tables/index.cjs.map +2 -2
  260. package/dist/index.cjs +16 -0
  261. package/dist/index.cjs.map +3 -3
  262. package/dist/index.d.ts +6 -0
  263. package/dist/index.d.ts.map +1 -1
  264. package/dist/index.js +4 -0
  265. package/dist/index.js.map +1 -1
  266. package/dist/lighting/ambient-occlusion-pass.cjs +47 -28
  267. package/dist/lighting/ambient-occlusion-pass.d.ts +12 -0
  268. package/dist/lighting/ambient-occlusion-pass.d.ts.map +1 -1
  269. package/dist/lighting/ambient-occlusion-pass.js +45 -26
  270. package/dist/lighting/ambient-occlusion-pass.js.map +1 -1
  271. package/dist/lighting/clustered-light-grid.cjs +71 -20
  272. package/dist/lighting/clustered-light-grid.d.ts +37 -0
  273. package/dist/lighting/clustered-light-grid.d.ts.map +1 -1
  274. package/dist/lighting/clustered-light-grid.js +68 -18
  275. package/dist/lighting/clustered-light-grid.js.map +1 -1
  276. package/dist/lighting/contact-shadow-composite.cjs +72 -51
  277. package/dist/lighting/contact-shadow-composite.d.ts +274 -3
  278. package/dist/lighting/contact-shadow-composite.d.ts.map +1 -1
  279. package/dist/lighting/contact-shadow-composite.js +72 -50
  280. package/dist/lighting/contact-shadow-composite.js.map +1 -1
  281. package/dist/lighting/contact-shadow-pass.cjs +50 -39
  282. package/dist/lighting/contact-shadow-pass.d.ts +8 -0
  283. package/dist/lighting/contact-shadow-pass.d.ts.map +1 -1
  284. package/dist/lighting/contact-shadow-pass.js +47 -37
  285. package/dist/lighting/contact-shadow-pass.js.map +1 -1
  286. package/dist/lighting/cortao/cortao-occluder-lookup-table.cjs +96 -0
  287. package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts +41 -0
  288. package/dist/lighting/cortao/cortao-occluder-lookup-table.d.ts.map +1 -0
  289. package/dist/lighting/cortao/cortao-occluder-lookup-table.js +94 -0
  290. package/dist/lighting/cortao/cortao-occluder-lookup-table.js.map +1 -0
  291. package/dist/lighting/cortao/cortao-parameters.cjs +127 -0
  292. package/dist/lighting/cortao/cortao-parameters.d.ts +95 -0
  293. package/dist/lighting/cortao/cortao-parameters.d.ts.map +1 -0
  294. package/dist/lighting/cortao/cortao-parameters.js +122 -0
  295. package/dist/lighting/cortao/cortao-parameters.js.map +1 -0
  296. package/dist/lighting/cortao/cortao-pass.cjs +100 -0
  297. package/dist/lighting/cortao/cortao-pass.d.ts +33 -0
  298. package/dist/lighting/cortao/cortao-pass.d.ts.map +1 -0
  299. package/dist/lighting/cortao/cortao-pass.js +84 -0
  300. package/dist/lighting/cortao/cortao-pass.js.map +1 -0
  301. package/dist/lighting/cortao/cortao-passes.cjs +42 -0
  302. package/dist/lighting/cortao/cortao-passes.d.ts +38 -0
  303. package/dist/lighting/cortao/cortao-passes.d.ts.map +1 -0
  304. package/dist/lighting/cortao/cortao-passes.js +19 -0
  305. package/dist/lighting/cortao/cortao-passes.js.map +1 -0
  306. package/dist/lighting/cortao/cortao-shaders-wgsl.cjs +606 -0
  307. package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts +49 -0
  308. package/dist/lighting/cortao/cortao-shaders-wgsl.d.ts.map +1 -0
  309. package/dist/lighting/cortao/cortao-shaders-wgsl.js +610 -0
  310. package/dist/lighting/cortao/cortao-shaders-wgsl.js.map +1 -0
  311. package/dist/lighting/cortao/cortao-shaders.cjs +667 -0
  312. package/dist/lighting/cortao/cortao-shaders.d.ts +118 -0
  313. package/dist/lighting/cortao/cortao-shaders.d.ts.map +1 -0
  314. package/dist/lighting/cortao/cortao-shaders.js +657 -0
  315. package/dist/lighting/cortao/cortao-shaders.js.map +1 -0
  316. package/dist/lighting/cortao/cortao-upsample.cjs +191 -0
  317. package/dist/lighting/cortao/cortao-upsample.d.ts +16 -0
  318. package/dist/lighting/cortao/cortao-upsample.d.ts.map +1 -0
  319. package/dist/lighting/cortao/cortao-upsample.js +159 -0
  320. package/dist/lighting/cortao/cortao-upsample.js.map +1 -0
  321. package/dist/lighting/cortao/cortao-webgl-passes.cjs +229 -0
  322. package/dist/lighting/cortao/cortao-webgl-passes.d.ts +28 -0
  323. package/dist/lighting/cortao/cortao-webgl-passes.d.ts.map +1 -0
  324. package/dist/lighting/cortao/cortao-webgl-passes.js +212 -0
  325. package/dist/lighting/cortao/cortao-webgl-passes.js.map +1 -0
  326. package/dist/lighting/cortao/cortao-webgpu-passes.cjs +348 -0
  327. package/dist/lighting/cortao/cortao-webgpu-passes.d.ts +31 -0
  328. package/dist/lighting/cortao/cortao-webgpu-passes.d.ts.map +1 -0
  329. package/dist/lighting/cortao/cortao-webgpu-passes.js +335 -0
  330. package/dist/lighting/cortao/cortao-webgpu-passes.js.map +1 -0
  331. package/dist/lighting/index.cjs +13 -2
  332. package/dist/lighting/index.cjs.map +3 -3
  333. package/dist/lighting/index.d.ts +11 -6
  334. package/dist/lighting/index.d.ts.map +1 -1
  335. package/dist/lighting/index.js +6 -5
  336. package/dist/lighting/index.js.map +1 -1
  337. package/dist/lighting/shadow-map-renderer.cjs +40 -37
  338. package/dist/lighting/shadow-map-renderer.d.ts +15 -0
  339. package/dist/lighting/shadow-map-renderer.d.ts.map +1 -1
  340. package/dist/lighting/shadow-map-renderer.js +37 -35
  341. package/dist/lighting/shadow-map-renderer.js.map +1 -1
  342. package/dist/model/gpu-vector-model.cjs +39 -16
  343. package/dist/model/gpu-vector-model.d.ts +8 -0
  344. package/dist/model/gpu-vector-model.d.ts.map +1 -1
  345. package/dist/model/gpu-vector-model.js +46 -18
  346. package/dist/model/gpu-vector-model.js.map +1 -1
  347. package/dist/passes/effect-renderer.cjs +155 -0
  348. package/dist/passes/effect-renderer.d.ts +158 -0
  349. package/dist/passes/effect-renderer.d.ts.map +1 -0
  350. package/dist/passes/effect-renderer.js +143 -0
  351. package/dist/passes/effect-renderer.js.map +1 -0
  352. package/dist/passes/scene-capture-pass.cjs +42 -0
  353. package/dist/passes/scene-capture-pass.d.ts +29 -0
  354. package/dist/passes/scene-capture-pass.d.ts.map +1 -0
  355. package/dist/passes/scene-capture-pass.js +21 -0
  356. package/dist/passes/scene-capture-pass.js.map +1 -0
  357. package/dist/passes/shader-pass-renderer.cjs +94 -68
  358. package/dist/passes/shader-pass-renderer.d.ts +32 -15
  359. package/dist/passes/shader-pass-renderer.d.ts.map +1 -1
  360. package/dist/passes/shader-pass-renderer.js +104 -76
  361. package/dist/passes/shader-pass-renderer.js.map +1 -1
  362. package/dist/scenegraph/model-node.cjs +2 -0
  363. package/dist/scenegraph/model-node.d.ts +4 -0
  364. package/dist/scenegraph/model-node.d.ts.map +1 -1
  365. package/dist/scenegraph/model-node.js +2 -0
  366. package/dist/scenegraph/model-node.js.map +1 -1
  367. package/dist/splats/gpu-paged-splat-renderer.cjs +52 -8
  368. package/dist/splats/gpu-paged-splat-renderer.d.ts +16 -3
  369. package/dist/splats/gpu-paged-splat-renderer.d.ts.map +1 -1
  370. package/dist/splats/gpu-paged-splat-renderer.js +55 -9
  371. package/dist/splats/gpu-paged-splat-renderer.js.map +1 -1
  372. package/dist/splats/gpu-paged-splat-shaders.cjs +3 -1
  373. package/dist/splats/gpu-paged-splat-shaders.d.ts.map +1 -1
  374. package/dist/splats/gpu-paged-splat-shaders.js +3 -1
  375. package/dist/splats/gpu-paged-splat-shaders.js.map +1 -1
  376. package/dist/splats/index.cjs.map +2 -2
  377. package/dist/text/fonts/atlas/browser-font-atlas.cjs +10 -1
  378. package/dist/text/fonts/atlas/browser-font-atlas.d.ts +3 -1
  379. package/dist/text/fonts/atlas/browser-font-atlas.d.ts.map +1 -1
  380. package/dist/text/fonts/atlas/browser-font-atlas.js +10 -2
  381. package/dist/text/fonts/atlas/browser-font-atlas.js.map +1 -1
  382. package/dist/text/fonts/atlas/lru-cache.cjs +4 -0
  383. package/dist/text/fonts/atlas/lru-cache.d.ts +3 -1
  384. package/dist/text/fonts/atlas/lru-cache.d.ts.map +1 -1
  385. package/dist/text/fonts/atlas/lru-cache.js +4 -0
  386. package/dist/text/fonts/atlas/lru-cache.js.map +1 -1
  387. package/dist/text/fonts/index.cjs +2 -0
  388. package/dist/text/fonts/index.cjs.map +1 -1
  389. package/dist/text/fonts/index.d.ts +1 -1
  390. package/dist/text/fonts/index.d.ts.map +1 -1
  391. package/dist/text/fonts/index.js +1 -1
  392. package/dist/text/fonts/index.js.map +1 -1
  393. package/dist/text/index.cjs.map +1 -1
  394. package/package.json +8 -8
  395. package/src/animation/animation-track.ts +5 -0
  396. package/src/animation/node-animation-binding.ts +9 -8
  397. package/src/animation/scenegraph-gpu-animation-layout.ts +195 -0
  398. package/src/animation/scenegraph-gpu-animation.ts +340 -0
  399. package/src/arrow/arrow-picking.ts +23 -11
  400. package/src/audio/audio-controller.ts +4 -1
  401. package/src/audio/audio-graph.ts +46 -25
  402. package/src/effects/README.md +38 -14
  403. package/src/effects/glfx-effects.ts +227 -0
  404. package/src/effects/graph/gpu-effect-operation.ts +601 -0
  405. package/src/effects/graph/temporal-graph-history.ts +46 -0
  406. package/src/effects/index.ts +81 -19
  407. package/src/effects/passes/postprocessing/fxaa/fxaa.ts +8 -0
  408. package/src/effects/passes/postprocessing/image-adjust-filters/tone-mapping.ts +8 -0
  409. package/src/effects/passes/postprocessing/image-blur-filters/bloom-composite-shader-pass.ts +219 -19
  410. package/src/effects/passes/postprocessing/image-blur-filters/bloom-compute-pyramid.ts +6 -6
  411. package/src/effects/passes/screen-space/camera-reprojection-temporal-antialiasing.ts +45 -45
  412. package/src/effects/passes/screen-space/clustered-volumetric-lighting.ts +88 -68
  413. package/src/effects/passes/screen-space/copy-pass.ts +4 -0
  414. package/src/effects/passes/screen-space/depth-aware-blur.ts +13 -3
  415. package/src/effects/passes/screen-space/dof.ts +20 -3
  416. package/src/effects/passes/screen-space/gtao.ts +91 -65
  417. package/src/effects/passes/screen-space/hdr-auto-exposure.ts +109 -84
  418. package/src/effects/passes/screen-space/height-fog.ts +18 -3
  419. package/src/effects/passes/screen-space/motion-blur.ts +8 -7
  420. package/src/effects/passes/screen-space/outlines.ts +143 -17
  421. package/src/effects/passes/screen-space/screen-space-global-illumination.ts +75 -64
  422. package/src/effects/passes/screen-space/screen-space-reflections.ts +158 -95
  423. package/src/effects/passes/screen-space/selection-outline.ts +11 -0
  424. package/src/effects/passes/screen-space/ssao.ts +79 -46
  425. package/src/effects/passes/screen-space/temporal-antialiasing.ts +43 -33
  426. package/src/effects/passes/screen-space/temporal-frame.ts +33 -0
  427. package/src/effects/passes/screen-space/volumetric-fog.ts +30 -24
  428. package/src/effects/temporal-upscale/index.ts +20 -0
  429. package/src/effects/temporal-upscale/temporal-math.ts +308 -0
  430. package/src/effects/temporal-upscale/temporal-upscale-shaders.ts +326 -0
  431. package/src/effects/temporal-upscale/temporal-upscaler.ts +538 -0
  432. package/src/experimental-controls.ts +13 -1
  433. package/src/experimental-materials.ts +37 -1
  434. package/src/experimental-textures.ts +9 -1
  435. package/src/experimental-webxr.ts +18 -1
  436. package/src/gltf/gltf/create-gltf-model.ts +59 -90
  437. package/src/gltf/gltf/create-scenegraph-from-gltf.ts +71 -5
  438. package/src/gltf/gltf/gltf-animated-crowd.ts +30 -177
  439. package/src/gltf/gltf/gltf-animation-nodes.ts +82 -0
  440. package/src/gltf/gltf/gltf-animator.ts +15 -4
  441. package/src/gltf/gltf/gltf-gpu-animation-controller.ts +88 -0
  442. package/src/gltf/gltf/gltf-gpu-animation.ts +53 -60
  443. package/src/gltf/index.ts +5 -0
  444. package/src/gltf/parsers/parse-gltf.ts +12 -2
  445. package/src/graph/physics/index.ts +4 -0
  446. package/src/graph/physics/physics-controller-geometry.ts +33 -1
  447. package/src/index.ts +25 -0
  448. package/src/lighting/ambient-occlusion-pass.ts +62 -28
  449. package/src/lighting/clustered-light-grid.ts +87 -30
  450. package/src/lighting/contact-shadow-composite.ts +80 -52
  451. package/src/lighting/contact-shadow-pass.ts +59 -39
  452. package/src/lighting/cortao/cortao-occluder-lookup-table.ts +138 -0
  453. package/src/lighting/cortao/cortao-parameters.ts +218 -0
  454. package/src/lighting/cortao/cortao-pass.ts +136 -0
  455. package/src/lighting/cortao/cortao-passes.ts +50 -0
  456. package/src/lighting/cortao/cortao-shaders-wgsl.ts +633 -0
  457. package/src/lighting/cortao/cortao-shaders.ts +674 -0
  458. package/src/lighting/cortao/cortao-upsample.ts +177 -0
  459. package/src/lighting/cortao/cortao-webgl-passes.ts +284 -0
  460. package/src/lighting/cortao/cortao-webgpu-passes.ts +430 -0
  461. package/src/lighting/index.ts +12 -3
  462. package/src/lighting/shadow-map-renderer.ts +57 -43
  463. package/src/model/gpu-vector-model.ts +47 -18
  464. package/src/passes/effect-renderer.ts +332 -0
  465. package/src/passes/scene-capture-pass.ts +51 -0
  466. package/src/passes/shader-pass-renderer.ts +164 -115
  467. package/src/scenegraph/model-node.ts +5 -0
  468. package/src/splats/README.md +1 -1
  469. package/src/splats/gpu-paged-splat-renderer.ts +77 -9
  470. package/src/splats/gpu-paged-splat-shaders.ts +7 -1
  471. package/src/text/fonts/atlas/browser-font-atlas.ts +12 -2
  472. package/src/text/fonts/atlas/lru-cache.ts +6 -1
  473. package/src/text/fonts/index.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cortao-occluder-lookup-table.js","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-occluder-lookup-table.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,6DAA6D;AAC7D,4DAA4D;AAC5D,6CAA6C;AA2B7C,mFAAmF;AACnF,MAAM,CAAC,MAAM,oCAAoC,GAAG,EAAE,CAAC;AACvD,gFAAgF;AAChF,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAEpD,4CAA4C;AAC5C,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CACvC,OAAmC;IAEnC,MAAM,EACJ,QAAQ,EACR,mBAAmB,GAAG,oCAAoC,EAC1D,gBAAgB,GAAG,iCAAiC,EACrD,GAAG,OAAO,CAAC;IACZ,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC;IACrC,MAAM,aAAa,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,mBAAmB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC;IAChF,MAAM,IAAI,GACR,QAAQ,IAAI,CAAC;QACX,CAAC,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC;QAC5B,CAAC,CAAC,QAAQ,IAAI,EAAE;YACd,CAAC,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC;YAC7B,CAAC,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC;IAEpC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,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+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var cortao_parameters_exports = {};
19
+ __export(cortao_parameters_exports, {
20
+ CORTAO_MAX_MIP_COUNT: () => CORTAO_MAX_MIP_COUNT,
21
+ getCORTAOFilterPassUniforms: () => getCORTAOFilterPassUniforms,
22
+ getCORTAOMainPassUniforms: () => getCORTAOMainPassUniforms,
23
+ getCORTAOMipAtlasSize: () => getCORTAOMipAtlasSize,
24
+ getCORTAOMipCount: () => getCORTAOMipCount,
25
+ getCORTAOMipmapUniforms: () => getCORTAOMipmapUniforms,
26
+ getCORTAOPrepassUniforms: () => getCORTAOPrepassUniforms,
27
+ isSupportedProjection: () => isSupportedProjection
28
+ });
29
+ module.exports = __toCommonJS(cortao_parameters_exports);
30
+ const CORTAO_MAX_MIP_COUNT = 8;
31
+ const MAX_FLOAT32 = 34028234663852886e22;
32
+ function isSupportedProjection(matrix) {
33
+ const zeroIndices = [1, 2, 3, 4, 6, 7, 12, 13, 15];
34
+ const epsilon = 1e-6;
35
+ return zeroIndices.every((index) => Math.abs(matrix[index]) < epsilon) && Math.abs(matrix[11] + 1) < epsilon && matrix[0] !== 0 && matrix[5] !== 0 && matrix[14] !== 0;
36
+ }
37
+ function getCORTAOMipCount(width, height) {
38
+ const shortSide = Math.max(1, Math.min(width, height));
39
+ return Math.min(CORTAO_MAX_MIP_COUNT, Math.floor(Math.log2(shortSide)) + 1);
40
+ }
41
+ function getCORTAOMipAtlasSize(width, height) {
42
+ return [width + Math.max(width >> 1, 1), height];
43
+ }
44
+ function getCORTAOPrepassUniforms(camera, configuration) {
45
+ const { nearPlane, farPlane } = camera;
46
+ let depthScale;
47
+ let depthOffset;
48
+ if (!Number.isFinite(nearPlane)) {
49
+ depthScale = 1 / farPlane;
50
+ depthOffset = 0;
51
+ } else if (!Number.isFinite(farPlane)) {
52
+ depthScale = -1 / nearPlane;
53
+ depthOffset = 1 / nearPlane;
54
+ } else {
55
+ depthScale = (nearPlane - farPlane) / (nearPlane * farPlane);
56
+ depthOffset = 1 / nearPlane;
57
+ }
58
+ return {
59
+ unprojectParams: getUnprojectParams(camera.projectionMatrix),
60
+ resolution: [configuration.width, configuration.height],
61
+ depthScale,
62
+ depthOffset,
63
+ randomSeed: configuration.randomSeed >>> 0
64
+ };
65
+ }
66
+ function getCORTAOMipmapUniforms(configuration) {
67
+ return {
68
+ resolution: [configuration.width, configuration.height],
69
+ mipCount: getCORTAOMipCount(configuration.width, configuration.height),
70
+ randomSeed: configuration.randomSeed >>> 0
71
+ };
72
+ }
73
+ function getCORTAOMainPassUniforms(camera, configuration) {
74
+ const matrix = camera.projectionMatrix;
75
+ const projectionX = matrix[0];
76
+ const projectionY = matrix[5];
77
+ const projectionOffsetX = matrix[8];
78
+ const projectionOffsetY = matrix[9];
79
+ const inverseY = 1 / projectionY;
80
+ const maxApparentCircleRadius = inverseY * configuration.maxScreenSpaceRadius * 2;
81
+ return {
82
+ unprojectParams: getUnprojectParams(matrix),
83
+ // WebGL textures and clip space both have +Y up, so CORTAO's flipY is false.
84
+ projectionParams: [
85
+ 0.5 * projectionX,
86
+ 0.5 * projectionY,
87
+ -0.5 + 0.5 * projectionOffsetX,
88
+ -0.5 + 0.5 * projectionOffsetY
89
+ ],
90
+ resolution: [configuration.width, configuration.height],
91
+ normalBias: 1 / projectionX / configuration.width * Math.SQRT2,
92
+ radius: Math.min(configuration.radius, MAX_FLOAT32),
93
+ maxApparentCircleRadiusCoefficient: maxApparentCircleRadius / Math.sqrt(maxApparentCircleRadius * maxApparentCircleRadius + 1),
94
+ mipBias: Math.log2(projectionY * configuration.height * 0.5) + configuration.mipBias,
95
+ inverseMaxSlopeCompensation: 1 / configuration.maxSlopeCompensation,
96
+ backfaceThreshold: configuration.backfaceThreshold,
97
+ backfaceBoost: configuration.backfaceBoost,
98
+ intensity: configuration.intensity,
99
+ mipCount: getCORTAOMipCount(configuration.width, configuration.height),
100
+ randomSeed: configuration.randomSeed >>> 0
101
+ };
102
+ }
103
+ function getCORTAOFilterPassUniforms(configuration) {
104
+ return {
105
+ resolution: [configuration.width, configuration.height],
106
+ depthSensitivity: configuration.filterDepthSensitivity,
107
+ normalSensitivity: configuration.filterNormalSensitivity
108
+ };
109
+ }
110
+ function getUnprojectParams(matrix) {
111
+ const inverseX = 1 / matrix[0];
112
+ const inverseY = 1 / matrix[5];
113
+ const inverseOffsetX = matrix[8] / matrix[0];
114
+ const inverseOffsetY = matrix[9] / matrix[5];
115
+ return [2 * inverseX, 2 * inverseY, -inverseX + inverseOffsetX, -inverseY + inverseOffsetY];
116
+ }
117
+ // Annotate the CommonJS export names for ESM import in node:
118
+ 0 && (module.exports = {
119
+ CORTAO_MAX_MIP_COUNT,
120
+ getCORTAOFilterPassUniforms,
121
+ getCORTAOMainPassUniforms,
122
+ getCORTAOMipAtlasSize,
123
+ getCORTAOMipCount,
124
+ getCORTAOMipmapUniforms,
125
+ getCORTAOPrepassUniforms,
126
+ isSupportedProjection
127
+ });
@@ -0,0 +1,95 @@
1
+ /** The maximum number of mip levels in the packed data buffer. */
2
+ export declare const CORTAO_MAX_MIP_COUNT = 8;
3
+ /** The camera values that CORTAO needs. All distances are in view-space units. */
4
+ export type CORTAOCamera = {
5
+ /** Column-major perspective projection from view space to clip space. */
6
+ projectionMatrix: readonly number[];
7
+ /** The distance to the near plane, in view-space units. */
8
+ nearPlane: number;
9
+ /** The distance to the far plane, in view-space units. */
10
+ farPlane: number;
11
+ };
12
+ /** The user configuration that the per-pass uniforms derive from. */
13
+ export type CORTAOConfiguration = {
14
+ /** Drawing buffer width, in pixels. */
15
+ width: number;
16
+ /** Drawing buffer height, in pixels. */
17
+ height: number;
18
+ /** Seed for the per-pixel noise. A constant seed prevents flicker without temporal filtering. */
19
+ randomSeed: number;
20
+ /** Maximum world-space radius, in view-space units. */
21
+ radius: number;
22
+ /** Maximum screen-space radius, as a fraction of the drawing buffer height. */
23
+ maxScreenSpaceRadius: number;
24
+ /** Mip level bias for the packed data reads in the main pass. */
25
+ mipBias: number;
26
+ /** Maximum enlargement of occluders that are seen at a grazing angle. */
27
+ maxSlopeCompensation: number;
28
+ /** Threshold that classifies an occluder as a back face. */
29
+ backfaceThreshold: number;
30
+ /** Extra enlargement of back-face occluders, from 0 to 1. */
31
+ backfaceBoost: number;
32
+ /** Exponent applied to the occlusion. 1 is the physically based result. */
33
+ intensity: number;
34
+ /** Depth sensitivity of the bilateral filter. */
35
+ filterDepthSensitivity: number;
36
+ /** Normal sensitivity of the bilateral filter. */
37
+ filterNormalSensitivity: number;
38
+ };
39
+ /** Uniforms of the prepass. */
40
+ export type CORTAOPrepassUniforms = {
41
+ unprojectParams: [number, number, number, number];
42
+ resolution: [number, number];
43
+ depthScale: number;
44
+ depthOffset: number;
45
+ randomSeed: number;
46
+ };
47
+ /** Uniforms of the mip atlas pass. */
48
+ export type CORTAOMipmapUniforms = {
49
+ resolution: [number, number];
50
+ mipCount: number;
51
+ randomSeed: number;
52
+ };
53
+ /** Uniforms of the main pass. */
54
+ export type CORTAOMainPassUniforms = {
55
+ unprojectParams: [number, number, number, number];
56
+ projectionParams: [number, number, number, number];
57
+ resolution: [number, number];
58
+ normalBias: number;
59
+ radius: number;
60
+ maxApparentCircleRadiusCoefficient: number;
61
+ mipBias: number;
62
+ inverseMaxSlopeCompensation: number;
63
+ backfaceThreshold: number;
64
+ backfaceBoost: number;
65
+ intensity: number;
66
+ mipCount: number;
67
+ randomSeed: number;
68
+ };
69
+ /** Uniforms of the filter pass. */
70
+ export type CORTAOFilterPassUniforms = {
71
+ resolution: [number, number];
72
+ depthSensitivity: number;
73
+ normalSensitivity: number;
74
+ };
75
+ /**
76
+ * Tests whether a column-major matrix is a perspective projection with only a field of view and
77
+ * an optional off-center offset. CORTAO supports no other projection.
78
+ */
79
+ export declare function isSupportedProjection(matrix: readonly number[]): boolean;
80
+ /**
81
+ * Gets the number of packed data mip levels. The smallest level keeps at least one pixel on the
82
+ * short side, so that the levels of the mip atlas do not overlap.
83
+ */
84
+ export declare function getCORTAOMipCount(width: number, height: number): number;
85
+ /** Gets the size of the packed data mip atlas. Level 0 is on the left, levels 1 and up on the right. */
86
+ export declare function getCORTAOMipAtlasSize(width: number, height: number): [number, number];
87
+ /** Gets the prepass uniforms. Port of `populatePrepassParameters()`. */
88
+ export declare function getCORTAOPrepassUniforms(camera: CORTAOCamera, configuration: CORTAOConfiguration): CORTAOPrepassUniforms;
89
+ /** Gets the mip atlas uniforms. */
90
+ export declare function getCORTAOMipmapUniforms(configuration: CORTAOConfiguration): CORTAOMipmapUniforms;
91
+ /** Gets the main pass uniforms. Port of `populateMainPassParameters()`, without the Y flip. */
92
+ export declare function getCORTAOMainPassUniforms(camera: CORTAOCamera, configuration: CORTAOConfiguration): CORTAOMainPassUniforms;
93
+ /** Gets the filter pass uniforms. Port of `populateFilterPassParameters()`. */
94
+ export declare function getCORTAOFilterPassUniforms(configuration: CORTAOConfiguration): CORTAOFilterPassUniforms;
95
+ //# sourceMappingURL=cortao-parameters.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cortao-parameters.d.ts","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-parameters.ts"],"names":[],"mappings":"AAOA,kEAAkE;AAClE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,kFAAkF;AAClF,MAAM,MAAM,YAAY,GAAG;IACzB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,aAAa,EAAE,mBAAmB,GAAG,oBAAoB,CAMhG;AAED,+FAA+F;AAC/F,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,mBAAmB,GACjC,sBAAsB,CA8BxB;AAED,+EAA+E;AAC/E,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,mBAAmB,GACjC,wBAAwB,CAM1B"}
@@ -0,0 +1,122 @@
1
+ // luma.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ // Portions adapted from src/CORTAOParameters.h of the CORTAO reference implementation.
5
+ // SPDX-FileCopyrightText: Copyright (c) 2026 Daniel Isheden
6
+ // See THIRD-PARTY-NOTICES.md in this module.
7
+ /** The maximum number of mip levels in the packed data buffer. */
8
+ export const CORTAO_MAX_MIP_COUNT = 8;
9
+ /** The largest finite 32-bit float. It stands in for an unlimited world-space radius. */
10
+ const MAX_FLOAT32 = 3.4028234663852886e38;
11
+ /**
12
+ * Tests whether a column-major matrix is a perspective projection with only a field of view and
13
+ * an optional off-center offset. CORTAO supports no other projection.
14
+ */
15
+ export function isSupportedProjection(matrix) {
16
+ const zeroIndices = [1, 2, 3, 4, 6, 7, 12, 13, 15];
17
+ const epsilon = 1e-6;
18
+ return (zeroIndices.every(index => Math.abs(matrix[index]) < epsilon) &&
19
+ Math.abs(matrix[11] + 1) < epsilon &&
20
+ matrix[0] !== 0 &&
21
+ matrix[5] !== 0 &&
22
+ matrix[14] !== 0);
23
+ }
24
+ /**
25
+ * Gets the number of packed data mip levels. The smallest level keeps at least one pixel on the
26
+ * short side, so that the levels of the mip atlas do not overlap.
27
+ */
28
+ export function getCORTAOMipCount(width, height) {
29
+ const shortSide = Math.max(1, Math.min(width, height));
30
+ return Math.min(CORTAO_MAX_MIP_COUNT, Math.floor(Math.log2(shortSide)) + 1);
31
+ }
32
+ /** Gets the size of the packed data mip atlas. Level 0 is on the left, levels 1 and up on the right. */
33
+ export function getCORTAOMipAtlasSize(width, height) {
34
+ return [width + Math.max(width >> 1, 1), height];
35
+ }
36
+ /** Gets the prepass uniforms. Port of `populatePrepassParameters()`. */
37
+ export function getCORTAOPrepassUniforms(camera, configuration) {
38
+ const { nearPlane, farPlane } = camera;
39
+ let depthScale;
40
+ let depthOffset;
41
+ if (!Number.isFinite(nearPlane)) {
42
+ // Infinite near plane (reverse depth).
43
+ depthScale = 1 / farPlane;
44
+ depthOffset = 0;
45
+ }
46
+ else if (!Number.isFinite(farPlane)) {
47
+ // Infinite far plane.
48
+ depthScale = -1 / nearPlane;
49
+ depthOffset = 1 / nearPlane;
50
+ }
51
+ else {
52
+ // Finite near and far planes. Reverse depth gives a positive scale.
53
+ depthScale = (nearPlane - farPlane) / (nearPlane * farPlane);
54
+ depthOffset = 1 / nearPlane;
55
+ }
56
+ return {
57
+ unprojectParams: getUnprojectParams(camera.projectionMatrix),
58
+ resolution: [configuration.width, configuration.height],
59
+ depthScale,
60
+ depthOffset,
61
+ randomSeed: configuration.randomSeed >>> 0
62
+ };
63
+ }
64
+ /** Gets the mip atlas uniforms. */
65
+ export function getCORTAOMipmapUniforms(configuration) {
66
+ return {
67
+ resolution: [configuration.width, configuration.height],
68
+ mipCount: getCORTAOMipCount(configuration.width, configuration.height),
69
+ randomSeed: configuration.randomSeed >>> 0
70
+ };
71
+ }
72
+ /** Gets the main pass uniforms. Port of `populateMainPassParameters()`, without the Y flip. */
73
+ export function getCORTAOMainPassUniforms(camera, configuration) {
74
+ const matrix = camera.projectionMatrix;
75
+ const projectionX = matrix[0];
76
+ const projectionY = matrix[5];
77
+ const projectionOffsetX = matrix[8];
78
+ const projectionOffsetY = matrix[9];
79
+ const inverseY = 1 / projectionY;
80
+ const maxApparentCircleRadius = inverseY * configuration.maxScreenSpaceRadius * 2;
81
+ return {
82
+ unprojectParams: getUnprojectParams(matrix),
83
+ // WebGL textures and clip space both have +Y up, so CORTAO's flipY is false.
84
+ projectionParams: [
85
+ 0.5 * projectionX,
86
+ 0.5 * projectionY,
87
+ -0.5 + 0.5 * projectionOffsetX,
88
+ -0.5 + 0.5 * projectionOffsetY
89
+ ],
90
+ resolution: [configuration.width, configuration.height],
91
+ normalBias: (1 / projectionX / configuration.width) * Math.SQRT2,
92
+ radius: Math.min(configuration.radius, MAX_FLOAT32),
93
+ maxApparentCircleRadiusCoefficient: maxApparentCircleRadius / Math.sqrt(maxApparentCircleRadius * maxApparentCircleRadius + 1),
94
+ mipBias: Math.log2(projectionY * configuration.height * 0.5) + configuration.mipBias,
95
+ inverseMaxSlopeCompensation: 1 / configuration.maxSlopeCompensation,
96
+ backfaceThreshold: configuration.backfaceThreshold,
97
+ backfaceBoost: configuration.backfaceBoost,
98
+ intensity: configuration.intensity,
99
+ mipCount: getCORTAOMipCount(configuration.width, configuration.height),
100
+ randomSeed: configuration.randomSeed >>> 0
101
+ };
102
+ }
103
+ /** Gets the filter pass uniforms. Port of `populateFilterPassParameters()`. */
104
+ export function getCORTAOFilterPassUniforms(configuration) {
105
+ return {
106
+ resolution: [configuration.width, configuration.height],
107
+ depthSensitivity: configuration.filterDepthSensitivity,
108
+ normalSensitivity: configuration.filterNormalSensitivity
109
+ };
110
+ }
111
+ /**
112
+ * Gets the parameters that map a texture coordinate to a view-space direction at depth 1.
113
+ * The inverse of the projection form that CORTAO supports has these entries in closed form.
114
+ */
115
+ function getUnprojectParams(matrix) {
116
+ const inverseX = 1 / matrix[0];
117
+ const inverseY = 1 / matrix[5];
118
+ const inverseOffsetX = matrix[8] / matrix[0];
119
+ const inverseOffsetY = matrix[9] / matrix[5];
120
+ return [2 * inverseX, 2 * inverseY, -inverseX + inverseOffsetX, -inverseY + inverseOffsetY];
121
+ }
122
+ //# sourceMappingURL=cortao-parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cortao-parameters.js","sourceRoot":"","sources":["../../../src/lighting/cortao/cortao-parameters.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,+BAA+B;AAC/B,4DAA4D;AAC5D,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AO;QACpF,2BAA2B,EAAE,CAAC,GAAG,aAAa,CAAC,oBAAoB;QACnE,iBAAiB,EAAE,aAAa,CAAC,iBAAiB;QAClD,aAAa,EAAE,aAAa,CAAC,aAAa;QAC1C,SAAS,EAAE,aAAa,CAAC,SAAS;QAClC,QAAQ,EAAE,iBAAiB,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC;QACtE,UAAU,EAAE,aAAa,CAAC,UAAU,KAAK,CAAC;KAC3C,CAAC;AACJ,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,2BAA2B,CACzC,aAAkC;IAElC,OAAO;QACL,UAAU,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,MAAM,CAAC;QACvD,gBAAgB,EAAE,aAAa,CAAC,sBAAsB;QACtD,iBAAiB,EAAE,aAAa,CAAC,uBAAuB;KACzD,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,SAAS,kBAAkB,CAAC,MAAyB;IACnD,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC/B,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7C,MAAM,cAAc,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,CAAC,GAAG,QAAQ,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,QAAQ,GAAG,cAAc,EAAE,CAAC,QAAQ,GAAG,cAAc,CAAC,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,100 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var cortao_pass_exports = {};
19
+ __export(cortao_pass_exports, {
20
+ CORTAOPass: () => CORTAOPass
21
+ });
22
+ module.exports = __toCommonJS(cortao_pass_exports);
23
+ var import_core = require("@luma.gl/core");
24
+ var import_cortao_parameters = require("./cortao-parameters.cjs");
25
+ var import_cortao_upsample = require("./cortao-upsample.cjs");
26
+ var import_cortao_webgl_passes = require("./cortao-webgl-passes.cjs");
27
+ var import_cortao_webgpu_passes = require("./cortao-webgpu-passes.cjs");
28
+ class CORTAOPass {
29
+ device;
30
+ passes;
31
+ resolutionScale;
32
+ upsample;
33
+ depthOnlyView = null;
34
+ destroyed = false;
35
+ constructor(device, props = {}) {
36
+ this.device = device;
37
+ const { id = "cortao", resolutionScale = 1, sampleCount = 16, rayCount = 16, largeFilter = true, filterSymmetry = true } = props;
38
+ (0, import_core.assert)(Number.isInteger(sampleCount) && sampleCount > 0);
39
+ (0, import_core.assert)(device.type === "webgl" || device.type === "webgpu");
40
+ const Passes = device.type === "webgpu" ? import_cortao_webgpu_passes.CORTAOWebGPUPasses : import_cortao_webgl_passes.CORTAOWebGLPasses;
41
+ this.passes = new Passes(device, id, { sampleCount, rayCount, largeFilter, filterSymmetry }, resolutionScale !== 1);
42
+ this.resolutionScale = resolutionScale;
43
+ this.upsample = resolutionScale === 1 ? null : new import_cortao_upsample.CORTAOUpsample(device, `${id}-upsample`);
44
+ }
45
+ /**
46
+ * Borrows single-sample hardware depth and returns a pass-owned, full-resolution visibility mask.
47
+ * On WebGPU, submit each render before recording another render with this instance.
48
+ */
49
+ render({ camera, depthTexture, filter = true, radius = Infinity, maxScreenSpaceRadius = 0.2, intensity = 1, mipBias = -4, maxSlopeCompensation = 4, backfaceThreshold = 0.5, backfaceBoost = 0.5, filterDepthSensitivity = 512, filterNormalSensitivity = 16, randomSeed = 0 }) {
50
+ (0, import_core.assert)(!this.destroyed && depthTexture.device === this.device);
51
+ (0, import_core.assert)((0, import_cortao_parameters.isSupportedProjection)(camera.projectionMatrix));
52
+ const configuration = {
53
+ width: Math.max(1, Math.round(depthTexture.width * this.resolutionScale)),
54
+ height: Math.max(1, Math.round(depthTexture.height * this.resolutionScale)),
55
+ radius,
56
+ maxScreenSpaceRadius,
57
+ intensity,
58
+ mipBias,
59
+ maxSlopeCompensation,
60
+ backfaceThreshold,
61
+ backfaceBoost,
62
+ filterDepthSensitivity,
63
+ filterNormalSensitivity,
64
+ randomSeed
65
+ };
66
+ const depthView = this.getDepthView(depthTexture);
67
+ const visibility = this.passes.renderOcclusion({ camera, depthView, filter, configuration });
68
+ if (!this.upsample) {
69
+ return visibility;
70
+ }
71
+ const { depthScale, depthOffset } = (0, import_cortao_parameters.getCORTAOPrepassUniforms)(camera, configuration);
72
+ return this.upsample.render(depthView, visibility, { depthScale, depthOffset });
73
+ }
74
+ destroy() {
75
+ var _a, _b;
76
+ if (!this.destroyed) {
77
+ this.destroyed = true;
78
+ this.passes.destroy();
79
+ (_a = this.upsample) == null ? void 0 : _a.destroy();
80
+ (_b = this.depthOnlyView) == null ? void 0 : _b.destroy();
81
+ this.depthOnlyView = null;
82
+ }
83
+ }
84
+ getDepthView(depthTexture) {
85
+ var _a, _b;
86
+ if (this.device.type !== "webgpu") {
87
+ return depthTexture.view;
88
+ }
89
+ if (((_a = this.depthOnlyView) == null ? void 0 : _a.texture) === depthTexture) {
90
+ return this.depthOnlyView;
91
+ }
92
+ (_b = this.depthOnlyView) == null ? void 0 : _b.destroy();
93
+ this.depthOnlyView = this.device.getTextureFormatInfo(depthTexture.format).attachment === "depth-stencil" ? depthTexture.createView({ aspect: "depth-only", mipLevelCount: 1, arrayLayerCount: 1 }) : null;
94
+ return this.depthOnlyView ?? depthTexture.view;
95
+ }
96
+ }
97
+ // Annotate the CommonJS export names for ESM import in node:
98
+ 0 && (module.exports = {
99
+ CORTAOPass
100
+ });
@@ -0,0 +1,33 @@
1
+ import { type Device, type Texture } from '@luma.gl/core';
2
+ import { type CORTAOCamera, type CORTAOConfiguration } from "./cortao-parameters.js";
3
+ import type { CORTAOShaderOptions } from "./cortao-passes.js";
4
+ /** Pipeline specialization options. */
5
+ export type CORTAOPassProps = Partial<CORTAOShaderOptions> & {
6
+ id?: string;
7
+ /** Evaluation scale per axis. The returned visibility is always full size. Default 1. */
8
+ resolutionScale?: 1 | 0.5 | 0.25;
9
+ };
10
+ /** Per-frame inputs. Camera distances and radius use the same view-space units. */
11
+ export type CORTAORenderOptions = Partial<Omit<CORTAOConfiguration, 'width' | 'height'>> & {
12
+ camera: CORTAOCamera;
13
+ depthTexture: Texture;
14
+ filter?: boolean;
15
+ };
16
+ /** @experimental Depth-only ambient visibility using Circular Occluder Ray-Traced Ambient Occlusion. */
17
+ export declare class CORTAOPass {
18
+ readonly device: Device;
19
+ private readonly passes;
20
+ readonly resolutionScale: 1 | 0.5 | 0.25;
21
+ private readonly upsample;
22
+ private depthOnlyView;
23
+ private destroyed;
24
+ constructor(device: Device, props?: CORTAOPassProps);
25
+ /**
26
+ * Borrows single-sample hardware depth and returns a pass-owned, full-resolution visibility mask.
27
+ * On WebGPU, submit each render before recording another render with this instance.
28
+ */
29
+ render({ camera, depthTexture, filter, radius, maxScreenSpaceRadius, intensity, mipBias, maxSlopeCompensation, backfaceThreshold, backfaceBoost, filterDepthSensitivity, filterNormalSensitivity, randomSeed }: CORTAORenderOptions): Texture;
30
+ destroy(): void;
31
+ private getDepthView;
32
+ }
33
+ //# sourceMappingURL=cortao-pass.d.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mB,EACnB,sBAA4B,EAC5B,uBAA4B,EAC5B,UAAc,EACf,EAAE,mBAAmB,GAAG,OAAO;IA2BhC,OAAO,IAAI,IAAI;IAUf,OAAO,CAAC,YAAY;CAgBrB"}
@@ -0,0 +1,84 @@
1
+ // luma.gl
2
+ // SPDX-License-Identifier: MIT
3
+ // SPDX-FileCopyrightText: Copyright (c) vis.gl contributors
4
+ import { assert } from '@luma.gl/core';
5
+ import { getCORTAOPrepassUniforms, isSupportedProjection } from "./cortao-parameters.js";
6
+ import { CORTAOUpsample } from "./cortao-upsample.js";
7
+ import { CORTAOWebGLPasses } from "./cortao-webgl-passes.js";
8
+ import { CORTAOWebGPUPasses } from "./cortao-webgpu-passes.js";
9
+ /** @experimental Depth-only ambient visibility using Circular Occluder Ray-Traced Ambient Occlusion. */
10
+ export class CORTAOPass {
11
+ device;
12
+ passes;
13
+ resolutionScale;
14
+ upsample;
15
+ depthOnlyView = null;
16
+ destroyed = false;
17
+ constructor(device, props = {}) {
18
+ this.device = device;
19
+ const { id = 'cortao', resolutionScale = 1, sampleCount = 16, rayCount = 16, largeFilter = true, filterSymmetry = true } = props;
20
+ // The sample count is injected into the GLSL and WGSL as an integer constant.
21
+ assert(Number.isInteger(sampleCount) && sampleCount > 0);
22
+ // Only WebGL 2 and WebGPU implement the required integer texture operations.
23
+ assert(device.type === 'webgl' || device.type === 'webgpu');
24
+ const Passes = device.type === 'webgpu' ? CORTAOWebGPUPasses : CORTAOWebGLPasses;
25
+ this.passes = new Passes(device, id, { sampleCount, rayCount, largeFilter, filterSymmetry }, resolutionScale !== 1);
26
+ this.resolutionScale = resolutionScale;
27
+ this.upsample = resolutionScale === 1 ? null : new CORTAOUpsample(device, `${id}-upsample`);
28
+ }
29
+ /**
30
+ * Borrows single-sample hardware depth and returns a pass-owned, full-resolution visibility mask.
31
+ * On WebGPU, submit each render before recording another render with this instance.
32
+ */
33
+ render({ camera, depthTexture, filter = true, radius = Infinity, maxScreenSpaceRadius = 0.2, intensity = 1, mipBias = -4, maxSlopeCompensation = 4, backfaceThreshold = 0.5, backfaceBoost = 0.5, filterDepthSensitivity = 512, filterNormalSensitivity = 16, randomSeed = 0 }) {
34
+ // The depth texture must come from the same device and the supplied perspective camera.
35
+ assert(!this.destroyed && depthTexture.device === this.device);
36
+ assert(isSupportedProjection(camera.projectionMatrix));
37
+ const configuration = {
38
+ width: Math.max(1, Math.round(depthTexture.width * this.resolutionScale)),
39
+ height: Math.max(1, Math.round(depthTexture.height * this.resolutionScale)),
40
+ radius,
41
+ maxScreenSpaceRadius,
42
+ intensity,
43
+ mipBias,
44
+ maxSlopeCompensation,
45
+ backfaceThreshold,
46
+ backfaceBoost,
47
+ filterDepthSensitivity,
48
+ filterNormalSensitivity,
49
+ randomSeed
50
+ };
51
+ const depthView = this.getDepthView(depthTexture);
52
+ const visibility = this.passes.renderOcclusion({ camera, depthView, filter, configuration });
53
+ if (!this.upsample) {
54
+ return visibility;
55
+ }
56
+ const { depthScale, depthOffset } = getCORTAOPrepassUniforms(camera, configuration);
57
+ return this.upsample.render(depthView, visibility, { depthScale, depthOffset });
58
+ }
59
+ destroy() {
60
+ if (!this.destroyed) {
61
+ this.destroyed = true;
62
+ this.passes.destroy();
63
+ this.upsample?.destroy();
64
+ this.depthOnlyView?.destroy();
65
+ this.depthOnlyView = null;
66
+ }
67
+ }
68
+ getDepthView(depthTexture) {
69
+ if (this.device.type !== 'webgpu') {
70
+ return depthTexture.view;
71
+ }
72
+ if (this.depthOnlyView?.texture === depthTexture) {
73
+ return this.depthOnlyView;
74
+ }
75
+ this.depthOnlyView?.destroy();
76
+ // A depth binding cannot use the all-aspects view of a combined depth-stencil texture.
77
+ this.depthOnlyView =
78
+ this.device.getTextureFormatInfo(depthTexture.format).attachment === 'depth-stencil'
79
+ ? depthTexture.createView({ aspect: 'depth-only', mipLevelCount: 1, arrayLayerCount: 1 })
80
+ : null;
81
+ return this.depthOnlyView ?? depthTexture.view;
82
+ }
83
+ }
84
+ //# sourceMappingURL=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,CAAC,CAAC,UAAU,KAAK,eAAe;gBAClF,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,EAAC,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAC,CAAC;gBACvF,CAAC,CAAC,IAAI,CAAC;QACX,OAAO,IAAI,CAAC,aAAa,IAAI,YAAY,CAAC,IAAI,CAAC;IACjD,CAAC;CACF"}
@@ -0,0 +1,42 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var cortao_passes_exports = {};
19
+ __export(cortao_passes_exports, {
20
+ LOOKUP_TABLE_SIZE: () => LOOKUP_TABLE_SIZE,
21
+ NEAREST_SAMPLER: () => NEAREST_SAMPLER,
22
+ PASS_PARAMETERS: () => PASS_PARAMETERS
23
+ });
24
+ module.exports = __toCommonJS(cortao_passes_exports);
25
+ const PASS_PARAMETERS = {
26
+ depthWriteEnabled: false,
27
+ depthCompare: "always"
28
+ };
29
+ const NEAREST_SAMPLER = {
30
+ minFilter: "nearest",
31
+ magFilter: "nearest"
32
+ };
33
+ const LOOKUP_TABLE_SIZE = {
34
+ directionResolution: 24,
35
+ radiusResolution: 16
36
+ };
37
+ // Annotate the CommonJS export names for ESM import in node:
38
+ 0 && (module.exports = {
39
+ LOOKUP_TABLE_SIZE,
40
+ NEAREST_SAMPLER,
41
+ PASS_PARAMETERS
42
+ });