@onerjs/core 8.26.1 → 8.26.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 (269) hide show
  1. package/Engines/abstractEngine.js +2 -2
  2. package/Engines/abstractEngine.js.map +1 -1
  3. package/FrameGraph/Tasks/Rendering/objectRendererTask.js +6 -0
  4. package/FrameGraph/Tasks/Rendering/objectRendererTask.js.map +1 -1
  5. package/FrameGraph/frameGraphContext.d.ts +2 -1
  6. package/FrameGraph/frameGraphContext.js +4 -1
  7. package/FrameGraph/frameGraphContext.js.map +1 -1
  8. package/Lights/Clustered/clusteredLightContainer.d.ts +1 -1
  9. package/Lights/Clustered/clusteredLightContainer.js +4 -5
  10. package/Lights/Clustered/clusteredLightContainer.js.map +1 -1
  11. package/Lights/pointLight.js +4 -4
  12. package/Lights/pointLight.js.map +1 -1
  13. package/Lights/rectAreaLight.js +4 -4
  14. package/Lights/rectAreaLight.js.map +1 -1
  15. package/Lights/spotLight.js +2 -2
  16. package/Lights/spotLight.js.map +1 -1
  17. package/Materials/Background/backgroundMaterial.d.ts +19 -91
  18. package/Materials/Background/backgroundMaterial.js +17 -245
  19. package/Materials/Background/backgroundMaterial.js.map +1 -1
  20. package/Materials/Node/Blocks/Dual/lightBlock.js +15 -4
  21. package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
  22. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +28 -5
  23. package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
  24. package/Materials/Node/nodeMaterial.d.ts +57 -69
  25. package/Materials/Node/nodeMaterial.js +9 -86
  26. package/Materials/Node/nodeMaterial.js.map +1 -1
  27. package/Materials/Node/nodeMaterialBuildState.d.ts +3 -1
  28. package/Materials/Node/nodeMaterialBuildState.js +35 -15
  29. package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
  30. package/Materials/PBR/index.d.ts +5 -0
  31. package/Materials/PBR/index.js +5 -0
  32. package/Materials/PBR/index.js.map +1 -1
  33. package/Materials/PBR/openPbrMaterial.d.ts +998 -0
  34. package/Materials/PBR/openPbrMaterial.js +2069 -0
  35. package/Materials/PBR/openPbrMaterial.js.map +1 -0
  36. package/Materials/PBR/pbrBaseMaterial.d.ts +57 -43
  37. package/Materials/PBR/pbrBaseMaterial.js +21 -304
  38. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  39. package/Materials/PBR/pbrMaterial.d.ts +0 -78
  40. package/Materials/PBR/pbrMaterial.js +0 -110
  41. package/Materials/PBR/pbrMaterial.js.map +1 -1
  42. package/Materials/floatingOriginMatrixOverrides.d.ts +3 -0
  43. package/Materials/floatingOriginMatrixOverrides.js +91 -0
  44. package/Materials/floatingOriginMatrixOverrides.js.map +1 -0
  45. package/Materials/imageProcessing.d.ts +65 -0
  46. package/Materials/imageProcessing.js +162 -0
  47. package/Materials/imageProcessing.js.map +1 -0
  48. package/Materials/imageProcessingConfiguration.defines.d.ts +25 -0
  49. package/Materials/imageProcessingConfiguration.defines.js +27 -0
  50. package/Materials/imageProcessingConfiguration.defines.js.map +1 -1
  51. package/Materials/index.d.ts +2 -0
  52. package/Materials/index.js +2 -0
  53. package/Materials/index.js.map +1 -1
  54. package/Materials/material.d.ts +14 -0
  55. package/Materials/material.js +14 -0
  56. package/Materials/material.js.map +1 -1
  57. package/Materials/materialHelper.functions.d.ts +53 -0
  58. package/Materials/materialHelper.functions.js +297 -0
  59. package/Materials/materialHelper.functions.js.map +1 -1
  60. package/Materials/standardMaterial.d.ts +57 -121
  61. package/Materials/standardMaterial.js +21 -250
  62. package/Materials/standardMaterial.js.map +1 -1
  63. package/Materials/uv.defines.d.ts +22 -0
  64. package/Materials/uv.defines.js +24 -0
  65. package/Materials/uv.defines.js.map +1 -0
  66. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +1 -0
  67. package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
  68. package/Meshes/transformNode.d.ts +2 -0
  69. package/Meshes/transformNode.js +7 -4
  70. package/Meshes/transformNode.js.map +1 -1
  71. package/Misc/decorators.d.ts +7 -0
  72. package/Misc/decorators.js +34 -0
  73. package/Misc/decorators.js.map +1 -1
  74. package/Particles/Node/Blocks/Emitters/createParticleBlock.js +10 -1
  75. package/Particles/Node/Blocks/Emitters/createParticleBlock.js.map +1 -1
  76. package/Particles/Node/Blocks/index.d.ts +2 -0
  77. package/Particles/Node/Blocks/index.js +2 -0
  78. package/Particles/Node/Blocks/index.js.map +1 -1
  79. package/Particles/Node/Blocks/particleInputBlock.js +4 -1
  80. package/Particles/Node/Blocks/particleInputBlock.js.map +1 -1
  81. package/Particles/Node/Blocks/particleLocalVariableBlock.d.ts +38 -0
  82. package/Particles/Node/Blocks/particleLocalVariableBlock.js +108 -0
  83. package/Particles/Node/Blocks/particleLocalVariableBlock.js.map +1 -0
  84. package/Particles/Node/Blocks/particleVectorLengthBlock.d.ts +26 -0
  85. package/Particles/Node/Blocks/particleVectorLengthBlock.js +50 -0
  86. package/Particles/Node/Blocks/particleVectorLengthBlock.js.map +1 -0
  87. package/Rendering/IBLShadows/iblShadowsPluginMaterial.d.ts +2 -1
  88. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js +45 -0
  89. package/Rendering/IBLShadows/iblShadowsPluginMaterial.js.map +1 -1
  90. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +2 -1
  91. package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
  92. package/Rendering/geometryBufferRenderer.js +6 -4
  93. package/Rendering/geometryBufferRenderer.js.map +1 -1
  94. package/Rendering/iblCdfGenerator.js +28 -20
  95. package/Rendering/iblCdfGenerator.js.map +1 -1
  96. package/Rendering/reflectiveShadowMap.d.ts +3 -3
  97. package/Shaders/ShadersInclude/backgroundUboDeclaration.js +1 -1
  98. package/Shaders/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
  99. package/Shaders/ShadersInclude/clusteredLightingFunctions.js +3 -1
  100. package/Shaders/ShadersInclude/clusteredLightingFunctions.js.map +1 -1
  101. package/Shaders/ShadersInclude/defaultUboDeclaration.js +1 -1
  102. package/Shaders/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  103. package/Shaders/ShadersInclude/hdrFilteringFunctions.js +34 -0
  104. package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  105. package/Shaders/ShadersInclude/helperFunctions.js +1 -1
  106. package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
  107. package/Shaders/ShadersInclude/importanceSampling.js +4 -0
  108. package/Shaders/ShadersInclude/importanceSampling.js.map +1 -1
  109. package/Shaders/ShadersInclude/lightsFragmentFunctions.js +1 -0
  110. package/Shaders/ShadersInclude/lightsFragmentFunctions.js.map +1 -1
  111. package/Shaders/ShadersInclude/openpbrBaseLayerData.d.ts +5 -0
  112. package/Shaders/ShadersInclude/openpbrBaseLayerData.js +127 -0
  113. package/Shaders/ShadersInclude/openpbrBaseLayerData.js.map +1 -0
  114. package/Shaders/ShadersInclude/openpbrBlockAmbientOcclusion.d.ts +5 -0
  115. package/Shaders/ShadersInclude/openpbrBlockAmbientOcclusion.js +35 -0
  116. package/Shaders/ShadersInclude/openpbrBlockAmbientOcclusion.js.map +1 -0
  117. package/Shaders/ShadersInclude/openpbrBlockNormalFinal.d.ts +5 -0
  118. package/Shaders/ShadersInclude/openpbrBlockNormalFinal.js +25 -0
  119. package/Shaders/ShadersInclude/openpbrBlockNormalFinal.js.map +1 -0
  120. package/Shaders/ShadersInclude/openpbrCoatLayerData.d.ts +5 -0
  121. package/Shaders/ShadersInclude/openpbrCoatLayerData.js +59 -0
  122. package/Shaders/ShadersInclude/openpbrCoatLayerData.js.map +1 -0
  123. package/Shaders/ShadersInclude/openpbrConductorReflectance.d.ts +5 -0
  124. package/Shaders/ShadersInclude/openpbrConductorReflectance.js +19 -0
  125. package/Shaders/ShadersInclude/openpbrConductorReflectance.js.map +1 -0
  126. package/Shaders/ShadersInclude/openpbrDielectricReflectance.d.ts +5 -0
  127. package/Shaders/ShadersInclude/openpbrDielectricReflectance.js +30 -0
  128. package/Shaders/ShadersInclude/openpbrDielectricReflectance.js.map +1 -0
  129. package/Shaders/ShadersInclude/openpbrDirectLighting.d.ts +5 -0
  130. package/Shaders/ShadersInclude/openpbrDirectLighting.js +69 -0
  131. package/Shaders/ShadersInclude/openpbrDirectLighting.js.map +1 -0
  132. package/Shaders/ShadersInclude/openpbrDirectLightingInit.d.ts +5 -0
  133. package/Shaders/ShadersInclude/openpbrDirectLightingInit.js +80 -0
  134. package/Shaders/ShadersInclude/openpbrDirectLightingInit.js.map +1 -0
  135. package/Shaders/ShadersInclude/openpbrDirectLightingShadow.d.ts +5 -0
  136. package/Shaders/ShadersInclude/openpbrDirectLightingShadow.js +129 -0
  137. package/Shaders/ShadersInclude/openpbrDirectLightingShadow.js.map +1 -0
  138. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.d.ts +5 -0
  139. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +106 -0
  140. package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -0
  141. package/Shaders/ShadersInclude/openpbrFragmentDeclaration.d.ts +6 -0
  142. package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js +115 -0
  143. package/Shaders/ShadersInclude/openpbrFragmentDeclaration.js.map +1 -0
  144. package/Shaders/ShadersInclude/openpbrFragmentSamplersDeclaration.d.ts +6 -0
  145. package/Shaders/ShadersInclude/openpbrFragmentSamplersDeclaration.js +72 -0
  146. package/Shaders/ShadersInclude/openpbrFragmentSamplersDeclaration.js.map +1 -0
  147. package/Shaders/ShadersInclude/openpbrGeometryInfo.d.ts +5 -0
  148. package/Shaders/ShadersInclude/openpbrGeometryInfo.js +46 -0
  149. package/Shaders/ShadersInclude/openpbrGeometryInfo.js.map +1 -0
  150. package/Shaders/ShadersInclude/openpbrIblFunctions.d.ts +5 -0
  151. package/Shaders/ShadersInclude/openpbrIblFunctions.js +221 -0
  152. package/Shaders/ShadersInclude/openpbrIblFunctions.js.map +1 -0
  153. package/Shaders/ShadersInclude/openpbrNormalMapFragment.d.ts +5 -0
  154. package/Shaders/ShadersInclude/openpbrNormalMapFragment.js +64 -0
  155. package/Shaders/ShadersInclude/openpbrNormalMapFragment.js.map +1 -0
  156. package/Shaders/ShadersInclude/openpbrNormalMapFragmentFunctions.d.ts +6 -0
  157. package/Shaders/ShadersInclude/openpbrNormalMapFragmentFunctions.js +45 -0
  158. package/Shaders/ShadersInclude/openpbrNormalMapFragmentFunctions.js.map +1 -0
  159. package/Shaders/ShadersInclude/openpbrNormalMapFragmentMainFunctions.d.ts +5 -0
  160. package/Shaders/ShadersInclude/openpbrNormalMapFragmentMainFunctions.js +72 -0
  161. package/Shaders/ShadersInclude/openpbrNormalMapFragmentMainFunctions.js.map +1 -0
  162. package/Shaders/ShadersInclude/openpbrNormalMapVertex.d.ts +5 -0
  163. package/Shaders/ShadersInclude/openpbrNormalMapVertex.js +16 -0
  164. package/Shaders/ShadersInclude/openpbrNormalMapVertex.js.map +1 -0
  165. package/Shaders/ShadersInclude/openpbrNormalMapVertexDeclaration.d.ts +5 -0
  166. package/Shaders/ShadersInclude/openpbrNormalMapVertexDeclaration.js +16 -0
  167. package/Shaders/ShadersInclude/openpbrNormalMapVertexDeclaration.js.map +1 -0
  168. package/Shaders/ShadersInclude/openpbrUboDeclaration.d.ts +7 -0
  169. package/Shaders/ShadersInclude/openpbrUboDeclaration.js +18 -0
  170. package/Shaders/ShadersInclude/openpbrUboDeclaration.js.map +1 -0
  171. package/Shaders/ShadersInclude/openpbrVertexDeclaration.d.ts +6 -0
  172. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +103 -0
  173. package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -0
  174. package/Shaders/ShadersInclude/pbrBRDFFunctions.js +1 -1
  175. package/Shaders/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
  176. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +1 -0
  177. package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
  178. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js +3 -1
  179. package/Shaders/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  180. package/Shaders/ShadersInclude/pbrHelperFunctions.js +2 -0
  181. package/Shaders/ShadersInclude/pbrHelperFunctions.js.map +1 -1
  182. package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
  183. package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  184. package/Shaders/openpbr.fragment.d.ts +54 -0
  185. package/Shaders/openpbr.fragment.js +206 -0
  186. package/Shaders/openpbr.fragment.js.map +1 -0
  187. package/Shaders/openpbr.vertex.d.ts +39 -0
  188. package/Shaders/openpbr.vertex.js +238 -0
  189. package/Shaders/openpbr.vertex.js.map +1 -0
  190. package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js +1 -1
  191. package/ShadersWGSL/ShadersInclude/backgroundUboDeclaration.js.map +1 -1
  192. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js +1 -1
  193. package/ShadersWGSL/ShadersInclude/defaultUboDeclaration.js.map +1 -1
  194. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +28 -0
  195. package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
  196. package/ShadersWGSL/ShadersInclude/importanceSampling.js +4 -0
  197. package/ShadersWGSL/ShadersInclude/importanceSampling.js.map +1 -1
  198. package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.d.ts +5 -0
  199. package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js +126 -0
  200. package/ShadersWGSL/ShadersInclude/openpbrBaseLayerData.js.map +1 -0
  201. package/ShadersWGSL/ShadersInclude/openpbrBlockAmbientOcclusion.d.ts +5 -0
  202. package/ShadersWGSL/ShadersInclude/openpbrBlockAmbientOcclusion.js +36 -0
  203. package/ShadersWGSL/ShadersInclude/openpbrBlockAmbientOcclusion.js.map +1 -0
  204. package/ShadersWGSL/ShadersInclude/openpbrBlockNormalFinal.d.ts +5 -0
  205. package/ShadersWGSL/ShadersInclude/openpbrBlockNormalFinal.js +25 -0
  206. package/ShadersWGSL/ShadersInclude/openpbrBlockNormalFinal.js.map +1 -0
  207. package/ShadersWGSL/ShadersInclude/openpbrCoatLayerData.d.ts +5 -0
  208. package/ShadersWGSL/ShadersInclude/openpbrCoatLayerData.js +59 -0
  209. package/ShadersWGSL/ShadersInclude/openpbrCoatLayerData.js.map +1 -0
  210. package/ShadersWGSL/ShadersInclude/openpbrConductorReflectance.d.ts +5 -0
  211. package/ShadersWGSL/ShadersInclude/openpbrConductorReflectance.js +19 -0
  212. package/ShadersWGSL/ShadersInclude/openpbrConductorReflectance.js.map +1 -0
  213. package/ShadersWGSL/ShadersInclude/openpbrDielectricReflectance.d.ts +5 -0
  214. package/ShadersWGSL/ShadersInclude/openpbrDielectricReflectance.js +33 -0
  215. package/ShadersWGSL/ShadersInclude/openpbrDielectricReflectance.js.map +1 -0
  216. package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.d.ts +5 -0
  217. package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js +69 -0
  218. package/ShadersWGSL/ShadersInclude/openpbrDirectLighting.js.map +1 -0
  219. package/ShadersWGSL/ShadersInclude/openpbrDirectLightingInit.d.ts +5 -0
  220. package/ShadersWGSL/ShadersInclude/openpbrDirectLightingInit.js +80 -0
  221. package/ShadersWGSL/ShadersInclude/openpbrDirectLightingInit.js.map +1 -0
  222. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.d.ts +5 -0
  223. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +112 -0
  224. package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -0
  225. package/ShadersWGSL/ShadersInclude/openpbrFragmentSamplersDeclaration.d.ts +6 -0
  226. package/ShadersWGSL/ShadersInclude/openpbrFragmentSamplersDeclaration.js +68 -0
  227. package/ShadersWGSL/ShadersInclude/openpbrFragmentSamplersDeclaration.js.map +1 -0
  228. package/ShadersWGSL/ShadersInclude/openpbrGeometryInfo.d.ts +5 -0
  229. package/ShadersWGSL/ShadersInclude/openpbrGeometryInfo.js +54 -0
  230. package/ShadersWGSL/ShadersInclude/openpbrGeometryInfo.js.map +1 -0
  231. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.d.ts +5 -0
  232. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +218 -0
  233. package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -0
  234. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragment.d.ts +5 -0
  235. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragment.js +64 -0
  236. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragment.js.map +1 -0
  237. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentFunctions.d.ts +6 -0
  238. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentFunctions.js +45 -0
  239. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentFunctions.js.map +1 -0
  240. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentMainFunctions.d.ts +5 -0
  241. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentMainFunctions.js +51 -0
  242. package/ShadersWGSL/ShadersInclude/openpbrNormalMapFragmentMainFunctions.js.map +1 -0
  243. package/ShadersWGSL/ShadersInclude/openpbrNormalMapVertex.d.ts +5 -0
  244. package/ShadersWGSL/ShadersInclude/openpbrNormalMapVertex.js +16 -0
  245. package/ShadersWGSL/ShadersInclude/openpbrNormalMapVertex.js.map +1 -0
  246. package/ShadersWGSL/ShadersInclude/openpbrNormalMapVertexDeclaration.d.ts +5 -0
  247. package/ShadersWGSL/ShadersInclude/openpbrNormalMapVertexDeclaration.js +16 -0
  248. package/ShadersWGSL/ShadersInclude/openpbrNormalMapVertexDeclaration.js.map +1 -0
  249. package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.d.ts +7 -0
  250. package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js +17 -0
  251. package/ShadersWGSL/ShadersInclude/openpbrUboDeclaration.js.map +1 -0
  252. package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js +1 -1
  253. package/ShadersWGSL/ShadersInclude/pbrBRDFFunctions.js.map +1 -1
  254. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js +3 -1
  255. package/ShadersWGSL/ShadersInclude/pbrDirectLightingFunctions.js.map +1 -1
  256. package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js +2 -0
  257. package/ShadersWGSL/ShadersInclude/pbrHelperFunctions.js.map +1 -1
  258. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
  259. package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
  260. package/ShadersWGSL/openpbr.fragment.d.ts +52 -0
  261. package/ShadersWGSL/openpbr.fragment.js +193 -0
  262. package/ShadersWGSL/openpbr.fragment.js.map +1 -0
  263. package/ShadersWGSL/openpbr.vertex.d.ts +37 -0
  264. package/ShadersWGSL/openpbr.vertex.js +227 -0
  265. package/ShadersWGSL/openpbr.vertex.js.map +1 -0
  266. package/package.json +1 -1
  267. package/scene.d.ts +21 -0
  268. package/scene.js +29 -3
  269. package/scene.js.map +1 -1
