@onerjs/core 9.0.1 → 9.0.3

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 (476) hide show
  1. package/Animations/animationGroup.pure.js.map +1 -1
  2. package/Buffers/buffer.pure.js +4 -0
  3. package/Buffers/buffer.pure.js.map +1 -1
  4. package/Cameras/camera.pure.d.ts +14 -0
  5. package/Cameras/camera.pure.js +15 -0
  6. package/Cameras/camera.pure.js.map +1 -1
  7. package/Compute/computeShader.pure.d.ts +2 -1
  8. package/Compute/computeShader.pure.js +29 -10
  9. package/Compute/computeShader.pure.js.map +1 -1
  10. package/Culling/ray.core.js +22 -9
  11. package/Culling/ray.core.js.map +1 -1
  12. package/Engines/IDrawContext.d.ts +2 -0
  13. package/Engines/IDrawContext.js.map +1 -1
  14. package/Engines/Native/nativeInterfaces.d.ts +55 -4
  15. package/Engines/Native/nativeInterfaces.js.map +1 -1
  16. package/Engines/Native/nativeRenderTargetWrapper.d.ts +1 -0
  17. package/Engines/Native/nativeRenderTargetWrapper.js +5 -1
  18. package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
  19. package/Engines/Processors/shaderCodeInliner.d.ts +2 -0
  20. package/Engines/Processors/shaderCodeInliner.js +251 -6
  21. package/Engines/Processors/shaderCodeInliner.js.map +1 -1
  22. package/Engines/Processors/shaderProcessor.js +10 -1
  23. package/Engines/Processors/shaderProcessor.js.map +1 -1
  24. package/Engines/WebGPU/Extensions/engine.debugging.pure.js +12 -0
  25. package/Engines/WebGPU/Extensions/engine.debugging.pure.js.map +1 -1
  26. package/Engines/WebGPU/Extensions/engine.multiRender.pure.js +0 -1
  27. package/Engines/WebGPU/Extensions/engine.multiRender.pure.js.map +1 -1
  28. package/Engines/WebGPU/Extensions/engine.query.pure.js +5 -0
  29. package/Engines/WebGPU/Extensions/engine.query.pure.js.map +1 -1
  30. package/Engines/WebGPU/webgpuBufferManager.js +7 -0
  31. package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
  32. package/Engines/WebGPU/webgpuCacheTextureView.d.ts +1 -1
  33. package/Engines/WebGPU/webgpuCacheTextureView.js +20 -8
  34. package/Engines/WebGPU/webgpuCacheTextureView.js.map +1 -1
  35. package/Engines/WebGPU/webgpuDrawContext.d.ts +2 -0
  36. package/Engines/WebGPU/webgpuDrawContext.js +6 -0
  37. package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
  38. package/Engines/WebGPU/webgpuQuerySet.d.ts +3 -3
  39. package/Engines/WebGPU/webgpuQuerySet.js +23 -9
  40. package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
  41. package/Engines/WebGPU/webgpuRenderPassCommandStream.d.ts +156 -0
  42. package/Engines/WebGPU/webgpuRenderPassCommandStream.js +323 -0
  43. package/Engines/WebGPU/webgpuRenderPassCommandStream.js.map +1 -0
  44. package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
  45. package/Engines/WebGPU/webgpuTextureManager.js +4 -3
  46. package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
  47. package/Engines/WebGPU/webgpuTimestampQuery.d.ts +3 -1
  48. package/Engines/WebGPU/webgpuTimestampQuery.js +9 -6
  49. package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
  50. package/Engines/abstractEngine.pure.d.ts +2 -0
  51. package/Engines/abstractEngine.pure.js +14 -5
  52. package/Engines/abstractEngine.pure.js.map +1 -1
  53. package/Engines/constants.d.ts +6 -0
  54. package/Engines/constants.js +6 -0
  55. package/Engines/constants.js.map +1 -1
  56. package/Engines/engine.d.ts +198 -24
  57. package/Engines/pure.d.ts +1 -0
  58. package/Engines/pure.js +1 -0
  59. package/Engines/pure.js.map +1 -1
  60. package/Engines/renderCommandBatcher.pure.d.ts +16 -0
  61. package/Engines/renderCommandBatcher.pure.js +24 -0
  62. package/Engines/renderCommandBatcher.pure.js.map +1 -0
  63. package/Engines/thinEngine.functions.js +3 -2
  64. package/Engines/thinEngine.functions.js.map +1 -1
  65. package/Engines/thinEngine.pure.js +18 -2
  66. package/Engines/thinEngine.pure.js.map +1 -1
  67. package/Engines/thinNativeEngine.pure.d.ts +10 -7
  68. package/Engines/thinNativeEngine.pure.js +117 -46
  69. package/Engines/thinNativeEngine.pure.js.map +1 -1
  70. package/Engines/thinWebGPUEngine.d.ts +8 -0
  71. package/Engines/thinWebGPUEngine.js +11 -0
  72. package/Engines/thinWebGPUEngine.js.map +1 -1
  73. package/Engines/webgpuEngine.pure.d.ts +60 -1
  74. package/Engines/webgpuEngine.pure.js +238 -42
  75. package/Engines/webgpuEngine.pure.js.map +1 -1
  76. package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.d.ts +3 -3
  77. package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js +2 -1
  78. package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js.map +1 -1
  79. package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.d.ts +3 -3
  80. package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js +2 -1
  81. package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js.map +1 -1
  82. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.d.ts +5 -0
  83. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js +8 -0
  84. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js.map +1 -0
  85. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.d.ts +77 -0
  86. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js +141 -0
  87. package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js.map +1 -0
  88. package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.d.ts +5 -3
  89. package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js +38 -7
  90. package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js.map +1 -1
  91. package/FlowGraph/Blocks/Event/index.d.ts +1 -0
  92. package/FlowGraph/Blocks/Event/index.js +1 -0
  93. package/FlowGraph/Blocks/Event/index.js.map +1 -1
  94. package/FlowGraph/Blocks/Event/pure.d.ts +1 -0
  95. package/FlowGraph/Blocks/Event/pure.js +1 -0
  96. package/FlowGraph/Blocks/Event/pure.js.map +1 -1
  97. package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.d.ts +3 -3
  98. package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js +2 -1
  99. package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js.map +1 -1
  100. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.d.ts +3 -3
  101. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js +2 -1
  102. package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js.map +1 -1
  103. package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.d.ts +3 -3
  104. package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js +2 -1
  105. package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js.map +1 -1
  106. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.d.ts +3 -3
  107. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js +2 -1
  108. package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js.map +1 -1
  109. package/FlowGraph/Blocks/allBlocks.pure.js +2 -0
  110. package/FlowGraph/Blocks/allBlocks.pure.js.map +1 -1
  111. package/FlowGraph/Blocks/flowGraphBlockFactory.js +2 -0
  112. package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
  113. package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +1 -0
  114. package/FlowGraph/Blocks/flowGraphBlockNames.js +1 -0
  115. package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
  116. package/FlowGraph/flowGraph.d.ts +12 -1
  117. package/FlowGraph/flowGraph.js +38 -0
  118. package/FlowGraph/flowGraph.js.map +1 -1
  119. package/FlowGraph/flowGraphCoordinator.d.ts +44 -0
  120. package/FlowGraph/flowGraphCoordinator.js +141 -0
  121. package/FlowGraph/flowGraphCoordinator.js.map +1 -1
  122. package/FlowGraph/flowGraphDataConnection.pure.js +41 -14
  123. package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
  124. package/FlowGraph/flowGraphParser.js +105 -5
  125. package/FlowGraph/flowGraphParser.js.map +1 -1
  126. package/FlowGraph/flowGraphSoundAssets.d.ts +40 -0
  127. package/FlowGraph/flowGraphSoundAssets.js +33 -0
  128. package/FlowGraph/flowGraphSoundAssets.js.map +1 -0
  129. package/FlowGraph/index.d.ts +1 -0
  130. package/FlowGraph/index.js +1 -0
  131. package/FlowGraph/index.js.map +1 -1
  132. package/FlowGraph/pure.d.ts +1 -0
  133. package/FlowGraph/pure.js +1 -0
  134. package/FlowGraph/pure.js.map +1 -1
  135. package/FlowGraph/serialization.d.ts +8 -0
  136. package/FlowGraph/serialization.js +31 -12
  137. package/FlowGraph/serialization.js.map +1 -1
  138. package/FlowGraph/typeDefinitions.d.ts +25 -0
  139. package/FlowGraph/typeDefinitions.js.map +1 -1
  140. package/FrameGraph/Tasks/PostProcesses/taaTask.js +2 -0
  141. package/FrameGraph/Tasks/PostProcesses/taaTask.js.map +1 -1
  142. package/Instrumentation/engineInstrumentation.d.ts +1 -0
  143. package/Instrumentation/engineInstrumentation.js +25 -6
  144. package/Instrumentation/engineInstrumentation.js.map +1 -1
  145. package/Lights/Clustered/clusteredLightContainer.pure.js +2 -0
  146. package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
  147. package/Lights/Shadows/cascadedShadowGenerator.pure.d.ts +36 -1
  148. package/Lights/Shadows/cascadedShadowGenerator.pure.js +202 -27
  149. package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
  150. package/Lights/directionalLight.pure.d.ts +24 -10
  151. package/Lights/directionalLight.pure.js +29 -11
  152. package/Lights/directionalLight.pure.js.map +1 -1
  153. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +4 -4
  154. package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
  155. package/Materials/Node/Blocks/Dual/lightBlock.pure.js +1 -1
  156. package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
  157. package/Materials/Node/Blocks/Input/inputBlock.pure.js +4 -0
  158. package/Materials/Node/Blocks/Input/inputBlock.pure.js.map +1 -1
  159. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.d.ts +9 -0
  160. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +23 -3
  161. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
  162. package/Materials/PBR/openpbrMaterial.pure.js +1 -1
  163. package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
  164. package/Materials/PBR/pbrBaseMaterial.pure.d.ts +9 -0
  165. package/Materials/PBR/pbrBaseMaterial.pure.js +60 -1
  166. package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
  167. package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +11 -0
  168. package/Materials/PBR/pbrBaseSimpleMaterial.js +21 -2
  169. package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
  170. package/Materials/PBR/pbrMaterial.pure.d.ts +12 -0
  171. package/Materials/PBR/pbrMaterial.pure.js +23 -3
  172. package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
  173. package/Materials/Textures/Filtering/hdrIrradianceFiltering.d.ts +1 -0
  174. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js +10 -0
  175. package/Materials/Textures/Filtering/hdrIrradianceFiltering.js.map +1 -1
  176. package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +5 -0
  177. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +7 -0
  178. package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -1
  179. package/Materials/Textures/HTML/htmlInteractionManager.d.ts +9 -3
  180. package/Materials/Textures/HTML/htmlInteractionManager.js +64 -5
  181. package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -1
  182. package/Materials/Textures/HTML/htmlTexture.d.ts +11 -11
  183. package/Materials/Textures/HTML/htmlTexture.js +106 -65
  184. package/Materials/Textures/HTML/htmlTexture.js.map +1 -1
  185. package/Materials/Textures/Loaders/internalTextureLoader.d.ts +2 -1
  186. package/Materials/Textures/Loaders/internalTextureLoader.js.map +1 -1
  187. package/Materials/Textures/Loaders/ktxTextureLoader.d.ts +2 -1
  188. package/Materials/Textures/Loaders/ktxTextureLoader.js +4 -50
  189. package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
  190. package/Materials/Textures/Procedurals/proceduralTexture.pure.js +10 -0
  191. package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
  192. package/Materials/Textures/dynamicTexture.pure.js +6 -0
  193. package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
  194. package/Materials/Textures/ktx2encoderTypes.d.ts +51 -0
  195. package/Materials/Textures/ktx2encoderTypes.js +2 -0
  196. package/Materials/Textures/ktx2encoderTypes.js.map +1 -0
  197. package/Materials/Textures/renderTargetTexture.pure.js +10 -2
  198. package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
  199. package/Materials/Textures/texture.pure.js +7 -1
  200. package/Materials/Textures/texture.pure.js.map +1 -1
  201. package/Materials/Textures/textureMerger.d.ts +11 -0
  202. package/Materials/Textures/textureMerger.js +34 -19
  203. package/Materials/Textures/textureMerger.js.map +1 -1
  204. package/Materials/Textures/textureProcessor.d.ts +145 -0
  205. package/Materials/Textures/textureProcessor.js +445 -45
  206. package/Materials/Textures/textureProcessor.js.map +1 -1
  207. package/Materials/Textures/textureSampling.functions.d.ts +41 -0
  208. package/Materials/Textures/textureSampling.functions.js +82 -0
  209. package/Materials/Textures/textureSampling.functions.js.map +1 -0
  210. package/Materials/drawWrapper.d.ts +8 -0
  211. package/Materials/drawWrapper.js +19 -0
  212. package/Materials/drawWrapper.js.map +1 -1
  213. package/Materials/effect.pure.d.ts +6 -0
  214. package/Materials/effect.pure.js +28 -6
  215. package/Materials/effect.pure.js.map +1 -1
  216. package/Materials/effect.webgl.functions.pure.js +1 -1
  217. package/Materials/effect.webgl.functions.pure.js.map +1 -1
  218. package/Materials/material.pure.d.ts +5 -0
  219. package/Materials/material.pure.js +9 -2
  220. package/Materials/material.pure.js.map +1 -1
  221. package/Materials/materialFlags.d.ts +6 -0
  222. package/Materials/materialFlags.js +14 -0
  223. package/Materials/materialFlags.js.map +1 -1
  224. package/Materials/materialHelper.functions.d.ts +2 -1
  225. package/Materials/materialHelper.functions.js +36 -2
  226. package/Materials/materialHelper.functions.js.map +1 -1
  227. package/Materials/materialHelper.geometryrendering.js +19 -16
  228. package/Materials/materialHelper.geometryrendering.js.map +1 -1
  229. package/Materials/materialPluginManager.pure.js +12 -8
  230. package/Materials/materialPluginManager.pure.js.map +1 -1
  231. package/Materials/prePassConfiguration.js +19 -16
  232. package/Materials/prePassConfiguration.js.map +1 -1
  233. package/Materials/shaderMaterial.pure.js +19 -6
  234. package/Materials/shaderMaterial.pure.js.map +1 -1
  235. package/Materials/shadowDepthWrapper.d.ts +6 -0
  236. package/Materials/shadowDepthWrapper.js +17 -0
  237. package/Materials/shadowDepthWrapper.js.map +1 -1
  238. package/Meshes/Compression/dracoCodec.d.ts +14 -0
  239. package/Meshes/Compression/dracoCodec.js +22 -0
  240. package/Meshes/Compression/dracoCodec.js.map +1 -1
  241. package/Meshes/Compression/dracoDecoder.d.ts +1 -0
  242. package/Meshes/Compression/dracoDecoder.js +27 -0
  243. package/Meshes/Compression/dracoDecoder.js.map +1 -1
  244. package/Meshes/Compression/dracoEncoder.d.ts +1 -0
  245. package/Meshes/Compression/dracoEncoder.js +8 -0
  246. package/Meshes/Compression/dracoEncoder.js.map +1 -1
  247. package/Meshes/Compression/meshoptCompression.d.ts +1 -0
  248. package/Meshes/Compression/meshoptCompression.js +9 -0
  249. package/Meshes/Compression/meshoptCompression.js.map +1 -1
  250. package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.d.ts +415 -0
  251. package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js +912 -0
  252. package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js.map +1 -0
  253. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +3 -0
  254. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +40 -9
  255. package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
  256. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +112 -8
  257. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +696 -74
  258. package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
  259. package/Meshes/abstractMesh.pure.js +12 -4
  260. package/Meshes/abstractMesh.pure.js.map +1 -1
  261. package/Meshes/geometry.d.ts +5 -0
  262. package/Meshes/geometry.js +25 -0
  263. package/Meshes/geometry.js.map +1 -1
  264. package/Meshes/index.d.ts +1 -0
  265. package/Meshes/index.js +1 -0
  266. package/Meshes/index.js.map +1 -1
  267. package/Meshes/mesh.pure.d.ts +7 -0
  268. package/Meshes/mesh.pure.js +18 -13
  269. package/Meshes/mesh.pure.js.map +1 -1
  270. package/Meshes/pure.d.ts +1 -0
  271. package/Meshes/pure.js +1 -0
  272. package/Meshes/pure.js.map +1 -1
  273. package/Meshes/subMesh.pure.d.ts +3 -0
  274. package/Meshes/subMesh.pure.js +26 -0
  275. package/Meshes/subMesh.pure.js.map +1 -1
  276. package/Meshes/thinInstanceMesh.pure.js +5 -3
  277. package/Meshes/thinInstanceMesh.pure.js.map +1 -1
  278. package/Misc/index.d.ts +1 -0
  279. package/Misc/index.js +1 -0
  280. package/Misc/index.js.map +1 -1
  281. package/Misc/khronosTextureContainer2.d.ts +3 -2
  282. package/Misc/khronosTextureContainer2.js +24 -6
  283. package/Misc/khronosTextureContainer2.js.map +1 -1
  284. package/Misc/khronosTextureContainer2Encoder.d.ts +166 -0
  285. package/Misc/khronosTextureContainer2Encoder.js +556 -0
  286. package/Misc/khronosTextureContainer2Encoder.js.map +1 -0
  287. package/Misc/khronosTextureContainer2EncoderWorker.d.ts +61 -0
  288. package/Misc/khronosTextureContainer2EncoderWorker.js +55 -0
  289. package/Misc/khronosTextureContainer2EncoderWorker.js.map +1 -0
  290. package/Misc/pure.d.ts +1 -0
  291. package/Misc/pure.js +1 -0
  292. package/Misc/pure.js.map +1 -1
  293. package/Misc/textureFormat.functions.d.ts +6 -0
  294. package/Misc/textureFormat.functions.js +54 -0
  295. package/Misc/textureFormat.functions.js.map +1 -0
  296. package/Misc/textureTools.d.ts +6 -2
  297. package/Misc/textureTools.js +100 -42
  298. package/Misc/textureTools.js.map +1 -1
  299. package/Misc/tools.pure.js +1 -1
  300. package/Misc/tools.pure.js.map +1 -1
  301. package/Particles/Node/Blocks/systemBlock.pure.d.ts +1 -1
  302. package/Particles/Node/Blocks/systemBlock.pure.js +6 -3
  303. package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
  304. package/Particles/computeShaderParticleSystem.pure.js +5 -0
  305. package/Particles/computeShaderParticleSystem.pure.js.map +1 -1
  306. package/Particles/gpuParticleSystem.pure.d.ts +2 -0
  307. package/Particles/gpuParticleSystem.pure.js +25 -1
  308. package/Particles/gpuParticleSystem.pure.js.map +1 -1
  309. package/Particles/solidParticle.d.ts +5 -0
  310. package/Particles/solidParticle.js +5 -0
  311. package/Particles/solidParticle.js.map +1 -1
  312. package/Particles/solidParticleSystem.d.ts +10 -0
  313. package/Particles/solidParticleSystem.js +72 -13
  314. package/Particles/solidParticleSystem.js.map +1 -1
  315. package/Particles/thinParticleSystem.pure.js +4 -0
  316. package/Particles/thinParticleSystem.pure.js.map +1 -1
  317. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.d.ts +27 -6
  318. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js +60 -5
  319. package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js.map +1 -1
  320. package/PostProcesses/thinTAAPostProcess.d.ts +1 -0
  321. package/PostProcesses/thinTAAPostProcess.js +17 -1
  322. package/PostProcesses/thinTAAPostProcess.js.map +1 -1
  323. package/PostProcesses/volumetricLightScatteringPostProcess.pure.d.ts +2 -1
  324. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +6 -5
  325. package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
  326. package/Rendering/boundingBoxRenderer.pure.js +2 -3
  327. package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
  328. package/Rendering/geometryBufferRenderer.pure.js +8 -2
  329. package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
  330. package/Rendering/objectRenderer.d.ts +1 -0
  331. package/Rendering/objectRenderer.js +14 -0
  332. package/Rendering/objectRenderer.js.map +1 -1
  333. package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
  334. package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
  335. package/Shaders/ShadersInclude/bumpVertex.js +1 -1
  336. package/Shaders/ShadersInclude/bumpVertex.js.map +1 -1
  337. package/Shaders/ShadersInclude/bumpVertexDeclaration.js +1 -1
  338. package/Shaders/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
  339. package/Shaders/ShadersInclude/hdrFilteringFunctions.js +5 -1
  340. package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  341. package/Shaders/ShadersInclude/helperFunctions.js +2 -2
  342. package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
  343. package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
  344. package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
  345. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +6 -0
  346. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -1
  347. package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
  348. package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
  349. package/Shaders/ShadersInclude/pbrBlockNormalFinal.js +9 -0
  350. package/Shaders/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
  351. package/Shaders/ShadersInclude/pbrBlockReflectance.js +1 -1
  352. package/Shaders/ShadersInclude/pbrBlockReflectance.js.map +1 -1
  353. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
  354. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
  355. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js +7 -1
  356. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js.map +1 -1
  357. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
  358. package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
  359. package/Shaders/ShadersInclude/pbrIBLFunctions.js +12 -0
  360. package/Shaders/ShadersInclude/pbrIBLFunctions.js.map +1 -1
  361. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  362. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  363. package/Shaders/ShadersInclude/pbrVertexDeclaration.js +3 -0
  364. package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
  365. package/Shaders/geometry.vertex.js +6 -6
  366. package/Shaders/geometry.vertex.js.map +1 -1
  367. package/Shaders/gpuUpdateParticles.vertex.js +1 -1
  368. package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
  369. package/Shaders/lod.fragment.js +15 -2
  370. package/Shaders/lod.fragment.js.map +1 -1
  371. package/Shaders/lod3D.fragment.js +15 -2
  372. package/Shaders/lod3D.fragment.js.map +1 -1
  373. package/Shaders/lodCube.fragment.js +15 -2
  374. package/Shaders/lodCube.fragment.js.map +1 -1
  375. package/Shaders/openpbr.vertex.js +2 -0
  376. package/Shaders/openpbr.vertex.js.map +1 -1
  377. package/Shaders/pbr.fragment.js +12 -1
  378. package/Shaders/pbr.fragment.js.map +1 -1
  379. package/Shaders/pbr.vertex.js +2 -0
  380. package/Shaders/pbr.vertex.js.map +1 -1
  381. package/Shaders/textureMerger.fragment.js +28 -0
  382. package/Shaders/textureMerger.fragment.js.map +1 -1
  383. package/Shaders/textureProcessor.fragment.js +26 -4
  384. package/Shaders/textureProcessor.fragment.js.map +1 -1
  385. package/Shaders/volumetricLightScattering.fragment.js +1 -1
  386. package/Shaders/volumetricLightScattering.fragment.js.map +1 -1
  387. package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
  388. package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
  389. package/ShadersWGSL/ShadersInclude/bumpVertex.js +1 -1
  390. package/ShadersWGSL/ShadersInclude/bumpVertex.js.map +1 -1
  391. package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js +1 -1
  392. package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
  393. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +1 -1
  394. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  395. package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
  396. package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
  397. package/ShadersWGSL/ShadersInclude/lightFragment.js +44 -2
  398. package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
  399. package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js +17 -3
  400. package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js.map +1 -1
  401. package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js +12 -1
  402. package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js.map +1 -1
  403. package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
  404. package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
  405. package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
  406. package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
  407. package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js +9 -0
  408. package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
  409. package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js +1 -1
  410. package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js.map +1 -1
  411. package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
  412. package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
  413. package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js +1 -1
  414. package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js.map +1 -1
  415. package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
  416. package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
  417. package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js +8 -0
  418. package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js.map +1 -1
  419. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  420. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  421. package/ShadersWGSL/ShadersInclude/prePassVertex.js +2 -2
  422. package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
  423. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +1 -1
  424. package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
  425. package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js +3 -1
  426. package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js.map +1 -1
  427. package/ShadersWGSL/ShadersInclude/shadowsVertex.js +16 -0
  428. package/ShadersWGSL/ShadersInclude/shadowsVertex.js.map +1 -1
  429. package/ShadersWGSL/default.fragment.js +4 -4
  430. package/ShadersWGSL/default.fragment.js.map +1 -1
  431. package/ShadersWGSL/default.vertex.js +1 -1
  432. package/ShadersWGSL/default.vertex.js.map +1 -1
  433. package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
  434. package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
  435. package/ShadersWGSL/gpuUpdateParticles.compute.js +1 -1
  436. package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
  437. package/ShadersWGSL/gsSortCount.compute.d.ts +5 -0
  438. package/ShadersWGSL/gsSortCount.compute.js +19 -0
  439. package/ShadersWGSL/gsSortCount.compute.js.map +1 -0
  440. package/ShadersWGSL/gsSortKeys.compute.d.ts +5 -0
  441. package/ShadersWGSL/gsSortKeys.compute.js +49 -0
  442. package/ShadersWGSL/gsSortKeys.compute.js.map +1 -0
  443. package/ShadersWGSL/gsSortOutput.compute.d.ts +5 -0
  444. package/ShadersWGSL/gsSortOutput.compute.js +28 -0
  445. package/ShadersWGSL/gsSortOutput.compute.js.map +1 -0
  446. package/ShadersWGSL/gsSortScanLocal.compute.d.ts +5 -0
  447. package/ShadersWGSL/gsSortScanLocal.compute.js +23 -0
  448. package/ShadersWGSL/gsSortScanLocal.compute.js.map +1 -0
  449. package/ShadersWGSL/gsSortScanSums.compute.d.ts +5 -0
  450. package/ShadersWGSL/gsSortScanSums.compute.js +19 -0
  451. package/ShadersWGSL/gsSortScanSums.compute.js.map +1 -0
  452. package/ShadersWGSL/gsSortScatter.compute.d.ts +5 -0
  453. package/ShadersWGSL/gsSortScatter.compute.js +33 -0
  454. package/ShadersWGSL/gsSortScatter.compute.js.map +1 -0
  455. package/ShadersWGSL/lod.fragment.js +14 -2
  456. package/ShadersWGSL/lod.fragment.js.map +1 -1
  457. package/ShadersWGSL/lod3D.fragment.js +14 -2
  458. package/ShadersWGSL/lod3D.fragment.js.map +1 -1
  459. package/ShadersWGSL/lodCube.fragment.js +14 -2
  460. package/ShadersWGSL/lodCube.fragment.js.map +1 -1
  461. package/ShadersWGSL/openpbr.vertex.js +3 -1
  462. package/ShadersWGSL/openpbr.vertex.js.map +1 -1
  463. package/ShadersWGSL/pbr.fragment.js +11 -0
  464. package/ShadersWGSL/pbr.fragment.js.map +1 -1
  465. package/ShadersWGSL/pbr.vertex.js +3 -1
  466. package/ShadersWGSL/pbr.vertex.js.map +1 -1
  467. package/ShadersWGSL/textureMerger.fragment.js +40 -4
  468. package/ShadersWGSL/textureMerger.fragment.js.map +1 -1
  469. package/ShadersWGSL/textureProcessor.fragment.js +26 -4
  470. package/ShadersWGSL/textureProcessor.fragment.js.map +1 -1
  471. package/Sprites/spriteRenderer.js +15 -5
  472. package/Sprites/spriteRenderer.js.map +1 -1
  473. package/package.json +1 -1
  474. package/scene.pure.d.ts +23 -1
  475. package/scene.pure.js +83 -1
  476. package/scene.pure.js.map +1 -1
