@babylonjs/core 6.32.0 → 6.33.0

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 (138) hide show
  1. package/Animations/animatable.js +13 -1
  2. package/Animations/animatable.js.map +1 -1
  3. package/Animations/animation.d.ts +4 -0
  4. package/Animations/animation.js +13 -1
  5. package/Animations/animation.js.map +1 -1
  6. package/Animations/runtimeAnimation.js +11 -1
  7. package/Animations/runtimeAnimation.js.map +1 -1
  8. package/Behaviors/Meshes/pointerDragBehavior.js +18 -7
  9. package/Behaviors/Meshes/pointerDragBehavior.js.map +1 -1
  10. package/Engines/Extensions/engine.dynamicTexture.js +6 -0
  11. package/Engines/Extensions/engine.dynamicTexture.js.map +1 -1
  12. package/Engines/Extensions/engine.multiRender.js +1 -1
  13. package/Engines/Extensions/engine.multiRender.js.map +1 -1
  14. package/Engines/Extensions/engine.renderTarget.js +1 -1
  15. package/Engines/Extensions/engine.renderTarget.js.map +1 -1
  16. package/Engines/ICanvas.d.ts +45 -0
  17. package/Engines/ICanvas.js.map +1 -1
  18. package/Engines/thinEngine.d.ts +0 -4
  19. package/Engines/thinEngine.js +2 -24
  20. package/Engines/thinEngine.js.map +1 -1
  21. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.d.ts +3 -0
  22. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js +11 -4
  23. package/FlowGraph/Blocks/Event/flowGraphMeshPickEventBlock.js.map +1 -1
  24. package/FlowGraph/flowGraph.d.ts +1 -0
  25. package/FlowGraph/flowGraph.js +26 -1
  26. package/FlowGraph/flowGraph.js.map +1 -1
  27. package/FlowGraph/utils.d.ts +9 -0
  28. package/FlowGraph/utils.js +11 -0
  29. package/FlowGraph/utils.js.map +1 -0
  30. package/Gizmos/axisDragGizmo.js +1 -1
  31. package/Gizmos/axisDragGizmo.js.map +1 -1
  32. package/Gizmos/axisScaleGizmo.d.ts +13 -1
  33. package/Gizmos/axisScaleGizmo.js +37 -8
  34. package/Gizmos/axisScaleGizmo.js.map +1 -1
  35. package/Gizmos/gizmo.d.ts +17 -1
  36. package/Gizmos/gizmo.js +28 -2
  37. package/Gizmos/gizmo.js.map +1 -1
  38. package/Gizmos/planeDragGizmo.d.ts +3 -1
  39. package/Gizmos/planeDragGizmo.js +5 -3
  40. package/Gizmos/planeDragGizmo.js.map +1 -1
  41. package/Gizmos/positionGizmo.d.ts +7 -0
  42. package/Gizmos/positionGizmo.js +15 -0
  43. package/Gizmos/positionGizmo.js.map +1 -1
  44. package/Gizmos/rotationGizmo.d.ts +7 -0
  45. package/Gizmos/rotationGizmo.js +15 -0
  46. package/Gizmos/rotationGizmo.js.map +1 -1
  47. package/Gizmos/scaleGizmo.d.ts +15 -0
  48. package/Gizmos/scaleGizmo.js +30 -0
  49. package/Gizmos/scaleGizmo.js.map +1 -1
  50. package/Materials/Background/backgroundMaterial.js +6 -1
  51. package/Materials/Background/backgroundMaterial.js.map +1 -1
  52. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +3 -3
  53. package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
  54. package/Materials/Node/Blocks/PBR/subSurfaceBlock.d.ts +4 -0
  55. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +14 -1
  56. package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
  57. package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js +5 -2
  58. package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js.map +1 -1
  59. package/Materials/Node/nodeMaterial.js +1 -0
  60. package/Materials/Node/nodeMaterial.js.map +1 -1
  61. package/Materials/Node/nodeMaterialBuildStateSharedData.d.ts +5 -1
  62. package/Materials/Node/nodeMaterialBuildStateSharedData.js.map +1 -1
  63. package/Materials/PBR/pbrBaseMaterial.d.ts +0 -12
  64. package/Materials/PBR/pbrBaseMaterial.js +1 -20
  65. package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
  66. package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +10 -0
  67. package/Materials/PBR/pbrSubSurfaceConfiguration.js +21 -0
  68. package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
  69. package/Materials/Textures/Procedurals/proceduralTexture.d.ts +5 -0
  70. package/Materials/Textures/Procedurals/proceduralTexture.js +16 -0
  71. package/Materials/Textures/Procedurals/proceduralTexture.js.map +1 -1
  72. package/Materials/Textures/internalTexture.d.ts +4 -0
  73. package/Materials/Textures/internalTexture.js +8 -1
  74. package/Materials/Textures/internalTexture.js.map +1 -1
  75. package/Materials/material.d.ts +8 -0
  76. package/Materials/material.js +19 -0
  77. package/Materials/material.js.map +1 -1
  78. package/Materials/shaderMaterial.js +23 -11
  79. package/Materials/shaderMaterial.js.map +1 -1
  80. package/Materials/standardMaterial.d.ts +0 -8
  81. package/Materials/standardMaterial.js +0 -15
  82. package/Materials/standardMaterial.js.map +1 -1
  83. package/Maths/math.plane.d.ts +8 -1
  84. package/Maths/math.plane.js +14 -5
  85. package/Maths/math.plane.js.map +1 -1
  86. package/Maths/math.vector.d.ts +2 -1
  87. package/Maths/math.vector.js +5 -4
  88. package/Maths/math.vector.js.map +1 -1
  89. package/Meshes/Node/Blocks/Set/setColorsBlock.js +3 -0
  90. package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
  91. package/Meshes/Node/Blocks/Set/setNormalsBlock.js +3 -0
  92. package/Meshes/Node/Blocks/Set/setNormalsBlock.js.map +1 -1
  93. package/Meshes/Node/Blocks/Set/setPositionsBlock.js +3 -0
  94. package/Meshes/Node/Blocks/Set/setPositionsBlock.js.map +1 -1
  95. package/Meshes/Node/Blocks/Set/setTangentsBlock.js +3 -0
  96. package/Meshes/Node/Blocks/Set/setTangentsBlock.js.map +1 -1
  97. package/Meshes/Node/Blocks/Set/setUVsBlock.js +3 -0
  98. package/Meshes/Node/Blocks/Set/setUVsBlock.js.map +1 -1
  99. package/Meshes/Node/Blocks/mergeGeometryBlock.js +6 -0
  100. package/Meshes/Node/Blocks/mergeGeometryBlock.js.map +1 -1
  101. package/Meshes/Node/Blocks/randomBlock.js +1 -1
  102. package/Meshes/Node/Blocks/randomBlock.js.map +1 -1
  103. package/Meshes/mesh.vertexData.js +78 -94
  104. package/Meshes/mesh.vertexData.js.map +1 -1
  105. package/Meshes/transformNode.d.ts +4 -0
  106. package/Meshes/transformNode.js +6 -0
  107. package/Meshes/transformNode.js.map +1 -1
  108. package/PostProcesses/postProcess.d.ts +88 -3
  109. package/PostProcesses/postProcess.js +34 -21
  110. package/PostProcesses/postProcess.js.map +1 -1
  111. package/Rendering/GaussianSplatting/gaussianSplatting.d.ts +65 -0
  112. package/Rendering/GaussianSplatting/gaussianSplatting.js +285 -0
  113. package/Rendering/GaussianSplatting/gaussianSplatting.js.map +1 -0
  114. package/Rendering/GaussianSplatting/index.d.ts +1 -0
  115. package/Rendering/GaussianSplatting/index.js +2 -0
  116. package/Rendering/GaussianSplatting/index.js.map +1 -0
  117. package/Rendering/index.d.ts +1 -0
  118. package/Rendering/index.js +1 -0
  119. package/Rendering/index.js.map +1 -1
  120. package/Shaders/ShadersInclude/pbrBlockSubSurface.js +119 -44
  121. package/Shaders/ShadersInclude/pbrBlockSubSurface.js.map +1 -1
  122. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js +3 -0
  123. package/Shaders/ShadersInclude/pbrFragmentDeclaration.js.map +1 -1
  124. package/Shaders/background.fragment.d.ts +2 -0
  125. package/Shaders/background.fragment.js +7 -0
  126. package/Shaders/background.fragment.js.map +1 -1
  127. package/Shaders/background.vertex.d.ts +2 -0
  128. package/Shaders/background.vertex.js +4 -0
  129. package/Shaders/background.vertex.js.map +1 -1
  130. package/Shaders/line.fragment.d.ts +2 -0
  131. package/Shaders/line.fragment.js +7 -0
  132. package/Shaders/line.fragment.js.map +1 -1
  133. package/Shaders/line.vertex.d.ts +2 -0
  134. package/Shaders/line.vertex.js +4 -0
  135. package/Shaders/line.vertex.js.map +1 -1
  136. package/Shaders/pbr.fragment.js +3 -0
  137. package/Shaders/pbr.fragment.js.map +1 -1
  138. package/package.json +1 -1