@@ -0,0 +1,998 @@
1
+ import type { Nullable } from "../../types.js";
2
+ import { Scene } from "../../scene.js";
3
+ import { Color3 } from "../../Maths/math.color.js";
4
+ import { ImageProcessingConfiguration } from "../imageProcessingConfiguration.js";
5
+ import type { BaseTexture } from "../../Materials/Textures/baseTexture.js";
6
+ import { Material } from "../material.js";
7
+ import type { AbstractMesh } from "../../Meshes/abstractMesh.js";
8
+ import { MaterialDefines } from "../materialDefines.js";
9
+ import { PrePassConfiguration } from "../prePassConfiguration.js";
10
+ import type { IMaterialCompilationOptions } from "../../Materials/material.js";
11
+ import type { SubMesh } from "../../Meshes/subMesh.js";
12
+ import { Vector2 } from "../../Maths/math.vector.js";
13
+ import type { Matrix } from "../../Maths/math.vector.js";
14
+ import type { Mesh } from "../../Meshes/mesh.js";
15
+ import { PushMaterial } from "../pushMaterial.js";
16
+ import type { IAnimatable } from "../../Animations/animatable.interface.js";
17
+ declare const OpenPBRMaterialDefinesBase_base: {
18
+ new (...args: any[]): {
19
+ MAINUV1: boolean;
20
+ MAINUV2: boolean;
21
+ MAINUV3: boolean;
22
+ MAINUV4: boolean;
23
+ MAINUV5: boolean;
24
+ MAINUV6: boolean;
25
+ UV1: boolean;
26
+ UV2: boolean;
27
+ UV3: boolean;
28
+ UV4: boolean;
29
+ UV5: boolean;
30
+ UV6: boolean;
31
+ };
32
+ } & typeof MaterialDefines;
33
+ declare class OpenPBRMaterialDefinesBase extends OpenPBRMaterialDefinesBase_base {
34
+ }
35
+ declare const OpenPBRMaterialDefines_base: {
36
+ new (...args: any[]): {
37
+ IMAGEPROCESSING: boolean;
38
+ VIGNETTE: boolean;
39
+ VIGNETTEBLENDMODEMULTIPLY: boolean;
40
+ VIGNETTEBLENDMODEOPAQUE: boolean;
41
+ TONEMAPPING: number;
42
+ CONTRAST: boolean;
43
+ COLORCURVES: boolean;
44
+ COLORGRADING: boolean;
45
+ COLORGRADING3D: boolean;
46
+ SAMPLER3DGREENDEPTH: boolean;
47
+ SAMPLER3DBGRMAP: boolean;
48
+ DITHER: boolean;
49
+ IMAGEPROCESSINGPOSTPROCESS: boolean;
50
+ SKIPFINALCOLORCLAMP: boolean;
51
+ EXPOSURE: boolean;
52
+ };
53
+ } & typeof OpenPBRMaterialDefinesBase;
54
+ /**
55
+ * Manages the defines for the PBR Material.
56
+ * @internal
57
+ */
58
+ export declare class OpenPBRMaterialDefines extends OpenPBRMaterialDefines_base {
59
+ NUM_SAMPLES: string;
60
+ REALTIME_FILTERING: boolean;
61
+ IBL_CDF_FILTERING: boolean;
62
+ VERTEXCOLOR: boolean;
63
+ BAKED_VERTEX_ANIMATION_TEXTURE: boolean;
64
+ VERTEXALPHA: boolean;
65
+ ALPHATEST: boolean;
66
+ DEPTHPREPASS: boolean;
67
+ ALPHABLEND: boolean;
68
+ ALPHA_FROM_BASE_COLOR_TEXTURE: boolean;
69
+ ALPHATESTVALUE: string;
70
+ PREMULTIPLYALPHA: boolean;
71
+ REFLECTIVITY_GAMMA: boolean;
72
+ REFLECTIVITYDIRECTUV: number;
73
+ SPECULARTERM: boolean;
74
+ LODBASEDMICROSFURACE: boolean;
75
+ METALLICWORKFLOW: boolean;
76
+ ROUGHNESSSTOREINMETALMAPALPHA: boolean;
77
+ ROUGHNESSSTOREINMETALMAPGREEN: boolean;
78
+ METALLNESSSTOREINMETALMAPBLUE: boolean;
79
+ AOSTOREINMETALMAPRED: boolean;
80
+ SPECULAR_WEIGHT_IN_ALPHA: boolean;
81
+ SPECULAR_WEIGHT_FROM_SPECULAR_COLOR_TEXTURE: boolean;
82
+ SPECULAR_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE: boolean;
83
+ COAT_ROUGHNESS_ANISOTROPY_FROM_TANGENT_TEXTURE: boolean;
84
+ USE_GLTF_STYLE_ANISOTROPY: boolean;
85
+ ENVIRONMENTBRDF: boolean;
86
+ ENVIRONMENTBRDF_RGBD: boolean;
87
+ NORMAL: boolean;
88
+ TANGENT: boolean;
89
+ OBJECTSPACE_NORMALMAP: boolean;
90
+ PARALLAX: boolean;
91
+ PARALLAX_RHS: boolean;
92
+ PARALLAXOCCLUSION: boolean;
93
+ NORMALXYSCALE: boolean;
94
+ ANISOTROPIC: boolean;
95
+ ANISOTROPIC_OPENPBR: boolean;
96
+ ANISOTROPIC_BASE: boolean;
97
+ ANISOTROPIC_COAT: boolean;
98
+ REFLECTION: boolean;
99
+ REFLECTIONMAP_3D: boolean;
100
+ REFLECTIONMAP_SPHERICAL: boolean;
101
+ REFLECTIONMAP_PLANAR: boolean;
102
+ REFLECTIONMAP_CUBIC: boolean;
103
+ USE_LOCAL_REFLECTIONMAP_CUBIC: boolean;
104
+ REFLECTIONMAP_PROJECTION: boolean;
105
+ REFLECTIONMAP_SKYBOX: boolean;
106
+ REFLECTIONMAP_EXPLICIT: boolean;
107
+ REFLECTIONMAP_EQUIRECTANGULAR: boolean;
108
+ REFLECTIONMAP_EQUIRECTANGULAR_FIXED: boolean;
109
+ REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED: boolean;
110
+ INVERTCUBICMAP: boolean;
111
+ USESPHERICALFROMREFLECTIONMAP: boolean;
112
+ USEIRRADIANCEMAP: boolean;
113
+ USE_IRRADIANCE_DOMINANT_DIRECTION: boolean;
114
+ USESPHERICALINVERTEX: boolean;
115
+ REFLECTIONMAP_OPPOSITEZ: boolean;
116
+ LODINREFLECTIONALPHA: boolean;
117
+ GAMMAREFLECTION: boolean;
118
+ RGBDREFLECTION: boolean;
119
+ RADIANCEOCCLUSION: boolean;
120
+ HORIZONOCCLUSION: boolean;
121
+ INSTANCES: boolean;
122
+ THIN_INSTANCES: boolean;
123
+ INSTANCESCOLOR: boolean;
124
+ PREPASS: boolean;
125
+ PREPASS_COLOR: boolean;
126
+ PREPASS_COLOR_INDEX: number;
127
+ PREPASS_IRRADIANCE: boolean;
128
+ PREPASS_IRRADIANCE_INDEX: number;
129
+ PREPASS_ALBEDO: boolean;
130
+ PREPASS_ALBEDO_INDEX: number;
131
+ PREPASS_ALBEDO_SQRT: boolean;
132
+ PREPASS_ALBEDO_SQRT_INDEX: number;
133
+ PREPASS_DEPTH: boolean;
134
+ PREPASS_DEPTH_INDEX: number;
135
+ PREPASS_SCREENSPACE_DEPTH: boolean;
136
+ PREPASS_SCREENSPACE_DEPTH_INDEX: number;
137
+ PREPASS_NORMALIZED_VIEW_DEPTH: boolean;
138
+ PREPASS_NORMALIZED_VIEW_DEPTH_INDEX: number;
139
+ PREPASS_NORMAL: boolean;
140
+ PREPASS_NORMAL_INDEX: number;
141
+ PREPASS_NORMAL_WORLDSPACE: boolean;
142
+ PREPASS_WORLD_NORMAL: boolean;
143
+ PREPASS_WORLD_NORMAL_INDEX: number;
144
+ PREPASS_POSITION: boolean;
145
+ PREPASS_POSITION_INDEX: number;
146
+ PREPASS_LOCAL_POSITION: boolean;
147
+ PREPASS_LOCAL_POSITION_INDEX: number;
148
+ PREPASS_VELOCITY: boolean;
149
+ PREPASS_VELOCITY_INDEX: number;
150
+ PREPASS_VELOCITY_LINEAR: boolean;
151
+ PREPASS_VELOCITY_LINEAR_INDEX: number;
152
+ PREPASS_REFLECTIVITY: boolean;
153
+ PREPASS_REFLECTIVITY_INDEX: number;
154
+ SCENE_MRT_COUNT: number;
155
+ NUM_BONE_INFLUENCERS: number;
156
+ BonesPerMesh: number;
157
+ BONETEXTURE: boolean;
158
+ BONES_VELOCITY_ENABLED: boolean;
159
+ NONUNIFORMSCALING: boolean;
160
+ MORPHTARGETS: boolean;
161
+ MORPHTARGETS_POSITION: boolean;
162
+ MORPHTARGETS_NORMAL: boolean;
163
+ MORPHTARGETS_TANGENT: boolean;
164
+ MORPHTARGETS_UV: boolean;
165
+ MORPHTARGETS_UV2: boolean;
166
+ MORPHTARGETS_COLOR: boolean;
167
+ MORPHTARGETTEXTURE_HASPOSITIONS: boolean;
168
+ MORPHTARGETTEXTURE_HASNORMALS: boolean;
169
+ MORPHTARGETTEXTURE_HASTANGENTS: boolean;
170
+ MORPHTARGETTEXTURE_HASUVS: boolean;
171
+ MORPHTARGETTEXTURE_HASUV2S: boolean;
172
+ MORPHTARGETTEXTURE_HASCOLORS: boolean;
173
+ NUM_MORPH_INFLUENCERS: number;
174
+ MORPHTARGETS_TEXTURE: boolean;
175
+ USEPHYSICALLIGHTFALLOFF: boolean;
176
+ USEGLTFLIGHTFALLOFF: boolean;
177
+ TWOSIDEDLIGHTING: boolean;
178
+ MIRRORED: boolean;
179
+ SHADOWFLOAT: boolean;
180
+ CLIPPLANE: boolean;
181
+ CLIPPLANE2: boolean;
182
+ CLIPPLANE3: boolean;
183
+ CLIPPLANE4: boolean;
184
+ CLIPPLANE5: boolean;
185
+ CLIPPLANE6: boolean;
186
+ POINTSIZE: boolean;
187
+ FOG: boolean;
188
+ LOGARITHMICDEPTH: boolean;
189
+ CAMERA_ORTHOGRAPHIC: boolean;
190
+ CAMERA_PERSPECTIVE: boolean;
191
+ AREALIGHTSUPPORTED: boolean;
192
+ FORCENORMALFORWARD: boolean;
193
+ SPECULARAA: boolean;
194
+ UNLIT: boolean;
195
+ DECAL_AFTER_DETAIL: boolean;
196
+ DEBUGMODE: number;
197
+ BRDF_V_HEIGHT_CORRELATED: boolean;
198
+ MS_BRDF_ENERGY_CONSERVATION: boolean;
199
+ SPHERICAL_HARMONICS: boolean;
200
+ SPECULAR_GLOSSINESS_ENERGY_CONSERVATION: boolean;
201
+ MIX_IBL_RADIANCE_WITH_IRRADIANCE: boolean;
202
+ LEGACY_SPECULAR_ENERGY_CONSERVATION: boolean;
203
+ BASE_DIFFUSE_MODEL: number;
204
+ DIELECTRIC_SPECULAR_MODEL: number;
205
+ CONDUCTOR_SPECULAR_MODEL: number;
206
+ /**
207
+ * Initializes the PBR Material defines.
208
+ * @param externalProperties The external properties
209
+ */
210
+ constructor(externalProperties?: {
211
+ [name: string]: {
212
+ type: string;
213
+ default: any;
214
+ };
215
+ });
216
+ /**
217
+ * Resets the PBR Material defines.
218
+ */
219
+ reset(): void;
220
+ }
221
+ declare const OpenPBRMaterialBase_base: {
222
+ new (...args: any[]): {
223
+ _imageProcessingConfiguration: ImageProcessingConfiguration;
224
+ imageProcessingConfiguration: ImageProcessingConfiguration;
225
+ _imageProcessingObserver: Nullable<import("../../index.js").Observer<ImageProcessingConfiguration>>;
226
+ _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>): void;
227
+ cameraColorCurvesEnabled: boolean;
228
+ cameraColorGradingEnabled: boolean;
229
+ cameraToneMappingEnabled: boolean;
230
+ cameraExposure: number;
231
+ cameraContrast: number;
232
+ cameraColorGradingTexture: Nullable<BaseTexture>;
233
+ cameraColorCurves: Nullable<import("../index.js").ColorCurves>;
234
+ };
235
+ } & typeof PushMaterial;
236
+ declare class OpenPBRMaterialBase extends OpenPBRMaterialBase_base {
237
+ }
238
+ /**
239
+ * A Physically based material that follows the specification of OpenPBR.
240
+ *
241
+ * For more information, please refer to the documentation :
242
+ * https://academysoftwarefoundation.github.io/OpenPBR/index.html
243
+ */
244
+ export declare class OpenPBRMaterial extends OpenPBRMaterialBase {
245
+ /**
246
+ * Base Weight is a multiplier on the diffuse and metal lobes.
247
+ * See OpenPBR's specs for base_weight
248
+ */
249
+ baseWeight: number;
250
+ private _baseWeight;
251
+ /**
252
+ * Base Weight is a multiplier on the diffuse and metal lobes.
253
+ * See OpenPBR's specs for base_weight
254
+ */
255
+ baseWeightTexture: Nullable<BaseTexture>;
256
+ private _baseWeightTexture;
257
+ /**
258
+ * Color of the base diffuse lobe.
259
+ * See OpenPBR's specs for base_color
260
+ */
261
+ baseColor: Color3;
262
+ private _baseColor;
263
+ /**
264
+ * Base Color Texture property.
265
+ * See OpenPBR's specs for base_color
266
+ */
267
+ baseColorTexture: Nullable<BaseTexture>;
268
+ private _baseColorTexture;
269
+ /**
270
+ * Roughness of the diffuse lobe.
271
+ * See OpenPBR's specs for base_diffuse_roughness
272
+ */
273
+ baseDiffuseRoughness: number;
274
+ private _baseDiffuseRoughness;
275
+ /**
276
+ * Roughness texture of the diffuse lobe.
277
+ * See OpenPBR's specs for base_diffuse_roughness
278
+ */
279
+ baseDiffuseRoughnessTexture: Nullable<BaseTexture>;
280
+ private _baseDiffuseRoughnessTexture;
281
+ /**
282
+ * Metalness of the base lobe.
283
+ * See OpenPBR's specs for base_metalness
284
+ */
285
+ baseMetalness: number;
286
+ private _baseMetalness;
287
+ /**
288
+ * Metalness texture.
289
+ * See OpenPBR's specs for base_metalness
290
+ */
291
+ baseMetalnessTexture: Nullable<BaseTexture>;
292
+ private _baseMetalnessTexture;
293
+ /**
294
+ * Weight of the specular lobe.
295
+ * See OpenPBR's specs for specular_weight
296
+ */
297
+ specularWeight: number;
298
+ private _specularWeight;
299
+ /**
300
+ * Weight texture of the specular lobe.
301
+ * See OpenPBR's specs for specular_weight
302
+ */
303
+ specularWeightTexture: Nullable<BaseTexture>;
304
+ private _specularWeightTexture;
305
+ /**
306
+ * Color of the specular lobe.
307
+ * See OpenPBR's specs for specular_color
308
+ */
309
+ specularColor: Color3;
310
+ private _specularColor;
311
+ /**
312
+ * Specular Color Texture property.
313
+ * See OpenPBR's specs for specular_color
314
+ */
315
+ specularColorTexture: Nullable<BaseTexture>;
316
+ private _specularColorTexture;
317
+ /**
318
+ * Roughness of the specular lobe.
319
+ * See OpenPBR's specs for specular_roughness
320
+ */
321
+ specularRoughness: number;
322
+ private _specularRoughness;
323
+ /**
324
+ * Roughness texture of the specular lobe.
325
+ * See OpenPBR's specs for specular_roughness
326
+ */
327
+ specularRoughnessTexture: Nullable<BaseTexture>;
328
+ private _specularRoughnessTexture;
329
+ /**
330
+ * Anisotropic roughness of the specular lobe.
331
+ * See OpenPBR's specs for specular_roughness_anisotropy
332
+ */
333
+ specularRoughnessAnisotropy: number;
334
+ private _specularRoughnessAnisotropy;
335
+ /**
336
+ * Anisotropic Roughness texture.
337
+ * See OpenPBR's specs for specular_roughness
338
+ */
339
+ specularRoughnessAnisotropyTexture: Nullable<BaseTexture>;
340
+ private _specularRoughnessAnisotropyTexture;
341
+ /**
342
+ * IOR of the specular lobe.
343
+ * See OpenPBR's specs for specular_ior
344
+ */
345
+ specularIor: number;
346
+ private _specularIor;
347
+ /**
348
+ * Defines the amount of clear coat on the surface.
349
+ * See OpenPBR's specs for coat_weight
350
+ */
351
+ coatWeight: number;
352
+ private _coatWeight;
353
+ /**
354
+ * Coat weight texture.
355
+ * See OpenPBR's specs for coat_weight
356
+ */
357
+ coatWeightTexture: Nullable<BaseTexture>;
358
+ private _coatWeightTexture;
359
+ /**
360
+ * Defines the color of the clear coat on the surface.
361
+ * See OpenPBR's specs for coat_color
362
+ */
363
+ coatColor: Color3;
364
+ private _coatColor;
365
+ /**
366
+ * Color texture of the clear coat.
367
+ * See OpenPBR's specs for coat_color
368
+ */
369
+ coatColorTexture: Nullable<BaseTexture>;
370
+ private _coatColorTexture;
371
+ /**
372
+ * Defines the roughness of the clear coat on the surface.
373
+ * See OpenPBR's specs for coat_roughness
374
+ */
375
+ coatRoughness: number;
376
+ private _coatRoughness;
377
+ /**
378
+ * Roughness texture of the clear coat.
379
+ * See OpenPBR's specs for coat_roughness
380
+ */
381
+ coatRoughnessTexture: Nullable<BaseTexture>;
382
+ private _coatRoughnessTexture;
383
+ /**
384
+ * Defines the anisotropy of the clear coat on the surface.
385
+ * See OpenPBR's specs for coat_roughness_anisotropy
386
+ */
387
+ coatRoughnessAnisotropy: number;
388
+ private _coatRoughnessAnisotropy;
389
+ /**
390
+ * Anisotropic Roughness texture of the clear coat.
391
+ * See OpenPBR's specs for coat_roughness_anisotropy
392
+ */
393
+ coatRoughnessAnisotropyTexture: Nullable<BaseTexture>;
394
+ private _coatRoughnessAnisotropyTexture;
395
+ /**
396
+ * Defines the IOR of the clear coat on the surface.
397
+ * See OpenPBR's specs for coat_ior
398
+ */
399
+ coatIor: number;
400
+ private _coatIor;
401
+ /**
402
+ * Defines the amount that interreflections within the coat allow the underlying surface
403
+ * to be darkened. A value of 1.0 means that the physically correct amount of darkening
404
+ * is applied, while a value of 0.0 means that no darkening is applied.
405
+ * See OpenPBR's specs for coat_darkening
406
+ */
407
+ coatDarkening: number;
408
+ private _coatDarkening;
409
+ /**
410
+ * Defines the amount that interreflections within the coat allow the underlying surface
411
+ * to be darkened. A value of 1.0 means that the physically correct amount of darkening
412
+ * is applied, while a value of 0.0 means that no darkening is applied.
413
+ * See OpenPBR's specs for coat_darkening
414
+ */
415
+ coatDarkeningTexture: Nullable<BaseTexture>;
416
+ private _coatDarkeningTexture;
417
+ /**
418
+ * Specifies whether the coat roughness is taken from the
419
+ * same texture as the coat_weight.
420
+ */
421
+ useCoatRoughnessFromWeightTexture: boolean;
422
+ /**
423
+ * Defines the normal of the material's geometry.
424
+ * See OpenPBR's specs for geometry_normal
425
+ */
426
+ geometryNormalTexture: Nullable<BaseTexture>;
427
+ private _geometryNormalTexture;
428
+ /**
429
+ * Defines the tangent of the material's geometry. Used only for anisotropic reflections.
430
+ * See OpenPBR's specs for geometry_tangent
431
+ */
432
+ geometryTangent: Vector2;
433
+ private _geometryTangent;
434
+ /**
435
+ * Defines the angle of the tangent of the material's geometry. Used only for anisotropic reflections.
436
+ * See OpenPBR's specs for geometry_tangent
437
+ */
438
+ get geometryTangentAngle(): number;
439
+ set geometryTangentAngle(value: number);
440
+ /**
441
+ * Defines the tangent of the material's geometry. Used only for anisotropic reflections.
442
+ * See OpenPBR's specs for geometry_tangent
443
+ */
444
+ geometryTangentTexture: Nullable<BaseTexture>;
445
+ private _geometryTangentTexture;
446
+ /**
447
+ * Defines the normal of the material's coat layer.
448
+ * See OpenPBR's specs for geometry_coat_normal
449
+ */
450
+ geometryCoatNormalTexture: Nullable<BaseTexture>;
451
+ private _geometryCoatNormalTexture;
452
+ /**
453
+ * Defines the tangent of the material's coat layer. Used only for anisotropic reflections.
454
+ * See OpenPBR's specs for geometry_coat_tangent
455
+ */
456
+ geometryCoatTangent: Vector2;
457
+ private _geometryCoatTangent;
458
+ /**
459
+ * Defines the angle of the tangent of the material's coat layer.
460
+ */
461
+ get geometryCoatTangentAngle(): number;
462
+ /**
463
+ * Defines the angle of the tangent of the material's coat layer.
464
+ */
465
+ set geometryCoatTangentAngle(value: number);
466
+ /**
467
+ * Defines the tangent of the material's coat layer. Used only for anisotropic reflections.
468
+ * See OpenPBR's specs for geometry_coat_tangent
469
+ */
470
+ geometryCoatTangentTexture: Nullable<BaseTexture>;
471
+ private _geometryCoatTangentTexture;
472
+ /**
473
+ * Defines the opacity of the material's geometry.
474
+ * See OpenPBR's specs for geometry_opacity
475
+ */
476
+ geometryOpacity: number;
477
+ private _geometryOpacity;
478
+ /**
479
+ * Defines the opacity texture of the material's geometry.
480
+ * See OpenPBR's specs for geometry_opacity
481
+ */
482
+ geometryOpacityTexture: Nullable<BaseTexture>;
483
+ private _geometryOpacityTexture;
484
+ /**
485
+ * Defines the luminance of the material's emission.
486
+ * See OpenPBR's specs for emission_luminance
487
+ */
488
+ emissionLuminance: number;
489
+ private _emissionLuminance;
490
+ /**
491
+ * Defines the color of the material's emission.
492
+ * See OpenPBR's specs for emission_color
493
+ */
494
+ emissionColor: Color3;
495
+ private _emissionColor;
496
+ /**
497
+ * Defines the texture of the material's emission color.
498
+ * See OpenPBR's specs for emission_color
499
+ */
500
+ emissionColorTexture: Nullable<BaseTexture>;
501
+ private _emissionColorTexture;
502
+ /**
503
+ * Defines the ambient occlusion texture.
504
+ */
505
+ ambientOcclusionTexture: Nullable<BaseTexture>;
506
+ private _ambientOcclusionTexture;
507
+ private _propertyList;
508
+ private _uniformsList;
509
+ private _samplersList;
510
+ private _samplerDefines;
511
+ private static _noiseTextures;
512
+ /**
513
+ * Intensity of the direct lights e.g. the four lights available in your scene.
514
+ * This impacts both the direct diffuse and specular highlights.
515
+ */
516
+ directIntensity: number;
517
+ /**
518
+ * Intensity of the environment e.g. how much the environment will light the object
519
+ * either through harmonics for rough material or through the reflection for shiny ones.
520
+ */
521
+ environmentIntensity: number;
522
+ /**
523
+ * Specifies that the specular weight is stored in the alpha channel of the specular weight texture.
524
+ */
525
+ useSpecularWeightFromTextureAlpha: boolean;
526
+ /**
527
+ * Enforces alpha test in opaque or blend mode in order to improve the performances of some situations.
528
+ */
529
+ forceAlphaTest: boolean;
530
+ /**
531
+ * Defines the alpha limits in alpha test mode.
532
+ */
533
+ alphaCutOff: number;
534
+ /**
535
+ * Specifies if the metallic texture contains the ambient occlusion information in its red channel.
536
+ */
537
+ useAmbientOcclusionFromMetallicTextureRed: boolean;
538
+ /**
539
+ * Specifies if the ambient texture contains the ambient occlusion information in its red channel only.
540
+ */
541
+ useAmbientInGrayScale: boolean;
542
+ /**
543
+ * BJS is using an hardcoded light falloff based on a manually sets up range.
544
+ * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.
545
+ * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
546
+ */
547
+ get usePhysicalLightFalloff(): boolean;
548
+ /**
549
+ * BJS is using an hardcoded light falloff based on a manually sets up range.
550
+ * In PBR, one way to represents the falloff is to use the inverse squared root algorithm.
551
+ * This parameter can help you switch back to the BJS mode in order to create scenes using both materials.
552
+ */
553
+ set usePhysicalLightFalloff(value: boolean);
554
+ /**
555
+ * In order to support the falloff compatibility with gltf, a special mode has been added
556
+ * to reproduce the gltf light falloff.
557
+ */
558
+ get useGLTFLightFalloff(): boolean;
559
+ /**
560
+ * In order to support the falloff compatibility with gltf, a special mode has been added
561
+ * to reproduce the gltf light falloff.
562
+ */
563
+ set useGLTFLightFalloff(value: boolean);
564
+ /**
565
+ * Allows using an object space normal map (instead of tangent space).
566
+ */
567
+ useObjectSpaceNormalMap: boolean;
568
+ /**
569
+ * Allows using the normal map in parallax mode.
570
+ */
571
+ useParallax: boolean;
572
+ /**
573
+ * Allows using the normal map in parallax occlusion mode.
574
+ */
575
+ useParallaxOcclusion: boolean;
576
+ /**
577
+ * Controls the scale bias of the parallax mode.
578
+ */
579
+ parallaxScaleBias: number;
580
+ /**
581
+ * If sets to true, disables all the lights affecting the material.
582
+ */
583
+ disableLighting: boolean;
584
+ /**
585
+ * Force the shader to compute irradiance in the fragment shader in order to take normal mapping into account.
586
+ */
587
+ forceIrradianceInFragment: boolean;
588
+ /**
589
+ * Number of Simultaneous lights allowed on the material.
590
+ */
591
+ maxSimultaneousLights: number;
592
+ /**
593
+ * If sets to true, x component of normal map value will invert (x = 1.0 - x).
594
+ */
595
+ invertNormalMapX: boolean;
596
+ /**
597
+ * If sets to true, y component of normal map value will invert (y = 1.0 - y).
598
+ */
599
+ invertNormalMapY: boolean;
600
+ /**
601
+ * If sets to true and backfaceCulling is false, normals will be flipped on the backside.
602
+ */
603
+ twoSidedLighting: boolean;
604
+ /**
605
+ * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
606
+ * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)
607
+ */
608
+ useAlphaFresnel: boolean;
609
+ /**
610
+ * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
611
+ * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)
612
+ */
613
+ useLinearAlphaFresnel: boolean;
614
+ /**
615
+ * Let user defines the brdf lookup texture used for IBL.
616
+ * A default 8bit version is embedded but you could point at :
617
+ * * Default texture: https://assets.babylonjs.com/environments/correlatedMSBRDF_RGBD.png
618
+ * * Default 16bit pixel depth texture: https://assets.babylonjs.com/environments/correlatedMSBRDF.dds
619
+ * * LEGACY Default None correlated https://assets.babylonjs.com/environments/uncorrelatedBRDF_RGBD.png
620
+ * * LEGACY Default None correlated 16bit pixel depth https://assets.babylonjs.com/environments/uncorrelatedBRDF.dds
621
+ */
622
+ environmentBRDFTexture: Nullable<BaseTexture>;
623
+ /**
624
+ * Force normal to face away from face.
625
+ */
626
+ forceNormalForward: boolean;
627
+ /**
628
+ * Enables specular anti aliasing in the PBR shader.
629
+ * It will both interacts on the Geometry for analytical and IBL lighting.
630
+ * It also prefilter the roughness map based on the normalmap values.
631
+ */
632
+ enableSpecularAntiAliasing: boolean;
633
+ /**
634
+ * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal
635
+ * makes the reflect vector face the model (under horizon).
636
+ */
637
+ useHorizonOcclusion: boolean;
638
+ /**
639
+ * This parameters will enable/disable radiance occlusion by preventing the radiance to lit
640
+ * too much the area relying on ambient texture to define their ambient occlusion.
641
+ */
642
+ useRadianceOcclusion: boolean;
643
+ /**
644
+ * If set to true, no lighting calculations will be applied.
645
+ */
646
+ unlit: boolean;
647
+ /**
648
+ * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)
649
+ */
650
+ applyDecalMapAfterDetailMap: boolean;
651
+ /**
652
+ * Force all the PBR materials to compile to glsl even on WebGPU engines.
653
+ * False by default. This is mostly meant for backward compatibility.
654
+ */
655
+ static ForceGLSL: boolean;
656
+ /**
657
+ * This stores the direct, emissive, environment, and specular light intensities into a Vector4.
658
+ */
659
+ private _lightingInfos;
660
+ /**
661
+ * Stores the radiance (and, possibly, irradiance) values in a texture.
662
+ * @internal
663
+ */
664
+ _radianceTexture: Nullable<BaseTexture>;
665
+ /**
666
+ * Specifies that the specular weight will be read from the alpha channel.
667
+ * This is for compatibility with glTF's KHR_materials_specular extension.
668
+ * @internal
669
+ */
670
+ _useSpecularWeightFromAlpha: boolean;
671
+ /**
672
+ * Specifies that the specular weight will be read from the alpha channel of the specular color texture.
673
+ * This is for compatibility with glTF's KHR_materials_specular extension.
674
+ * @internal
675
+ */
676
+ _useSpecularWeightFromSpecularColorTexture: boolean;
677
+ /**
678
+ * Specifies if the material uses anisotropy weight read from the geometry tangent texture's blue channel.
679
+ * This is for compatibility with glTF's anisotropy extension.
680
+ * @internal
681
+ */
682
+ _useSpecularRoughnessAnisotropyFromTangentTexture: boolean;
683
+ /**
684
+ * Specifies if the material uses coat anisotropy weight read from the coat's geometry tangent texture's blue channel.
685
+ * This is for compatibility with glTF's clearcoat_anisotropy extension.
686
+ * @internal
687
+ */
688
+ _useCoatRoughnessAnisotropyFromTangentTexture: boolean;
689
+ /**
690
+ * Assume the anisotropy data is stored in the format specified by
691
+ * KHR_materials_anisotropy.
692
+ * @internal
693
+ */
694
+ _useGltfStyleAnisotropy: boolean;
695
+ /**
696
+ * This parameters will enable/disable Horizon occlusion to prevent normal maps to look shiny when the normal
697
+ * makes the reflect vector face the model (under horizon).
698
+ * @internal
699
+ */
700
+ _useHorizonOcclusion: boolean;
701
+ /**
702
+ * This parameters will enable/disable radiance occlusion by preventing the radiance to lit
703
+ * too much the area relying on ambient texture to define their ambient occlusion.
704
+ * @internal
705
+ */
706
+ _useRadianceOcclusion: boolean;
707
+ /**
708
+ * Specifies that the alpha is coming from the base color texture's alpha channel.
709
+ * This is for compatibility with glTF.
710
+ * @internal
711
+ */
712
+ _useAlphaFromBaseColorTexture: boolean;
713
+ /**
714
+ * Specifies if the metallic texture contains the ambient occlusion information in its red channel.
715
+ * This is for compatibility with glTF.
716
+ * @internal
717
+ */
718
+ _useAmbientOcclusionFromMetallicTextureRed: boolean;
719
+ /**
720
+ * Specifies if the metallic texture contains the roughness information in its green channel.
721
+ * This is for compatibility with glTF.
722
+ * @internal
723
+ */
724
+ _useRoughnessFromMetallicTextureGreen: boolean;
725
+ /**
726
+ * Specifies if the metallic texture contains the metallic information in its blue channel.
727
+ * This is for compatibility with glTF.
728
+ * @internal
729
+ */
730
+ _useMetallicFromMetallicTextureBlue: boolean;
731
+ /**
732
+ * Defines the falloff type used in this material.
733
+ * It by default is Physical.
734
+ * @internal
735
+ */
736
+ _lightFalloff: number;
737
+ /**
738
+ * Allows using an object space normal map (instead of tangent space).
739
+ * @internal
740
+ */
741
+ _useObjectSpaceNormalMap: boolean;
742
+ /**
743
+ * Allows using the normal map in parallax mode.
744
+ * @internal
745
+ */
746
+ _useParallax: boolean;
747
+ /**
748
+ * Allows using the normal map in parallax occlusion mode.
749
+ * @internal
750
+ */
751
+ _useParallaxOcclusion: boolean;
752
+ /**
753
+ * Controls the scale bias of the parallax mode.
754
+ * @internal
755
+ */
756
+ _parallaxScaleBias: number;
757
+ /**
758
+ * If sets to true, disables all the lights affecting the material.
759
+ * @internal
760
+ */
761
+ _disableLighting: boolean;
762
+ /**
763
+ * Number of Simultaneous lights allowed on the material.
764
+ * @internal
765
+ */
766
+ _maxSimultaneousLights: number;
767
+ /**
768
+ * If sets to true, x component of normal map value will be inverted (x = 1.0 - x).
769
+ * @internal
770
+ */
771
+ _invertNormalMapX: boolean;
772
+ /**
773
+ * If sets to true, y component of normal map value will be inverted (y = 1.0 - y).
774
+ * @internal
775
+ */
776
+ _invertNormalMapY: boolean;
777
+ /**
778
+ * If sets to true and backfaceCulling is false, normals will be flipped on the backside.
779
+ * @internal
780
+ */
781
+ _twoSidedLighting: boolean;
782
+ /**
783
+ * Defines the alpha limits in alpha test mode.
784
+ * @internal
785
+ */
786
+ _alphaCutOff: number;
787
+ /**
788
+ * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
789
+ * And/Or occlude the blended part. (alpha is converted to gamma to compute the fresnel)
790
+ * @internal
791
+ */
792
+ _useAlphaFresnel: boolean;
793
+ /**
794
+ * A fresnel is applied to the alpha of the model to ensure grazing angles edges are not alpha tested.
795
+ * And/Or occlude the blended part. (alpha stays linear to compute the fresnel)
796
+ * @internal
797
+ */
798
+ _useLinearAlphaFresnel: boolean;
799
+ /**
800
+ * Specifies the environment BRDF texture used to compute the scale and offset roughness values
801
+ * from cos theta and roughness:
802
+ * http://blog.selfshadow.com/publications/s2013-shading-course/karis/s2013_pbs_epic_notes_v2.pdf
803
+ * @internal
804
+ */
805
+ _environmentBRDFTexture: Nullable<BaseTexture>;
806
+ /**
807
+ * Force the shader to compute irradiance in the fragment shader in order to take normal mapping into account.
808
+ * @internal
809
+ */
810
+ _forceIrradianceInFragment: boolean;
811
+ private _realTimeFiltering;
812
+ /**
813
+ * Enables realtime filtering on the texture.
814
+ */
815
+ get realTimeFiltering(): boolean;
816
+ set realTimeFiltering(b: boolean);
817
+ private _realTimeFilteringQuality;
818
+ /**
819
+ * Quality switch for realtime filtering
820
+ */
821
+ get realTimeFilteringQuality(): number;
822
+ set realTimeFilteringQuality(n: number);
823
+ /**
824
+ * Can this material render to several textures at once
825
+ */
826
+ get canRenderToMRT(): boolean;
827
+ /**
828
+ * Force normal to face away from face.
829
+ * @internal
830
+ */
831
+ _forceNormalForward: boolean;
832
+ /**
833
+ * Enables specular anti aliasing in the PBR shader.
834
+ * It will both interacts on the Geometry for analytical and IBL lighting.
835
+ * It also prefilter the roughness map based on the normalmap values.
836
+ * @internal
837
+ */
838
+ _enableSpecularAntiAliasing: boolean;
839
+ /**
840
+ * Stores the available render targets.
841
+ */
842
+ private _renderTargets;
843
+ /**
844
+ * If set to true, no lighting calculations will be applied.
845
+ */
846
+ private _unlit;
847
+ /**
848
+ * If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)
849
+ */
850
+ private _applyDecalMapAfterDetailMap;
851
+ private _debugMode;
852
+ private _shadersLoaded;
853
+ private _breakShaderLoadedCheck;
854
+ /**
855
+ * @internal
856
+ * This is reserved for the inspector.
857
+ * Defines the material debug mode.
858
+ * It helps seeing only some components of the material while troubleshooting.
859
+ */
860
+ debugMode: number;
861
+ /**
862
+ * @internal
863
+ * This is reserved for the inspector.
864
+ * Specify from where on screen the debug mode should start.
865
+ * The value goes from -1 (full screen) to 1 (not visible)
866
+ * It helps with side by side comparison against the final render
867
+ * This defaults to -1
868
+ */
869
+ debugLimit: number;
870
+ /**
871
+ * @internal
872
+ * This is reserved for the inspector.
873
+ * As the default viewing range might not be enough (if the ambient is really small for instance)
874
+ * You can use the factor to better multiply the final value.
875
+ */
876
+ debugFactor: number;
877
+ /**
878
+ * Defines additional PrePass parameters for the material.
879
+ */
880
+ readonly prePassConfiguration: PrePassConfiguration;
881
+ protected _cacheHasRenderTargetTextures: boolean;
882
+ /**
883
+ * Instantiates a new OpenPBRMaterial instance.
884
+ *
885
+ * @param name The material name
886
+ * @param scene The scene the material will be use in.
887
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
888
+ */
889
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
890
+ /**
891
+ * Gets a boolean indicating that current material needs to register RTT
892
+ */
893
+ get hasRenderTargetTextures(): boolean;
894
+ /**
895
+ * Can this material render to prepass
896
+ */
897
+ get isPrePassCapable(): boolean;
898
+ /**
899
+ * @returns the name of the material class.
900
+ */
901
+ getClassName(): string;
902
+ protected _transparencyMode: number;
903
+ get transparencyMode(): number;
904
+ set transparencyMode(value: number);
905
+ /**
906
+ * @returns whether or not the alpha value of the albedo texture should be used for alpha blending.
907
+ */
908
+ protected _shouldUseAlphaFromBaseColorTexture(): boolean;
909
+ /**
910
+ * @returns whether or not there is a usable alpha channel for transparency.
911
+ */
912
+ protected _hasAlphaChannel(): boolean;
913
+ /**
914
+ * Makes a duplicate of the current material.
915
+ * @param name - name to use for the new material.
916
+ * @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g baseColor and opacity), only clone it once and reuse it on the other channels. Default false.
917
+ * @param rootUrl defines the root URL to use to load textures
918
+ * @returns cloned material instance
919
+ */
920
+ clone(name: string, cloneTexturesOnlyOnce?: boolean, rootUrl?: string): OpenPBRMaterial;
921
+ /**
922
+ * Serializes this PBR Material.
923
+ * @returns - An object with the serialized material.
924
+ */
925
+ serialize(): any;
926
+ /**
927
+ * Parses a PBR Material from a serialized object.
928
+ * @param source - Serialized object.
929
+ * @param scene - BJS scene instance.
930
+ * @param rootUrl - url for the scene object
931
+ * @returns - OpenPBRMaterial
932
+ */
933
+ static Parse(source: any, scene: Scene, rootUrl: string): OpenPBRMaterial;
934
+ /**
935
+ * Force shader compilation
936
+ * @param mesh - Define the mesh we want to force the compilation for
937
+ * @param onCompiled - Define a callback triggered when the compilation completes
938
+ * @param options - Define the options used to create the compilation
939
+ */
940
+ forceCompilation(mesh: AbstractMesh, onCompiled?: (material: Material) => void, options?: Partial<IMaterialCompilationOptions>): void;
941
+ /**
942
+ * Specifies that the submesh is ready to be used.
943
+ * @param mesh - BJS mesh.
944
+ * @param subMesh - A submesh of the BJS mesh. Used to check if it is ready.
945
+ * @param useInstances - Specifies that instances should be used.
946
+ * @returns - boolean indicating that the submesh is ready or not.
947
+ */
948
+ isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
949
+ /**
950
+ * Initializes the uniform buffer layout for the shader.
951
+ */
952
+ buildUniformLayout(): void;
953
+ /**
954
+ * Binds the submesh data.
955
+ * @param world - The world matrix.
956
+ * @param mesh - The BJS mesh.
957
+ * @param subMesh - A submesh of the BJS mesh.
958
+ */
959
+ bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
960
+ /**
961
+ * Returns the animatable textures.
962
+ * If material have animatable metallic texture, then reflectivity texture will not be returned, even if it has animations.
963
+ * @returns - Array of animatable textures.
964
+ */
965
+ getAnimatables(): IAnimatable[];
966
+ /**
967
+ * Returns an array of the actively used textures.
968
+ * @returns - Array of BaseTextures
969
+ */
970
+ getActiveTextures(): BaseTexture[];
971
+ /**
972
+ * Checks to see if a texture is used in the material.
973
+ * @param texture - Base texture to use.
974
+ * @returns - Boolean specifying if a texture is used in the material.
975
+ */
976
+ hasTexture(texture: BaseTexture): boolean;
977
+ /**
978
+ * Sets the required values to the prepass renderer.
979
+ * It can't be sets when subsurface scattering of this material is disabled.
980
+ * When scene have ability to enable subsurface prepass effect, it will enable.
981
+ * @returns - If prepass is enabled or not.
982
+ */
983
+ setPrePassRenderer(): boolean;
984
+ /**
985
+ * Disposes the resources of the material.
986
+ * @param forceDisposeEffect - Forces the disposal of effects.
987
+ * @param forceDisposeTextures - Forces the disposal of all textures.
988
+ */
989
+ dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean): void;
990
+ /**
991
+ * Returns the texture used for reflections.
992
+ * @returns - Reflection texture if present. Otherwise, returns the environment texture.
993
+ */
994
+ private _getRadianceTexture;
995
+ private _prepareEffect;
996
+ private _prepareDefines;
997
+ }
998
+ export {};