@aura3d/rendering 2.0.4 → 3.0.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 (374) hide show
  1. package/dist/AtmosphereWetness.d.ts +61 -0
  2. package/dist/AtmosphereWetness.d.ts.map +1 -0
  3. package/dist/AtmosphereWetness.js +99 -0
  4. package/dist/AtmosphereWetness.js.map +1 -0
  5. package/dist/CascadedShadowMaps.d.ts.map +1 -1
  6. package/dist/CascadedShadowMaps.js +3 -1
  7. package/dist/CascadedShadowMaps.js.map +1 -1
  8. package/dist/ClusteredForwardLighting.d.ts +25 -1
  9. package/dist/ClusteredForwardLighting.d.ts.map +1 -1
  10. package/dist/ClusteredForwardLighting.js +80 -3
  11. package/dist/ClusteredForwardLighting.js.map +1 -1
  12. package/dist/DayNightSky.d.ts +63 -0
  13. package/dist/DayNightSky.d.ts.map +1 -0
  14. package/dist/DayNightSky.js +156 -0
  15. package/dist/DayNightSky.js.map +1 -0
  16. package/dist/EnvironmentPresetPack.d.ts +30 -0
  17. package/dist/EnvironmentPresetPack.d.ts.map +1 -0
  18. package/dist/EnvironmentPresetPack.js +49 -0
  19. package/dist/EnvironmentPresetPack.js.map +1 -0
  20. package/dist/ExtensionScalarAtlas.d.ts +18 -0
  21. package/dist/ExtensionScalarAtlas.d.ts.map +1 -0
  22. package/dist/ExtensionScalarAtlas.js +107 -0
  23. package/dist/ExtensionScalarAtlas.js.map +1 -0
  24. package/dist/ForwardPass.d.ts +65 -0
  25. package/dist/ForwardPass.d.ts.map +1 -1
  26. package/dist/ForwardPass.js +196 -2
  27. package/dist/ForwardPass.js.map +1 -1
  28. package/dist/InstancedPBRMaterial.d.ts +1 -0
  29. package/dist/InstancedPBRMaterial.d.ts.map +1 -1
  30. package/dist/InstancedPBRMaterial.js +3 -0
  31. package/dist/InstancedPBRMaterial.js.map +1 -1
  32. package/dist/InstancingDiagnostics.d.ts +69 -0
  33. package/dist/InstancingDiagnostics.d.ts.map +1 -0
  34. package/dist/InstancingDiagnostics.js +98 -0
  35. package/dist/InstancingDiagnostics.js.map +1 -0
  36. package/dist/LeanWebGL2Device.d.ts +265 -0
  37. package/dist/LeanWebGL2Device.d.ts.map +1 -0
  38. package/dist/LeanWebGL2Device.js +4001 -0
  39. package/dist/LeanWebGL2Device.js.map +1 -0
  40. package/dist/LightingRig.d.ts +19 -1
  41. package/dist/LightingRig.d.ts.map +1 -1
  42. package/dist/LightingRig.js +61 -1
  43. package/dist/LightingRig.js.map +1 -1
  44. package/dist/MaterialBinding.js +1 -1
  45. package/dist/MaterialBinding.js.map +1 -1
  46. package/dist/MeshConsolidation.d.ts +12 -0
  47. package/dist/MeshConsolidation.d.ts.map +1 -1
  48. package/dist/MeshConsolidation.js +28 -0
  49. package/dist/MeshConsolidation.js.map +1 -1
  50. package/dist/MorphTargetPlan.d.ts +29 -2
  51. package/dist/MorphTargetPlan.d.ts.map +1 -1
  52. package/dist/MorphTargetPlan.js +23 -4
  53. package/dist/MorphTargetPlan.js.map +1 -1
  54. package/dist/NormalMappedPBRMaterial.d.ts.map +1 -1
  55. package/dist/NormalMappedPBRMaterial.js +22 -2
  56. package/dist/NormalMappedPBRMaterial.js.map +1 -1
  57. package/dist/OceanSurface.d.ts +75 -0
  58. package/dist/OceanSurface.d.ts.map +1 -1
  59. package/dist/OceanSurface.js +211 -0
  60. package/dist/OceanSurface.js.map +1 -1
  61. package/dist/PBRMaterial.d.ts +1 -0
  62. package/dist/PBRMaterial.d.ts.map +1 -1
  63. package/dist/PBRMaterial.js +23 -2
  64. package/dist/PBRMaterial.js.map +1 -1
  65. package/dist/PbrReference.d.ts +48 -0
  66. package/dist/PbrReference.d.ts.map +1 -1
  67. package/dist/PbrReference.js +126 -0
  68. package/dist/PbrReference.js.map +1 -1
  69. package/dist/PlanarReflection.d.ts +221 -0
  70. package/dist/PlanarReflection.d.ts.map +1 -0
  71. package/dist/PlanarReflection.js +541 -0
  72. package/dist/PlanarReflection.js.map +1 -0
  73. package/dist/PostProcessPass.d.ts +32 -0
  74. package/dist/PostProcessPass.d.ts.map +1 -1
  75. package/dist/PostProcessPass.js +79 -36
  76. package/dist/PostProcessPass.js.map +1 -1
  77. package/dist/ProjectionMath.d.ts +3 -0
  78. package/dist/ProjectionMath.d.ts.map +1 -0
  79. package/dist/ProjectionMath.js +26 -0
  80. package/dist/ProjectionMath.js.map +1 -0
  81. package/dist/ReflectionSurfaces.d.ts +17 -0
  82. package/dist/ReflectionSurfaces.d.ts.map +1 -1
  83. package/dist/ReflectionSurfaces.js +103 -1
  84. package/dist/ReflectionSurfaces.js.map +1 -1
  85. package/dist/RenderDevice.d.ts +92 -0
  86. package/dist/RenderDevice.d.ts.map +1 -1
  87. package/dist/RenderDevice.js +85 -0
  88. package/dist/RenderDevice.js.map +1 -1
  89. package/dist/Renderer.d.ts +9 -0
  90. package/dist/Renderer.d.ts.map +1 -1
  91. package/dist/Renderer.js +97 -9
  92. package/dist/Renderer.js.map +1 -1
  93. package/dist/RendererPostprocessPlan.d.ts +64 -3
  94. package/dist/RendererPostprocessPlan.d.ts.map +1 -1
  95. package/dist/RendererPostprocessPlan.js +116 -12
  96. package/dist/RendererPostprocessPlan.js.map +1 -1
  97. package/dist/RendererVisualPipelineReport.d.ts.map +1 -1
  98. package/dist/RendererVisualPipelineReport.js +3 -1
  99. package/dist/RendererVisualPipelineReport.js.map +1 -1
  100. package/dist/Sampler.d.ts +29 -0
  101. package/dist/Sampler.d.ts.map +1 -1
  102. package/dist/Sampler.js +47 -0
  103. package/dist/Sampler.js.map +1 -1
  104. package/dist/ScreenSpaceReflectionPass.d.ts +43 -0
  105. package/dist/ScreenSpaceReflectionPass.d.ts.map +1 -0
  106. package/dist/ScreenSpaceReflectionPass.js +58 -0
  107. package/dist/ScreenSpaceReflectionPass.js.map +1 -0
  108. package/dist/SdfText.d.ts +250 -0
  109. package/dist/SdfText.d.ts.map +1 -0
  110. package/dist/SdfText.js +551 -0
  111. package/dist/SdfText.js.map +1 -0
  112. package/dist/ShaderChunks.d.ts.map +1 -1
  113. package/dist/ShaderChunks.js +30 -12
  114. package/dist/ShaderChunks.js.map +1 -1
  115. package/dist/ShaderLibrary.d.ts.map +1 -1
  116. package/dist/ShaderLibrary.js +601 -186
  117. package/dist/ShaderLibrary.js.map +1 -1
  118. package/dist/ShaderLibraryCore.d.ts +3 -0
  119. package/dist/ShaderLibraryCore.d.ts.map +1 -1
  120. package/dist/ShaderLibraryCore.js +73 -12
  121. package/dist/ShaderLibraryCore.js.map +1 -1
  122. package/dist/ShadowMap.d.ts +24 -0
  123. package/dist/ShadowMap.d.ts.map +1 -1
  124. package/dist/ShadowMap.js +43 -0
  125. package/dist/ShadowMap.js.map +1 -1
  126. package/dist/SkinnedLitMaterial.d.ts.map +1 -1
  127. package/dist/SkinnedLitMaterial.js +2 -0
  128. package/dist/SkinnedLitMaterial.js.map +1 -1
  129. package/dist/SkinningBounds.d.ts +10 -0
  130. package/dist/SkinningBounds.d.ts.map +1 -1
  131. package/dist/SkinningBounds.js +27 -0
  132. package/dist/SkinningBounds.js.map +1 -1
  133. package/dist/SpriteFlipbook.d.ts +60 -0
  134. package/dist/SpriteFlipbook.d.ts.map +1 -0
  135. package/dist/SpriteFlipbook.js +128 -0
  136. package/dist/SpriteFlipbook.js.map +1 -0
  137. package/dist/TemporalHistory.d.ts +37 -0
  138. package/dist/TemporalHistory.d.ts.map +1 -0
  139. package/dist/TemporalHistory.js +135 -0
  140. package/dist/TemporalHistory.js.map +1 -0
  141. package/dist/TemporalMath.d.ts +3 -0
  142. package/dist/TemporalMath.d.ts.map +1 -0
  143. package/dist/TemporalMath.js +9 -0
  144. package/dist/TemporalMath.js.map +1 -0
  145. package/dist/TerrainTiles.d.ts +120 -0
  146. package/dist/TerrainTiles.d.ts.map +1 -0
  147. package/dist/TerrainTiles.js +221 -0
  148. package/dist/TerrainTiles.js.map +1 -0
  149. package/dist/TexturedPBRMaterial.d.ts +4 -0
  150. package/dist/TexturedPBRMaterial.d.ts.map +1 -1
  151. package/dist/TexturedPBRMaterial.js +88 -5
  152. package/dist/TexturedPBRMaterial.js.map +1 -1
  153. package/dist/TexturedUnlitMaterial.d.ts.map +1 -1
  154. package/dist/TexturedUnlitMaterial.js +20 -2
  155. package/dist/TexturedUnlitMaterial.js.map +1 -1
  156. package/dist/UnlitMaterial.d.ts.map +1 -1
  157. package/dist/UnlitMaterial.js +20 -2
  158. package/dist/UnlitMaterial.js.map +1 -1
  159. package/dist/VertexFormat.d.ts +6 -0
  160. package/dist/VertexFormat.d.ts.map +1 -1
  161. package/dist/VertexFormat.js +12 -0
  162. package/dist/VertexFormat.js.map +1 -1
  163. package/dist/VolumetricFog.d.ts +55 -0
  164. package/dist/VolumetricFog.d.ts.map +1 -0
  165. package/dist/VolumetricFog.js +91 -0
  166. package/dist/VolumetricFog.js.map +1 -0
  167. package/dist/WaterSurface.d.ts +77 -0
  168. package/dist/WaterSurface.d.ts.map +1 -0
  169. package/dist/WaterSurface.js +133 -0
  170. package/dist/WaterSurface.js.map +1 -0
  171. package/dist/WebGL2Device.d.ts +73 -0
  172. package/dist/WebGL2Device.d.ts.map +1 -1
  173. package/dist/WebGL2Device.js +836 -79
  174. package/dist/WebGL2Device.js.map +1 -1
  175. package/dist/WebGPUDevice.d.ts +62 -1
  176. package/dist/WebGPUDevice.d.ts.map +1 -1
  177. package/dist/WebGPUDevice.js +844 -51
  178. package/dist/WebGPUDevice.js.map +1 -1
  179. package/dist/WebGPUExtensionAtlas.d.ts +6 -0
  180. package/dist/WebGPUExtensionAtlas.d.ts.map +1 -0
  181. package/dist/WebGPUExtensionAtlas.js +225 -0
  182. package/dist/WebGPUExtensionAtlas.js.map +1 -0
  183. package/dist/WebGPUSkinningLimits.d.ts +40 -0
  184. package/dist/WebGPUSkinningLimits.d.ts.map +1 -1
  185. package/dist/WebGPUSkinningLimits.js +32 -0
  186. package/dist/WebGPUSkinningLimits.js.map +1 -1
  187. package/dist/effects/CollisionModule.d.ts +9 -0
  188. package/dist/effects/CollisionModule.d.ts.map +1 -1
  189. package/dist/effects/CollisionModule.js +10 -0
  190. package/dist/effects/CollisionModule.js.map +1 -1
  191. package/dist/effects/ColorModule.d.ts +7 -0
  192. package/dist/effects/ColorModule.d.ts.map +1 -1
  193. package/dist/effects/ColorModule.js +23 -0
  194. package/dist/effects/ColorModule.js.map +1 -1
  195. package/dist/effects/ForceModule.d.ts +35 -0
  196. package/dist/effects/ForceModule.d.ts.map +1 -1
  197. package/dist/effects/ForceModule.js +49 -0
  198. package/dist/effects/ForceModule.js.map +1 -1
  199. package/dist/effects/GPUParticleBackend.d.ts +188 -0
  200. package/dist/effects/GPUParticleBackend.d.ts.map +1 -1
  201. package/dist/effects/GPUParticleBackend.js +710 -1
  202. package/dist/effects/GPUParticleBackend.js.map +1 -1
  203. package/dist/effects/HeightfieldModule.d.ts +58 -0
  204. package/dist/effects/HeightfieldModule.d.ts.map +1 -0
  205. package/dist/effects/HeightfieldModule.js +129 -0
  206. package/dist/effects/HeightfieldModule.js.map +1 -0
  207. package/dist/effects/LightingModule.d.ts +34 -0
  208. package/dist/effects/LightingModule.d.ts.map +1 -0
  209. package/dist/effects/LightingModule.js +54 -0
  210. package/dist/effects/LightingModule.js.map +1 -0
  211. package/dist/effects/ParticleDiagnostics.d.ts +8 -0
  212. package/dist/effects/ParticleDiagnostics.d.ts.map +1 -1
  213. package/dist/effects/ParticleDiagnostics.js +3 -0
  214. package/dist/effects/ParticleDiagnostics.js.map +1 -1
  215. package/dist/effects/ParticleModule.d.ts +8 -0
  216. package/dist/effects/ParticleModule.d.ts.map +1 -1
  217. package/dist/effects/ParticleModule.js.map +1 -1
  218. package/dist/effects/ParticleRenderer.d.ts +20 -0
  219. package/dist/effects/ParticleRenderer.d.ts.map +1 -1
  220. package/dist/effects/ParticleRenderer.js +57 -7
  221. package/dist/effects/ParticleRenderer.js.map +1 -1
  222. package/dist/effects/ParticleSystem.d.ts +45 -1
  223. package/dist/effects/ParticleSystem.d.ts.map +1 -1
  224. package/dist/effects/ParticleSystem.js +373 -4
  225. package/dist/effects/ParticleSystem.js.map +1 -1
  226. package/dist/effects/ResidentGPUParticleRenderer.d.ts +158 -0
  227. package/dist/effects/ResidentGPUParticleRenderer.d.ts.map +1 -0
  228. package/dist/effects/ResidentGPUParticleRenderer.js +576 -0
  229. package/dist/effects/ResidentGPUParticleRenderer.js.map +1 -0
  230. package/dist/effects/SizeModule.d.ts +4 -0
  231. package/dist/effects/SizeModule.d.ts.map +1 -1
  232. package/dist/effects/SizeModule.js +16 -0
  233. package/dist/effects/SizeModule.js.map +1 -1
  234. package/dist/effects/SubEmitterModule.d.ts +61 -0
  235. package/dist/effects/SubEmitterModule.d.ts.map +1 -0
  236. package/dist/effects/SubEmitterModule.js +119 -0
  237. package/dist/effects/SubEmitterModule.js.map +1 -0
  238. package/dist/effects/TrailModule.d.ts +38 -0
  239. package/dist/effects/TrailModule.d.ts.map +1 -1
  240. package/dist/effects/TrailModule.js +95 -2
  241. package/dist/effects/TrailModule.js.map +1 -1
  242. package/dist/effects/TurbulenceModule.d.ts +43 -0
  243. package/dist/effects/TurbulenceModule.d.ts.map +1 -0
  244. package/dist/effects/TurbulenceModule.js +130 -0
  245. package/dist/effects/TurbulenceModule.js.map +1 -0
  246. package/dist/effects/index.d.ts +4 -0
  247. package/dist/effects/index.d.ts.map +1 -1
  248. package/dist/effects/index.js +4 -0
  249. package/dist/effects/index.js.map +1 -1
  250. package/dist/extension-scalar-atlas.d.ts +3 -0
  251. package/dist/extension-scalar-atlas.d.ts.map +1 -0
  252. package/dist/extension-scalar-atlas.js +2 -0
  253. package/dist/extension-scalar-atlas.js.map +1 -0
  254. package/dist/index.d.ts +58 -19
  255. package/dist/index.d.ts.map +1 -1
  256. package/dist/index.js +32 -10
  257. package/dist/index.js.map +1 -1
  258. package/dist/lean/LeanProductionRenderer.d.ts.map +1 -1
  259. package/dist/lean/LeanProductionRenderer.js +2 -2
  260. package/dist/lean/LeanProductionRenderer.js.map +1 -1
  261. package/dist/lean-core-runtime.d.ts +13 -0
  262. package/dist/lean-core-runtime.d.ts.map +1 -0
  263. package/dist/lean-core-runtime.js +10 -0
  264. package/dist/lean-core-runtime.js.map +1 -0
  265. package/dist/materials/MaterialExtensions.js +3 -3
  266. package/dist/materials/MaterialExtensions.js.map +1 -1
  267. package/dist/postprocess/NativeBloomPyramid.d.ts +44 -0
  268. package/dist/postprocess/NativeBloomPyramid.d.ts.map +1 -0
  269. package/dist/postprocess/NativeBloomPyramid.js +84 -0
  270. package/dist/postprocess/NativeBloomPyramid.js.map +1 -0
  271. package/dist/postprocess/NativeLdrEffectLuts.d.ts +10 -1
  272. package/dist/postprocess/NativeLdrEffectLuts.d.ts.map +1 -1
  273. package/dist/postprocess/NativeLdrEffectLuts.js +19 -2
  274. package/dist/postprocess/NativeLdrEffectLuts.js.map +1 -1
  275. package/dist/postprocess/index.d.ts +2 -0
  276. package/dist/postprocess/index.d.ts.map +1 -1
  277. package/dist/postprocess/index.js +1 -0
  278. package/dist/postprocess/index.js.map +1 -1
  279. package/dist/production-runtime/PBRHDRPipeline.d.ts +22 -0
  280. package/dist/production-runtime/PBRHDRPipeline.d.ts.map +1 -1
  281. package/dist/production-runtime/PBRHDRPipeline.js +125 -0
  282. package/dist/production-runtime/PBRHDRPipeline.js.map +1 -1
  283. package/dist/production-runtime/ProductionRendererTypes.d.ts +1 -0
  284. package/dist/production-runtime/ProductionRendererTypes.d.ts.map +1 -1
  285. package/dist/production-runtime/ProductionRendererTypes.js.map +1 -1
  286. package/dist/production-runtime/ProductionRuntimeRenderer.d.ts +3 -0
  287. package/dist/production-runtime/ProductionRuntimeRenderer.d.ts.map +1 -1
  288. package/dist/production-runtime/ProductionRuntimeRenderer.js +8 -1
  289. package/dist/production-runtime/ProductionRuntimeRenderer.js.map +1 -1
  290. package/dist/production-runtime/ProductionWebGL2Renderer.d.ts +4 -0
  291. package/dist/production-runtime/ProductionWebGL2Renderer.d.ts.map +1 -1
  292. package/dist/production-runtime/ProductionWebGL2Renderer.js +15 -0
  293. package/dist/production-runtime/ProductionWebGL2Renderer.js.map +1 -1
  294. package/dist/production-runtime/ProductionWebGPURenderer.d.ts +58 -0
  295. package/dist/production-runtime/ProductionWebGPURenderer.d.ts.map +1 -1
  296. package/dist/production-runtime/ProductionWebGPURenderer.js +127 -0
  297. package/dist/production-runtime/ProductionWebGPURenderer.js.map +1 -1
  298. package/dist/production-runtime/framegraph/FrameGraph.d.ts +4 -2
  299. package/dist/production-runtime/framegraph/FrameGraph.d.ts.map +1 -1
  300. package/dist/production-runtime/framegraph/FrameGraph.js +62 -4
  301. package/dist/production-runtime/framegraph/FrameGraph.js.map +1 -1
  302. package/dist/production-runtime/framegraph/NativeFrameGraphBindings.d.ts +32 -0
  303. package/dist/production-runtime/framegraph/NativeFrameGraphBindings.d.ts.map +1 -0
  304. package/dist/production-runtime/framegraph/NativeFrameGraphBindings.js +111 -0
  305. package/dist/production-runtime/framegraph/NativeFrameGraphBindings.js.map +1 -0
  306. package/dist/production-runtime/framegraph/RenderPass.d.ts +23 -0
  307. package/dist/production-runtime/framegraph/RenderPass.d.ts.map +1 -1
  308. package/dist/production-runtime/framegraph/RenderPass.js +87 -1
  309. package/dist/production-runtime/framegraph/RenderPass.js.map +1 -1
  310. package/dist/production-runtime/index.d.ts +7 -4
  311. package/dist/production-runtime/index.d.ts.map +1 -1
  312. package/dist/production-runtime/index.js +4 -2
  313. package/dist/production-runtime/index.js.map +1 -1
  314. package/dist/production-runtime/passes/DepthPrepass.d.ts +18 -1
  315. package/dist/production-runtime/passes/DepthPrepass.d.ts.map +1 -1
  316. package/dist/production-runtime/passes/DepthPrepass.js +41 -2
  317. package/dist/production-runtime/passes/DepthPrepass.js.map +1 -1
  318. package/dist/production-runtime/passes/FramegraphTopology.d.ts +13 -0
  319. package/dist/production-runtime/passes/FramegraphTopology.d.ts.map +1 -0
  320. package/dist/production-runtime/passes/FramegraphTopology.js +59 -0
  321. package/dist/production-runtime/passes/FramegraphTopology.js.map +1 -0
  322. package/dist/production-runtime/passes/OpaquePass.d.ts +19 -1
  323. package/dist/production-runtime/passes/OpaquePass.d.ts.map +1 -1
  324. package/dist/production-runtime/passes/OpaquePass.js +43 -2
  325. package/dist/production-runtime/passes/OpaquePass.js.map +1 -1
  326. package/dist/production-runtime/passes/ShadowPass.d.ts +19 -1
  327. package/dist/production-runtime/passes/ShadowPass.d.ts.map +1 -1
  328. package/dist/production-runtime/passes/ShadowPass.js +45 -2
  329. package/dist/production-runtime/passes/ShadowPass.js.map +1 -1
  330. package/dist/production-runtime/passes/SkyboxPass.d.ts +17 -1
  331. package/dist/production-runtime/passes/SkyboxPass.d.ts.map +1 -1
  332. package/dist/production-runtime/passes/SkyboxPass.js +41 -2
  333. package/dist/production-runtime/passes/SkyboxPass.js.map +1 -1
  334. package/dist/production-runtime/passes/ToneMappingPass.d.ts +26 -1
  335. package/dist/production-runtime/passes/ToneMappingPass.d.ts.map +1 -1
  336. package/dist/production-runtime/passes/ToneMappingPass.js +62 -2
  337. package/dist/production-runtime/passes/ToneMappingPass.js.map +1 -1
  338. package/dist/production-runtime/passes/TransparentPass.d.ts +19 -1
  339. package/dist/production-runtime/passes/TransparentPass.d.ts.map +1 -1
  340. package/dist/production-runtime/passes/TransparentPass.js +47 -2
  341. package/dist/production-runtime/passes/TransparentPass.js.map +1 -1
  342. package/dist/reflection-surfaces.d.ts +5 -0
  343. package/dist/reflection-surfaces.d.ts.map +1 -0
  344. package/dist/reflection-surfaces.js +3 -0
  345. package/dist/reflection-surfaces.js.map +1 -0
  346. package/dist/shadows/CascadeHysteresis.d.ts +67 -0
  347. package/dist/shadows/CascadeHysteresis.d.ts.map +1 -0
  348. package/dist/shadows/CascadeHysteresis.js +104 -0
  349. package/dist/shadows/CascadeHysteresis.js.map +1 -0
  350. package/dist/shadows/ContactShadows.d.ts +52 -0
  351. package/dist/shadows/ContactShadows.d.ts.map +1 -1
  352. package/dist/shadows/ContactShadows.js +122 -0
  353. package/dist/shadows/ContactShadows.js.map +1 -1
  354. package/dist/shadows/SpotShadowMaps.d.ts +77 -0
  355. package/dist/shadows/SpotShadowMaps.d.ts.map +1 -0
  356. package/dist/shadows/SpotShadowMaps.js +106 -0
  357. package/dist/shadows/SpotShadowMaps.js.map +1 -0
  358. package/dist/webgpu/WebGPUPostProcess.d.ts +2 -0
  359. package/dist/webgpu/WebGPUPostProcess.d.ts.map +1 -1
  360. package/dist/webgpu/WebGPUPostProcess.js +1 -0
  361. package/dist/webgpu/WebGPUPostProcess.js.map +1 -1
  362. package/dist/webgpu/WebGPUPostShaders.d.ts +77 -0
  363. package/dist/webgpu/WebGPUPostShaders.d.ts.map +1 -0
  364. package/dist/webgpu/WebGPUPostShaders.js +261 -0
  365. package/dist/webgpu/WebGPUPostShaders.js.map +1 -0
  366. package/dist/webgpu/WebGPUTemporal.d.ts +17 -0
  367. package/dist/webgpu/WebGPUTemporal.d.ts.map +1 -0
  368. package/dist/webgpu/WebGPUTemporal.js +64 -0
  369. package/dist/webgpu/WebGPUTemporal.js.map +1 -0
  370. package/dist/webgpu.d.ts +6 -0
  371. package/dist/webgpu.d.ts.map +1 -1
  372. package/dist/webgpu.js +4 -0
  373. package/dist/webgpu.js.map +1 -1
  374. package/package.json +15 -3