@@ -50,6 +50,17 @@ export declare abstract class PBRBaseSimpleMaterial extends PBRBaseMaterial {
50
50
  * Occlusion Texture of the material (adding extra occlusion effects).
51
51
  */
52
52
  accessor occlusionTexture: Nullable<BaseTexture>;
53
+ /**
54
+ * Tangent-space bent normals in linear RGB. Combined with occlusionTexture to
55
+ * directionally occlude environment reflections without changing direct lighting.
56
+ * Uses a spherical-Gaussian approximation of visibility and the specular lobe.
57
+ * Bake the bent normal and cosine-weighted AO with matching occlusion distances.
58
+ * Without occlusionTexture this map has no effect; load it with gammaSpace set to false.
59
+ * The texture's level blends between unoccluded and fully bent-normal-occluded reflections (0..1).
60
+ * WebGL devices without high-precision fragment support use scalar AO instead.
61
+ * @see https://playground.babylonjs.com/#8N2ROI#5
62
+ */
63
+ accessor bentNormalTexture: Nullable<BaseTexture>;
53
64
  /**
54
65
  * Defines the alpha limits in alpha test mode.
55
66
  */
@@ -9,7 +9,7 @@ import { PBRBaseMaterial } from "./pbrBaseMaterial.pure.js";
9
9
  * It is used as the base class for both the specGloss and metalRough conventions.
10
10
  */
11
11
  let PBRBaseSimpleMaterial = (() => {
12
- var _a, _PBRBaseSimpleMaterial_maxSimultaneousLights_accessor_storage, _PBRBaseSimpleMaterial_disableLighting_accessor_storage, _PBRBaseSimpleMaterial_environmentTexture_accessor_storage, _PBRBaseSimpleMaterial_invertNormalMapX_accessor_storage, _PBRBaseSimpleMaterial_invertNormalMapY_accessor_storage, _PBRBaseSimpleMaterial_normalTexture_accessor_storage, _PBRBaseSimpleMaterial_emissiveColor_accessor_storage, _PBRBaseSimpleMaterial_emissiveTexture_accessor_storage, _PBRBaseSimpleMaterial_occlusionStrength_accessor_storage, _PBRBaseSimpleMaterial_occlusionTexture_accessor_storage, _PBRBaseSimpleMaterial_alphaCutOff_accessor_storage, _PBRBaseSimpleMaterial_lightmapTexture_accessor_storage, _PBRBaseSimpleMaterial_useLightmapAsShadowmap_accessor_storage;
12
+ var _a, _PBRBaseSimpleMaterial_maxSimultaneousLights_accessor_storage, _PBRBaseSimpleMaterial_disableLighting_accessor_storage, _PBRBaseSimpleMaterial_environmentTexture_accessor_storage, _PBRBaseSimpleMaterial_invertNormalMapX_accessor_storage, _PBRBaseSimpleMaterial_invertNormalMapY_accessor_storage, _PBRBaseSimpleMaterial_normalTexture_accessor_storage, _PBRBaseSimpleMaterial_emissiveColor_accessor_storage, _PBRBaseSimpleMaterial_emissiveTexture_accessor_storage, _PBRBaseSimpleMaterial_occlusionStrength_accessor_storage, _PBRBaseSimpleMaterial_occlusionTexture_accessor_storage, _PBRBaseSimpleMaterial_bentNormalTexture_accessor_storage, _PBRBaseSimpleMaterial_alphaCutOff_accessor_storage, _PBRBaseSimpleMaterial_lightmapTexture_accessor_storage, _PBRBaseSimpleMaterial_useLightmapAsShadowmap_accessor_storage;
13
13
  let _classSuper = PBRBaseMaterial;
14
14
  let _instanceExtraInitializers = [];
15
15
  let _maxSimultaneousLights_decorators;
@@ -42,6 +42,9 @@ let PBRBaseSimpleMaterial = (() => {
42
42
  let _occlusionTexture_decorators;
43
43
  let _occlusionTexture_initializers = [];
44
44
  let _occlusionTexture_extraInitializers = [];
45
+ let _bentNormalTexture_decorators;
46
+ let _bentNormalTexture_initializers = [];
47
+ let _bentNormalTexture_extraInitializers = [];
45
48
  let _alphaCutOff_decorators;
46
49
  let _alphaCutOff_initializers = [];
47
50
  let _alphaCutOff_extraInitializers = [];
@@ -103,6 +106,18 @@ let PBRBaseSimpleMaterial = (() => {
103
106
  */
104
107
  get occlusionTexture() { return __classPrivateFieldGet(this, _PBRBaseSimpleMaterial_occlusionTexture_accessor_storage, "f"); }
105
108
  set occlusionTexture(value) { __classPrivateFieldSet(this, _PBRBaseSimpleMaterial_occlusionTexture_accessor_storage, value, "f"); }
109
+ /**
110
+ * Tangent-space bent normals in linear RGB. Combined with occlusionTexture to
111
+ * directionally occlude environment reflections without changing direct lighting.
112
+ * Uses a spherical-Gaussian approximation of visibility and the specular lobe.
113
+ * Bake the bent normal and cosine-weighted AO with matching occlusion distances.
114
+ * Without occlusionTexture this map has no effect; load it with gammaSpace set to false.
115
+ * The texture's level blends between unoccluded and fully bent-normal-occluded reflections (0..1).
116
+ * WebGL devices without high-precision fragment support use scalar AO instead.
117
+ * @see https://playground.babylonjs.com/#8N2ROI#5
118
+ */
119
+ get bentNormalTexture() { return __classPrivateFieldGet(this, _PBRBaseSimpleMaterial_bentNormalTexture_accessor_storage, "f"); }
120
+ set bentNormalTexture(value) { __classPrivateFieldSet(this, _PBRBaseSimpleMaterial_bentNormalTexture_accessor_storage, value, "f"); }
106
121
  /**
107
122
  * Defines the alpha limits in alpha test mode.
108
123
  */
@@ -153,7 +168,8 @@ let PBRBaseSimpleMaterial = (() => {
153
168
  _PBRBaseSimpleMaterial_emissiveTexture_accessor_storage.set(this, (__runInitializers(this, _emissiveColor_extraInitializers), __runInitializers(this, _emissiveTexture_initializers, void 0)));
154
169
  _PBRBaseSimpleMaterial_occlusionStrength_accessor_storage.set(this, (__runInitializers(this, _emissiveTexture_extraInitializers), __runInitializers(this, _occlusionStrength_initializers, 1.0)));
155
170
  _PBRBaseSimpleMaterial_occlusionTexture_accessor_storage.set(this, (__runInitializers(this, _occlusionStrength_extraInitializers), __runInitializers(this, _occlusionTexture_initializers, void 0)));
156
- _PBRBaseSimpleMaterial_alphaCutOff_accessor_storage.set(this, (__runInitializers(this, _occlusionTexture_extraInitializers), __runInitializers(this, _alphaCutOff_initializers, void 0)));
171
+ _PBRBaseSimpleMaterial_bentNormalTexture_accessor_storage.set(this, (__runInitializers(this, _occlusionTexture_extraInitializers), __runInitializers(this, _bentNormalTexture_initializers, void 0)));
172
+ _PBRBaseSimpleMaterial_alphaCutOff_accessor_storage.set(this, (__runInitializers(this, _bentNormalTexture_extraInitializers), __runInitializers(this, _alphaCutOff_initializers, void 0)));
157
173
  _PBRBaseSimpleMaterial_lightmapTexture_accessor_storage.set(this, (__runInitializers(this, _alphaCutOff_extraInitializers), __runInitializers(this, _lightmapTexture_initializers, void 0)));
158
174
  _PBRBaseSimpleMaterial_useLightmapAsShadowmap_accessor_storage.set(this, (__runInitializers(this, _lightmapTexture_extraInitializers), __runInitializers(this, _useLightmapAsShadowmap_initializers, false)));
159
175
  __runInitializers(this, _useLightmapAsShadowmap_extraInitializers);
@@ -174,6 +190,7 @@ let PBRBaseSimpleMaterial = (() => {
174
190
  _PBRBaseSimpleMaterial_emissiveTexture_accessor_storage = new WeakMap(),
175
191
  _PBRBaseSimpleMaterial_occlusionStrength_accessor_storage = new WeakMap(),
176
192
  _PBRBaseSimpleMaterial_occlusionTexture_accessor_storage = new WeakMap(),
193
+ _PBRBaseSimpleMaterial_bentNormalTexture_accessor_storage = new WeakMap(),
177
194
  _PBRBaseSimpleMaterial_alphaCutOff_accessor_storage = new WeakMap(),
178
195
  _PBRBaseSimpleMaterial_lightmapTexture_accessor_storage = new WeakMap(),
179
196
  _PBRBaseSimpleMaterial_useLightmapAsShadowmap_accessor_storage = new WeakMap(),
@@ -189,6 +206,7 @@ let PBRBaseSimpleMaterial = (() => {
189
206
  _emissiveTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
190
207
  _occlusionStrength_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty", "_ambientTextureStrength")];
191
208
  _occlusionTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty", "_ambientTexture")];
209
+ _bentNormalTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
192
210
  _alphaCutOff_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty", "_alphaCutOff")];
193
211
  _get_doubleSided_decorators = [serialize()];
194
212
  _lightmapTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty", null)];
@@ -203,6 +221,7 @@ let PBRBaseSimpleMaterial = (() => {
203
221
  __esDecorate(_a, null, _emissiveTexture_decorators, { kind: "accessor", name: "emissiveTexture", static: false, private: false, access: { has: obj => "emissiveTexture" in obj, get: obj => obj.emissiveTexture, set: (obj, value) => { obj.emissiveTexture = value; } }, metadata: _metadata }, _emissiveTexture_initializers, _emissiveTexture_extraInitializers);
204
222
  __esDecorate(_a, null, _occlusionStrength_decorators, { kind: "accessor", name: "occlusionStrength", static: false, private: false, access: { has: obj => "occlusionStrength" in obj, get: obj => obj.occlusionStrength, set: (obj, value) => { obj.occlusionStrength = value; } }, metadata: _metadata }, _occlusionStrength_initializers, _occlusionStrength_extraInitializers);
205
223
  __esDecorate(_a, null, _occlusionTexture_decorators, { kind: "accessor", name: "occlusionTexture", static: false, private: false, access: { has: obj => "occlusionTexture" in obj, get: obj => obj.occlusionTexture, set: (obj, value) => { obj.occlusionTexture = value; } }, metadata: _metadata }, _occlusionTexture_initializers, _occlusionTexture_extraInitializers);
224
+ __esDecorate(_a, null, _bentNormalTexture_decorators, { kind: "accessor", name: "bentNormalTexture", static: false, private: false, access: { has: obj => "bentNormalTexture" in obj, get: obj => obj.bentNormalTexture, set: (obj, value) => { obj.bentNormalTexture = value; } }, metadata: _metadata }, _bentNormalTexture_initializers, _bentNormalTexture_extraInitializers);
206
225
  __esDecorate(_a, null, _alphaCutOff_decorators, { kind: "accessor", name: "alphaCutOff", static: false, private: false, access: { has: obj => "alphaCutOff" in obj, get: obj => obj.alphaCutOff, set: (obj, value) => { obj.alphaCutOff = value; } }, metadata: _metadata }, _alphaCutOff_initializers, _alphaCutOff_extraInitializers);
207
226
  __esDecorate(_a, null, _get_doubleSided_decorators, { kind: "getter", name: "doubleSided", static: false, private: false, access: { has: obj => "doubleSided" in obj, get: obj => obj.doubleSided }, metadata: _metadata }, null, _instanceExtraInitializers);
208
227
  __esDecorate(_a, null, _lightmapTexture_decorators, { kind: "accessor", name: "lightmapTexture", static: false, private: false, access: { has: obj => "lightmapTexture" in obj, get: obj => obj.lightmapTexture, set: (obj, value) => { obj.lightmapTexture = value; } }, metadata: _metadata }, _lightmapTexture_initializers, _lightmapTexture_extraInitializers);
@@ -1 +1 @@
1
- {"version":3,"file":"pbrBaseSimpleMaterial.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/PBR/pbrBaseSimpleMaterial.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3G,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAIzD;;;;;GAKG;IACmB,qBAAqB;;sBAAS,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAA7C,qBAAsB,SAAQ,WAAe;YAC/D;;eAEG;YAGH,IAAgB,qBAAqB,+GAAK;YAA1C,IAAgB,qBAAqB,oHAAK;YAE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,CAAC;uCAMvE,SAAS,EAAE,EACX,gBAAgB,CAAC,kCAAkC,EAAE,cAAc,CAAC;2CAMpE,SAAS,EAAE;2CAmBX,kBAAkB,EAAE,EACpB,gBAAgB,CAAC,kCAAkC,EAAE,IAAI,CAAC;kDAM1D,SAAS,EAAE,EACX,gBAAgB,CAAC,kCAAkC,CAAC;YAtGrD,kNAAgB,qBAAqB,6BAArB,qBAAqB,qHAAK;YAO1C,gMAAgB,eAAe,6BAAf,eAAe,yGAAS;YAOxC,yMAAgB,kBAAkB,6BAAlB,kBAAkB,+GAAwB;YAO1D,mMAAgB,gBAAgB,6BAAhB,gBAAgB,2GAAS;YAOzC,mMAAgB,gBAAgB,6BAAhB,gBAAgB,2GAAS;YAOzC,0LAAgB,aAAa,6BAAb,aAAa,qGAAwB;YAOrD,0LAAgB,aAAa,6BAAb,aAAa,qGAAuB;YAOpD,gMAAgB,eAAe,6BAAf,eAAe,yGAAwB;YAOvD,sMAAgB,iBAAiB,6BAAjB,iBAAiB,6GAAe;YAOhD,mMAAgB,gBAAgB,6BAAhB,gBAAgB,2GAAwB;YAOxD,oLAAgB,WAAW,6BAAX,WAAW,iGAAS;YAMpC,sLAAW,WAAW,6DAErB;YAkBD,gMAAgB,eAAe,6BAAf,eAAe,yGAAwB;YAOvD,qNAAgB,sBAAsB,6BAAtB,sBAAsB,uHAAS;;;;;SA7G7B,qBAAqB","sourcesContent":["import { serialize, serializeAsColor3, expandToProperty, serializeAsTexture } from \"../../Misc/decorators\";\r\nimport { type Scene } from \"../../scene\";\r\nimport { Color3 } from \"../../Maths/math.color.pure\";\r\nimport { PBRBaseMaterial } from \"./pbrBaseMaterial.pure\";\r\nimport { type BaseTexture } from \"../../Materials/Textures/baseTexture\";\r\nimport { type Nullable } from \"../../types\";\r\n\r\n/**\r\n * The Physically based simple base material of BJS.\r\n *\r\n * This enables better naming and convention enforcements on top of the pbrMaterial.\r\n * It is used as the base class for both the specGloss and metalRough conventions.\r\n */\r\nexport abstract class PBRBaseSimpleMaterial extends PBRBaseMaterial {\r\n /**\r\n * Number of Simultaneous lights allowed on the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor maxSimultaneousLights = 4;\r\n\r\n /**\r\n * If sets to true, disables all the lights affecting the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor disableLighting = false;\r\n\r\n /**\r\n * Environment Texture used in the material (this is use for both reflection and environment lighting).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_reflectionTexture\")\r\n public accessor environmentTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * If sets to true, x component of normal map value will invert (x = 1.0 - x).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapX = false;\r\n\r\n /**\r\n * If sets to true, y component of normal map value will invert (y = 1.0 - y).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapY = false;\r\n\r\n /**\r\n * Normal map used in the model.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_bumpTexture\")\r\n public accessor normalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Emissivie color used to self-illuminate the model.\r\n */\r\n @serializeAsColor3(\"emissive\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * Emissivie texture used to self-illuminate the model.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Occlusion Channel Strength.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_ambientTextureStrength\")\r\n public accessor occlusionStrength: number = 1.0;\r\n\r\n /**\r\n * Occlusion Texture of the material (adding extra occlusion effects).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_ambientTexture\")\r\n public accessor occlusionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Defines the alpha limits in alpha test mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_alphaCutOff\")\r\n public accessor alphaCutOff: number;\r\n\r\n /**\r\n * Gets the current double sided mode.\r\n */\r\n @serialize()\r\n public get doubleSided(): boolean {\r\n return this._twoSidedLighting;\r\n }\r\n /**\r\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\r\n */\r\n public set doubleSided(value: boolean) {\r\n if (this._twoSidedLighting === value) {\r\n return;\r\n }\r\n this._twoSidedLighting = value;\r\n this.backFaceCulling = !value;\r\n this._markAllSubMeshesAsTexturesDirty();\r\n }\r\n\r\n /**\r\n * Stores the pre-calculated light information of a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", null)\r\n public accessor lightmapTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * If true, the light map contains occlusion information instead of lighting info.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useLightmapAsShadowmap = false;\r\n\r\n /**\r\n * Instantiates a new PBRMaterial instance.\r\n *\r\n * @param name The material name\r\n * @param scene The scene the material will be use in.\r\n */\r\n constructor(name: string, scene?: Scene) {\r\n super(name, scene);\r\n\r\n this._useAlphaFromAlbedoTexture = true;\r\n this._useAmbientInGrayScale = true;\r\n }\r\n\r\n public override getClassName(): string {\r\n return \"PBRBaseSimpleMaterial\";\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"pbrBaseSimpleMaterial.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/PBR/pbrBaseSimpleMaterial.ts"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AAhB,gBAAgB,2GAAwB;YAcxD,sMAAgB,iBAAiB,6BAAjB,iBAAiB,6GAAwB;YAOzD,oLAAgB,WAAW,6BAAX,WAAW,iGAAS;YAMpC,sLAAW,WAAW,6DAErB;YAkBD,gMAAgB,eAAe,6BAAf,eAAe,yGAAwB;YAOvD,qNAAgB,sBAAsB,6BAAtB,sBAAsB,uHAAS;;;;;SA3H7B,qBAAqB","sourcesContent":["import { serialize, serializeAsColor3, expandToProperty, serializeAsTexture } from \"../../Misc/decorators\";\r\nimport { type Scene } from \"../../scene\";\r\nimport { Color3 } from \"../../Maths/math.color.pure\";\r\nimport { PBRBaseMaterial } from \"./pbrBaseMaterial.pure\";\r\nimport { type BaseTexture } from \"../../Materials/Textures/baseTexture\";\r\nimport { type Nullable } from \"../../types\";\r\n\r\n/**\r\n * The Physically based simple base material of BJS.\r\n *\r\n * This enables better naming and convention enforcements on top of the pbrMaterial.\r\n * It is used as the base class for both the specGloss and metalRough conventions.\r\n */\r\nexport abstract class PBRBaseSimpleMaterial extends PBRBaseMaterial {\r\n /**\r\n * Number of Simultaneous lights allowed on the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor maxSimultaneousLights = 4;\r\n\r\n /**\r\n * If sets to true, disables all the lights affecting the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor disableLighting = false;\r\n\r\n /**\r\n * Environment Texture used in the material (this is use for both reflection and environment lighting).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_reflectionTexture\")\r\n public accessor environmentTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * If sets to true, x component of normal map value will invert (x = 1.0 - x).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapX = false;\r\n\r\n /**\r\n * If sets to true, y component of normal map value will invert (y = 1.0 - y).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapY = false;\r\n\r\n /**\r\n * Normal map used in the model.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_bumpTexture\")\r\n public accessor normalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Emissivie color used to self-illuminate the model.\r\n */\r\n @serializeAsColor3(\"emissive\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * Emissivie texture used to self-illuminate the model.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Occlusion Channel Strength.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_ambientTextureStrength\")\r\n public accessor occlusionStrength: number = 1.0;\r\n\r\n /**\r\n * Occlusion Texture of the material (adding extra occlusion effects).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_ambientTexture\")\r\n public accessor occlusionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Tangent-space bent normals in linear RGB. Combined with occlusionTexture to\r\n * directionally occlude environment reflections without changing direct lighting.\r\n * Uses a spherical-Gaussian approximation of visibility and the specular lobe.\r\n * Bake the bent normal and cosine-weighted AO with matching occlusion distances.\r\n * Without occlusionTexture this map has no effect; load it with gammaSpace set to false.\r\n * The texture's level blends between unoccluded and fully bent-normal-occluded reflections (0..1).\r\n * WebGL devices without high-precision fragment support use scalar AO instead.\r\n * @see https://playground.babylonjs.com/#8N2ROI#5\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor bentNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Defines the alpha limits in alpha test mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", \"_alphaCutOff\")\r\n public accessor alphaCutOff: number;\r\n\r\n /**\r\n * Gets the current double sided mode.\r\n */\r\n @serialize()\r\n public get doubleSided(): boolean {\r\n return this._twoSidedLighting;\r\n }\r\n /**\r\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\r\n */\r\n public set doubleSided(value: boolean) {\r\n if (this._twoSidedLighting === value) {\r\n return;\r\n }\r\n this._twoSidedLighting = value;\r\n this.backFaceCulling = !value;\r\n this._markAllSubMeshesAsTexturesDirty();\r\n }\r\n\r\n /**\r\n * Stores the pre-calculated light information of a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", null)\r\n public accessor lightmapTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * If true, the light map contains occlusion information instead of lighting info.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useLightmapAsShadowmap = false;\r\n\r\n /**\r\n * Instantiates a new PBRMaterial instance.\r\n *\r\n * @param name The material name\r\n * @param scene The scene the material will be use in.\r\n */\r\n constructor(name: string, scene?: Scene) {\r\n super(name, scene);\r\n\r\n this._useAlphaFromAlbedoTexture = true;\r\n this._useAmbientInGrayScale = true;\r\n }\r\n\r\n public override getClassName(): string {\r\n return \"PBRBaseSimpleMaterial\";\r\n }\r\n}\r\n"]}
@@ -74,6 +74,18 @@ export declare class PBRMaterial extends PBRBaseMaterial {
74
74
  * AKA Occlusion Texture in other nomenclature.
75
75
  */
76
76
  accessor ambientTexture: Nullable<BaseTexture>;
77
+ /**
78
+ * Tangent-space bent normals in linear RGB, used with ambientTexture (or metallic texture AO)
79
+ * to directionally occlude environment reflections using a spherical-Gaussian approximation
80
+ * of visibility and the specular lobe.
81
+ * Bake the bent normal and cosine-weighted AO with matching occlusion distances.
82
+ * Without an AO texture the map has no effect; direct lighting and diffuse AO are unchanged.
83
+ * Set gammaSpace to false when loading a bent normal texture.
84
+ * The texture's level blends between unoccluded and fully bent-normal-occluded reflections (0..1).
85
+ * WebGL devices without high-precision fragment support use scalar AO instead.
86
+ * @see https://playground.babylonjs.com/#8N2ROI#5
87
+ */
88
+ accessor bentNormalTexture: Nullable<BaseTexture>;
77
89
  /**
78
90
  * AKA Occlusion Texture Intensity in other nomenclature.
79
91
  */
@@ -16,7 +16,7 @@ import { RegisterClass } from "../../Misc/typeStore.js";
16
16
  * https://doc.babylonjs.com/features/featuresDeepDive/materials/using/introToPBR
17
17
  */
18
18
  let PBRMaterial = (() => {
19
- var _a, _PBRMaterial_directIntensity_accessor_storage, _PBRMaterial_emissiveIntensity_accessor_storage, _PBRMaterial_environmentIntensity_accessor_storage, _PBRMaterial_specularIntensity_accessor_storage, _PBRMaterial_disableBumpMap_accessor_storage, _PBRMaterial_albedoTexture_accessor_storage, _PBRMaterial_baseWeightTexture_accessor_storage, _PBRMaterial_baseDiffuseRoughnessTexture_accessor_storage, _PBRMaterial_ambientTexture_accessor_storage, _PBRMaterial_ambientTextureStrength_accessor_storage, _PBRMaterial_ambientTextureImpactOnAnalyticalLights_accessor_storage, _PBRMaterial_opacityTexture_accessor_storage, _PBRMaterial_reflectionTexture_accessor_storage, _PBRMaterial_emissiveTexture_accessor_storage, _PBRMaterial_reflectivityTexture_accessor_storage, _PBRMaterial_metallicTexture_accessor_storage, _PBRMaterial_metallic_accessor_storage, _PBRMaterial_roughness_accessor_storage, _PBRMaterial_metallicF0Factor_accessor_storage, _PBRMaterial_metallicReflectanceColor_accessor_storage, _PBRMaterial_useOnlyMetallicFromMetallicReflectanceTexture_accessor_storage, _PBRMaterial_metallicReflectanceTexture_accessor_storage, _PBRMaterial_reflectanceTexture_accessor_storage, _PBRMaterial_microSurfaceTexture_accessor_storage, _PBRMaterial_bumpTexture_accessor_storage, _PBRMaterial_lightmapTexture_accessor_storage, _PBRMaterial_ambientColor_accessor_storage, _PBRMaterial_albedoColor_accessor_storage, _PBRMaterial_baseWeight_accessor_storage, _PBRMaterial_baseDiffuseRoughness_accessor_storage, _PBRMaterial_reflectivityColor_accessor_storage, _PBRMaterial_reflectionColor_accessor_storage, _PBRMaterial_emissiveColor_accessor_storage, _PBRMaterial_microSurface_accessor_storage, _PBRMaterial_useLightmapAsShadowmap_accessor_storage, _PBRMaterial_useAlphaFromAlbedoTexture_accessor_storage, _PBRMaterial_forceAlphaTest_accessor_storage, _PBRMaterial_alphaCutOff_accessor_storage, _PBRMaterial_useSpecularOverAlpha_accessor_storage, _PBRMaterial_useMicroSurfaceFromReflectivityMapAlpha_accessor_storage, _PBRMaterial_useRoughnessFromMetallicTextureAlpha_accessor_storage, _PBRMaterial_useRoughnessFromMetallicTextureGreen_accessor_storage, _PBRMaterial_useMetallnessFromMetallicTextureBlue_accessor_storage, _PBRMaterial_useAmbientOcclusionFromMetallicTextureRed_accessor_storage, _PBRMaterial_useAmbientInGrayScale_accessor_storage, _PBRMaterial_useAutoMicroSurfaceFromReflectivityMap_accessor_storage, _PBRMaterial_useRadianceOverAlpha_accessor_storage, _PBRMaterial_useObjectSpaceNormalMap_accessor_storage, _PBRMaterial_useParallax_accessor_storage, _PBRMaterial_useParallaxOcclusion_accessor_storage, _PBRMaterial_parallaxScaleBias_accessor_storage, _PBRMaterial_disableLighting_accessor_storage, _PBRMaterial_forceIrradianceInFragment_accessor_storage, _PBRMaterial_maxSimultaneousLights_accessor_storage, _PBRMaterial_invertNormalMapX_accessor_storage, _PBRMaterial_invertNormalMapY_accessor_storage, _PBRMaterial_twoSidedLighting_accessor_storage, _PBRMaterial_useAlphaFresnel_accessor_storage, _PBRMaterial_useLinearAlphaFresnel_accessor_storage, _PBRMaterial_environmentBRDFTexture_accessor_storage, _PBRMaterial_forceNormalForward_accessor_storage, _PBRMaterial_enableSpecularAntiAliasing_accessor_storage, _PBRMaterial_useHorizonOcclusion_accessor_storage, _PBRMaterial_useRadianceOcclusion_accessor_storage, _PBRMaterial_unlit_accessor_storage, _PBRMaterial_applyDecalMapAfterDetailMap_accessor_storage;
19
+ var _a, _PBRMaterial_directIntensity_accessor_storage, _PBRMaterial_emissiveIntensity_accessor_storage, _PBRMaterial_environmentIntensity_accessor_storage, _PBRMaterial_specularIntensity_accessor_storage, _PBRMaterial_disableBumpMap_accessor_storage, _PBRMaterial_albedoTexture_accessor_storage, _PBRMaterial_baseWeightTexture_accessor_storage, _PBRMaterial_baseDiffuseRoughnessTexture_accessor_storage, _PBRMaterial_ambientTexture_accessor_storage, _PBRMaterial_bentNormalTexture_accessor_storage, _PBRMaterial_ambientTextureStrength_accessor_storage, _PBRMaterial_ambientTextureImpactOnAnalyticalLights_accessor_storage, _PBRMaterial_opacityTexture_accessor_storage, _PBRMaterial_reflectionTexture_accessor_storage, _PBRMaterial_emissiveTexture_accessor_storage, _PBRMaterial_reflectivityTexture_accessor_storage, _PBRMaterial_metallicTexture_accessor_storage, _PBRMaterial_metallic_accessor_storage, _PBRMaterial_roughness_accessor_storage, _PBRMaterial_metallicF0Factor_accessor_storage, _PBRMaterial_metallicReflectanceColor_accessor_storage, _PBRMaterial_useOnlyMetallicFromMetallicReflectanceTexture_accessor_storage, _PBRMaterial_metallicReflectanceTexture_accessor_storage, _PBRMaterial_reflectanceTexture_accessor_storage, _PBRMaterial_microSurfaceTexture_accessor_storage, _PBRMaterial_bumpTexture_accessor_storage, _PBRMaterial_lightmapTexture_accessor_storage, _PBRMaterial_ambientColor_accessor_storage, _PBRMaterial_albedoColor_accessor_storage, _PBRMaterial_baseWeight_accessor_storage, _PBRMaterial_baseDiffuseRoughness_accessor_storage, _PBRMaterial_reflectivityColor_accessor_storage, _PBRMaterial_reflectionColor_accessor_storage, _PBRMaterial_emissiveColor_accessor_storage, _PBRMaterial_microSurface_accessor_storage, _PBRMaterial_useLightmapAsShadowmap_accessor_storage, _PBRMaterial_useAlphaFromAlbedoTexture_accessor_storage, _PBRMaterial_forceAlphaTest_accessor_storage, _PBRMaterial_alphaCutOff_accessor_storage, _PBRMaterial_useSpecularOverAlpha_accessor_storage, _PBRMaterial_useMicroSurfaceFromReflectivityMapAlpha_accessor_storage, _PBRMaterial_useRoughnessFromMetallicTextureAlpha_accessor_storage, _PBRMaterial_useRoughnessFromMetallicTextureGreen_accessor_storage, _PBRMaterial_useMetallnessFromMetallicTextureBlue_accessor_storage, _PBRMaterial_useAmbientOcclusionFromMetallicTextureRed_accessor_storage, _PBRMaterial_useAmbientInGrayScale_accessor_storage, _PBRMaterial_useAutoMicroSurfaceFromReflectivityMap_accessor_storage, _PBRMaterial_useRadianceOverAlpha_accessor_storage, _PBRMaterial_useObjectSpaceNormalMap_accessor_storage, _PBRMaterial_useParallax_accessor_storage, _PBRMaterial_useParallaxOcclusion_accessor_storage, _PBRMaterial_parallaxScaleBias_accessor_storage, _PBRMaterial_disableLighting_accessor_storage, _PBRMaterial_forceIrradianceInFragment_accessor_storage, _PBRMaterial_maxSimultaneousLights_accessor_storage, _PBRMaterial_invertNormalMapX_accessor_storage, _PBRMaterial_invertNormalMapY_accessor_storage, _PBRMaterial_twoSidedLighting_accessor_storage, _PBRMaterial_useAlphaFresnel_accessor_storage, _PBRMaterial_useLinearAlphaFresnel_accessor_storage, _PBRMaterial_environmentBRDFTexture_accessor_storage, _PBRMaterial_forceNormalForward_accessor_storage, _PBRMaterial_enableSpecularAntiAliasing_accessor_storage, _PBRMaterial_useHorizonOcclusion_accessor_storage, _PBRMaterial_useRadianceOcclusion_accessor_storage, _PBRMaterial_unlit_accessor_storage, _PBRMaterial_applyDecalMapAfterDetailMap_accessor_storage;
20
20
  let _classSuper = PBRBaseMaterial;
21
21
  let _instanceExtraInitializers = [];
22
22
  let _directIntensity_decorators;
@@ -46,6 +46,9 @@ let PBRMaterial = (() => {
46
46
  let _ambientTexture_decorators;
47
47
  let _ambientTexture_initializers = [];
48
48
  let _ambientTexture_extraInitializers = [];
49
+ let _bentNormalTexture_decorators;
50
+ let _bentNormalTexture_initializers = [];
51
+ let _bentNormalTexture_extraInitializers = [];
49
52
  let _ambientTextureStrength_decorators;
50
53
  let _ambientTextureStrength_initializers = [];
51
54
  let _ambientTextureStrength_extraInitializers = [];
@@ -269,6 +272,19 @@ let PBRMaterial = (() => {
269
272
  */
270
273
  get ambientTexture() { return __classPrivateFieldGet(this, _PBRMaterial_ambientTexture_accessor_storage, "f"); }
271
274
  set ambientTexture(value) { __classPrivateFieldSet(this, _PBRMaterial_ambientTexture_accessor_storage, value, "f"); }
275
+ /**
276
+ * Tangent-space bent normals in linear RGB, used with ambientTexture (or metallic texture AO)
277
+ * to directionally occlude environment reflections using a spherical-Gaussian approximation
278
+ * of visibility and the specular lobe.
279
+ * Bake the bent normal and cosine-weighted AO with matching occlusion distances.
280
+ * Without an AO texture the map has no effect; direct lighting and diffuse AO are unchanged.
281
+ * Set gammaSpace to false when loading a bent normal texture.
282
+ * The texture's level blends between unoccluded and fully bent-normal-occluded reflections (0..1).
283
+ * WebGL devices without high-precision fragment support use scalar AO instead.
284
+ * @see https://playground.babylonjs.com/#8N2ROI#5
285
+ */
286
+ get bentNormalTexture() { return __classPrivateFieldGet(this, _PBRMaterial_bentNormalTexture_accessor_storage, "f"); }
287
+ set bentNormalTexture(value) { __classPrivateFieldSet(this, _PBRMaterial_bentNormalTexture_accessor_storage, value, "f"); }
272
288
  /**
273
289
  * AKA Occlusion Texture Intensity in other nomenclature.
274
290
  */
@@ -709,7 +725,8 @@ let PBRMaterial = (() => {
709
725
  _PBRMaterial_baseWeightTexture_accessor_storage.set(this, (__runInitializers(this, _albedoTexture_extraInitializers), __runInitializers(this, _baseWeightTexture_initializers, void 0)));
710
726
  _PBRMaterial_baseDiffuseRoughnessTexture_accessor_storage.set(this, (__runInitializers(this, _baseWeightTexture_extraInitializers), __runInitializers(this, _baseDiffuseRoughnessTexture_initializers, void 0)));
711
727
  _PBRMaterial_ambientTexture_accessor_storage.set(this, (__runInitializers(this, _baseDiffuseRoughnessTexture_extraInitializers), __runInitializers(this, _ambientTexture_initializers, void 0)));
712
- _PBRMaterial_ambientTextureStrength_accessor_storage.set(this, (__runInitializers(this, _ambientTexture_extraInitializers), __runInitializers(this, _ambientTextureStrength_initializers, 1.0)));
728
+ _PBRMaterial_bentNormalTexture_accessor_storage.set(this, (__runInitializers(this, _ambientTexture_extraInitializers), __runInitializers(this, _bentNormalTexture_initializers, void 0)));
729
+ _PBRMaterial_ambientTextureStrength_accessor_storage.set(this, (__runInitializers(this, _bentNormalTexture_extraInitializers), __runInitializers(this, _ambientTextureStrength_initializers, 1.0)));
713
730
  _PBRMaterial_ambientTextureImpactOnAnalyticalLights_accessor_storage.set(this, (__runInitializers(this, _ambientTextureStrength_extraInitializers), __runInitializers(this, _ambientTextureImpactOnAnalyticalLights_initializers, _a.DEFAULT_AO_ON_ANALYTICAL_LIGHTS)));
714
731
  _PBRMaterial_opacityTexture_accessor_storage.set(this, (__runInitializers(this, _ambientTextureImpactOnAnalyticalLights_extraInitializers), __runInitializers(this, _opacityTexture_initializers, void 0)));
715
732
  _PBRMaterial_reflectionTexture_accessor_storage.set(this, (__runInitializers(this, _opacityTexture_extraInitializers), __runInitializers(this, _reflectionTexture_initializers, void 0)));
@@ -844,6 +861,7 @@ let PBRMaterial = (() => {
844
861
  _PBRMaterial_baseWeightTexture_accessor_storage = new WeakMap(),
845
862
  _PBRMaterial_baseDiffuseRoughnessTexture_accessor_storage = new WeakMap(),
846
863
  _PBRMaterial_ambientTexture_accessor_storage = new WeakMap(),
864
+ _PBRMaterial_bentNormalTexture_accessor_storage = new WeakMap(),
847
865
  _PBRMaterial_ambientTextureStrength_accessor_storage = new WeakMap(),
848
866
  _PBRMaterial_ambientTextureImpactOnAnalyticalLights_accessor_storage = new WeakMap(),
849
867
  _PBRMaterial_opacityTexture_accessor_storage = new WeakMap(),
@@ -912,6 +930,7 @@ let PBRMaterial = (() => {
912
930
  _baseWeightTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
913
931
  _baseDiffuseRoughnessTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
914
932
  _ambientTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
933
+ _bentNormalTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
915
934
  _ambientTextureStrength_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
916
935
  _ambientTextureImpactOnAnalyticalLights_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
917
936
  _opacityTexture_decorators = [serializeAsTexture(), expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")];
@@ -969,7 +988,7 @@ let PBRMaterial = (() => {
969
988
  _enableSpecularAntiAliasing_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
970
989
  _useHorizonOcclusion_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
971
990
  _useRadianceOcclusion_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
972
- _unlit_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsMiscDirty")];
991
+ _unlit_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")];
973
992
  _applyDecalMapAfterDetailMap_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsMiscDirty")];
974
993
  __esDecorate(_a, null, _directIntensity_decorators, { kind: "accessor", name: "directIntensity", static: false, private: false, access: { has: obj => "directIntensity" in obj, get: obj => obj.directIntensity, set: (obj, value) => { obj.directIntensity = value; } }, metadata: _metadata }, _directIntensity_initializers, _directIntensity_extraInitializers);
975
994
  __esDecorate(_a, null, _emissiveIntensity_decorators, { kind: "accessor", name: "emissiveIntensity", static: false, private: false, access: { has: obj => "emissiveIntensity" in obj, get: obj => obj.emissiveIntensity, set: (obj, value) => { obj.emissiveIntensity = value; } }, metadata: _metadata }, _emissiveIntensity_initializers, _emissiveIntensity_extraInitializers);
@@ -980,6 +999,7 @@ let PBRMaterial = (() => {
980
999
  __esDecorate(_a, null, _baseWeightTexture_decorators, { kind: "accessor", name: "baseWeightTexture", static: false, private: false, access: { has: obj => "baseWeightTexture" in obj, get: obj => obj.baseWeightTexture, set: (obj, value) => { obj.baseWeightTexture = value; } }, metadata: _metadata }, _baseWeightTexture_initializers, _baseWeightTexture_extraInitializers);
981
1000
  __esDecorate(_a, null, _baseDiffuseRoughnessTexture_decorators, { kind: "accessor", name: "baseDiffuseRoughnessTexture", static: false, private: false, access: { has: obj => "baseDiffuseRoughnessTexture" in obj, get: obj => obj.baseDiffuseRoughnessTexture, set: (obj, value) => { obj.baseDiffuseRoughnessTexture = value; } }, metadata: _metadata }, _baseDiffuseRoughnessTexture_initializers, _baseDiffuseRoughnessTexture_extraInitializers);
982
1001
  __esDecorate(_a, null, _ambientTexture_decorators, { kind: "accessor", name: "ambientTexture", static: false, private: false, access: { has: obj => "ambientTexture" in obj, get: obj => obj.ambientTexture, set: (obj, value) => { obj.ambientTexture = value; } }, metadata: _metadata }, _ambientTexture_initializers, _ambientTexture_extraInitializers);
1002
+ __esDecorate(_a, null, _bentNormalTexture_decorators, { kind: "accessor", name: "bentNormalTexture", static: false, private: false, access: { has: obj => "bentNormalTexture" in obj, get: obj => obj.bentNormalTexture, set: (obj, value) => { obj.bentNormalTexture = value; } }, metadata: _metadata }, _bentNormalTexture_initializers, _bentNormalTexture_extraInitializers);
983
1003
  __esDecorate(_a, null, _ambientTextureStrength_decorators, { kind: "accessor", name: "ambientTextureStrength", static: false, private: false, access: { has: obj => "ambientTextureStrength" in obj, get: obj => obj.ambientTextureStrength, set: (obj, value) => { obj.ambientTextureStrength = value; } }, metadata: _metadata }, _ambientTextureStrength_initializers, _ambientTextureStrength_extraInitializers);
984
1004
  __esDecorate(_a, null, _ambientTextureImpactOnAnalyticalLights_decorators, { kind: "accessor", name: "ambientTextureImpactOnAnalyticalLights", static: false, private: false, access: { has: obj => "ambientTextureImpactOnAnalyticalLights" in obj, get: obj => obj.ambientTextureImpactOnAnalyticalLights, set: (obj, value) => { obj.ambientTextureImpactOnAnalyticalLights = value; } }, metadata: _metadata }, _ambientTextureImpactOnAnalyticalLights_initializers, _ambientTextureImpactOnAnalyticalLights_extraInitializers);
985
1005
  __esDecorate(_a, null, _opacityTexture_decorators, { kind: "accessor", name: "opacityTexture", static: false, private: false, access: { has: obj => "opacityTexture" in obj, get: obj => obj.opacityTexture, set: (obj, value) => { obj.opacityTexture = value; } }, metadata: _metadata }, _opacityTexture_initializers, _opacityTexture_extraInitializers);
@@ -1 +1 @@
1
- {"version":3,"file":"pbrMaterial.pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/PBR/pbrMaterial.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD;;;;;;GAMG;IACU,WAAW;;sBAAS,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BAAkB,GAAG,eAAe,CAAC,kBAAmB;QAExF;;WAEG;QAC6B,wBAAqB,GAAG,eAAe,CAAC,qBAAsB;QAE9F;;WAEG;QAC6B,yBAAsB,GAAG,eAAe,CAAC,sBAAuB;QAEhG;;;WAGG;QAC6B,gCAA6B,GAAG,eAAe,CAAC,6BAA8B;QAE9G;;;WAGG;QACoB,kCAA+B,GAAG,eAAe,CAAC,+BAAgC;;;SA1BhG,WAAW;AA2tBxB,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IAC/B,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,uHAAuH;IACvH,oCAAoC,EAAE,CAAC;IAEvC,aAAa,CAAC,qBAAqB,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IAC/B,mBAAmB,EAAE,CAAC;AAC1B,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, serializeAsColor3, expandToProperty, serializeAsTexture } from \"../../Misc/decorators\";\r\nimport { GetEnvironmentBRDFTexture } from \"../../Misc/brdfTextureTools\";\r\nimport { type Nullable } from \"../../types\";\r\nimport { type Scene } from \"../../scene.pure\";\r\nimport { Color3 } from \"../../Maths/math.color.pure\";\r\nimport { type BaseTexture } from \"../../Materials/Textures/baseTexture.pure\";\r\nimport { PBRBaseMaterial } from \"./pbrBaseMaterial.pure\";\r\nimport { RegisterImageProcessingConfiguration } from \"../imageProcessingConfiguration.pure\";\r\nimport { Material } from \"../material.pure\";\r\nimport { SerializationHelper } from \"../../Misc/decorators.serialization\";\r\nimport { RegisterClass } from \"../../Misc/typeStore\";\r\n\r\n/**\r\n * The Physically based material of BJS.\r\n *\r\n * This offers the main features of a standard PBR material.\r\n * For more information, please refer to the documentation :\r\n * https://doc.babylonjs.com/features/featuresDeepDive/materials/using/introToPBR\r\n */\r\nexport class PBRMaterial extends PBRBaseMaterial {\r\n /**\r\n * PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.\r\n */\r\n public static override readonly PBRMATERIAL_OPAQUE = PBRBaseMaterial.PBRMATERIAL_OPAQUE;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATEST = PBRBaseMaterial.PBRMATERIAL_ALPHATEST;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHABLEND = PBRBaseMaterial.PBRMATERIAL_ALPHABLEND;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n * They are also discarded below the alpha cutoff threshold to improve performances.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATESTANDBLEND = PBRBaseMaterial.PBRMATERIAL_ALPHATESTANDBLEND;\r\n\r\n /**\r\n * Defines the default value of how much AO map is occluding the analytical lights\r\n * (point spot...).\r\n */\r\n public static override DEFAULT_AO_ON_ANALYTICAL_LIGHTS = PBRBaseMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Intensity of the direct lights e.g. the four lights available in your scene.\r\n * This impacts both the direct diffuse and specular highlights.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor directIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the emissive part of the material.\r\n * This helps controlling the emissive effect without modifying the emissive color.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the environment e.g. how much the environment will light the object\r\n * either through harmonics for rough material or through the reflection for shiny ones.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor environmentIntensity: number = 1.0;\r\n\r\n /**\r\n * This is a special control allowing the reduction of the specular highlights coming from the\r\n * four lights of the scene. Those highlights may not be needed in full environment lighting.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor specularIntensity: number = 1.0;\r\n\r\n /**\r\n * Debug Control allowing disabling the bump map on this material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor disableBumpMap: boolean = false;\r\n\r\n /**\r\n * AKA Diffuse Texture in standard nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor albedoTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Weight texture (multiplier to the diffuse and metal lobes).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness texture (roughness of the diffuse lobe).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseDiffuseRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture Intensity in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientTextureStrength: number = 1.0;\r\n\r\n /**\r\n * Defines how much the AO map is occluding the analytical lights (point spot...).\r\n * 1 means it completely occludes it\r\n * 0 mean it has no impact\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientTextureImpactOnAnalyticalLights: number = PBRMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Stores the alpha values in a texture. Use luminance if texture.getAlphaFromRGB is true.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor opacityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the reflection values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the emissive values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Specular texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectivityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to switch from specular/glossiness to metallic/roughness workflow.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Specifies the metallic scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the metalness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallic: Nullable<number>;\r\n\r\n /**\r\n * Specifies the roughness scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the roughness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor roughness: Nullable<number>;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 factor to help configuring the material F0.\r\n * By default the indexOfrefraction is used to compute F0;\r\n *\r\n * This is used as a factor against the default reflectance at normal incidence to tweak it.\r\n *\r\n * F0 = defaultF0 * metallicF0Factor * metallicReflectanceColor;\r\n * F90 = metallicReflectanceColor;\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicF0Factor = 1;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 color.\r\n * By default the F90 is always 1;\r\n *\r\n * Please note that this factor is also used as a factor against the default reflectance at normal incidence.\r\n *\r\n * F0 = defaultF0_from_IOR * metallicF0Factor * metallicReflectanceColor\r\n * F90 = metallicF0Factor;\r\n */\r\n @serializeAsColor3()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicReflectanceColor = Color3.White();\r\n\r\n /**\r\n * Specifies that only the A channel from metallicReflectanceTexture should be used.\r\n * If false, both RGB and A channels will be used\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useOnlyMetallicFromMetallicReflectanceTexture = false;\r\n\r\n /**\r\n * Defines to store metallicReflectanceColor in RGB and metallicF0Factor in A\r\n * This is multiplied against the scalar values defined in the material.\r\n * If useOnlyMetallicFromMetallicReflectanceTexture is true, don't use the RGB channels, only A\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicReflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Defines to store reflectanceColor in RGB\r\n * This is multiplied against the scalar values defined in the material.\r\n * If both reflectanceTexture and metallicReflectanceTexture textures are provided and useOnlyMetallicFromMetallicReflectanceTexture\r\n * is false, metallicReflectanceTexture takes priority and reflectanceTexture is not used\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to enable roughness/glossiness fetch from a separate channel depending on the current mode.\r\n * Gray Scale represents roughness in metallic mode and glossiness in specular mode.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor microSurfaceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores surface normal data used to displace a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor bumpTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the pre-calculated light information of a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", null)\r\n public accessor lightmapTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the refracted light information in a texture.\r\n */\r\n public get refractionTexture(): Nullable<BaseTexture> {\r\n return this.subSurface.refractionTexture;\r\n }\r\n public set refractionTexture(value: Nullable<BaseTexture>) {\r\n this.subSurface.refractionTexture = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n } else if (!this.subSurface.linkRefractionWithTransparency) {\r\n this.subSurface.isRefractionEnabled = false;\r\n }\r\n }\r\n\r\n /**\r\n * The color of a material in ambient lighting.\r\n */\r\n @serializeAsColor3(\"ambient\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Diffuse Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"albedo\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor albedoColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * OpenPBR Base Weight (multiplier to the diffuse and metal lobes).\r\n */\r\n @serialize(\"baseWeight\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseWeight = 1;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness (roughness of the diffuse lobe).\r\n */\r\n @serialize(\"baseDiffuseRoughness\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseDiffuseRoughness: Nullable<number>;\r\n\r\n /**\r\n * AKA Specular Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"reflectivity\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectivityColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * The color reflected from the material.\r\n */\r\n @serializeAsColor3(\"reflection\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectionColor = new Color3(1.0, 1.0, 1.0);\r\n\r\n /**\r\n * The color emitted from the material.\r\n */\r\n @serializeAsColor3(\"emissive\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Glossiness in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor microSurface = 1.0;\r\n\r\n /**\r\n * Index of refraction of the material base layer.\r\n * https://en.wikipedia.org/wiki/List_of_refractive_indices\r\n *\r\n * This does not only impact refraction but also the Base F0 of Dielectric Materials.\r\n *\r\n * From dielectric fresnel rules: F0 = square((iorT - iorI) / (iorT + iorI))\r\n */\r\n public get indexOfRefraction(): number {\r\n return this.subSurface.indexOfRefraction;\r\n }\r\n public set indexOfRefraction(value: number) {\r\n this.subSurface.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.\r\n */\r\n public get invertRefractionY(): boolean {\r\n return this.subSurface.invertRefractionY;\r\n }\r\n public set invertRefractionY(value: boolean) {\r\n this.subSurface.invertRefractionY = value;\r\n }\r\n\r\n /**\r\n * This parameters will make the material used its opacity to control how much it is refracting against not.\r\n * Materials half opaque for instance using refraction could benefit from this control.\r\n */\r\n public get linkRefractionWithTransparency(): boolean {\r\n return this.subSurface.linkRefractionWithTransparency;\r\n }\r\n public set linkRefractionWithTransparency(value: boolean) {\r\n this.subSurface.linkRefractionWithTransparency = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n }\r\n }\r\n\r\n /**\r\n * If true, the light map contains occlusion information instead of lighting info.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useLightmapAsShadowmap = false;\r\n\r\n /**\r\n * Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor useAlphaFromAlbedoTexture = false;\r\n\r\n /**\r\n * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor forceAlphaTest = false;\r\n\r\n /**\r\n * Defines the alpha limits in alpha test mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor alphaCutOff = 0.4;\r\n\r\n /**\r\n * Specifies that the material will keep the specular highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When sun reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useSpecularOverAlpha = true;\r\n\r\n /**\r\n * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useMicroSurfaceFromReflectivityMapAlpha = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRoughnessFromMetallicTextureAlpha = true;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its green channel.\r\n * Needs useRoughnessFromMetallicTextureAlpha to be false.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRoughnessFromMetallicTextureGreen = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the metallness information in its blue channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useMetallnessFromMetallicTextureBlue = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the ambient occlusion information in its red channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAmbientOcclusionFromMetallicTextureRed = false;\r\n\r\n /**\r\n * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAmbientInGrayScale = false;\r\n\r\n /**\r\n * In case the reflectivity map does not contain the microsurface information in its alpha channel,\r\n * The material will try to infer what glossiness each pixel should be.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAutoMicroSurfaceFromReflectivityMap = false;\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n @serialize()\r\n public get usePhysicalLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n }\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n public set usePhysicalLightFalloff(value: boolean) {\r\n if (value !== this.usePhysicalLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n @serialize()\r\n public get useGLTFLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n public set useGLTFLightFalloff(value: boolean) {\r\n if (value !== this.useGLTFLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When the street lights reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRadianceOverAlpha = true;\r\n\r\n /**\r\n * Allows using an object space normal map (instead of tangent space).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useObjectSpaceNormalMap = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useParallax = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax occlusion mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useParallaxOcclusion = false;\r\n\r\n /**\r\n * Controls the scale bias of the parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor parallaxScaleBias = 0.05;\r\n\r\n /**\r\n * If sets to true, disables all the lights affecting the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor disableLighting = false;\r\n\r\n /**\r\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor forceIrradianceInFragment = false;\r\n\r\n /**\r\n * Number of Simultaneous lights allowed on the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor maxSimultaneousLights = 4;\r\n\r\n /**\r\n * If sets to true, x component of normal map value will invert (x = 1.0 - x).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapX = false;\r\n\r\n /**\r\n * If sets to true, y component of normal map value will invert (y = 1.0 - y).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapY = false;\r\n\r\n /**\r\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor twoSidedLighting = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAlphaFresnel = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useLinearAlphaFresnel = false;\r\n\r\n /**\r\n * Let user defines the brdf lookup texture used for IBL.\r\n * A default 8bit version is embedded but you could point at :\r\n * * Default texture: https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png\r\n * * Default 16bit pixel depth texture: https://assets.babylonjs.com/environments/correlatedMSBRDF.dds\r\n * * LEGACY Default None correlated https://assets.babylonjs.com/environments/uncorrelatedBRDF_RGBD.png\r\n * * LEGACY Default None correlated 16bit pixel depth https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds\r\n */\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor environmentBRDFTexture: Nullable<BaseTexture> = null;\r\n\r\n /**\r\n * Force normal to face away from face.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor forceNormalForward = false;\r\n\r\n /**\r\n * Enables specular anti aliasing in the PBR shader.\r\n * It will both interacts on the Geometry for analytical and IBL lighting.\r\n * It also prefilter the roughness map based on the bump values.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor enableSpecularAntiAliasing = false;\r\n\r\n /**\r\n * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal\r\n * makes the reflect vector face the model (under horizon).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useHorizonOcclusion = true;\r\n\r\n /**\r\n * This parameters will enable/disable radiance occlusion by preventing the radiance to lit\r\n * too much the area relying on ambient texture to define their ambient occlusion.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRadianceOcclusion = true;\r\n\r\n /**\r\n * If set to true, no lighting calculations will be applied.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\r\n public accessor unlit = false;\r\n\r\n /**\r\n * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\r\n public accessor applyDecalMapAfterDetailMap = false;\r\n\r\n /**\r\n * Instantiates a new PBRMaterial instance.\r\n *\r\n * @param name The material name\r\n * @param scene The scene the material will be use in.\r\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\r\n */\r\n constructor(name: string, scene?: Scene, forceGLSL = false) {\r\n super(name, scene, forceGLSL);\r\n\r\n this._environmentBRDFTexture = GetEnvironmentBRDFTexture(this.getScene());\r\n }\r\n\r\n /**\r\n * @returns the name of this material class.\r\n */\r\n public override getClassName(): string {\r\n return \"PBRMaterial\";\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current material.\r\n * @param name - name to use for the new material.\r\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\r\n * @param rootUrl defines the root URL to use to load textures\r\n * @returns cloned material instance\r\n */\r\n public override clone(name: string, cloneTexturesOnlyOnce: boolean = true, rootUrl = \"\"): PBRMaterial {\r\n const clone = SerializationHelper.Clone(() => new PBRMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });\r\n\r\n clone.id = name;\r\n clone.name = name;\r\n\r\n this.stencil.copyTo(clone.stencil);\r\n\r\n this._clonePlugins(clone, rootUrl);\r\n\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serializes this PBR Material.\r\n * @returns - An object with the serialized material.\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.customType = \"BABYLON.PBRMaterial\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Parses a PBR Material from a serialized object.\r\n * @param source - Serialized object.\r\n * @param scene - BJS scene instance.\r\n * @param rootUrl - url for the scene object\r\n * @returns - PBRMaterial\r\n */\r\n public static override Parse(source: any, scene: Scene, rootUrl: string): PBRMaterial {\r\n const material = SerializationHelper.Parse(() => new PBRMaterial(source.name, scene), source, scene, rootUrl);\r\n\r\n if (source.stencil) {\r\n material.stencil.parse(source.stencil, scene, rootUrl);\r\n }\r\n\r\n Material._ParsePlugins(source, material, scene, rootUrl);\r\n\r\n // The code block below ensures backward compatibility with serialized materials before plugins are automatically serialized.\r\n if (source.clearCoat) {\r\n material.clearCoat.parse(source.clearCoat, scene, rootUrl);\r\n }\r\n if (source.anisotropy) {\r\n material.anisotropy.parse(source.anisotropy, scene, rootUrl);\r\n }\r\n if (source.brdf) {\r\n material.brdf.parse(source.brdf, scene, rootUrl);\r\n }\r\n if (source.sheen) {\r\n material.sheen.parse(source.sheen, scene, rootUrl);\r\n }\r\n if (source.subSurface) {\r\n material.subSurface.parse(source.subSurface, scene, rootUrl);\r\n }\r\n if (source.iridescence) {\r\n material.iridescence.parse(source.iridescence, scene, rootUrl);\r\n }\r\n\r\n return material;\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for pbrMaterial.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterPbrMaterial(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n // PBRMaterial serializes its image processing configuration, so the parser must be registered for clone/parse to work.\r\n RegisterImageProcessingConfiguration();\r\n\r\n RegisterClass(\"BABYLON.PBRMaterial\", PBRMaterial);\r\n}\r\n\r\n/**\r\n * Register side effects for PBRMaterial.\r\n * Safe to call multiple times; only the first call has an effect.\r\n * Alias for {@link RegisterPbrMaterial}.\r\n */\r\nexport function RegisterPBRMaterial(): void {\r\n RegisterPbrMaterial();\r\n}\r\n"]}
1
+ {"version":3,"file":"pbrMaterial.pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/PBR/pbrMaterial.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAGxE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,OAAO,EAAE,eAAe,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E,WAAW,CAAC,CAAC;AACtD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mBAAmB;IAC/B,mBAAmB,EAAE,CAAC;AAC1B,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, serializeAsColor3, expandToProperty, serializeAsTexture } from \"../../Misc/decorators\";\r\nimport { GetEnvironmentBRDFTexture } from \"../../Misc/brdfTextureTools\";\r\nimport { type Nullable } from \"../../types\";\r\nimport { type Scene } from \"../../scene.pure\";\r\nimport { Color3 } from \"../../Maths/math.color.pure\";\r\nimport { type BaseTexture } from \"../../Materials/Textures/baseTexture.pure\";\r\nimport { PBRBaseMaterial } from \"./pbrBaseMaterial.pure\";\r\nimport { RegisterImageProcessingConfiguration } from \"../imageProcessingConfiguration.pure\";\r\nimport { Material } from \"../material.pure\";\r\nimport { SerializationHelper } from \"../../Misc/decorators.serialization\";\r\nimport { RegisterClass } from \"../../Misc/typeStore\";\r\n\r\n/**\r\n * The Physically based material of BJS.\r\n *\r\n * This offers the main features of a standard PBR material.\r\n * For more information, please refer to the documentation :\r\n * https://doc.babylonjs.com/features/featuresDeepDive/materials/using/introToPBR\r\n */\r\nexport class PBRMaterial extends PBRBaseMaterial {\r\n /**\r\n * PBRMaterialTransparencyMode: No transparency mode, Alpha channel is not use.\r\n */\r\n public static override readonly PBRMATERIAL_OPAQUE = PBRBaseMaterial.PBRMATERIAL_OPAQUE;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Alpha Test mode, pixel are discarded below a certain threshold defined by the alpha cutoff value.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATEST = PBRBaseMaterial.PBRMATERIAL_ALPHATEST;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHABLEND = PBRBaseMaterial.PBRMATERIAL_ALPHABLEND;\r\n\r\n /**\r\n * PBRMaterialTransparencyMode: Pixels are blended (according to the alpha mode) with the already drawn pixels in the current frame buffer.\r\n * They are also discarded below the alpha cutoff threshold to improve performances.\r\n */\r\n public static override readonly PBRMATERIAL_ALPHATESTANDBLEND = PBRBaseMaterial.PBRMATERIAL_ALPHATESTANDBLEND;\r\n\r\n /**\r\n * Defines the default value of how much AO map is occluding the analytical lights\r\n * (point spot...).\r\n */\r\n public static override DEFAULT_AO_ON_ANALYTICAL_LIGHTS = PBRBaseMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Intensity of the direct lights e.g. the four lights available in your scene.\r\n * This impacts both the direct diffuse and specular highlights.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor directIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the emissive part of the material.\r\n * This helps controlling the emissive effect without modifying the emissive color.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveIntensity: number = 1.0;\r\n\r\n /**\r\n * Intensity of the environment e.g. how much the environment will light the object\r\n * either through harmonics for rough material or through the reflection for shiny ones.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor environmentIntensity: number = 1.0;\r\n\r\n /**\r\n * This is a special control allowing the reduction of the specular highlights coming from the\r\n * four lights of the scene. Those highlights may not be needed in full environment lighting.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor specularIntensity: number = 1.0;\r\n\r\n /**\r\n * Debug Control allowing disabling the bump map on this material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor disableBumpMap: boolean = false;\r\n\r\n /**\r\n * AKA Diffuse Texture in standard nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor albedoTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Weight texture (multiplier to the diffuse and metal lobes).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseWeightTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness texture (roughness of the diffuse lobe).\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseDiffuseRoughnessTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Tangent-space bent normals in linear RGB, used with ambientTexture (or metallic texture AO)\r\n * to directionally occlude environment reflections using a spherical-Gaussian approximation\r\n * of visibility and the specular lobe.\r\n * Bake the bent normal and cosine-weighted AO with matching occlusion distances.\r\n * Without an AO texture the map has no effect; direct lighting and diffuse AO are unchanged.\r\n * Set gammaSpace to false when loading a bent normal texture.\r\n * The texture's level blends between unoccluded and fully bent-normal-occluded reflections (0..1).\r\n * WebGL devices without high-precision fragment support use scalar AO instead.\r\n * @see https://playground.babylonjs.com/#8N2ROI#5\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor bentNormalTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Occlusion Texture Intensity in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientTextureStrength: number = 1.0;\r\n\r\n /**\r\n * Defines how much the AO map is occluding the analytical lights (point spot...).\r\n * 1 means it completely occludes it\r\n * 0 mean it has no impact\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientTextureImpactOnAnalyticalLights: number = PBRMaterial.DEFAULT_AO_ON_ANALYTICAL_LIGHTS;\r\n\r\n /**\r\n * Stores the alpha values in a texture. Use luminance if texture.getAlphaFromRGB is true.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor opacityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the reflection values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectionTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the emissive values in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * AKA Specular texture in other nomenclature.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectivityTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to switch from specular/glossiness to metallic/roughness workflow.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Specifies the metallic scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the metalness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallic: Nullable<number>;\r\n\r\n /**\r\n * Specifies the roughness scalar of the metallic/roughness workflow.\r\n * Can also be used to scale the roughness values of the metallic texture.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor roughness: Nullable<number>;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 factor to help configuring the material F0.\r\n * By default the indexOfrefraction is used to compute F0;\r\n *\r\n * This is used as a factor against the default reflectance at normal incidence to tweak it.\r\n *\r\n * F0 = defaultF0 * metallicF0Factor * metallicReflectanceColor;\r\n * F90 = metallicReflectanceColor;\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicF0Factor = 1;\r\n\r\n /**\r\n * In metallic workflow, specifies an F0 color.\r\n * By default the F90 is always 1;\r\n *\r\n * Please note that this factor is also used as a factor against the default reflectance at normal incidence.\r\n *\r\n * F0 = defaultF0_from_IOR * metallicF0Factor * metallicReflectanceColor\r\n * F90 = metallicF0Factor;\r\n */\r\n @serializeAsColor3()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicReflectanceColor = Color3.White();\r\n\r\n /**\r\n * Specifies that only the A channel from metallicReflectanceTexture should be used.\r\n * If false, both RGB and A channels will be used\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useOnlyMetallicFromMetallicReflectanceTexture = false;\r\n\r\n /**\r\n * Defines to store metallicReflectanceColor in RGB and metallicF0Factor in A\r\n * This is multiplied against the scalar values defined in the material.\r\n * If useOnlyMetallicFromMetallicReflectanceTexture is true, don't use the RGB channels, only A\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor metallicReflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Defines to store reflectanceColor in RGB\r\n * This is multiplied against the scalar values defined in the material.\r\n * If both reflectanceTexture and metallicReflectanceTexture textures are provided and useOnlyMetallicFromMetallicReflectanceTexture\r\n * is false, metallicReflectanceTexture takes priority and reflectanceTexture is not used\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectanceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Used to enable roughness/glossiness fetch from a separate channel depending on the current mode.\r\n * Gray Scale represents roughness in metallic mode and glossiness in specular mode.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor microSurfaceTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores surface normal data used to displace a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor bumpTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the pre-calculated light information of a mesh in a texture.\r\n */\r\n @serializeAsTexture()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\", null)\r\n public accessor lightmapTexture: Nullable<BaseTexture>;\r\n\r\n /**\r\n * Stores the refracted light information in a texture.\r\n */\r\n public get refractionTexture(): Nullable<BaseTexture> {\r\n return this.subSurface.refractionTexture;\r\n }\r\n public set refractionTexture(value: Nullable<BaseTexture>) {\r\n this.subSurface.refractionTexture = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n } else if (!this.subSurface.linkRefractionWithTransparency) {\r\n this.subSurface.isRefractionEnabled = false;\r\n }\r\n }\r\n\r\n /**\r\n * The color of a material in ambient lighting.\r\n */\r\n @serializeAsColor3(\"ambient\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor ambientColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Diffuse Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"albedo\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor albedoColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * OpenPBR Base Weight (multiplier to the diffuse and metal lobes).\r\n */\r\n @serialize(\"baseWeight\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseWeight = 1;\r\n\r\n /**\r\n * OpenPBR Base Diffuse Roughness (roughness of the diffuse lobe).\r\n */\r\n @serialize(\"baseDiffuseRoughness\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor baseDiffuseRoughness: Nullable<number>;\r\n\r\n /**\r\n * AKA Specular Color in other nomenclature.\r\n */\r\n @serializeAsColor3(\"reflectivity\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectivityColor = new Color3(1, 1, 1);\r\n\r\n /**\r\n * The color reflected from the material.\r\n */\r\n @serializeAsColor3(\"reflection\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor reflectionColor = new Color3(1.0, 1.0, 1.0);\r\n\r\n /**\r\n * The color emitted from the material.\r\n */\r\n @serializeAsColor3(\"emissive\")\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor emissiveColor = new Color3(0, 0, 0);\r\n\r\n /**\r\n * AKA Glossiness in other nomenclature.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor microSurface = 1.0;\r\n\r\n /**\r\n * Index of refraction of the material base layer.\r\n * https://en.wikipedia.org/wiki/List_of_refractive_indices\r\n *\r\n * This does not only impact refraction but also the Base F0 of Dielectric Materials.\r\n *\r\n * From dielectric fresnel rules: F0 = square((iorT - iorI) / (iorT + iorI))\r\n */\r\n public get indexOfRefraction(): number {\r\n return this.subSurface.indexOfRefraction;\r\n }\r\n public set indexOfRefraction(value: number) {\r\n this.subSurface.indexOfRefraction = value;\r\n }\r\n\r\n /**\r\n * Controls if refraction needs to be inverted on Y. This could be useful for procedural texture.\r\n */\r\n public get invertRefractionY(): boolean {\r\n return this.subSurface.invertRefractionY;\r\n }\r\n public set invertRefractionY(value: boolean) {\r\n this.subSurface.invertRefractionY = value;\r\n }\r\n\r\n /**\r\n * This parameters will make the material used its opacity to control how much it is refracting against not.\r\n * Materials half opaque for instance using refraction could benefit from this control.\r\n */\r\n public get linkRefractionWithTransparency(): boolean {\r\n return this.subSurface.linkRefractionWithTransparency;\r\n }\r\n public set linkRefractionWithTransparency(value: boolean) {\r\n this.subSurface.linkRefractionWithTransparency = value;\r\n if (value) {\r\n this.subSurface.isRefractionEnabled = true;\r\n }\r\n }\r\n\r\n /**\r\n * If true, the light map contains occlusion information instead of lighting info.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useLightmapAsShadowmap = false;\r\n\r\n /**\r\n * Specifies that the alpha is coming form the albedo channel alpha channel for alpha blending.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor useAlphaFromAlbedoTexture = false;\r\n\r\n /**\r\n * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor forceAlphaTest = false;\r\n\r\n /**\r\n * Defines the alpha limits in alpha test mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor alphaCutOff = 0.4;\r\n\r\n /**\r\n * Specifies that the material will keep the specular highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When sun reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useSpecularOverAlpha = true;\r\n\r\n /**\r\n * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useMicroSurfaceFromReflectivityMapAlpha = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its alpha channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRoughnessFromMetallicTextureAlpha = true;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the roughness information in its green channel.\r\n * Needs useRoughnessFromMetallicTextureAlpha to be false.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRoughnessFromMetallicTextureGreen = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the metallness information in its blue channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useMetallnessFromMetallicTextureBlue = false;\r\n\r\n /**\r\n * Specifies if the metallic texture contains the ambient occlusion information in its red channel.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAmbientOcclusionFromMetallicTextureRed = false;\r\n\r\n /**\r\n * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAmbientInGrayScale = false;\r\n\r\n /**\r\n * In case the reflectivity map does not contain the microsurface information in its alpha channel,\r\n * The material will try to infer what glossiness each pixel should be.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAutoMicroSurfaceFromReflectivityMap = false;\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n @serialize()\r\n public get usePhysicalLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n }\r\n\r\n /**\r\n * BJS is using an hardcoded light falloff based on a manually sets up range.\r\n * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.\r\n * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.\r\n */\r\n public set usePhysicalLightFalloff(value: boolean) {\r\n if (value !== this.usePhysicalLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_PHYSICAL;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n @serialize()\r\n public get useGLTFLightFalloff(): boolean {\r\n return this._lightFalloff === PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n }\r\n\r\n /**\r\n * In order to support the falloff compatibility with gltf, a special mode has been added\r\n * to reproduce the gltf light falloff.\r\n */\r\n public set useGLTFLightFalloff(value: boolean) {\r\n if (value !== this.useGLTFLightFalloff) {\r\n // Ensure the effect will be rebuilt.\r\n this._markAllSubMeshesAsTexturesDirty();\r\n\r\n if (value) {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_GLTF;\r\n } else {\r\n this._lightFalloff = PBRBaseMaterial.LIGHTFALLOFF_STANDARD;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones).\r\n * A car glass is a good example of that. When the street lights reflects on it you can not see what is behind.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRadianceOverAlpha = true;\r\n\r\n /**\r\n * Allows using an object space normal map (instead of tangent space).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useObjectSpaceNormalMap = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useParallax = false;\r\n\r\n /**\r\n * Allows using the bump map in parallax occlusion mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useParallaxOcclusion = false;\r\n\r\n /**\r\n * Controls the scale bias of the parallax mode.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor parallaxScaleBias = 0.05;\r\n\r\n /**\r\n * If sets to true, disables all the lights affecting the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor disableLighting = false;\r\n\r\n /**\r\n * Force the shader to compute irradiance in the fragment shader in order to take bump in account.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor forceIrradianceInFragment = false;\r\n\r\n /**\r\n * Number of Simultaneous lights allowed on the material.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsLightsDirty\")\r\n public accessor maxSimultaneousLights = 4;\r\n\r\n /**\r\n * If sets to true, x component of normal map value will invert (x = 1.0 - x).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapX = false;\r\n\r\n /**\r\n * If sets to true, y component of normal map value will invert (y = 1.0 - y).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor invertNormalMapY = false;\r\n\r\n /**\r\n * If sets to true and backfaceCulling is false, normals will be flipped on the backside.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor twoSidedLighting = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useAlphaFresnel = false;\r\n\r\n /**\r\n * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.\r\n * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useLinearAlphaFresnel = false;\r\n\r\n /**\r\n * Let user defines the brdf lookup texture used for IBL.\r\n * A default 8bit version is embedded but you could point at :\r\n * * Default texture: https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png\r\n * * Default 16bit pixel depth texture: https://assets.babylonjs.com/environments/correlatedMSBRDF.dds\r\n * * LEGACY Default None correlated https://assets.babylonjs.com/environments/uncorrelatedBRDF_RGBD.png\r\n * * LEGACY Default None correlated 16bit pixel depth https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds\r\n */\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor environmentBRDFTexture: Nullable<BaseTexture> = null;\r\n\r\n /**\r\n * Force normal to face away from face.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor forceNormalForward = false;\r\n\r\n /**\r\n * Enables specular anti aliasing in the PBR shader.\r\n * It will both interacts on the Geometry for analytical and IBL lighting.\r\n * It also prefilter the roughness map based on the bump values.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor enableSpecularAntiAliasing = false;\r\n\r\n /**\r\n * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal\r\n * makes the reflect vector face the model (under horizon).\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useHorizonOcclusion = true;\r\n\r\n /**\r\n * This parameters will enable/disable radiance occlusion by preventing the radiance to lit\r\n * too much the area relying on ambient texture to define their ambient occlusion.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor useRadianceOcclusion = true;\r\n\r\n /**\r\n * If set to true, no lighting calculations will be applied.\r\n */\r\n @serialize()\r\n // Textures are also invalidated because lit-only texture features (bent normals) depend on unlit.\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesAndMiscDirty\")\r\n public accessor unlit = false;\r\n\r\n /**\r\n * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsMiscDirty\")\r\n public accessor applyDecalMapAfterDetailMap = false;\r\n\r\n /**\r\n * Instantiates a new PBRMaterial instance.\r\n *\r\n * @param name The material name\r\n * @param scene The scene the material will be use in.\r\n * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false\r\n */\r\n constructor(name: string, scene?: Scene, forceGLSL = false) {\r\n super(name, scene, forceGLSL);\r\n\r\n this._environmentBRDFTexture = GetEnvironmentBRDFTexture(this.getScene());\r\n }\r\n\r\n /**\r\n * @returns the name of this material class.\r\n */\r\n public override getClassName(): string {\r\n return \"PBRMaterial\";\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current material.\r\n * @param name - name to use for the new material.\r\n * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.\r\n * @param rootUrl defines the root URL to use to load textures\r\n * @returns cloned material instance\r\n */\r\n public override clone(name: string, cloneTexturesOnlyOnce: boolean = true, rootUrl = \"\"): PBRMaterial {\r\n const clone = SerializationHelper.Clone(() => new PBRMaterial(name, this.getScene()), this, { cloneTexturesOnlyOnce });\r\n\r\n clone.id = name;\r\n clone.name = name;\r\n\r\n this.stencil.copyTo(clone.stencil);\r\n\r\n this._clonePlugins(clone, rootUrl);\r\n\r\n return clone;\r\n }\r\n\r\n /**\r\n * Serializes this PBR Material.\r\n * @returns - An object with the serialized material.\r\n */\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n serializationObject.customType = \"BABYLON.PBRMaterial\";\r\n\r\n return serializationObject;\r\n }\r\n\r\n // Statics\r\n /**\r\n * Parses a PBR Material from a serialized object.\r\n * @param source - Serialized object.\r\n * @param scene - BJS scene instance.\r\n * @param rootUrl - url for the scene object\r\n * @returns - PBRMaterial\r\n */\r\n public static override Parse(source: any, scene: Scene, rootUrl: string): PBRMaterial {\r\n const material = SerializationHelper.Parse(() => new PBRMaterial(source.name, scene), source, scene, rootUrl);\r\n\r\n if (source.stencil) {\r\n material.stencil.parse(source.stencil, scene, rootUrl);\r\n }\r\n\r\n Material._ParsePlugins(source, material, scene, rootUrl);\r\n\r\n // The code block below ensures backward compatibility with serialized materials before plugins are automatically serialized.\r\n if (source.clearCoat) {\r\n material.clearCoat.parse(source.clearCoat, scene, rootUrl);\r\n }\r\n if (source.anisotropy) {\r\n material.anisotropy.parse(source.anisotropy, scene, rootUrl);\r\n }\r\n if (source.brdf) {\r\n material.brdf.parse(source.brdf, scene, rootUrl);\r\n }\r\n if (source.sheen) {\r\n material.sheen.parse(source.sheen, scene, rootUrl);\r\n }\r\n if (source.subSurface) {\r\n material.subSurface.parse(source.subSurface, scene, rootUrl);\r\n }\r\n if (source.iridescence) {\r\n material.iridescence.parse(source.iridescence, scene, rootUrl);\r\n }\r\n\r\n return material;\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for pbrMaterial.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterPbrMaterial(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n // PBRMaterial serializes its image processing configuration, so the parser must be registered for clone/parse to work.\r\n RegisterImageProcessingConfiguration();\r\n\r\n RegisterClass(\"BABYLON.PBRMaterial\", PBRMaterial);\r\n}\r\n\r\n/**\r\n * Register side effects for PBRMaterial.\r\n * Safe to call multiple times; only the first call has an effect.\r\n * Alias for {@link RegisterPbrMaterial}.\r\n */\r\nexport function RegisterPBRMaterial(): void {\r\n RegisterPbrMaterial();\r\n}\r\n"]}
@@ -46,6 +46,7 @@ export declare class HDRIrradianceFiltering {
46
46
  */
47
47
  constructor(engine: AbstractEngine, options?: IHDRIrradianceFilteringOptions);
48
48
  private _createRenderTarget;
49
+ private _rebuildRenderTargetStorage;
49
50
  private _prefilterInternal;
50
51
  private _createEffect;
51
52
  /**
@@ -55,6 +55,12 @@ export class HDRIrradianceFiltering {
55
55
  this._engine.updateTextureWrappingMode(rtWrapper.texture, 0, 0, 0);
56
56
  return rtWrapper;
57
57
  }
58
+ _rebuildRenderTargetStorage(size) {
59
+ const rtWrapper = this._createRenderTarget(size);
60
+ const proxy = rtWrapper.texture;
61
+ rtWrapper.dispose(true);
62
+ return { proxy, isReady: true, isAsync: false };
63
+ }
58
64
  _prefilterInternal(texture) {
59
65
  const width = texture.getSize().width;
60
66
  const mipmapsCount = ILog2(width);
@@ -97,6 +103,10 @@ export class HDRIrradianceFiltering {
97
103
  effect.setTexture("inputTexture", null);
98
104
  effect.setTexture("icdfTexture", null);
99
105
  const irradianceTexture = new BaseTexture(texture.getScene(), outputTexture.texture);
106
+ // The returned texture now owns the internal texture; only the framebuffers need releasing.
107
+ // That also drops the wrapper from the engine's restore cache, so recreate the storage on context restore.
108
+ outputTexture.texture.onRebuildCallback = () => this._rebuildRenderTargetStorage(irradianceSize);
109
+ outputTexture.dispose(true);
100
110
  irradianceTexture.name = texture.name + "_irradiance";
101
111
  irradianceTexture.displayName = texture.name + "_irradiance";
102
112
  irradianceTexture.gammaSpace = false;