@@ -3,11 +3,15 @@ import type { NodeMaterialBlock } from "./nodeMaterialBlock";
3
3
  import type { InputBlock } from "./Blocks/Input/inputBlock";
4
4
  import type { Scene } from "../../scene";
5
5
  import type { Immutable } from "../../types";
6
- import type { NodeMaterialTextureBlocks } from "./nodeMaterial";
6
+ import type { NodeMaterial, NodeMaterialTextureBlocks } from "./nodeMaterial";
7
7
  /**
8
8
  * Class used to store shared data between 2 NodeMaterialBuildState
9
9
  */
10
10
  export declare class NodeMaterialBuildStateSharedData {
11
+ /**
12
+ * The node material we are currently building
13
+ */
14
+ nodeMaterial: NodeMaterial;
11
15
  /**
12
16
  * Gets the list of emitted varyings
13
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"nodeMaterialBuildStateSharedData.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Node/nodeMaterialBuildStateSharedData.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,OAAO,gCAAgC;IAmHzC,gCAAgC;IAChC;QAnHA;;WAEG;QACI,UAAK,GAAa,EAAE,CAAC;QAE5B;;WAEG;QACI,aAAQ,GAAa,EAAE,CAAC;QAE/B;;WAEG;QACI,uBAAkB,GAAG,EAAE,CAAC;QAO/B;;WAEG;QACI,gBAAW,GAAiB,EAAE,CAAC;QAEtC;;WAEG;QACI,kBAAa,GAAgC,EAAE,CAAC;QAEvD;;WAEG;QACI,mBAAc,GAAwB,EAAE,CAAC;QAEhD;;WAEG;QACI,yBAAoB,GAAwB,EAAE,CAAC;QAEtD;;WAEG;QACI,wBAAmB,GAAwB,EAAE,CAAC;QAErD;;WAEG;QACI,sBAAiB,GAAwB,EAAE,CAAC;QAEnD;;WAEG;QACI,4BAAuB,GAAwB,EAAE,CAAC;QAEzD;;WAEG;QACI,yBAAoB,GAAwB,EAAE,CAAC;QAEtD;;WAEG;QACI,mBAAc,GAAwB,EAAE,CAAC;QA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EAAE;YAC3B,YAAY,IAAI,sHAAsH,CAAC;SAC1I;QACD,KAAK,MAAM,iBAAiB,IAAI,IAAI,CAAC,MAAM,CAAC,6BAA6B,EAAE;YACvE,YAAY,IAAI,SAAS,iBAAiB,CAAC,IAAI,eAC3C,iBAAiB,CAAC,UAAU,CAAC,IACjC,IAAI,iBAAiB,CAAC,UAAU,CAAC,YAAY,EAAE,2CAA2C,CAAC;SAC9F;QAED,IAAI,YAAY,EAAE;YACd,MAAM,iCAAiC,GAAG,YAAY,CAAC;SAC1D;IACL,CAAC;CACJ","sourcesContent":["import type { NodeMaterialConnectionPoint } from \"./nodeMaterialBlockConnectionPoint\";\r\nimport type { NodeMaterialBlock } from \"./nodeMaterialBlock\";\r\nimport type { InputBlock } from \"./Blocks/Input/inputBlock\";\r\nimport type { Scene } from \"../../scene\";\r\nimport type { Immutable } from \"../../types\";\r\nimport type { NodeMaterialTextureBlocks } from \"./nodeMaterial\";\r\n\r\n/**\r\n * Class used to store shared data between 2 NodeMaterialBuildState\r\n */\r\nexport class NodeMaterialBuildStateSharedData {\r\n /**\r\n * Gets the list of emitted varyings\r\n */\r\n public temps: string[] = [];\r\n\r\n /**\r\n * Gets the list of emitted varyings\r\n */\r\n public varyings: string[] = [];\r\n\r\n /**\r\n * Gets the varying declaration string\r\n */\r\n public varyingDeclaration = \"\";\r\n\r\n /**\r\n * List of the fragment output nodes\r\n */\r\n public fragmentOutputNodes: Immutable<Array<NodeMaterialBlock>>;\r\n\r\n /**\r\n * Input blocks\r\n */\r\n public inputBlocks: InputBlock[] = [];\r\n\r\n /**\r\n * Input blocks\r\n */\r\n public textureBlocks: NodeMaterialTextureBlocks[] = [];\r\n\r\n /**\r\n * Bindable blocks (Blocks that need to set data to the effect)\r\n */\r\n public bindableBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * Bindable blocks (Blocks that need to set data to the effect) that will always be called (by bindForSubMesh), contrary to bindableBlocks that won't be called if _mustRebind() returns false\r\n */\r\n public forcedBindableBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a compilation fallback\r\n */\r\n public blocksWithFallbacks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a define update\r\n */\r\n public blocksWithDefines: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a repeatable content\r\n */\r\n public repeatableContentBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a dynamic list of uniforms\r\n */\r\n public dynamicUniformBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can block the isReady function for the material\r\n */\r\n public blockingBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * Gets the list of animated inputs\r\n */\r\n public animatedInputs: InputBlock[] = [];\r\n\r\n /**\r\n * Build Id used to avoid multiple recompilations\r\n */\r\n public buildId: number;\r\n\r\n /** List of emitted variables */\r\n public variableNames: { [key: string]: number } = {};\r\n\r\n /** List of emitted defines */\r\n public defineNames: { [key: string]: number } = {};\r\n\r\n /** Should emit comments? */\r\n public emitComments: boolean;\r\n\r\n /** Emit build activity */\r\n public verbose: boolean;\r\n\r\n /** Gets or sets the hosting scene */\r\n public scene: Scene;\r\n\r\n /**\r\n * Gets the compilation hints emitted at compilation time\r\n */\r\n public hints = {\r\n needWorldViewMatrix: false,\r\n needWorldViewProjectionMatrix: false,\r\n needAlphaBlending: false,\r\n needAlphaTesting: false,\r\n };\r\n\r\n /**\r\n * List of compilation checks\r\n */\r\n public checks = {\r\n emitVertex: false,\r\n emitFragment: false,\r\n notConnectedNonOptionalInputs: new Array<NodeMaterialConnectionPoint>(),\r\n };\r\n\r\n /**\r\n * Is vertex program allowed to be empty?\r\n */\r\n public allowEmptyVertexProgram: boolean = false;\r\n\r\n /** Creates a new shared data */\r\n public constructor() {\r\n // Exclude usual attributes from free variable names\r\n this.variableNames[\"position\"] = 0;\r\n this.variableNames[\"normal\"] = 0;\r\n this.variableNames[\"tangent\"] = 0;\r\n this.variableNames[\"uv\"] = 0;\r\n this.variableNames[\"uv2\"] = 0;\r\n this.variableNames[\"uv3\"] = 0;\r\n this.variableNames[\"uv4\"] = 0;\r\n this.variableNames[\"uv5\"] = 0;\r\n this.variableNames[\"uv6\"] = 0;\r\n this.variableNames[\"color\"] = 0;\r\n this.variableNames[\"matricesIndices\"] = 0;\r\n this.variableNames[\"matricesWeights\"] = 0;\r\n this.variableNames[\"matricesIndicesExtra\"] = 0;\r\n this.variableNames[\"matricesWeightsExtra\"] = 0;\r\n this.variableNames[\"diffuseBase\"] = 0;\r\n this.variableNames[\"specularBase\"] = 0;\r\n this.variableNames[\"worldPos\"] = 0;\r\n this.variableNames[\"shadow\"] = 0;\r\n this.variableNames[\"view\"] = 0;\r\n\r\n // Exclude known varyings\r\n this.variableNames[\"vTBN\"] = 0;\r\n\r\n // Exclude defines\r\n this.defineNames[\"MAINUV0\"] = 0;\r\n this.defineNames[\"MAINUV1\"] = 0;\r\n this.defineNames[\"MAINUV2\"] = 0;\r\n this.defineNames[\"MAINUV3\"] = 0;\r\n this.defineNames[\"MAINUV4\"] = 0;\r\n this.defineNames[\"MAINUV5\"] = 0;\r\n this.defineNames[\"MAINUV6\"] = 0;\r\n this.defineNames[\"MAINUV7\"] = 0;\r\n }\r\n\r\n /**\r\n * Emits console errors and exceptions if there is a failing check\r\n */\r\n public emitErrors() {\r\n let errorMessage = \"\";\r\n\r\n if (!this.checks.emitVertex && !this.allowEmptyVertexProgram) {\r\n errorMessage += \"NodeMaterial does not have a vertex output. You need to at least add a block that generates a glPosition value.\\n\";\r\n }\r\n if (!this.checks.emitFragment) {\r\n errorMessage += \"NodeMaterial does not have a fragment output. You need to at least add a block that generates a glFragColor value.\\n\";\r\n }\r\n for (const notConnectedInput of this.checks.notConnectedNonOptionalInputs) {\r\n errorMessage += `input ${notConnectedInput.name} from block ${\r\n notConnectedInput.ownerBlock.name\r\n }[${notConnectedInput.ownerBlock.getClassName()}] is not connected and is not optional.\\n`;\r\n }\r\n\r\n if (errorMessage) {\r\n throw \"Build of NodeMaterial failed:\\n\" + errorMessage;\r\n }\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"nodeMaterialBuildStateSharedData.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Node/nodeMaterialBuildStateSharedData.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,OAAO,gCAAgC;IAwHzC,gCAAgC;IAChC;QAnHA;;WAEG;QACI,UAAK,GAAa,EAAE,CAAC;QAE5B;;WAEG;QACI,aAAQ,GAAa,EAAE,CAAC;QAE/B;;WAEG;QACI,uBAAkB,GAAG,EAAE,CAAC;QAO/B;;WAEG;QACI,gBAAW,GAAiB,EAAE,CAAC;QAEtC;;WAEG;QACI,kBAAa,GAAgC,EAAE,CAAC;QAEvD;;WAEG;QACI,mBAAc,GAAwB,EAAE,CAAC;QAEhD;;WAEG;QACI,yBAAoB,GAAwB,EAAE,CAAC;QAEtD;;WAEG;QACI,wBAAmB,GAAwB,EAAE,CAAC;QAErD;;WAEG;QACI,sBAAiB,GAAwB,EAAE,CAAC;QAEnD;;WAEG;QACI,4BAAuB,GAAwB,EAAE,CAAC;QAEzD;;WAEG;QACI,yBAAoB,GAAwB,EAAE,CAAC;QAEtD;;WAEG;QACI,mBAAc,GAAwB,EAAE,CAAC;QAEhD;;WAEG;QACI,mBAAc,GAAiB,EAAE,CAAC;QAOzC,gCAAgC;QACzB,kBAAa,GAA8B,EAAE,CAAC;QAErD,8BAA8B;QACvB,gBAAW,GAA8B,EAAE,CAAC;QAWnD;;WAEG;QACI,UAAK,GAAG;YACX,mBAAmB,EAAE,KAAK;YAC1B,6BAA6B,EAAE,KAAK;YACpC,iBAAiB,EAAE,KAAK;YACxB,gBAAgB,EAAE,KAAK;SAC1B,CAAC;QAEF;;WAEG;QACI,WAAM,GAAG;YACZ,UAAU,EAAE,KAAK;YACjB,YAAY,EAAE,KAAK;YACnB,6BAA6B,EAAE,IAAI,KAAK,EAA+B;SA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";\r\nimport type { NodeMaterialBlock } from \"./nodeMaterialBlock\";\r\nimport type { InputBlock } from \"./Blocks/Input/inputBlock\";\r\nimport type { Scene } from \"../../scene\";\r\nimport type { Immutable } from \"../../types\";\r\nimport type { NodeMaterial, NodeMaterialTextureBlocks } from \"./nodeMaterial\";\r\n\r\n/**\r\n * Class used to store shared data between 2 NodeMaterialBuildState\r\n */\r\nexport class NodeMaterialBuildStateSharedData {\r\n /**\r\n * The node material we are currently building\r\n */\r\n public nodeMaterial: NodeMaterial;\r\n\r\n /**\r\n * Gets the list of emitted varyings\r\n */\r\n public temps: string[] = [];\r\n\r\n /**\r\n * Gets the list of emitted varyings\r\n */\r\n public varyings: string[] = [];\r\n\r\n /**\r\n * Gets the varying declaration string\r\n */\r\n public varyingDeclaration = \"\";\r\n\r\n /**\r\n * List of the fragment output nodes\r\n */\r\n public fragmentOutputNodes: Immutable<Array<NodeMaterialBlock>>;\r\n\r\n /**\r\n * Input blocks\r\n */\r\n public inputBlocks: InputBlock[] = [];\r\n\r\n /**\r\n * Input blocks\r\n */\r\n public textureBlocks: NodeMaterialTextureBlocks[] = [];\r\n\r\n /**\r\n * Bindable blocks (Blocks that need to set data to the effect)\r\n */\r\n public bindableBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * Bindable blocks (Blocks that need to set data to the effect) that will always be called (by bindForSubMesh), contrary to bindableBlocks that won't be called if _mustRebind() returns false\r\n */\r\n public forcedBindableBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a compilation fallback\r\n */\r\n public blocksWithFallbacks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a define update\r\n */\r\n public blocksWithDefines: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a repeatable content\r\n */\r\n public repeatableContentBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can provide a dynamic list of uniforms\r\n */\r\n public dynamicUniformBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * List of blocks that can block the isReady function for the material\r\n */\r\n public blockingBlocks: NodeMaterialBlock[] = [];\r\n\r\n /**\r\n * Gets the list of animated inputs\r\n */\r\n public animatedInputs: InputBlock[] = [];\r\n\r\n /**\r\n * Build Id used to avoid multiple recompilations\r\n */\r\n public buildId: number;\r\n\r\n /** List of emitted variables */\r\n public variableNames: { [key: string]: number } = {};\r\n\r\n /** List of emitted defines */\r\n public defineNames: { [key: string]: number } = {};\r\n\r\n /** Should emit comments? */\r\n public emitComments: boolean;\r\n\r\n /** Emit build activity */\r\n public verbose: boolean;\r\n\r\n /** Gets or sets the hosting scene */\r\n public scene: Scene;\r\n\r\n /**\r\n * Gets the compilation hints emitted at compilation time\r\n */\r\n public hints = {\r\n needWorldViewMatrix: false,\r\n needWorldViewProjectionMatrix: false,\r\n needAlphaBlending: false,\r\n needAlphaTesting: false,\r\n };\r\n\r\n /**\r\n * List of compilation checks\r\n */\r\n public checks = {\r\n emitVertex: false,\r\n emitFragment: false,\r\n notConnectedNonOptionalInputs: new Array<NodeMaterialConnectionPoint>(),\r\n };\r\n\r\n /**\r\n * Is vertex program allowed to be empty?\r\n */\r\n public allowEmptyVertexProgram: boolean = false;\r\n\r\n /** Creates a new shared data */\r\n public constructor() {\r\n // Exclude usual attributes from free variable names\r\n this.variableNames[\"position\"] = 0;\r\n this.variableNames[\"normal\"] = 0;\r\n this.variableNames[\"tangent\"] = 0;\r\n this.variableNames[\"uv\"] = 0;\r\n this.variableNames[\"uv2\"] = 0;\r\n this.variableNames[\"uv3\"] = 0;\r\n this.variableNames[\"uv4\"] = 0;\r\n this.variableNames[\"uv5\"] = 0;\r\n this.variableNames[\"uv6\"] = 0;\r\n this.variableNames[\"color\"] = 0;\r\n this.variableNames[\"matricesIndices\"] = 0;\r\n this.variableNames[\"matricesWeights\"] = 0;\r\n this.variableNames[\"matricesIndicesExtra\"] = 0;\r\n this.variableNames[\"matricesWeightsExtra\"] = 0;\r\n this.variableNames[\"diffuseBase\"] = 0;\r\n this.variableNames[\"specularBase\"] = 0;\r\n this.variableNames[\"worldPos\"] = 0;\r\n this.variableNames[\"shadow\"] = 0;\r\n this.variableNames[\"view\"] = 0;\r\n\r\n // Exclude known varyings\r\n this.variableNames[\"vTBN\"] = 0;\r\n\r\n // Exclude defines\r\n this.defineNames[\"MAINUV0\"] = 0;\r\n this.defineNames[\"MAINUV1\"] = 0;\r\n this.defineNames[\"MAINUV2\"] = 0;\r\n this.defineNames[\"MAINUV3\"] = 0;\r\n this.defineNames[\"MAINUV4\"] = 0;\r\n this.defineNames[\"MAINUV5\"] = 0;\r\n this.defineNames[\"MAINUV6\"] = 0;\r\n this.defineNames[\"MAINUV7\"] = 0;\r\n }\r\n\r\n /**\r\n * Emits console errors and exceptions if there is a failing check\r\n */\r\n public emitErrors() {\r\n let errorMessage = \"\";\r\n\r\n if (!this.checks.emitVertex && !this.allowEmptyVertexProgram) {\r\n errorMessage += \"NodeMaterial does not have a vertex output. You need to at least add a block that generates a glPosition value.\\n\";\r\n }\r\n if (!this.checks.emitFragment) {\r\n errorMessage += \"NodeMaterial does not have a fragment output. You need to at least add a block that generates a glFragColor value.\\n\";\r\n }\r\n for (const notConnectedInput of this.checks.notConnectedNonOptionalInputs) {\r\n errorMessage += `input ${notConnectedInput.name} from block ${\r\n notConnectedInput.ownerBlock.name\r\n }[${notConnectedInput.ownerBlock.getClassName()}] is not connected and is not optional.\\n`;\r\n }\r\n\r\n if (errorMessage) {\r\n throw \"Build of NodeMaterial failed:\\n\" + errorMessage;\r\n }\r\n }\r\n}\r\n"]}
@@ -642,10 +642,6 @@ export declare abstract class PBRBaseMaterial extends PushMaterial {
642
642
  * Sets the global ambient color for the material used in lighting calculations.
643
643
  */
644
644
  private _globalAmbientColor;
645
- /**
646
- * Enables the use of logarithmic depth buffers, which is good for wide depth buffers.
647
- */
648
- private _useLogarithmicDepth;
649
645
  /**
650
646
  * If set to true, no lighting calculations will be applied.
651
647
  */
@@ -730,14 +726,6 @@ export declare abstract class PBRBaseMaterial extends PushMaterial {
730
726
  * Gets the name of the material class.
731
727
  */
732
728
  getClassName(): string;
733
- /**
734
- * Enabled the use of logarithmic depth buffers, which is good for wide depth buffers.
735
- */
736
- get useLogarithmicDepth(): boolean;
737
- /**
738
- * Enabled the use of logarithmic depth buffers, which is good for wide depth buffers.
739
- */
740
- set useLogarithmicDepth(value: boolean);
741
729
  /**
742
730
  * Returns true if alpha blending should be disabled.
743
731
  */
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from "../../tslib.es6.js";
2
2
  /* eslint-disable @typescript-eslint/naming-convention */
3
- import { serialize, serializeAsImageProcessingConfiguration, expandToProperty } from "../../Misc/decorators.js";
3
+ import { serializeAsImageProcessingConfiguration, expandToProperty } from "../../Misc/decorators.js";
4
4
  import { Logger } from "../../Misc/logger.js";
5
5
  import { SmartArray } from "../../Misc/smartArray.js";
6
6
  import { GetEnvironmentBRDFTexture } from "../../Misc/brdfTextureTools.js";
@@ -654,10 +654,6 @@ export class PBRBaseMaterial extends PushMaterial {
654
654
  * Sets the global ambient color for the material used in lighting calculations.
655
655
  */
656
656
  this._globalAmbientColor = new Color3(0, 0, 0);
657
- /**
658
- * Enables the use of logarithmic depth buffers, which is good for wide depth buffers.
659
- */
660
- this._useLogarithmicDepth = false;
661
657
  /**
662
658
  * If set to true, no lighting calculations will be applied.
663
659
  */
@@ -733,18 +729,6 @@ export class PBRBaseMaterial extends PushMaterial {
733
729
  getClassName() {
734
730
  return "PBRBaseMaterial";
735
731
  }
736
- /**
737
- * Enabled the use of logarithmic depth buffers, which is good for wide depth buffers.
738
- */
739
- get useLogarithmicDepth() {
740
- return this._useLogarithmicDepth;
741
- }
742
- /**
743
- * Enabled the use of logarithmic depth buffers, which is good for wide depth buffers.
744
- */
745
- set useLogarithmicDepth(value) {
746
- this._useLogarithmicDepth = value && this.getScene().getEngine().getCaps().fragmentDepthSupported;
747
- }
748
732
  /**
749
733
  * Returns true if alpha blending should be disabled.
750
734
  */
@@ -2130,7 +2114,4 @@ __decorate([
2130
2114
  __decorate([
2131
2115
  expandToProperty("_markAllSubMeshesAsMiscDirty")
2132
2116
  ], PBRBaseMaterial.prototype, "debugMode", void 0);
2133
- __decorate([
2134
- serialize()
2135
- ], PBRBaseMaterial.prototype, "useLogarithmicDepth", null);
2136
2117
  //# sourceMappingURL=pbrBaseMaterial.js.map