@@ -1 +1 @@
1
- {"version":3,"file":"WebGPUPostProcess.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgpu/WebGPUPostProcess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC"}
1
+ {"version":3,"file":"WebGPUPostProcess.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgpu/WebGPUPostProcess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAE9E,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * muse3jsparity-PRD J2 — native WebGPU post-process WGSL sources.
3
+ *
4
+ * Fullscreen-triangle passes that run on the real WebGPU device
5
+ * (WebGPUDevice.executeWebGPUBloom / executeWebGPUColorGrade /
6
+ * executeWebGPUFxaa). Backend-agnostic image work: bright-extract with a
7
+ * soft-knee threshold, a separable-Gaussian mip pyramid, energy-weighted
8
+ * composite, exposure/contrast/saturation color grade, and an FXAA
9
+ * luma-edge pass. Native TAA is owned by WebGPUTemporal.ts, with explicit
10
+ * GPU velocity and ping-pong history targets; it performs no CPU readback.
11
+ */
12
+ export declare const WEBGPU_POST_VERTEX_WGSL = "struct PostVertexOutput {\n @builtin(position) position: vec4<f32>,\n @location(0) uv: vec2<f32>,\n};\n\n@vertex\nfn vs_post(@builtin(vertex_index) index: u32) -> PostVertexOutput {\n var output: PostVertexOutput;\n let corners = array<vec2<f32>, 3>(\n vec2<f32>(-1.0, -1.0),\n vec2<f32>(3.0, -1.0),\n vec2<f32>(-1.0, 3.0)\n );\n let corner = corners[index];\n output.position = vec4<f32>(corner, 0.0, 1.0);\n output.uv = vec2<f32>((corner.x + 1.0) * 0.5, 1.0 - (corner.y + 1.0) * 0.5);\n return output;\n}\n";
13
+ export declare function webgpuBrightExtractFragment(): string;
14
+ export declare function webgpuBlurFragment(): string;
15
+ export interface WebGPUCompositeParams {
16
+ /** Per-mip weights, index 0 = finest. Energy-preserving when they sum to 1. */
17
+ readonly weights: readonly number[];
18
+ /** Global gain (bloom strength). */
19
+ readonly strength: number;
20
+ }
21
+ export declare const WEBGPU_BLOOM_MAX_MIPS = 5;
22
+ export declare function webgpuBloomCompositeFragment(params: WebGPUCompositeParams): string;
23
+ /** Default per-mip weights: 0.5^i falloff normalized to sum 1 (energy-preserving). */
24
+ export declare function defaultWebGPUBloomWeights(mipCount: number): number[];
25
+ export type WebGPUBloomQuality = "performance" | "balanced" | "cinematic";
26
+ export interface WebGPUBloomOptions {
27
+ readonly threshold?: number;
28
+ readonly knee?: number;
29
+ readonly strength?: number;
30
+ readonly quality?: WebGPUBloomQuality;
31
+ readonly mipCount?: number;
32
+ }
33
+ export interface NormalizedWebGPUBloom {
34
+ readonly threshold: number;
35
+ readonly knee: number;
36
+ readonly strength: number;
37
+ readonly quality: WebGPUBloomQuality;
38
+ readonly mipCount: number;
39
+ readonly halfFloat: boolean;
40
+ }
41
+ export declare const WEBGPU_BLOOM_QUALITY_TABLE: Readonly<Record<WebGPUBloomQuality, {
42
+ readonly mipCount: number;
43
+ readonly halfFloat: boolean;
44
+ }>>;
45
+ export declare function normalizeWebGPUBloomQuality(quality: WebGPUBloomQuality | undefined): {
46
+ readonly quality: WebGPUBloomQuality;
47
+ readonly mipCount: number;
48
+ readonly halfFloat: boolean;
49
+ };
50
+ export declare function normalizeWebGPUBloomOptions(options?: WebGPUBloomOptions): NormalizedWebGPUBloom;
51
+ export interface WebGPUBloomDiagnostics {
52
+ readonly mipCount: number;
53
+ readonly halfFloat: boolean;
54
+ readonly targetBytes: number;
55
+ readonly compositeGain: number;
56
+ readonly passes: number;
57
+ readonly executionMode: "webgpu-native-post";
58
+ }
59
+ export interface WebGPUColorGradeOptions {
60
+ readonly exposure?: number;
61
+ readonly contrast?: number;
62
+ readonly saturation?: number;
63
+ }
64
+ export interface NormalizedWebGPUColorGrade {
65
+ readonly exposure: number;
66
+ readonly contrast: number;
67
+ readonly saturation: number;
68
+ }
69
+ export declare function normalizeWebGPUColorGradeOptions(options?: WebGPUColorGradeOptions): NormalizedWebGPUColorGrade;
70
+ export interface WebGPUFxaaOptions {
71
+ readonly enabled?: boolean;
72
+ }
73
+ /** CPU mirror of the WGSL soft-knee gate (unit oracle, never the shader output). */
74
+ export declare function webgpuSoftKneeWeight(luma: number, threshold: number, knee: number): number;
75
+ export declare function webgpuColorGradeFragment(): string;
76
+ export declare function webgpuFxaaFragment(): string;
77
+ //# sourceMappingURL=WebGPUPostShaders.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebGPUPostShaders.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgpu/WebGPUPostShaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,uBAAuB,mhBAkBnC,CAAC;AAEF,wBAAgB,2BAA2B,IAAI,MAAM,CA0BpD;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAyB3C;AAED,MAAM,WAAW,qBAAqB;IACpC,+EAA+E;IAC/E,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,oCAAoC;IACpC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,CA2BlF;AAED,sFAAsF;AACtF,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAIpE;AAED,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,UAAU,GAAG,WAAW,CAAC;AAE1E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EA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7B;AAED,wBAAgB,gCAAgC,CAAC,OAAO,GAAE,uBAA4B,GAAG,0BAA0B,CAQlH;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAQ1F;AAED,wBAAgB,wBAAwB,IAAI,MAAM,CA0BjD;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAwD3C"}
@@ -0,0 +1,261 @@
1
+ /**
2
+ * muse3jsparity-PRD J2 — native WebGPU post-process WGSL sources.
3
+ *
4
+ * Fullscreen-triangle passes that run on the real WebGPU device
5
+ * (WebGPUDevice.executeWebGPUBloom / executeWebGPUColorGrade /
6
+ * executeWebGPUFxaa). Backend-agnostic image work: bright-extract with a
7
+ * soft-knee threshold, a separable-Gaussian mip pyramid, energy-weighted
8
+ * composite, exposure/contrast/saturation color grade, and an FXAA
9
+ * luma-edge pass. Native TAA is owned by WebGPUTemporal.ts, with explicit
10
+ * GPU velocity and ping-pong history targets; it performs no CPU readback.
11
+ */
12
+ export const WEBGPU_POST_VERTEX_WGSL = `struct PostVertexOutput {
13
+ @builtin(position) position: vec4<f32>,
14
+ @location(0) uv: vec2<f32>,
15
+ };
16
+
17
+ @vertex
18
+ fn vs_post(@builtin(vertex_index) index: u32) -> PostVertexOutput {
19
+ var output: PostVertexOutput;
20
+ let corners = array<vec2<f32>, 3>(
21
+ vec2<f32>(-1.0, -1.0),
22
+ vec2<f32>(3.0, -1.0),
23
+ vec2<f32>(-1.0, 3.0)
24
+ );
25
+ let corner = corners[index];
26
+ output.position = vec4<f32>(corner, 0.0, 1.0);
27
+ output.uv = vec2<f32>((corner.x + 1.0) * 0.5, 1.0 - (corner.y + 1.0) * 0.5);
28
+ return output;
29
+ }
30
+ `;
31
+ export function webgpuBrightExtractFragment() {
32
+ return `struct BloomUniforms {
33
+ threshold: f32,
34
+ knee: f32,
35
+ strength: f32,
36
+ _pad: f32,
37
+ };
38
+
39
+ @group(0) @binding(0) var<uniform> u_bloom: BloomUniforms;
40
+ @group(0) @binding(1) var u_sampler: sampler;
41
+ @group(0) @binding(2) var u_source: texture_2d<f32>;
42
+
43
+ @fragment
44
+ fn fs_bright(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
45
+ let color = textureSample(u_source, u_sampler, uv);
46
+ let luma = dot(color.rgb, vec3<f32>(0.2126, 0.7152, 0.0722));
47
+ // Soft-knee gate: smoothstep over [threshold - knee, threshold + knee].
48
+ // knee = 0 collapses to a hard step (matches the native WebGL2 path).
49
+ // NOTE: threshold/knee MUST be read from u_bloom (not baked): an
50
+ // unreferenced uniform is stripped, which invalidates bind-group entry 0.
51
+ let lo = u_bloom.threshold - u_bloom.knee;
52
+ let hi = u_bloom.threshold + u_bloom.knee;
53
+ let weight = smoothstep(lo, hi, luma);
54
+ return vec4<f32>(color.rgb * weight, 1.0);
55
+ }
56
+ `;
57
+ }
58
+ export function webgpuBlurFragment() {
59
+ return `struct BlurUniforms {
60
+ direction: vec2<f32>,
61
+ texel: vec2<f32>,
62
+ };
63
+
64
+ @group(0) @binding(0) var<uniform> u_blur: BlurUniforms;
65
+ @group(0) @binding(1) var u_sampler: sampler;
66
+ @group(0) @binding(2) var u_source: texture_2d<f32>;
67
+
68
+ @fragment
69
+ fn fs_blur(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
70
+ // 9-tap separable Gaussian (sigma ~1.35): weights sum to exactly 1.0 so
71
+ // the pyramid preserves energy before the composite gain stage.
72
+ // NOTE: direction/texel MUST be read from u_blur (not baked): an
73
+ // unreferenced uniform is stripped, which invalidates bind-group entry 0.
74
+ let step = u_blur.direction * u_blur.texel;
75
+ var acc = textureSample(u_source, u_sampler, uv) * 0.2270270270;
76
+ acc = acc + textureSample(u_source, u_sampler, uv + step * 1.3846153846) * 0.3162162162;
77
+ acc = acc + textureSample(u_source, u_sampler, uv - step * 1.3846153846) * 0.3162162162;
78
+ acc = acc + textureSample(u_source, u_sampler, uv + step * 3.2307692308) * 0.0702702703;
79
+ acc = acc + textureSample(u_source, u_sampler, uv - step * 3.2307692308) * 0.0702702703;
80
+ return vec4<f32>(acc.rgb, 1.0);
81
+ }
82
+ `;
83
+ }
84
+ export const WEBGPU_BLOOM_MAX_MIPS = 5;
85
+ export function webgpuBloomCompositeFragment(params) {
86
+ const lines = params.weights
87
+ .map((weight, index) => ` bloom = bloom + textureSample(u_mip${index}, u_sampler, uv).rgb * ${weight.toFixed(5)};`)
88
+ .join("\n");
89
+ const bindings = params.weights
90
+ .map((_, index) => `@group(0) @binding(${index + 3}) var u_mip${index}: texture_2d<f32>;`)
91
+ .join("\n");
92
+ return `struct CompositeUniforms {
93
+ strength: f32,
94
+ _pad0: f32,
95
+ _pad1: f32,
96
+ _pad2: f32,
97
+ };
98
+
99
+ @group(0) @binding(0) var<uniform> u_composite: CompositeUniforms;
100
+ @group(0) @binding(1) var u_sampler: sampler;
101
+ @group(0) @binding(2) var u_scene: texture_2d<f32>;
102
+ ${bindings}
103
+
104
+ @fragment
105
+ fn fs_composite(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
106
+ let scene = textureSample(u_scene, u_sampler, uv);
107
+ var bloom = vec3<f32>(0.0, 0.0, 0.0);
108
+ ${lines}
109
+ return vec4<f32>(scene.rgb + bloom * u_composite.strength, scene.a);
110
+ }
111
+ `;
112
+ }
113
+ /** Default per-mip weights: 0.5^i falloff normalized to sum 1 (energy-preserving). */
114
+ export function defaultWebGPUBloomWeights(mipCount) {
115
+ const raw = Array.from({ length: mipCount }, (_, index) => Math.pow(0.5, index));
116
+ const total = raw.reduce((sum, value) => sum + value, 0);
117
+ return raw.map((value) => value / total);
118
+ }
119
+ export const WEBGPU_BLOOM_QUALITY_TABLE = {
120
+ // performance keeps the single-target legacy shape; balanced/cinematic run
121
+ // the full pyramid with half-float mip targets (mirrors the WebGL2 tiers).
122
+ performance: { mipCount: 1, halfFloat: false },
123
+ balanced: { mipCount: 3, halfFloat: true },
124
+ cinematic: { mipCount: 5, halfFloat: true }
125
+ };
126
+ export function normalizeWebGPUBloomQuality(quality) {
127
+ const resolved = quality ?? "balanced";
128
+ const table = WEBGPU_BLOOM_QUALITY_TABLE[resolved];
129
+ if (!table)
130
+ throw new RangeError(`Unknown WebGPU bloom quality "${String(quality)}" (expected performance|balanced|cinematic).`);
131
+ return { quality: resolved, mipCount: table.mipCount, halfFloat: table.halfFloat };
132
+ }
133
+ export function normalizeWebGPUBloomOptions(options = {}) {
134
+ const { quality, mipCount, halfFloat } = normalizeWebGPUBloomQuality(options.quality);
135
+ const threshold = options.threshold ?? 0.85;
136
+ const knee = options.knee ?? 0.15;
137
+ const strength = options.strength ?? 0.6;
138
+ if (!Number.isFinite(threshold) || threshold < 0)
139
+ throw new RangeError("WebGPU bloom threshold must be a finite number >= 0.");
140
+ if (!Number.isFinite(knee) || knee < 0)
141
+ throw new RangeError("WebGPU bloom knee must be a finite number >= 0.");
142
+ if (!Number.isFinite(strength) || strength < 0)
143
+ throw new RangeError("WebGPU bloom strength must be a finite number >= 0.");
144
+ if (options.mipCount !== undefined) {
145
+ if (!Number.isInteger(options.mipCount) || options.mipCount < 1 || options.mipCount > WEBGPU_BLOOM_MAX_MIPS) {
146
+ throw new RangeError(`WebGPU bloom mipCount must be an integer in [1, ${WEBGPU_BLOOM_MAX_MIPS}].`);
147
+ }
148
+ return { threshold, knee, strength, quality, mipCount: options.mipCount, halfFloat };
149
+ }
150
+ return { threshold, knee, strength, quality, mipCount, halfFloat };
151
+ }
152
+ export function normalizeWebGPUColorGradeOptions(options = {}) {
153
+ const exposure = options.exposure ?? 0;
154
+ const contrast = options.contrast ?? 1;
155
+ const saturation = options.saturation ?? 1;
156
+ if (!Number.isFinite(exposure))
157
+ throw new RangeError("WebGPU color-grade exposure must be finite.");
158
+ if (!Number.isFinite(contrast) || contrast < 0)
159
+ throw new RangeError("WebGPU color-grade contrast must be finite and >= 0.");
160
+ if (!Number.isFinite(saturation) || saturation < 0)
161
+ throw new RangeError("WebGPU color-grade saturation must be finite and >= 0.");
162
+ return { exposure, contrast, saturation };
163
+ }
164
+ /** CPU mirror of the WGSL soft-knee gate (unit oracle, never the shader output). */
165
+ export function webgpuSoftKneeWeight(luma, threshold, knee) {
166
+ if (knee <= 0)
167
+ return luma >= threshold ? 1 : 0;
168
+ const lo = threshold - knee;
169
+ const hi = threshold + knee;
170
+ if (luma <= lo)
171
+ return 0;
172
+ if (luma >= hi)
173
+ return 1;
174
+ const t = (luma - lo) / (hi - lo);
175
+ return t * t * (3 - 2 * t);
176
+ }
177
+ export function webgpuColorGradeFragment() {
178
+ return `struct GradeUniforms {
179
+ exposure: f32,
180
+ contrast: f32,
181
+ saturation: f32,
182
+ _pad: f32,
183
+ };
184
+
185
+ @group(0) @binding(0) var<uniform> u_grade: GradeUniforms;
186
+ @group(0) @binding(1) var u_sampler: sampler;
187
+ @group(0) @binding(2) var u_source: texture_2d<f32>;
188
+
189
+ @fragment
190
+ fn fs_grade(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
191
+ var color = textureSample(u_source, u_sampler, uv).rgb;
192
+ // Exposure first (stops simulate the root colorGrade node), then
193
+ // saturation around luma, then contrast around middle gray.
194
+ // NOTE: all three MUST be read from u_grade (not baked): an unreferenced
195
+ // uniform is stripped, which invalidates bind-group entry 0.
196
+ color = color * exp2(u_grade.exposure);
197
+ let luma = dot(color, vec3<f32>(0.2126, 0.7152, 0.0722));
198
+ color = mix(vec3<f32>(luma), color, u_grade.saturation);
199
+ color = (color - vec3<f32>(0.5)) * u_grade.contrast + vec3<f32>(0.5);
200
+ return vec4<f32>(color, 1.0);
201
+ }
202
+ `;
203
+ }
204
+ export function webgpuFxaaFragment() {
205
+ return `struct FxaaUniforms {
206
+ texel: vec2<f32>,
207
+ _pad0: f32,
208
+ _pad1: f32,
209
+ };
210
+
211
+ @group(0) @binding(0) var<uniform> u_fxaa: FxaaUniforms;
212
+ @group(0) @binding(1) var u_sampler: sampler;
213
+ @group(0) @binding(2) var u_source: texture_2d<f32>;
214
+
215
+ fn fxaaLuma(uv: vec2<f32>) -> f32 {
216
+ let color = textureSample(u_source, u_sampler, uv).rgb;
217
+ return dot(color, vec3<f32>(0.299, 0.587, 0.114));
218
+ }
219
+
220
+ @fragment
221
+ fn fs_fxaa(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
222
+ // Compact FXAA 3.11 console core: luma neighborhood, edge direction from
223
+ // the diagonal/axis contrast, one perpendicular blend tap pair.
224
+ // NOTE: texel MUST be read from u_fxaa (not baked): an unreferenced
225
+ // uniform is stripped, which invalidates bind-group entry 0.
226
+ let texel = u_fxaa.texel;
227
+ // All taps up front: textureSample needs uniform control flow, so no
228
+ // sampling may happen after the flat-neighborhood early-out below —
229
+ // including the early-out's own return value.
230
+ let center = textureSample(u_source, u_sampler, uv).rgb;
231
+ let lumaM = fxaaLuma(uv);
232
+ let lumaN = fxaaLuma(uv + vec2<f32>(0.0, -texel.y));
233
+ let lumaS = fxaaLuma(uv + vec2<f32>(0.0, texel.y));
234
+ let lumaW = fxaaLuma(uv + vec2<f32>(-texel.x, 0.0));
235
+ let lumaE = fxaaLuma(uv + vec2<f32>(texel.x, 0.0));
236
+ let rangeMin = min(lumaM, min(min(lumaN, lumaS), min(lumaW, lumaE)));
237
+ let rangeMax = max(lumaM, max(max(lumaN, lumaS), max(lumaW, lumaE)));
238
+ let range = rangeMax - rangeMin;
239
+ // Flat neighborhoods pass through untouched (no blur where nothing edges).
240
+ if (range < max(0.0312, rangeMax * 0.125)) {
241
+ return vec4<f32>(center, 1.0);
242
+ }
243
+ // Canonical FXAA 3.11 console edge terms (first-order axis contrast):
244
+ // edgeHorz measures the N-S gradient, so a dominant edgeHorz means the
245
+ // edge spans horizontally and the blend taps go vertical, and vice versa.
246
+ // (Second-order-only terms vanish on ideal steps and pick no direction.)
247
+ let edgeHorz = abs((-2.0 * lumaM) + lumaN + lumaS);
248
+ let edgeVert = abs((-2.0 * lumaM) + lumaW + lumaE);
249
+ let horzSpan = edgeHorz >= edgeVert;
250
+ // WGSL has no ternary operator: select(falseValue, trueValue, condition).
251
+ // textureSampleLevel (explicit LOD) is used for the blend taps because they
252
+ // sit after the early-out branch: implicit-derivative sampling is illegal
253
+ // in non-uniform control flow.
254
+ let blend = select(vec2<f32>(texel.x * 0.5, 0.0), vec2<f32>(0.0, texel.y * 0.5), horzSpan);
255
+ let tapA = textureSampleLevel(u_source, u_sampler, uv - blend, 0.0).rgb;
256
+ let tapB = textureSampleLevel(u_source, u_sampler, uv + blend, 0.0).rgb;
257
+ return vec4<f32>((tapA + tapB) * 0.5, 1.0);
258
+ }
259
+ `;
260
+ }
261
+ //# sourceMappingURL=WebGPUPostShaders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebGPUPostShaders.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgpu/WebGPUPostShaders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;CAkBtC,CAAC;AAEF,MAAM,UAAU,2BAA2B;IACzC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBR,CAAC;AACF,CAAC;AASD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC,MAAM,UAAU,4BAA4B,CAAC,MAA6B;IACxE,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO;SACzB,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,wCAAwC,KAAK,0BAA0B,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC;SACnH,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,MAAM,QAAQ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AI,EAAE;QAAE,OAAO,CAAC,CAAC;IACzB,IAAI,IAAI,IAAI,EAAE;QAAE,OAAO,CAAC,CAAC;IACzB,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;IAClC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,wBAAwB;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsDR,CAAC;AACF,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { RenderTarget } from "../RenderDevice.js";
2
+ export { temporalAccumulationWeight } from "../TemporalMath.js";
3
+ /** GPU-only temporal contract. All targets use the native top-left UV convention. */
4
+ export interface WebGPUTemporalInputs {
5
+ readonly velocity: RenderTarget;
6
+ readonly history: RenderTarget;
7
+ readonly historyOutput: RenderTarget;
8
+ readonly historyValid: boolean;
9
+ readonly historyFrames?: number;
10
+ readonly blend?: number;
11
+ readonly depthThreshold?: number;
12
+ }
13
+ export declare function normalizeWebGPUTemporalOptions(options: Pick<WebGPUTemporalInputs, "blend" | "depthThreshold" | "historyFrames">): readonly [number, number];
14
+ export declare const WEBGPU_TAA_FRAGMENT = "\nstruct TemporalUniforms { texel: vec2<f32>, blend: f32, valid: f32, depthThreshold: f32, _pad0: f32, _pad1: f32, _pad2: f32 };\n@group(0) @binding(0) var<uniform> temporal: TemporalUniforms;\n@group(0) @binding(1) var linearSampler: sampler;\n@group(0) @binding(2) var source: texture_2d<f32>;\n@group(0) @binding(3) var velocity: texture_2d<f32>;\n@group(0) @binding(4) var history: texture_2d<f32>;\n@fragment fn fs_taa(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {\n let current = textureSampleLevel(source, linearSampler, uv, 0.0);\n let dimensions = vec2<i32>(textureDimensions(velocity));\n let coord = clamp(vec2<i32>(uv * vec2<f32>(dimensions)), vec2<i32>(0), dimensions - vec2<i32>(1));\n let motion = textureLoad(velocity, coord, 0);\n let previousUV = uv - motion.rg;\n let previous = textureSampleLevel(history, linearSampler, previousUV, 0.0);\n var lo = current.rgb;\n var hi = current.rgb;\n for (var y = -1; y <= 1; y = y + 1) {\n for (var x = -1; x <= 1; x = x + 1) {\n let neighbor = textureSampleLevel(source, linearSampler, uv + vec2<f32>(f32(x), f32(y)) * temporal.texel, 0.0).rgb;\n lo = min(lo, neighbor); hi = max(hi, neighbor);\n }\n }\n let inBounds = all(previousUV >= vec2<f32>(0.0)) && all(previousUV <= vec2<f32>(1.0));\n // Filtered history alpha mixes categorical foreground/background depths.\n // Validate the actual contributing surfaces instead of a nonexistent\n // interpolated surface; filtered RGB remains neighborhood-clipped below.\n let previousBase = vec2<i32>(floor(previousUV * vec2<f32>(dimensions) - vec2<f32>(0.5)));\n var depthError = 1.0;\n for (var y = 0; y < 2; y = y + 1) {\n for (var x = 0; x < 2; x = x + 1) {\n let tap = clamp(previousBase + vec2<i32>(x, y), vec2<i32>(0), dimensions - vec2<i32>(1));\n depthError = min(depthError, abs(textureLoad(history, tap, 0).a - motion.a));\n }\n }\n let depthMatches = depthError <= temporal.depthThreshold;\n let accept = temporal.valid > 0.5 && inBounds && depthMatches;\n let weight = select(0.0, temporal.blend * 0.90, accept);\n return vec4<f32>(mix(current.rgb, clamp(previous.rgb, lo, hi), weight), motion.b);\n}";
15
+ /** Separate output restores scene alpha: history alpha contains depth. */
16
+ export declare const WEBGPU_TAA_OUTPUT_FRAGMENT = "\nstruct OutputUniforms { texel: vec2<f32>, _pad: vec2<f32> };\n@group(0) @binding(0) var<uniform> output: OutputUniforms;\n@group(0) @binding(1) var linearSampler: sampler;\n@group(0) @binding(2) var resolved: texture_2d<f32>;\n@group(0) @binding(3) var source: texture_2d<f32>;\n@fragment fn fs_taa_output(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {\n let p = clamp(uv, output.texel * 0.5, vec2<f32>(1.0) - output.texel * 0.5);\n let current = textureSample(source, linearSampler, p);\n let accumulated = textureSample(resolved, linearSampler, p);\n return vec4<f32>(accumulated.rgb, current.a);\n}";
17
+ //# sourceMappingURL=WebGPUTemporal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebGPUTemporal.d.ts","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgpu/WebGPUTemporal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,qFAAqF;AACrF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,QAAQ,EAAE,YAAY,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,QAAQ,CAAC,aAAa,EAAE,YAAY,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CAClC;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,gBAAgB,GAAG,eAAe,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAM3J;AAED,eAAO,MAAM,mBAAmB,4oEAsC9B,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,0BAA0B,6mBAWrC,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { temporalAccumulationWeight } from "../TemporalMath.js";
2
+ export { temporalAccumulationWeight } from "../TemporalMath.js";
3
+ export function normalizeWebGPUTemporalOptions(options) {
4
+ const blend = options.blend ?? 0.9;
5
+ const depthThreshold = options.depthThreshold ?? 0.01;
6
+ if (!Number.isFinite(blend) || blend < 0 || blend >= 1)
7
+ throw new RangeError("TAA blend must be finite in [0, 1)");
8
+ if (!Number.isFinite(depthThreshold) || depthThreshold <= 0 || depthThreshold > 1)
9
+ throw new RangeError("TAA depthThreshold must be finite in (0, 1]");
10
+ return [temporalAccumulationWeight(blend, options.historyFrames), depthThreshold];
11
+ }
12
+ export const WEBGPU_TAA_FRAGMENT = `
13
+ struct TemporalUniforms { texel: vec2<f32>, blend: f32, valid: f32, depthThreshold: f32, _pad0: f32, _pad1: f32, _pad2: f32 };
14
+ @group(0) @binding(0) var<uniform> temporal: TemporalUniforms;
15
+ @group(0) @binding(1) var linearSampler: sampler;
16
+ @group(0) @binding(2) var source: texture_2d<f32>;
17
+ @group(0) @binding(3) var velocity: texture_2d<f32>;
18
+ @group(0) @binding(4) var history: texture_2d<f32>;
19
+ @fragment fn fs_taa(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
20
+ let current = textureSampleLevel(source, linearSampler, uv, 0.0);
21
+ let dimensions = vec2<i32>(textureDimensions(velocity));
22
+ let coord = clamp(vec2<i32>(uv * vec2<f32>(dimensions)), vec2<i32>(0), dimensions - vec2<i32>(1));
23
+ let motion = textureLoad(velocity, coord, 0);
24
+ let previousUV = uv - motion.rg;
25
+ let previous = textureSampleLevel(history, linearSampler, previousUV, 0.0);
26
+ var lo = current.rgb;
27
+ var hi = current.rgb;
28
+ for (var y = -1; y <= 1; y = y + 1) {
29
+ for (var x = -1; x <= 1; x = x + 1) {
30
+ let neighbor = textureSampleLevel(source, linearSampler, uv + vec2<f32>(f32(x), f32(y)) * temporal.texel, 0.0).rgb;
31
+ lo = min(lo, neighbor); hi = max(hi, neighbor);
32
+ }
33
+ }
34
+ let inBounds = all(previousUV >= vec2<f32>(0.0)) && all(previousUV <= vec2<f32>(1.0));
35
+ // Filtered history alpha mixes categorical foreground/background depths.
36
+ // Validate the actual contributing surfaces instead of a nonexistent
37
+ // interpolated surface; filtered RGB remains neighborhood-clipped below.
38
+ let previousBase = vec2<i32>(floor(previousUV * vec2<f32>(dimensions) - vec2<f32>(0.5)));
39
+ var depthError = 1.0;
40
+ for (var y = 0; y < 2; y = y + 1) {
41
+ for (var x = 0; x < 2; x = x + 1) {
42
+ let tap = clamp(previousBase + vec2<i32>(x, y), vec2<i32>(0), dimensions - vec2<i32>(1));
43
+ depthError = min(depthError, abs(textureLoad(history, tap, 0).a - motion.a));
44
+ }
45
+ }
46
+ let depthMatches = depthError <= temporal.depthThreshold;
47
+ let accept = temporal.valid > 0.5 && inBounds && depthMatches;
48
+ let weight = select(0.0, temporal.blend * 0.90, accept);
49
+ return vec4<f32>(mix(current.rgb, clamp(previous.rgb, lo, hi), weight), motion.b);
50
+ }`;
51
+ /** Separate output restores scene alpha: history alpha contains depth. */
52
+ export const WEBGPU_TAA_OUTPUT_FRAGMENT = `
53
+ struct OutputUniforms { texel: vec2<f32>, _pad: vec2<f32> };
54
+ @group(0) @binding(0) var<uniform> output: OutputUniforms;
55
+ @group(0) @binding(1) var linearSampler: sampler;
56
+ @group(0) @binding(2) var resolved: texture_2d<f32>;
57
+ @group(0) @binding(3) var source: texture_2d<f32>;
58
+ @fragment fn fs_taa_output(@location(0) uv: vec2<f32>) -> @location(0) vec4<f32> {
59
+ let p = clamp(uv, output.texel * 0.5, vec2<f32>(1.0) - output.texel * 0.5);
60
+ let current = textureSample(source, linearSampler, p);
61
+ let accumulated = textureSample(resolved, linearSampler, p);
62
+ return vec4<f32>(accumulated.rgb, current.a);
63
+ }`;
64
+ //# sourceMappingURL=WebGPUTemporal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebGPUTemporal.js","sourceRoot":"","sources":["../../../../../packages/rendering/src/webgpu/WebGPUTemporal.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAa7D,MAAM,UAAU,8BAA8B,CAAC,OAAiF;IAC9H,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,GAAG,CAAC;IACnC,MAAM,cAAc,GAAG,OAAO,CAAC,cAAc,IAAI,IAAI,CAAC;IACtD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,oCAAoC,CAAC,CAAC;IACnH,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,cAAc,IAAI,CAAC,IAAI,cAAc,GAAG,CAAC;QAAE,MAAM,IAAI,UAAU,CAAC,6CAA6C,CAAC,CAAC;IACvJ,OAAO,CAAC,0BAA0B,CAAC,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,EAAE,cAAc,CAAC,CAAC;AACpF,CAAC;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCjC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;EAWxC,CAAC"}
package/dist/webgpu.d.ts CHANGED
@@ -22,4 +22,10 @@
22
22
  */
23
23
  export { WebGPUDevice } from "./WebGPUDevice.js";
24
24
  export type { WebGPUAdapterLike, WebGPUBufferDescriptorLike, WebGPUBufferLike, WebGPUDeviceLike, WebGPUDeviceOptions, WebGPULike, WebGPUQueueLike, WebGPUSamplerDescriptorLike } from "./WebGPUDevice.js";
25
+ export { normalizeWebGPUTemporalOptions, WEBGPU_TAA_FRAGMENT, WEBGPU_TAA_OUTPUT_FRAGMENT } from "./webgpu/WebGPUTemporal.js";
26
+ export type { WebGPUTemporalInputs } from "./webgpu/WebGPUTemporal.js";
27
+ export { defaultWebGPUBloomWeights, normalizeWebGPUColorGradeOptions, normalizeWebGPUBloomOptions, normalizeWebGPUBloomQuality, webgpuBloomCompositeFragment, webgpuBlurFragment, webgpuBrightExtractFragment, webgpuColorGradeFragment, webgpuFxaaFragment, webgpuSoftKneeWeight, WEBGPU_BLOOM_MAX_MIPS, WEBGPU_BLOOM_QUALITY_TABLE, WEBGPU_POST_VERTEX_WGSL, } from "./webgpu/WebGPUPostShaders.js";
28
+ export type { NormalizedWebGPUColorGrade, NormalizedWebGPUBloom, WebGPUBloomDiagnostics, WebGPUBloomOptions, WebGPUBloomQuality, WebGPUColorGradeOptions, WebGPUCompositeParams, WebGPUFxaaOptions, } from "./webgpu/WebGPUPostShaders.js";
29
+ export { WebGPUPipelineCache } from "./webgpu/WebGPUPipelineCache.js";
30
+ export { Texture } from "./Texture.js";
25
31
  //# sourceMappingURL=webgpu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webgpu.d.ts","sourceRoot":"","sources":["../../../../packages/rendering/src/webgpu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"webgpu.d.ts","sourceRoot":"","sources":["../../../../packages/rendering/src/webgpu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,iBAAiB,EACjB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1H,YAAY,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EACV,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
package/dist/webgpu.js CHANGED
@@ -21,4 +21,8 @@
21
21
  * `MIGRATION-1.6.md`.
22
22
  */
23
23
  export { WebGPUDevice } from "./WebGPUDevice.js";
24
+ export { normalizeWebGPUTemporalOptions, WEBGPU_TAA_FRAGMENT, WEBGPU_TAA_OUTPUT_FRAGMENT } from "./webgpu/WebGPUTemporal.js";
25
+ export { defaultWebGPUBloomWeights, normalizeWebGPUColorGradeOptions, normalizeWebGPUBloomOptions, normalizeWebGPUBloomQuality, webgpuBloomCompositeFragment, webgpuBlurFragment, webgpuBrightExtractFragment, webgpuColorGradeFragment, webgpuFxaaFragment, webgpuSoftKneeWeight, WEBGPU_BLOOM_MAX_MIPS, WEBGPU_BLOOM_QUALITY_TABLE, WEBGPU_POST_VERTEX_WGSL, } from "./webgpu/WebGPUPostShaders.js";
26
+ export { WebGPUPipelineCache } from "./webgpu/WebGPUPipelineCache.js";
27
+ export { Texture } from "./Texture.js";
24
28
  //# sourceMappingURL=webgpu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webgpu.js","sourceRoot":"","sources":["../../../../packages/rendering/src/webgpu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"webgpu.js","sourceRoot":"","sources":["../../../../packages/rendering/src/webgpu.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAY9C,OAAO,EAAE,8BAA8B,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAG1H,OAAO,EACL,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,2BAA2B,EAC3B,wBAAwB,EACxB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AAYpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aura3d/rendering",
3
- "version": "2.0.4",
3
+ "version": "3.0.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -11,16 +11,28 @@
11
11
  "types": "./dist/lean-runtime.d.ts",
12
12
  "import": "./dist/lean-runtime.js"
13
13
  },
14
+ "./lean-core-runtime": {
15
+ "types": "./dist/lean-core-runtime.d.ts",
16
+ "import": "./dist/lean-core-runtime.js"
17
+ },
14
18
  "./webgpu": {
15
19
  "types": "./dist/webgpu.d.ts",
16
20
  "import": "./dist/webgpu.js"
21
+ },
22
+ "./extension-scalar-atlas": {
23
+ "types": "./dist/extension-scalar-atlas.d.ts",
24
+ "import": "./dist/extension-scalar-atlas.js"
25
+ },
26
+ "./reflection-surfaces": {
27
+ "types": "./dist/reflection-surfaces.d.ts",
28
+ "import": "./dist/reflection-surfaces.js"
17
29
  }
18
30
  },
19
31
  "main": "./dist/index.js",
20
32
  "types": "./dist/index.d.ts",
21
33
  "dependencies": {
22
- "@aura3d/math": "2.0.4",
23
- "@aura3d/scene": "2.0.4"
34
+ "@aura3d/math": "3.0.1",
35
+ "@aura3d/scene": "3.0.1"
24
36
  },
25
37
  "sideEffects": false,
26
38
  "description": "Render-device abstraction, WebGL2/mock backends, buffers, textures, shader modules, materials, render graphs, lighting, shadows, and particle rendering for Aura3D.",