@babylonjs/core 6.45.0 → 6.46.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.
- package/Animations/animation.js +1 -1
- package/Animations/animation.js.map +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.js +2 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
- package/Bones/skeleton.js +2 -2
- package/Bones/skeleton.js.map +1 -1
- package/Cameras/camera.d.ts +3 -3
- package/Cameras/camera.js +2 -1
- package/Cameras/camera.js.map +1 -1
- package/Cameras/cameraInputsManager.js +1 -1
- package/Cameras/cameraInputsManager.js.map +1 -1
- package/Cameras/targetCamera.js +4 -0
- package/Cameras/targetCamera.js.map +1 -1
- package/Compute/computeShader.d.ts +4 -2
- package/Compute/computeShader.js +7 -3
- package/Compute/computeShader.js.map +1 -1
- package/Debug/directionalLightFrustumViewer.js +6 -6
- package/Debug/directionalLightFrustumViewer.js.map +1 -1
- package/Engines/Extensions/engine.computeShader.d.ts +2 -1
- package/Engines/Extensions/engine.computeShader.js +1 -0
- package/Engines/Extensions/engine.computeShader.js.map +1 -1
- package/Engines/Extensions/engine.rawTexture.js +3 -3
- package/Engines/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/Native/nativePipelineContext.js +1 -1
- package/Engines/Native/nativePipelineContext.js.map +1 -1
- package/Engines/WebGL/webGLPipelineContext.js +1 -1
- package/Engines/WebGL/webGLPipelineContext.js.map +1 -1
- package/Engines/WebGPU/webgpuComputeContext.js +7 -3
- package/Engines/WebGPU/webgpuComputeContext.js.map +1 -1
- package/Engines/engine.d.ts +1 -1
- package/Engines/thinEngine.js +2 -2
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.js +2 -15
- package/Engines/webgpuEngine.js.map +1 -1
- package/Layers/glowLayer.js +2 -1
- package/Layers/glowLayer.js.map +1 -1
- package/Layers/highlightLayer.js +2 -1
- package/Layers/highlightLayer.js.map +1 -1
- package/Lights/light.js +2 -1
- package/Lights/light.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.js +9 -0
- package/Loading/Plugins/babylonFileLoader.js.map +1 -1
- package/Loading/sceneLoader.d.ts +6 -1
- package/Loading/sceneLoader.js +6 -5
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +2 -1
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterial.d.ts +2 -1
- package/Materials/Node/nodeMaterial.js +5 -1
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.js +2 -1
- package/Materials/PBR/pbrMaterial.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js +2 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js +2 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.js.map +1 -1
- package/Materials/Textures/baseTexture.js +2 -1
- package/Materials/Textures/baseTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.js +2 -1
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/rawCubeTexture.js +1 -1
- package/Materials/Textures/rawCubeTexture.js.map +1 -1
- package/Materials/Textures/texture.js +2 -1
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/colorCurves.d.ts +1 -1
- package/Materials/colorCurves.functions.d.ts +5 -0
- package/Materials/colorCurves.functions.js +8 -0
- package/Materials/colorCurves.functions.js.map +1 -0
- package/Materials/colorCurves.js +8 -8
- package/Materials/colorCurves.js.map +1 -1
- package/Materials/fresnelParameters.js +1 -1
- package/Materials/fresnelParameters.js.map +1 -1
- package/Materials/imageProcessingConfiguration.d.ts +3 -48
- package/Materials/imageProcessingConfiguration.defines.d.ts +46 -0
- package/Materials/imageProcessingConfiguration.defines.js +27 -0
- package/Materials/imageProcessingConfiguration.defines.js.map +1 -0
- package/Materials/imageProcessingConfiguration.functions.d.ts +13 -0
- package/Materials/imageProcessingConfiguration.functions.js +41 -0
- package/Materials/imageProcessingConfiguration.functions.js.map +1 -0
- package/Materials/imageProcessingConfiguration.js +18 -69
- package/Materials/imageProcessingConfiguration.js.map +1 -1
- package/Materials/material.js +2 -1
- package/Materials/material.js.map +1 -1
- package/Materials/materialHelper.d.ts +33 -33
- package/Materials/materialHelper.js +244 -286
- package/Materials/materialHelper.js.map +1 -1
- package/Materials/materialPluginBase.js +2 -1
- package/Materials/materialPluginBase.js.map +1 -1
- package/Materials/materialStencilState.js +2 -1
- package/Materials/materialStencilState.js.map +1 -1
- package/Materials/shaderMaterial.js +1 -1
- package/Materials/shaderMaterial.js.map +1 -1
- package/Materials/standardMaterial.d.ts +1 -1
- package/Materials/standardMaterial.js +2 -1
- package/Materials/standardMaterial.js.map +1 -1
- package/Materials/uniformBuffer.js +2 -2
- package/Materials/uniformBuffer.js.map +1 -1
- package/Maths/math.color.d.ts +392 -66
- package/Maths/math.color.js +541 -65
- package/Maths/math.color.js.map +1 -1
- package/Maths/math.like.d.ts +17 -28
- package/Maths/math.like.js.map +1 -1
- package/Maths/math.plane.d.ts +2 -1
- package/Maths/math.plane.js.map +1 -1
- package/Maths/math.polar.d.ts +1 -1
- package/Maths/math.polar.js.map +1 -1
- package/Maths/math.scalar.d.ts +6 -6
- package/Maths/math.scalar.functions.d.ts +51 -0
- package/Maths/math.scalar.functions.js +80 -0
- package/Maths/math.scalar.functions.js.map +1 -0
- package/Maths/math.scalar.js +48 -73
- package/Maths/math.scalar.js.map +1 -1
- package/Maths/math.vector.d.ts +571 -72
- package/Maths/math.vector.js +917 -119
- package/Maths/math.vector.js.map +1 -1
- package/Maths/math.viewport.d.ts +2 -1
- package/Maths/math.viewport.js.map +1 -1
- package/Maths/tensor.d.ts +411 -0
- package/Maths/tensor.js +3 -0
- package/Maths/tensor.js.map +1 -0
- package/Meshes/Node/Blocks/Set/setColorsBlock.js +20 -4
- package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +2 -1
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/mesh.js +2 -2
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/mesh.vertexData.d.ts +4 -0
- package/Meshes/mesh.vertexData.js +10 -0
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/transformNode.js +2 -1
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/arrayTools.d.ts +2 -19
- package/Misc/arrayTools.js.map +1 -1
- package/Misc/decorators.d.ts +0 -80
- package/Misc/decorators.functions.d.ts +7 -0
- package/Misc/decorators.functions.js +52 -0
- package/Misc/decorators.functions.js.map +1 -0
- package/Misc/decorators.js +2 -318
- package/Misc/decorators.js.map +1 -1
- package/Misc/decorators.serialization.d.ts +81 -0
- package/Misc/decorators.serialization.js +269 -0
- package/Misc/decorators.serialization.js.map +1 -0
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Misc/sceneRecorder.js +1 -1
- package/Misc/sceneRecorder.js.map +1 -1
- package/Misc/sceneSerializer.js +8 -1
- package/Misc/sceneSerializer.js.map +1 -1
- package/Misc/tools.functions.d.ts +14 -0
- package/Misc/tools.functions.js +23 -0
- package/Misc/tools.functions.js.map +1 -0
- package/Misc/tools.js +5 -6
- package/Misc/tools.js.map +1 -1
- package/Morph/morphTarget.js +2 -1
- package/Morph/morphTarget.js.map +1 -1
- package/Particles/EmitterTypes/boxParticleEmitter.js +8 -8
- package/Particles/EmitterTypes/boxParticleEmitter.js.map +1 -1
- package/Particles/baseParticleSystem.d.ts +8 -11
- package/Particles/baseParticleSystem.js +9 -40
- package/Particles/baseParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +71 -1
- package/Particles/gpuParticleSystem.js +102 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/particle.d.ts +3 -3
- package/Particles/particle.js +3 -3
- package/Particles/particle.js.map +1 -1
- package/Particles/particleSystem.d.ts +81 -455
- package/Particles/particleSystem.functions.d.ts +61 -0
- package/Particles/particleSystem.functions.js +79 -0
- package/Particles/particleSystem.functions.js.map +1 -0
- package/Particles/particleSystem.js +390 -1984
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +485 -0
- package/Particles/thinParticleSystem.js +1768 -0
- package/Particles/thinParticleSystem.js.map +1 -0
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js +2 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.js +2 -1
- package/PostProcesses/blackAndWhitePostProcess.js.map +1 -1
- package/PostProcesses/blurPostProcess.js +2 -1
- package/PostProcesses/blurPostProcess.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.js +2 -1
- package/PostProcesses/chromaticAberrationPostProcess.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.js +2 -1
- package/PostProcesses/colorCorrectionPostProcess.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.js +2 -1
- package/PostProcesses/convolutionPostProcess.js.map +1 -1
- package/PostProcesses/displayPassPostProcess.js +1 -1
- package/PostProcesses/displayPassPostProcess.js.map +1 -1
- package/PostProcesses/filterPostProcess.js +2 -1
- package/PostProcesses/filterPostProcess.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.js +1 -1
- package/PostProcesses/fxaaPostProcess.js.map +1 -1
- package/PostProcesses/grainPostProcess.js +2 -1
- package/PostProcesses/grainPostProcess.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.js +2 -1
- package/PostProcesses/motionBlurPostProcess.js.map +1 -1
- package/PostProcesses/passPostProcess.js +1 -1
- package/PostProcesses/passPostProcess.js.map +1 -1
- package/PostProcesses/postProcess.js +2 -1
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/refractionPostProcess.js +2 -1
- package/PostProcesses/refractionPostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js +2 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js +2 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.js +2 -1
- package/PostProcesses/sharpenPostProcess.js.map +1 -1
- package/Probes/reflectionProbe.js +2 -1
- package/Probes/reflectionProbe.js.map +1 -1
- package/Sprites/spriteManager.d.ts +4 -0
- package/Sprites/spriteManager.js.map +1 -1
- package/XR/features/WebXRControllerTeleportation.d.ts +9 -0
- package/XR/features/WebXRControllerTeleportation.js +75 -31
- package/XR/features/WebXRControllerTeleportation.js.map +1 -1
- package/node.js +2 -1
- package/node.js.map +1 -1
- package/package.json +1 -1
- package/types.d.ts +105 -0
- package/types.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materialHelper.js","sourceRoot":"","sources":["../../../../dev/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,CAAC,yBAAyB,GAAG,yBAAyB,CAAC;AACrE,cAAc,CAAC,qBAAqB,GAAG,qBAAqB,CAAC;AAC7D,cAAc,CAAC,WAAW,GAAG,WAAW,CAAC;AACzC,cAAc,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;AACjE,cAAc,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;AAC/D,cAAc,CAAC,iCAAiC,GAAG,iCAAiC,CAAC;AACrF,cAAc,CAAC,sBAAsB,GAAG,sBAAsB,CAAC;AAC/D,cAAc,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;AAC7E,cAAc,CAAC,qCAAqC,GAAG,qCAAqC,CAAC;AAC7F,cAAc,CAAC,2BAA2B,GAAG,2BAA2B,CAAC;AACzE,cAAc,CAAC,0BAA0B,GAAG,0BAA0B,CAAC;AACvE,cAAc,CAAC,oBAAoB,GAAG,oBAAoB,CAAC;AAC3D,cAAc,CAAC,wBAAwB,GAAG,wBAAwB,CAAC;AACnE,cAAc,CAAC,uBAAuB,GAAG,uBAAuB,CAAC;AACjE,cAAc,CAAC,8BAA8B,GAAG,8BAA8B,CAAC;AAC/E,cAAc,CAAC,kCAAkC,GAAG,kCAAkC,CAAC","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { Engine } from \"../Engines/engine\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { Light } from \"../Lights/light\";\r\nimport type { PrePassConfiguration } from \"../Materials/prePassConfiguration\";\r\n\r\nimport type { UniformBuffer } from \"./uniformBuffer\";\r\nimport type { Effect, IEffectCreationOptions } from \"./effect\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport type { MaterialDefines } from \"./materialDefines\";\r\nimport type { EffectFallbacks } from \"./effectFallbacks\";\r\nimport type { Material } from \"./material\";\r\nimport {\r\n BindBonesParameters,\r\n BindFogParameters,\r\n BindLight,\r\n BindLightProperties,\r\n BindLights,\r\n BindLogDepth,\r\n BindMorphTargetParameters,\r\n BindSceneUniformBuffer,\r\n BindTextureMatrix,\r\n GetFogState,\r\n HandleFallbacksForShadows,\r\n PrepareAttributesForBakedVertexAnimation,\r\n PrepareAttributesForBones,\r\n PrepareAttributesForInstances,\r\n PrepareAttributesForMorphTargets,\r\n PrepareAttributesForMorphTargetsInfluencers,\r\n PrepareDefinesForAttributes,\r\n PrepareDefinesForBakedVertexAnimation,\r\n PrepareDefinesForBones,\r\n PrepareDefinesForCamera,\r\n PrepareDefinesForFrameBoundValues,\r\n PrepareDefinesForLight,\r\n PrepareDefinesForLights,\r\n PrepareDefinesForMergedUV,\r\n PrepareDefinesForMisc,\r\n PrepareDefinesForMorphTargets,\r\n PrepareDefinesForMultiview,\r\n PrepareDefinesForOIT,\r\n PrepareDefinesForPrePass,\r\n PrepareUniformsAndSamplersForLight,\r\n PrepareUniformsAndSamplersList,\r\n PushAttributesForInstances,\r\n} from \"./materialHelper.functions\";\r\n\r\n/**\r\n * \"Static Class\" containing the most commonly used helper while dealing with material for rendering purpose.\r\n *\r\n * It contains the basic tools to help defining defines, binding uniform for the common part of the materials.\r\n *\r\n * This works by convention in BabylonJS but is meant to be use only with shader following the in place naming rules and conventions.\r\n */\r\nexport class MaterialHelper {\r\n /**\r\n * Binds the scene's uniform buffer to the effect.\r\n * @param effect defines the effect to bind to the scene uniform buffer\r\n * @param sceneUbo defines the uniform buffer storing scene data\r\n */\r\n public static BindSceneUniformBuffer(effect: Effect, sceneUbo: UniformBuffer): void {}\r\n\r\n /**\r\n * Helps preparing the defines values about the UVs in used in the effect.\r\n * UVs are shared as much as we can across channels in the shaders.\r\n * @param texture The texture we are preparing the UVs for\r\n * @param defines The defines to update\r\n * @param key The channel key \"diffuse\", \"specular\"... used in the shader\r\n */\r\n public static PrepareDefinesForMergedUV(texture: BaseTexture, defines: any, key: string): void {}\r\n\r\n /**\r\n * Binds a texture matrix value to its corresponding uniform\r\n * @param texture The texture to bind the matrix for\r\n * @param uniformBuffer The uniform buffer receiving the data\r\n * @param key The channel key \"diffuse\", \"specular\"... used in the shader\r\n */\r\n public static BindTextureMatrix(texture: BaseTexture, uniformBuffer: UniformBuffer, key: string): void {}\r\n\r\n /**\r\n * Gets the current status of the fog (should it be enabled?)\r\n * @param mesh defines the mesh to evaluate for fog support\r\n * @param scene defines the hosting scene\r\n * @returns true if fog must be enabled\r\n */\r\n public static GetFogState(mesh: AbstractMesh, scene: Scene) {\r\n return true;\r\n }\r\n\r\n /**\r\n * Helper used to prepare the list of defines associated with misc. values for shader compilation\r\n * @param mesh defines the current mesh\r\n * @param scene defines the current scene\r\n * @param useLogarithmicDepth defines if logarithmic depth has to be turned on\r\n * @param pointsCloud defines if point cloud rendering has to be turned on\r\n * @param fogEnabled defines if fog has to be turned on\r\n * @param alphaTest defines if alpha testing has to be turned on\r\n * @param defines defines the current list of defines\r\n * @param applyDecalAfterDetail Defines if the decal is applied after or before the detail\r\n */\r\n public static PrepareDefinesForMisc(\r\n mesh: AbstractMesh,\r\n scene: Scene,\r\n useLogarithmicDepth: boolean,\r\n pointsCloud: boolean,\r\n fogEnabled: boolean,\r\n alphaTest: boolean,\r\n defines: any,\r\n applyDecalAfterDetail: boolean = false\r\n ): void {}\r\n\r\n /**\r\n * Helper used to prepare the defines relative to the active camera\r\n * @param scene defines the current scene\r\n * @param defines specifies the list of active defines\r\n * @returns true if the defines have been updated, else false\r\n */\r\n public static PrepareDefinesForCamera(scene: Scene, defines: any): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Helper used to prepare the list of defines associated with frame values for shader compilation\r\n * @param scene defines the current scene\r\n * @param engine defines the current engine\r\n * @param material defines the material we are compiling the shader for\r\n * @param defines specifies the list of active defines\r\n * @param useInstances defines if instances have to be turned on\r\n * @param useClipPlane defines if clip plane have to be turned on\r\n * @param useThinInstances defines if thin instances have to be turned on\r\n */\r\n public static PrepareDefinesForFrameBoundValues(\r\n scene: Scene,\r\n engine: Engine,\r\n material: Material,\r\n defines: any,\r\n useInstances: boolean,\r\n useClipPlane: Nullable<boolean> = null,\r\n useThinInstances: boolean = false\r\n ): void {}\r\n\r\n /**\r\n * Prepares the defines for bones\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForBones(mesh: AbstractMesh, defines: any) {}\r\n\r\n /**\r\n * Prepares the defines for morph targets\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForMorphTargets(mesh: AbstractMesh, defines: any) {}\r\n\r\n /**\r\n * Prepares the defines for baked vertex animation\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForBakedVertexAnimation(mesh: AbstractMesh, defines: any) {}\r\n\r\n /**\r\n * Prepares the defines used in the shader depending on the attributes data available in the mesh\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n * @param useVertexColor Precise whether vertex colors should be used or not (override mesh info)\r\n * @param useBones Precise whether bones should be used or not (override mesh info)\r\n * @param useMorphTargets Precise whether morph targets should be used or not (override mesh info)\r\n * @param useVertexAlpha Precise whether vertex alpha should be used or not (override mesh info)\r\n * @param useBakedVertexAnimation Precise whether baked vertex animation should be used or not (override mesh info)\r\n * @returns false if defines are considered not dirty and have not been checked\r\n */\r\n public static PrepareDefinesForAttributes(\r\n mesh: AbstractMesh,\r\n defines: any,\r\n useVertexColor: boolean,\r\n useBones: boolean,\r\n useMorphTargets = false,\r\n useVertexAlpha = true,\r\n useBakedVertexAnimation = true\r\n ): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Prepares the defines related to multiview\r\n * @param scene The scene we are intending to draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForMultiview(scene: Scene, defines: any) {}\r\n\r\n /**\r\n * Prepares the defines related to order independant transparency\r\n * @param scene The scene we are intending to draw\r\n * @param defines The defines to update\r\n * @param needAlphaBlending Determines if the material needs alpha blending\r\n */\r\n public static PrepareDefinesForOIT(scene: Scene, defines: any, needAlphaBlending: boolean) {}\r\n\r\n /**\r\n * Prepares the defines related to the prepass\r\n * @param scene The scene we are intending to draw\r\n * @param defines The defines to update\r\n * @param canRenderToMRT Indicates if this material renders to several textures in the prepass\r\n */\r\n public static PrepareDefinesForPrePass(scene: Scene, defines: any, canRenderToMRT: boolean) {}\r\n\r\n /**\r\n * Prepares the defines related to the light information passed in parameter\r\n * @param scene The scene we are intending to draw\r\n * @param mesh The mesh the effect is compiling for\r\n * @param light The light the effect is compiling for\r\n * @param lightIndex The index of the light\r\n * @param defines The defines to update\r\n * @param specularSupported Specifies whether specular is supported or not (override lights data)\r\n * @param state Defines the current state regarding what is needed (normals, etc...)\r\n * @param state.needNormals\r\n * @param state.needRebuild\r\n * @param state.shadowEnabled\r\n * @param state.specularEnabled\r\n * @param state.lightmapMode\r\n */\r\n public static PrepareDefinesForLight(\r\n scene: Scene,\r\n mesh: AbstractMesh,\r\n light: Light,\r\n lightIndex: number,\r\n defines: any,\r\n specularSupported: boolean,\r\n state: {\r\n needNormals: boolean;\r\n needRebuild: boolean;\r\n shadowEnabled: boolean;\r\n specularEnabled: boolean;\r\n lightmapMode: boolean;\r\n }\r\n ) {}\r\n\r\n /**\r\n * Prepares the defines related to the light information passed in parameter\r\n * @param scene The scene we are intending to draw\r\n * @param mesh The mesh the effect is compiling for\r\n * @param defines The defines to update\r\n * @param specularSupported Specifies whether specular is supported or not (override lights data)\r\n * @param maxSimultaneousLights Specifies how manuy lights can be added to the effect at max\r\n * @param disableLighting Specifies whether the lighting is disabled (override scene and light)\r\n * @returns true if normals will be required for the rest of the effect\r\n */\r\n public static PrepareDefinesForLights(scene: Scene, mesh: AbstractMesh, defines: any, specularSupported: boolean, maxSimultaneousLights = 4, disableLighting = false): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Prepares the uniforms and samplers list to be used in the effect (for a specific light)\r\n * @param lightIndex defines the light index\r\n * @param uniformsList The uniform list\r\n * @param samplersList The sampler list\r\n * @param projectedLightTexture defines if projected texture must be used\r\n * @param uniformBuffersList defines an optional list of uniform buffers\r\n * @param updateOnlyBuffersList True to only update the uniformBuffersList array\r\n */\r\n public static PrepareUniformsAndSamplersForLight(\r\n lightIndex: number,\r\n uniformsList: string[],\r\n samplersList: string[],\r\n projectedLightTexture?: any,\r\n uniformBuffersList: Nullable<string[]> = null,\r\n updateOnlyBuffersList = false\r\n ) {}\r\n\r\n /**\r\n * Prepares the uniforms and samplers list to be used in the effect\r\n * @param uniformsListOrOptions The uniform names to prepare or an EffectCreationOptions containing the list and extra information\r\n * @param samplersList The sampler list\r\n * @param defines The defines helping in the list generation\r\n * @param maxSimultaneousLights The maximum number of simultaneous light allowed in the effect\r\n */\r\n public static PrepareUniformsAndSamplersList(\r\n uniformsListOrOptions: string[] | IEffectCreationOptions,\r\n samplersList?: string[],\r\n defines?: any,\r\n maxSimultaneousLights = 4\r\n ): void {}\r\n\r\n /**\r\n * This helps decreasing rank by rank the shadow quality (0 being the highest rank and quality)\r\n * @param defines The defines to update while falling back\r\n * @param fallbacks The authorized effect fallbacks\r\n * @param maxSimultaneousLights The maximum number of lights allowed\r\n * @param rank the current rank of the Effect\r\n * @returns The newly affected rank\r\n */\r\n public static HandleFallbacksForShadows(defines: any, fallbacks: EffectFallbacks, maxSimultaneousLights = 4, rank = 0): number {\r\n return 0;\r\n }\r\n\r\n /**\r\n * Prepares the list of attributes required for morph targets according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare the morph targets attributes for\r\n * @param influencers The number of influencers\r\n */\r\n public static PrepareAttributesForMorphTargetsInfluencers(attribs: string[], mesh: AbstractMesh, influencers: number): void {}\r\n\r\n /**\r\n * Prepares the list of attributes required for morph targets according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare the morph targets attributes for\r\n * @param defines The current Defines of the effect\r\n */\r\n public static PrepareAttributesForMorphTargets(attribs: string[], mesh: AbstractMesh, defines: any): void {}\r\n\r\n /**\r\n * Prepares the list of attributes required for baked vertex animations according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare for baked vertex animations\r\n * @param defines The current Defines of the effect\r\n */\r\n public static PrepareAttributesForBakedVertexAnimation(attribs: string[], mesh: AbstractMesh, defines: any): void {}\r\n\r\n /**\r\n * Prepares the list of attributes required for bones according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare the bones attributes for\r\n * @param defines The current Defines of the effect\r\n * @param fallbacks The current effect fallback strategy\r\n */\r\n public static PrepareAttributesForBones(attribs: string[], mesh: AbstractMesh, defines: any, fallbacks: EffectFallbacks): void {}\r\n\r\n /**\r\n * Check and prepare the list of attributes required for instances according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param defines The current MaterialDefines of the effect\r\n */\r\n public static PrepareAttributesForInstances(attribs: string[], defines: MaterialDefines): void {}\r\n\r\n /**\r\n * Add the list of attributes required for instances to the attribs array.\r\n * @param attribs The current list of supported attribs\r\n * @param needsPreviousMatrices If the shader needs previous matrices\r\n */\r\n public static PushAttributesForInstances(attribs: string[], needsPreviousMatrices: boolean = false): void {}\r\n\r\n /**\r\n * Binds the light information to the effect.\r\n * @param light The light containing the generator\r\n * @param effect The effect we are binding the data to\r\n * @param lightIndex The light index in the effect used to render\r\n */\r\n public static BindLightProperties(light: Light, effect: Effect, lightIndex: number): void {}\r\n\r\n /**\r\n * Binds the lights information from the scene to the effect for the given mesh.\r\n * @param light Light to bind\r\n * @param lightIndex Light index\r\n * @param scene The scene where the light belongs to\r\n * @param effect The effect we are binding the data to\r\n * @param useSpecular Defines if specular is supported\r\n * @param receiveShadows Defines if the effect (mesh) we bind the light for receives shadows\r\n */\r\n public static BindLight(light: Light, lightIndex: number, scene: Scene, effect: Effect, useSpecular: boolean, receiveShadows = true): void {}\r\n\r\n /**\r\n * Binds the lights information from the scene to the effect for the given mesh.\r\n * @param scene The scene the lights belongs to\r\n * @param mesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n * @param defines The generated defines for the effect\r\n * @param maxSimultaneousLights The maximum number of light that can be bound to the effect\r\n */\r\n public static BindLights(scene: Scene, mesh: AbstractMesh, effect: Effect, defines: any, maxSimultaneousLights = 4): void {}\r\n\r\n /**\r\n * Binds the fog information from the scene to the effect for the given mesh.\r\n * @param scene The scene the lights belongs to\r\n * @param mesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n * @param linearSpace Defines if the fog effect is applied in linear space\r\n */\r\n public static BindFogParameters(scene: Scene, mesh?: AbstractMesh, effect?: Effect, linearSpace = false): void {}\r\n\r\n /**\r\n * Binds the bones information from the mesh to the effect.\r\n * @param mesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n * @param prePassConfiguration Configuration for the prepass, in case prepass is activated\r\n */\r\n public static BindBonesParameters(mesh?: AbstractMesh, effect?: Effect, prePassConfiguration?: PrePassConfiguration): void {}\r\n\r\n /**\r\n * Binds the morph targets information from the mesh to the effect.\r\n * @param abstractMesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n */\r\n public static BindMorphTargetParameters(abstractMesh: AbstractMesh, effect: Effect): void {}\r\n\r\n /**\r\n * Binds the logarithmic depth information from the scene to the effect for the given defines.\r\n * @param defines The generated defines used in the effect\r\n * @param effect The effect we are binding the data to\r\n * @param scene The scene we are willing to render with logarithmic scale for\r\n */\r\n public static BindLogDepth(defines: any, effect: Effect, scene: Scene): void {}\r\n}\r\n\r\nMaterialHelper.BindLogDepth = BindLogDepth;\r\nMaterialHelper.BindFogParameters = BindFogParameters;\r\nMaterialHelper.PrepareAttributesForMorphTargetsInfluencers = PrepareAttributesForMorphTargetsInfluencers;\r\nMaterialHelper.PrepareAttributesForMorphTargets = PrepareAttributesForMorphTargets;\r\nMaterialHelper.PushAttributesForInstances = PushAttributesForInstances;\r\nMaterialHelper.BindMorphTargetParameters = BindMorphTargetParameters;\r\nMaterialHelper.BindSceneUniformBuffer = BindSceneUniformBuffer;\r\nMaterialHelper.PrepareDefinesForMergedUV = PrepareDefinesForMergedUV;\r\nMaterialHelper.BindTextureMatrix = BindTextureMatrix;\r\nMaterialHelper.PrepareAttributesForBakedVertexAnimation = PrepareAttributesForBakedVertexAnimation;\r\nMaterialHelper.BindBonesParameters = BindBonesParameters;\r\nMaterialHelper.BindLightProperties = BindLightProperties;\r\nMaterialHelper.BindLights = BindLights;\r\nMaterialHelper.BindLight = BindLight;\r\nMaterialHelper.PrepareAttributesForBones = PrepareAttributesForBones;\r\nMaterialHelper.PrepareAttributesForInstances = PrepareAttributesForInstances;\r\nMaterialHelper.HandleFallbacksForShadows = HandleFallbacksForShadows;\r\nMaterialHelper.PrepareDefinesForMisc = PrepareDefinesForMisc;\r\nMaterialHelper.GetFogState = GetFogState;\r\nMaterialHelper.PrepareDefinesForLights = PrepareDefinesForLights;\r\nMaterialHelper.PrepareDefinesForLight = PrepareDefinesForLight;\r\nMaterialHelper.PrepareDefinesForFrameBoundValues = PrepareDefinesForFrameBoundValues;\r\nMaterialHelper.PrepareDefinesForBones = PrepareDefinesForBones;\r\nMaterialHelper.PrepareDefinesForMorphTargets = PrepareDefinesForMorphTargets;\r\nMaterialHelper.PrepareDefinesForBakedVertexAnimation = PrepareDefinesForBakedVertexAnimation;\r\nMaterialHelper.PrepareDefinesForAttributes = PrepareDefinesForAttributes;\r\nMaterialHelper.PrepareDefinesForMultiview = PrepareDefinesForMultiview;\r\nMaterialHelper.PrepareDefinesForOIT = PrepareDefinesForOIT;\r\nMaterialHelper.PrepareDefinesForPrePass = PrepareDefinesForPrePass;\r\nMaterialHelper.PrepareDefinesForCamera = PrepareDefinesForCamera;\r\nMaterialHelper.PrepareUniformsAndSamplersList = PrepareUniformsAndSamplersList;\r\nMaterialHelper.PrepareUniformsAndSamplersForLight = PrepareUniformsAndSamplersForLight;\r\n"]}
|
|
1
|
+
{"version":3,"file":"materialHelper.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/materialHelper.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oBAAoB,CAAC;AAE5H;;;;;GAKG;AACW,uCAAwB,GAAkE,wBAAwB,CAAC;AAEjI;;;;;;;;;;;;;;GAcG;AACW,qCAAsB,GAcxB,sBAAsB,CAAC;AAEnC;;;;;;;;;GASG;AACW,sCAAuB,GAOtB,uBAAuB,CAAC;AAEvC;;;;;;;;GAQG;AACW,iDAAkC,GAOpC,kCAAkC,CAAC;AAE/C;;;;;;GAMG;AACW,6CAA8B,GAKhC,8BAA8B,CAAC;AAE3C;;;;;;;GAOG;AACW,wCAAyB,GAAwG,yBAAyB,CAAC;AAEzK;;;;;GAKG;AACW,0DAA2C,GAAyE,2CAA2C,CAAC;AAE9K;;;;;GAKG;AACW,+CAAgC,GAAkE,gCAAgC,CAAC;AAEjJ;;;;;GAKG;AACW,uDAAwC,GAAkE,wCAAwC,CAAC;AAEjK;;;;;;GAMG;AACW,wCAAyB,GAA8F,yBAAyB,CAAC;AAE/J;;;;GAIG;AACW,4CAA6B,GAA0D,6BAA6B,CAAC;AAEnI;;;;GAIG;AACW,yCAA0B,GAAiE,0BAA0B,CAAC;AAEpI;;;;;GAKG;AACW,kCAAmB,GAA+D,mBAAmB,CAAC;AAEpH;;;;;;;;GAQG;AACW,wBAAS,GAA6H,SAAS,CAAC;AAE9J;;;;;;;GAOG;AACW,yBAAU,GAA6G,UAAU,CAAC;AAEhJ;;;;;;GAMG;AACW,gCAAiB,GAAwF,iBAAiB,CAAC;AAEzI;;;;;GAKG;AACW,kCAAmB,GAAgG,mBAAmB,CAAC;AAErJ;;;;GAIG;AACW,wCAAyB,GAAyD,yBAAyB,CAAC;AAE1H;;;;;GAKG;AACW,2BAAY,GAAyD,YAAY,CAAC","sourcesContent":["import type { Nullable } from \"../types\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { Engine } from \"../Engines/engine\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { Light } from \"../Lights/light\";\r\nimport type { PrePassConfiguration } from \"../Materials/prePassConfiguration\";\r\n\r\nimport type { UniformBuffer } from \"./uniformBuffer\";\r\nimport type { Effect, IEffectCreationOptions } from \"./effect\";\r\nimport type { BaseTexture } from \"../Materials/Textures/baseTexture\";\r\nimport type { MaterialDefines } from \"./materialDefines\";\r\nimport type { EffectFallbacks } from \"./effectFallbacks\";\r\nimport type { Material } from \"./material\";\r\nimport {\r\n BindBonesParameters,\r\n BindFogParameters,\r\n BindLight,\r\n BindLightProperties,\r\n BindLights,\r\n BindLogDepth,\r\n BindMorphTargetParameters,\r\n BindSceneUniformBuffer,\r\n BindTextureMatrix,\r\n GetFogState,\r\n HandleFallbacksForShadows,\r\n PrepareAttributesForBakedVertexAnimation,\r\n PrepareAttributesForBones,\r\n PrepareAttributesForInstances,\r\n PrepareAttributesForMorphTargets,\r\n PrepareAttributesForMorphTargetsInfluencers,\r\n PrepareDefinesForAttributes,\r\n PrepareDefinesForBakedVertexAnimation,\r\n PrepareDefinesForBones,\r\n PrepareDefinesForCamera,\r\n PrepareDefinesForFrameBoundValues,\r\n PrepareDefinesForLight,\r\n PrepareDefinesForLights,\r\n PrepareDefinesForMergedUV,\r\n PrepareDefinesForMisc,\r\n PrepareDefinesForMorphTargets,\r\n PrepareDefinesForMultiview,\r\n PrepareDefinesForOIT,\r\n PrepareDefinesForPrePass,\r\n PrepareUniformsAndSamplersForLight,\r\n PrepareUniformsAndSamplersList,\r\n PushAttributesForInstances,\r\n} from \"./materialHelper.functions\";\r\n\r\n/**\r\n * \"Static Class\" containing the most commonly used helper while dealing with material for rendering purpose.\r\n *\r\n * It contains the basic tools to help defining defines, binding uniform for the common part of the materials.\r\n *\r\n * This works by convention in BabylonJS but is meant to be use only with shader following the in place naming rules and conventions.\r\n */\r\nexport class MaterialHelper {\r\n /**\r\n * Binds the scene's uniform buffer to the effect.\r\n * @param effect defines the effect to bind to the scene uniform buffer\r\n * @param sceneUbo defines the uniform buffer storing scene data\r\n */\r\n public static BindSceneUniformBuffer: (effect: Effect, sceneUbo: UniformBuffer) => void = BindSceneUniformBuffer;\r\n\r\n /**\r\n * Helps preparing the defines values about the UVs in used in the effect.\r\n * UVs are shared as much as we can across channels in the shaders.\r\n * @param texture The texture we are preparing the UVs for\r\n * @param defines The defines to update\r\n * @param key The channel key \"diffuse\", \"specular\"... used in the shader\r\n */\r\n public static PrepareDefinesForMergedUV: (texture: BaseTexture, defines: any, key: string) => void = PrepareDefinesForMergedUV;\r\n\r\n /**\r\n * Binds a texture matrix value to its corresponding uniform\r\n * @param texture The texture to bind the matrix for\r\n * @param uniformBuffer The uniform buffer receiving the data\r\n * @param key The channel key \"diffuse\", \"specular\"... used in the shader\r\n */\r\n public static BindTextureMatrix: (texture: BaseTexture, uniformBuffer: UniformBuffer, key: string) => void = BindTextureMatrix;\r\n\r\n /**\r\n * Gets the current status of the fog (should it be enabled?)\r\n * @param mesh defines the mesh to evaluate for fog support\r\n * @param scene defines the hosting scene\r\n * @returns true if fog must be enabled\r\n */\r\n public static GetFogState: (mesh: AbstractMesh, scene: Scene) => boolean = GetFogState;\r\n\r\n /**\r\n * Helper used to prepare the list of defines associated with misc. values for shader compilation\r\n * @param mesh defines the current mesh\r\n * @param scene defines the current scene\r\n * @param useLogarithmicDepth defines if logarithmic depth has to be turned on\r\n * @param pointsCloud defines if point cloud rendering has to be turned on\r\n * @param fogEnabled defines if fog has to be turned on\r\n * @param alphaTest defines if alpha testing has to be turned on\r\n * @param defines defines the current list of defines\r\n * @param applyDecalAfterDetail Defines if the decal is applied after or before the detail\r\n */\r\n public static PrepareDefinesForMisc: (\r\n mesh: AbstractMesh,\r\n scene: Scene,\r\n useLogarithmicDepth: boolean,\r\n pointsCloud: boolean,\r\n fogEnabled: boolean,\r\n alphaTest: boolean,\r\n defines: any,\r\n applyDecalAfterDetail?: boolean\r\n ) => void = PrepareDefinesForMisc;\r\n\r\n /**\r\n * Helper used to prepare the defines relative to the active camera\r\n * @param scene defines the current scene\r\n * @param defines specifies the list of active defines\r\n * @returns true if the defines have been updated, else false\r\n */\r\n public static PrepareDefinesForCamera: (scene: Scene, defines: any) => boolean = PrepareDefinesForCamera;\r\n\r\n /**\r\n * Helper used to prepare the list of defines associated with frame values for shader compilation\r\n * @param scene defines the current scene\r\n * @param engine defines the current engine\r\n * @param material defines the material we are compiling the shader for\r\n * @param defines specifies the list of active defines\r\n * @param useInstances defines if instances have to be turned on\r\n * @param useClipPlane defines if clip plane have to be turned on\r\n * @param useThinInstances defines if thin instances have to be turned on\r\n */\r\n public static PrepareDefinesForFrameBoundValues: (\r\n scene: Scene,\r\n engine: Engine,\r\n material: Material,\r\n defines: any,\r\n useInstances: boolean,\r\n useClipPlane?: Nullable<boolean>,\r\n useThinInstances?: boolean\r\n ) => void = PrepareDefinesForFrameBoundValues;\r\n\r\n /**\r\n * Prepares the defines for bones\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForBones: (mesh: AbstractMesh, defines: any) => void = PrepareDefinesForBones;\r\n\r\n /**\r\n * Prepares the defines for morph targets\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForMorphTargets: (mesh: AbstractMesh, defines: any) => void = PrepareDefinesForMorphTargets;\r\n\r\n /**\r\n * Prepares the defines for baked vertex animation\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForBakedVertexAnimation: (mesh: AbstractMesh, defines: any) => void = PrepareDefinesForBakedVertexAnimation;\r\n\r\n /**\r\n * Prepares the defines used in the shader depending on the attributes data available in the mesh\r\n * @param mesh The mesh containing the geometry data we will draw\r\n * @param defines The defines to update\r\n * @param useVertexColor Precise whether vertex colors should be used or not (override mesh info)\r\n * @param useBones Precise whether bones should be used or not (override mesh info)\r\n * @param useMorphTargets Precise whether morph targets should be used or not (override mesh info)\r\n * @param useVertexAlpha Precise whether vertex alpha should be used or not (override mesh info)\r\n * @param useBakedVertexAnimation Precise whether baked vertex animation should be used or not (override mesh info)\r\n * @returns false if defines are considered not dirty and have not been checked\r\n */\r\n public static PrepareDefinesForAttributes: (\r\n mesh: AbstractMesh,\r\n defines: any,\r\n useVertexColor: boolean,\r\n useBones: boolean,\r\n useMorphTargets?: boolean,\r\n useVertexAlpha?: boolean,\r\n useBakedVertexAnimation?: boolean\r\n ) => boolean = PrepareDefinesForAttributes;\r\n\r\n /**\r\n * Prepares the defines related to multiview\r\n * @param scene The scene we are intending to draw\r\n * @param defines The defines to update\r\n */\r\n public static PrepareDefinesForMultiview: (scene: Scene, defines: any) => void = PrepareDefinesForMultiview;\r\n\r\n /**\r\n * Prepares the defines related to order independant transparency\r\n * @param scene The scene we are intending to draw\r\n * @param defines The defines to update\r\n * @param needAlphaBlending Determines if the material needs alpha blending\r\n */\r\n public static PrepareDefinesForOIT: (scene: Scene, defines: any, needAlphaBlending: boolean) => void = PrepareDefinesForOIT;\r\n\r\n /**\r\n * Prepares the defines related to the prepass\r\n * @param scene The scene we are intending to draw\r\n * @param defines The defines to update\r\n * @param canRenderToMRT Indicates if this material renders to several textures in the prepass\r\n */\r\n public static PrepareDefinesForPrePass: (scene: Scene, defines: any, canRenderToMRT: boolean) => void = PrepareDefinesForPrePass;\r\n\r\n /**\r\n * Prepares the defines related to the light information passed in parameter\r\n * @param scene The scene we are intending to draw\r\n * @param mesh The mesh the effect is compiling for\r\n * @param light The light the effect is compiling for\r\n * @param lightIndex The index of the light\r\n * @param defines The defines to update\r\n * @param specularSupported Specifies whether specular is supported or not (override lights data)\r\n * @param state Defines the current state regarding what is needed (normals, etc...)\r\n * @param state.needNormals\r\n * @param state.needRebuild\r\n * @param state.shadowEnabled\r\n * @param state.specularEnabled\r\n * @param state.lightmapMode\r\n */\r\n public static PrepareDefinesForLight: (\r\n scene: Scene,\r\n mesh: AbstractMesh,\r\n light: Light,\r\n lightIndex: number,\r\n defines: any,\r\n specularSupported: boolean,\r\n state: {\r\n needNormals: boolean;\r\n needRebuild: boolean;\r\n shadowEnabled: boolean;\r\n specularEnabled: boolean;\r\n lightmapMode: boolean;\r\n }\r\n ) => void = PrepareDefinesForLight;\r\n\r\n /**\r\n * Prepares the defines related to the light information passed in parameter\r\n * @param scene The scene we are intending to draw\r\n * @param mesh The mesh the effect is compiling for\r\n * @param defines The defines to update\r\n * @param specularSupported Specifies whether specular is supported or not (override lights data)\r\n * @param maxSimultaneousLights Specifies how manuy lights can be added to the effect at max\r\n * @param disableLighting Specifies whether the lighting is disabled (override scene and light)\r\n * @returns true if normals will be required for the rest of the effect\r\n */\r\n public static PrepareDefinesForLights: (\r\n scene: Scene,\r\n mesh: AbstractMesh,\r\n defines: any,\r\n specularSupported: boolean,\r\n maxSimultaneousLights?: number,\r\n disableLighting?: boolean\r\n ) => boolean = PrepareDefinesForLights;\r\n\r\n /**\r\n * Prepares the uniforms and samplers list to be used in the effect (for a specific light)\r\n * @param lightIndex defines the light index\r\n * @param uniformsList The uniform list\r\n * @param samplersList The sampler list\r\n * @param projectedLightTexture defines if projected texture must be used\r\n * @param uniformBuffersList defines an optional list of uniform buffers\r\n * @param updateOnlyBuffersList True to only update the uniformBuffersList array\r\n */\r\n public static PrepareUniformsAndSamplersForLight: (\r\n lightIndex: number,\r\n uniformsList: string[],\r\n samplersList: string[],\r\n projectedLightTexture?: any,\r\n uniformBuffersList?: Nullable<string[]>,\r\n updateOnlyBuffersList?: boolean\r\n ) => void = PrepareUniformsAndSamplersForLight;\r\n\r\n /**\r\n * Prepares the uniforms and samplers list to be used in the effect\r\n * @param uniformsListOrOptions The uniform names to prepare or an EffectCreationOptions containing the list and extra information\r\n * @param samplersList The sampler list\r\n * @param defines The defines helping in the list generation\r\n * @param maxSimultaneousLights The maximum number of simultaneous light allowed in the effect\r\n */\r\n public static PrepareUniformsAndSamplersList: (\r\n uniformsListOrOptions: string[] | IEffectCreationOptions,\r\n samplersList?: string[],\r\n defines?: any,\r\n maxSimultaneousLights?: number\r\n ) => void = PrepareUniformsAndSamplersList;\r\n\r\n /**\r\n * This helps decreasing rank by rank the shadow quality (0 being the highest rank and quality)\r\n * @param defines The defines to update while falling back\r\n * @param fallbacks The authorized effect fallbacks\r\n * @param maxSimultaneousLights The maximum number of lights allowed\r\n * @param rank the current rank of the Effect\r\n * @returns The newly affected rank\r\n */\r\n public static HandleFallbacksForShadows: (defines: any, fallbacks: EffectFallbacks, maxSimultaneousLights?: number, rank?: number) => number = HandleFallbacksForShadows;\r\n\r\n /**\r\n * Prepares the list of attributes required for morph targets according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare the morph targets attributes for\r\n * @param influencers The number of influencers\r\n */\r\n public static PrepareAttributesForMorphTargetsInfluencers: (attribs: string[], mesh: AbstractMesh, influencers: number) => void = PrepareAttributesForMorphTargetsInfluencers;\r\n\r\n /**\r\n * Prepares the list of attributes required for morph targets according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare the morph targets attributes for\r\n * @param defines The current Defines of the effect\r\n */\r\n public static PrepareAttributesForMorphTargets: (attribs: string[], mesh: AbstractMesh, defines: any) => void = PrepareAttributesForMorphTargets;\r\n\r\n /**\r\n * Prepares the list of attributes required for baked vertex animations according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare for baked vertex animations\r\n * @param defines The current Defines of the effect\r\n */\r\n public static PrepareAttributesForBakedVertexAnimation: (attribs: string[], mesh: AbstractMesh, defines: any) => void = PrepareAttributesForBakedVertexAnimation;\r\n\r\n /**\r\n * Prepares the list of attributes required for bones according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param mesh The mesh to prepare the bones attributes for\r\n * @param defines The current Defines of the effect\r\n * @param fallbacks The current effect fallback strategy\r\n */\r\n public static PrepareAttributesForBones: (attribs: string[], mesh: AbstractMesh, defines: any, fallbacks: EffectFallbacks) => void = PrepareAttributesForBones;\r\n\r\n /**\r\n * Check and prepare the list of attributes required for instances according to the effect defines.\r\n * @param attribs The current list of supported attribs\r\n * @param defines The current MaterialDefines of the effect\r\n */\r\n public static PrepareAttributesForInstances: (attribs: string[], defines: MaterialDefines) => void = PrepareAttributesForInstances;\r\n\r\n /**\r\n * Add the list of attributes required for instances to the attribs array.\r\n * @param attribs The current list of supported attribs\r\n * @param needsPreviousMatrices If the shader needs previous matrices\r\n */\r\n public static PushAttributesForInstances: (attribs: string[], needsPreviousMatrices?: boolean) => void = PushAttributesForInstances;\r\n\r\n /**\r\n * Binds the light information to the effect.\r\n * @param light The light containing the generator\r\n * @param effect The effect we are binding the data to\r\n * @param lightIndex The light index in the effect used to render\r\n */\r\n public static BindLightProperties: (light: Light, effect: Effect, lightIndex: number) => void = BindLightProperties;\r\n\r\n /**\r\n * Binds the lights information from the scene to the effect for the given mesh.\r\n * @param light Light to bind\r\n * @param lightIndex Light index\r\n * @param scene The scene where the light belongs to\r\n * @param effect The effect we are binding the data to\r\n * @param useSpecular Defines if specular is supported\r\n * @param receiveShadows Defines if the effect (mesh) we bind the light for receives shadows\r\n */\r\n public static BindLight: (light: Light, lightIndex: number, scene: Scene, effect: Effect, useSpecular: boolean, receiveShadows?: boolean) => void = BindLight;\r\n\r\n /**\r\n * Binds the lights information from the scene to the effect for the given mesh.\r\n * @param scene The scene the lights belongs to\r\n * @param mesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n * @param defines The generated defines for the effect\r\n * @param maxSimultaneousLights The maximum number of light that can be bound to the effect\r\n */\r\n public static BindLights: (scene: Scene, mesh: AbstractMesh, effect: Effect, defines: any, maxSimultaneousLights?: number) => void = BindLights;\r\n\r\n /**\r\n * Binds the fog information from the scene to the effect for the given mesh.\r\n * @param scene The scene the lights belongs to\r\n * @param mesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n * @param linearSpace Defines if the fog effect is applied in linear space\r\n */\r\n public static BindFogParameters: (scene: Scene, mesh?: AbstractMesh, effect?: Effect, linearSpace?: boolean) => void = BindFogParameters;\r\n\r\n /**\r\n * Binds the bones information from the mesh to the effect.\r\n * @param mesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n * @param prePassConfiguration Configuration for the prepass, in case prepass is activated\r\n */\r\n public static BindBonesParameters: (mesh?: AbstractMesh, effect?: Effect, prePassConfiguration?: PrePassConfiguration) => void = BindBonesParameters;\r\n\r\n /**\r\n * Binds the morph targets information from the mesh to the effect.\r\n * @param abstractMesh The mesh we are binding the information to render\r\n * @param effect The effect we are binding the data to\r\n */\r\n public static BindMorphTargetParameters: (abstractMesh: AbstractMesh, effect: Effect) => void = BindMorphTargetParameters;\r\n\r\n /**\r\n * Binds the logarithmic depth information from the scene to the effect for the given defines.\r\n * @param defines The generated defines used in the effect\r\n * @param effect The effect we are binding the data to\r\n * @param scene The scene we are willing to render with logarithmic scale for\r\n */\r\n public static BindLogDepth: (defines: any, effect: Effect, scene: Scene) => void = BindLogDepth;\r\n}\r\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "../tslib.es6.js";
|
|
2
|
-
import {
|
|
2
|
+
import { serialize } from "../Misc/decorators.js";
|
|
3
3
|
import { MaterialPluginManager } from "./materialPluginManager.js";
|
|
4
4
|
|
|
5
|
+
import { SerializationHelper } from "../Misc/decorators.serialization.js";
|
|
5
6
|
/**
|
|
6
7
|
* Base class for material plugins.
|
|
7
8
|
* @since 5.0
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materialPluginBase.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/materialPluginBase.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAcjD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IA6BjB,OAAO,CAAC,MAAe;QAC7B,IAAI,MAAM,EAAE;YACR,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,I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tRU;IADN,SAAS,EAAE;gDACQ;AAMb;IADN,SAAS,EAAE;oDACkB;AAMvB;IADN,SAAS,EAAE;2DAC4B;AAMjC;IADN,SAAS,EAAE;kEACmC","sourcesContent":["import { SerializationHelper, serialize } from \"../Misc/decorators\";\r\nimport type { Nullable } from \"../types\";\r\nimport { MaterialPluginManager } from \"./materialPluginManager\";\r\nimport type { SmartArray } from \"../Misc/smartArray\";\r\nimport { Constants } from \"../Engines/constants\";\r\n\r\nimport type { Engine } from \"../Engines/engine\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { SubMesh } from \"../Meshes/subMesh\";\r\nimport type { IAnimatable } from \"../Animations/animatable.interface\";\r\nimport type { UniformBuffer } from \"./uniformBuffer\";\r\nimport type { EffectFallbacks } from \"./effectFallbacks\";\r\nimport type { MaterialDefines } from \"./materialDefines\";\r\nimport type { Material } from \"./material\";\r\nimport type { BaseTexture } from \"./Textures/baseTexture\";\r\nimport type { RenderTargetTexture } from \"./Textures/renderTargetTexture\";\r\n\r\n/**\r\n * Base class for material plugins.\r\n * @since 5.0\r\n */\r\nexport class MaterialPluginBase {\r\n /**\r\n * Defines the name of the plugin\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * Defines the priority of the plugin. Lower numbers run first.\r\n */\r\n @serialize()\r\n public priority: number = 500;\r\n\r\n /**\r\n * Indicates that any #include directive in the plugin code must be replaced by the corresponding code.\r\n */\r\n @serialize()\r\n public resolveIncludes: boolean = false;\r\n\r\n /**\r\n * Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)\r\n */\r\n @serialize()\r\n public registerForExtraEvents: boolean = false;\r\n\r\n protected _material: Material;\r\n protected _pluginManager: MaterialPluginManager;\r\n protected _pluginDefineNames?: { [name: string]: any };\r\n\r\n protected _enable(enable: boolean) {\r\n if (enable) {\r\n this._pluginManager._activatePlugin(this);\r\n }\r\n }\r\n\r\n /**\r\n * Helper function to mark defines as being dirty.\r\n */\r\n public readonly markAllDefinesAsDirty: () => void;\r\n\r\n /**\r\n * Creates a new material plugin\r\n * @param material parent material of the plugin\r\n * @param name name of the plugin\r\n * @param priority priority of the plugin\r\n * @param defines list of defines used by the plugin. The value of the property is the default value for this property\r\n * @param addToPluginList true to add the plugin to the list of plugins managed by the material plugin manager of the material (default: true)\r\n * @param enable true to enable the plugin (it is handy if the plugin does not handle properties to switch its current activation)\r\n * @param resolveIncludes Indicates that any #include directive in the plugin code must be replaced by the corresponding code (default: false)\r\n */\r\n constructor(material: Material, name: string, priority: number, defines?: { [key: string]: any }, addToPluginList = true, enable = false, resolveIncludes = false) {\r\n this._material = material;\r\n this.name = name;\r\n this.priority = priority;\r\n this.resolveIncludes = resolveIncludes;\r\n\r\n if (!material.pluginManager) {\r\n material.pluginManager = new MaterialPluginManager(material);\r\n material.onDisposeObservable.add(() => {\r\n material.pluginManager = undefined;\r\n });\r\n }\r\n\r\n this._pluginDefineNames = defines;\r\n this._pluginManager = material.pluginManager;\r\n\r\n if (addToPluginList) {\r\n this._pluginManager._addPlugin(this);\r\n }\r\n\r\n if (enable) {\r\n this._enable(true);\r\n }\r\n\r\n this.markAllDefinesAsDirty = material._dirtyCallbacks[Constants.MATERIAL_AllDirtyFlag];\r\n }\r\n\r\n /**\r\n * Gets the current class name useful for serialization or dynamic coding.\r\n * @returns The class name.\r\n */\r\n public getClassName(): string {\r\n return \"MaterialPluginBase\";\r\n }\r\n\r\n /**\r\n * Specifies that the submesh is ready to be used.\r\n * @param defines the list of \"defines\" to update.\r\n * @param scene defines the scene the material belongs to.\r\n * @param engine the engine this scene belongs to.\r\n * @param subMesh the submesh to check for readiness\r\n * @returns - boolean indicating that the submesh is ready or not.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public isReadyForSubMesh(defines: MaterialDefines, scene: Scene, engine: Engine, subMesh: SubMesh): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Binds the material data (this function is called even if mustRebind() returns false)\r\n * @param uniformBuffer defines the Uniform buffer to fill in.\r\n * @param scene defines the scene the material belongs to.\r\n * @param engine defines the engine the material belongs to.\r\n * @param subMesh the submesh to bind data for\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public hardBindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, subMesh: SubMesh): void {}\r\n\r\n /**\r\n * Binds the material data.\r\n * @param uniformBuffer defines the Uniform buffer to fill in.\r\n * @param scene defines the scene the material belongs to.\r\n * @param engine the engine this scene belongs to.\r\n * @param subMesh the submesh to bind data for\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, subMesh: SubMesh): void {}\r\n\r\n /**\r\n * Disposes the resources of the material.\r\n * @param forceDisposeTextures - Forces the disposal of all textures.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public dispose(forceDisposeTextures?: boolean): void {}\r\n\r\n /**\r\n * Returns a list of custom shader code fragments to customize the shader.\r\n * @param shaderType \"vertex\" or \"fragment\"\r\n * @returns null if no code to be added, or a list of pointName =\\> code.\r\n * Note that `pointName` can also be a regular expression if it starts with a `!`.\r\n * In that case, the string found by the regular expression (if any) will be\r\n * replaced by the code provided.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getCustomCode(shaderType: string): Nullable<{ [pointName: string]: string }> {\r\n return null;\r\n }\r\n\r\n /**\r\n * Collects all defines.\r\n * @param defines The object to append to.\r\n */\r\n public collectDefines(defines: { [name: string]: { type: string; default: any } }): void {\r\n if (!this._pluginDefineNames) {\r\n return;\r\n }\r\n for (const key of Object.keys(this._pluginDefineNames)) {\r\n if (key[0] === \"_\") {\r\n continue;\r\n }\r\n\r\n const type = typeof this._pluginDefineNames[key];\r\n defines[key] = {\r\n type: type === \"number\" ? \"number\" : type === \"string\" ? \"string\" : type === \"boolean\" ? \"boolean\" : \"object\",\r\n default: this._pluginDefineNames[key],\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * Sets the defines for the next rendering. Called before PrepareDefinesForAttributes is called.\r\n * @param defines the list of \"defines\" to update.\r\n * @param scene defines the scene to the material belongs to.\r\n * @param mesh the mesh being rendered\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public prepareDefinesBeforeAttributes(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void {}\r\n\r\n /**\r\n * Sets the defines for the next rendering\r\n * @param defines the list of \"defines\" to update.\r\n * @param scene defines the scene to the material belongs to.\r\n * @param mesh the mesh being rendered\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void {}\r\n\r\n /**\r\n * Checks to see if a texture is used in the material.\r\n * @param texture - Base texture to use.\r\n * @returns - Boolean specifying if a texture is used in the material.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public hasTexture(texture: BaseTexture): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that current material needs to register RTT\r\n * @returns true if this uses a render target otherwise false.\r\n */\r\n public hasRenderTargetTextures(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Fills the list of render target textures.\r\n * @param renderTargets the list of render targets to update\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public fillRenderTargetTextures(renderTargets: SmartArray<RenderTargetTexture>): void {}\r\n\r\n /**\r\n * Returns an array of the actively used textures.\r\n * @param activeTextures Array of BaseTextures\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getActiveTextures(activeTextures: BaseTexture[]): void {}\r\n\r\n /**\r\n * Returns the animatable textures.\r\n * @param animatables Array of animatable textures.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getAnimatables(animatables: IAnimatable[]): void {}\r\n\r\n /**\r\n * Add fallbacks to the effect fallbacks list.\r\n * @param defines defines the Base texture to use.\r\n * @param fallbacks defines the current fallback list.\r\n * @param currentRank defines the current fallback rank.\r\n * @returns the new fallback rank.\r\n */\r\n public addFallbacks(defines: MaterialDefines, fallbacks: EffectFallbacks, currentRank: number): number {\r\n return currentRank;\r\n }\r\n\r\n /**\r\n * Gets the samplers used by the plugin.\r\n * @param samplers list that the sampler names should be added to.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getSamplers(samplers: string[]): void {}\r\n\r\n /**\r\n * Gets the attributes used by the plugin.\r\n * @param attributes list that the attribute names should be added to.\r\n * @param scene the scene that the material belongs to.\r\n * @param mesh the mesh being rendered.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getAttributes(attributes: string[], scene: Scene, mesh: AbstractMesh): void {}\r\n\r\n /**\r\n * Gets the uniform buffers names added by the plugin.\r\n * @param ubos list that the ubo names should be added to.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getUniformBuffersNames(ubos: string[]): void {}\r\n\r\n /**\r\n * Gets the description of the uniforms to add to the ubo (if engine supports ubos) or to inject directly in the vertex/fragment shaders (if engine does not support ubos)\r\n * @returns the description of the uniforms\r\n */\r\n public getUniforms(): { ubo?: Array<{ name: string; size?: number; type?: string; arraySize?: number }>; vertex?: string; fragment?: string } {\r\n return {};\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current configuration into another one.\r\n * @param plugin define the config where to copy the info\r\n */\r\n public copyTo(plugin: MaterialPluginBase): void {\r\n SerializationHelper.Clone(() => plugin, this);\r\n }\r\n\r\n /**\r\n * Serializes this plugin configuration.\r\n * @returns - An object with the serialized config.\r\n */\r\n public serialize(): any {\r\n return SerializationHelper.Serialize(this);\r\n }\r\n\r\n /**\r\n * Parses a plugin configuration from a serialized object.\r\n * @param source - Serialized object.\r\n * @param scene Defines the scene we are parsing for\r\n * @param rootUrl Defines the rootUrl to load from\r\n */\r\n public parse(source: any, scene: Scene, rootUrl: string): void {\r\n SerializationHelper.Parse(() => this, source, scene, rootUrl);\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"materialPluginBase.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/materialPluginBase.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAajD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IA6BjB,OAAO,CAAC,MAAe;QAC7B,IAAI,MAAM,EAAE;YACR,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;SAC7C;IACL,CAAC;IAOD;;;;;;;;;OASG;IACH,YAAY,QAAkB,EAAE,IAAY,EAAE,QAAgB,EAAE,OAAgC,EAAE,eAAe,GAAG,IAAI,EAAE,MAAM,GAAG,KAAK,EAAE,eAAe,GAAG,KAAK;QA3CjK;;WAEG;QAEI,aAAQ,GAAW,GAAG,CAAC;QAE9B;;WAEG;QAEI,oBAAe,GAAY,KAAK,CAAC;QAExC;;WAEG;QAEI,2BAAsB,GAAY,KAAK,CAAC;QA4B3C,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QAEvC,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE;YACzB,QAAQ,CAAC,aAAa,GAAG,IAAI,qBAAqB,CAAC,QAAQ,CAAC,CAAC;YAC7D,QAAQ,CAAC,mBAAmB,CAAC,GAAG,CAAC,GAAG,EAAE;gBAClC,QAAQ,CAAC,aAAa,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;;;OAGG;IACH,6DAA6D;IACtD,sBAAsB,CAAC,IAAc,IAAS,CAAC;IAEtD;;;OAGG;IACI,WAAW;QACd,OAAO,EAAE,CAAC;IACd,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,MAA0B;QACpC,mBAAmB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAClD,CAAC;IAED;;;OAGG;IACI,SAAS;QACZ,OAAO,mBAAmB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,MAAW,EAAE,KAAY,EAAE,OAAe;QACnD,mBAAmB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;CACJ;AAtRU;IADN,SAAS,EAAE;gDACQ;AAMb;IADN,SAAS,EAAE;oDACkB;AAMvB;IADN,SAAS,EAAE;2DAC4B;AAMjC;IADN,SAAS,EAAE;kEACmC","sourcesContent":["import { serialize } from \"../Misc/decorators\";\r\nimport type { Nullable } from \"../types\";\r\nimport { MaterialPluginManager } from \"./materialPluginManager\";\r\nimport type { SmartArray } from \"../Misc/smartArray\";\r\nimport { Constants } from \"../Engines/constants\";\r\n\r\nimport type { Engine } from \"../Engines/engine\";\r\nimport type { Scene } from \"../scene\";\r\nimport type { AbstractMesh } from \"../Meshes/abstractMesh\";\r\nimport type { SubMesh } from \"../Meshes/subMesh\";\r\nimport type { IAnimatable } from \"../Animations/animatable.interface\";\r\nimport type { UniformBuffer } from \"./uniformBuffer\";\r\nimport type { EffectFallbacks } from \"./effectFallbacks\";\r\nimport type { MaterialDefines } from \"./materialDefines\";\r\nimport type { Material } from \"./material\";\r\nimport type { BaseTexture } from \"./Textures/baseTexture\";\r\nimport type { RenderTargetTexture } from \"./Textures/renderTargetTexture\";\r\nimport { SerializationHelper } from \"../Misc/decorators.serialization\";\r\n\r\n/**\r\n * Base class for material plugins.\r\n * @since 5.0\r\n */\r\nexport class MaterialPluginBase {\r\n /**\r\n * Defines the name of the plugin\r\n */\r\n @serialize()\r\n public name: string;\r\n\r\n /**\r\n * Defines the priority of the plugin. Lower numbers run first.\r\n */\r\n @serialize()\r\n public priority: number = 500;\r\n\r\n /**\r\n * Indicates that any #include directive in the plugin code must be replaced by the corresponding code.\r\n */\r\n @serialize()\r\n public resolveIncludes: boolean = false;\r\n\r\n /**\r\n * Indicates that this plugin should be notified for the extra events (HasRenderTargetTextures / FillRenderTargetTextures / HardBindForSubMesh)\r\n */\r\n @serialize()\r\n public registerForExtraEvents: boolean = false;\r\n\r\n protected _material: Material;\r\n protected _pluginManager: MaterialPluginManager;\r\n protected _pluginDefineNames?: { [name: string]: any };\r\n\r\n protected _enable(enable: boolean) {\r\n if (enable) {\r\n this._pluginManager._activatePlugin(this);\r\n }\r\n }\r\n\r\n /**\r\n * Helper function to mark defines as being dirty.\r\n */\r\n public readonly markAllDefinesAsDirty: () => void;\r\n\r\n /**\r\n * Creates a new material plugin\r\n * @param material parent material of the plugin\r\n * @param name name of the plugin\r\n * @param priority priority of the plugin\r\n * @param defines list of defines used by the plugin. The value of the property is the default value for this property\r\n * @param addToPluginList true to add the plugin to the list of plugins managed by the material plugin manager of the material (default: true)\r\n * @param enable true to enable the plugin (it is handy if the plugin does not handle properties to switch its current activation)\r\n * @param resolveIncludes Indicates that any #include directive in the plugin code must be replaced by the corresponding code (default: false)\r\n */\r\n constructor(material: Material, name: string, priority: number, defines?: { [key: string]: any }, addToPluginList = true, enable = false, resolveIncludes = false) {\r\n this._material = material;\r\n this.name = name;\r\n this.priority = priority;\r\n this.resolveIncludes = resolveIncludes;\r\n\r\n if (!material.pluginManager) {\r\n material.pluginManager = new MaterialPluginManager(material);\r\n material.onDisposeObservable.add(() => {\r\n material.pluginManager = undefined;\r\n });\r\n }\r\n\r\n this._pluginDefineNames = defines;\r\n this._pluginManager = material.pluginManager;\r\n\r\n if (addToPluginList) {\r\n this._pluginManager._addPlugin(this);\r\n }\r\n\r\n if (enable) {\r\n this._enable(true);\r\n }\r\n\r\n this.markAllDefinesAsDirty = material._dirtyCallbacks[Constants.MATERIAL_AllDirtyFlag];\r\n }\r\n\r\n /**\r\n * Gets the current class name useful for serialization or dynamic coding.\r\n * @returns The class name.\r\n */\r\n public getClassName(): string {\r\n return \"MaterialPluginBase\";\r\n }\r\n\r\n /**\r\n * Specifies that the submesh is ready to be used.\r\n * @param defines the list of \"defines\" to update.\r\n * @param scene defines the scene the material belongs to.\r\n * @param engine the engine this scene belongs to.\r\n * @param subMesh the submesh to check for readiness\r\n * @returns - boolean indicating that the submesh is ready or not.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public isReadyForSubMesh(defines: MaterialDefines, scene: Scene, engine: Engine, subMesh: SubMesh): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Binds the material data (this function is called even if mustRebind() returns false)\r\n * @param uniformBuffer defines the Uniform buffer to fill in.\r\n * @param scene defines the scene the material belongs to.\r\n * @param engine defines the engine the material belongs to.\r\n * @param subMesh the submesh to bind data for\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public hardBindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, subMesh: SubMesh): void {}\r\n\r\n /**\r\n * Binds the material data.\r\n * @param uniformBuffer defines the Uniform buffer to fill in.\r\n * @param scene defines the scene the material belongs to.\r\n * @param engine the engine this scene belongs to.\r\n * @param subMesh the submesh to bind data for\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public bindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, engine: Engine, subMesh: SubMesh): void {}\r\n\r\n /**\r\n * Disposes the resources of the material.\r\n * @param forceDisposeTextures - Forces the disposal of all textures.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public dispose(forceDisposeTextures?: boolean): void {}\r\n\r\n /**\r\n * Returns a list of custom shader code fragments to customize the shader.\r\n * @param shaderType \"vertex\" or \"fragment\"\r\n * @returns null if no code to be added, or a list of pointName =\\> code.\r\n * Note that `pointName` can also be a regular expression if it starts with a `!`.\r\n * In that case, the string found by the regular expression (if any) will be\r\n * replaced by the code provided.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getCustomCode(shaderType: string): Nullable<{ [pointName: string]: string }> {\r\n return null;\r\n }\r\n\r\n /**\r\n * Collects all defines.\r\n * @param defines The object to append to.\r\n */\r\n public collectDefines(defines: { [name: string]: { type: string; default: any } }): void {\r\n if (!this._pluginDefineNames) {\r\n return;\r\n }\r\n for (const key of Object.keys(this._pluginDefineNames)) {\r\n if (key[0] === \"_\") {\r\n continue;\r\n }\r\n\r\n const type = typeof this._pluginDefineNames[key];\r\n defines[key] = {\r\n type: type === \"number\" ? \"number\" : type === \"string\" ? \"string\" : type === \"boolean\" ? \"boolean\" : \"object\",\r\n default: this._pluginDefineNames[key],\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * Sets the defines for the next rendering. Called before PrepareDefinesForAttributes is called.\r\n * @param defines the list of \"defines\" to update.\r\n * @param scene defines the scene to the material belongs to.\r\n * @param mesh the mesh being rendered\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public prepareDefinesBeforeAttributes(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void {}\r\n\r\n /**\r\n * Sets the defines for the next rendering\r\n * @param defines the list of \"defines\" to update.\r\n * @param scene defines the scene to the material belongs to.\r\n * @param mesh the mesh being rendered\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public prepareDefines(defines: MaterialDefines, scene: Scene, mesh: AbstractMesh): void {}\r\n\r\n /**\r\n * Checks to see if a texture is used in the material.\r\n * @param texture - Base texture to use.\r\n * @returns - Boolean specifying if a texture is used in the material.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public hasTexture(texture: BaseTexture): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that current material needs to register RTT\r\n * @returns true if this uses a render target otherwise false.\r\n */\r\n public hasRenderTargetTextures(): boolean {\r\n return false;\r\n }\r\n\r\n /**\r\n * Fills the list of render target textures.\r\n * @param renderTargets the list of render targets to update\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public fillRenderTargetTextures(renderTargets: SmartArray<RenderTargetTexture>): void {}\r\n\r\n /**\r\n * Returns an array of the actively used textures.\r\n * @param activeTextures Array of BaseTextures\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getActiveTextures(activeTextures: BaseTexture[]): void {}\r\n\r\n /**\r\n * Returns the animatable textures.\r\n * @param animatables Array of animatable textures.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getAnimatables(animatables: IAnimatable[]): void {}\r\n\r\n /**\r\n * Add fallbacks to the effect fallbacks list.\r\n * @param defines defines the Base texture to use.\r\n * @param fallbacks defines the current fallback list.\r\n * @param currentRank defines the current fallback rank.\r\n * @returns the new fallback rank.\r\n */\r\n public addFallbacks(defines: MaterialDefines, fallbacks: EffectFallbacks, currentRank: number): number {\r\n return currentRank;\r\n }\r\n\r\n /**\r\n * Gets the samplers used by the plugin.\r\n * @param samplers list that the sampler names should be added to.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getSamplers(samplers: string[]): void {}\r\n\r\n /**\r\n * Gets the attributes used by the plugin.\r\n * @param attributes list that the attribute names should be added to.\r\n * @param scene the scene that the material belongs to.\r\n * @param mesh the mesh being rendered.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getAttributes(attributes: string[], scene: Scene, mesh: AbstractMesh): void {}\r\n\r\n /**\r\n * Gets the uniform buffers names added by the plugin.\r\n * @param ubos list that the ubo names should be added to.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\r\n public getUniformBuffersNames(ubos: string[]): void {}\r\n\r\n /**\r\n * Gets the description of the uniforms to add to the ubo (if engine supports ubos) or to inject directly in the vertex/fragment shaders (if engine does not support ubos)\r\n * @returns the description of the uniforms\r\n */\r\n public getUniforms(): { ubo?: Array<{ name: string; size?: number; type?: string; arraySize?: number }>; vertex?: string; fragment?: string } {\r\n return {};\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current configuration into another one.\r\n * @param plugin define the config where to copy the info\r\n */\r\n public copyTo(plugin: MaterialPluginBase): void {\r\n SerializationHelper.Clone(() => plugin, this);\r\n }\r\n\r\n /**\r\n * Serializes this plugin configuration.\r\n * @returns - An object with the serialized config.\r\n */\r\n public serialize(): any {\r\n return SerializationHelper.Serialize(this);\r\n }\r\n\r\n /**\r\n * Parses a plugin configuration from a serialized object.\r\n * @param source - Serialized object.\r\n * @param scene Defines the scene we are parsing for\r\n * @param rootUrl Defines the rootUrl to load from\r\n */\r\n public parse(source: any, scene: Scene, rootUrl: string): void {\r\n SerializationHelper.Parse(() => this, source, scene, rootUrl);\r\n }\r\n}\r\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "../tslib.es6.js";
|
|
2
|
+
import { SerializationHelper } from "../Misc/decorators.serialization.js";
|
|
2
3
|
|
|
3
|
-
import {
|
|
4
|
+
import { serialize } from "../Misc/decorators.js";
|
|
4
5
|
/**
|
|
5
6
|
* Class that holds the different stencil states of a material
|
|
6
7
|
* Usage example: https://playground.babylonjs.com/#CW5PRI#10
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"materialStencilState.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/materialStencilState.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"materialStencilState.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/materialStencilState.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE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,EAAE;gDAGX;AAWD;IADC,SAAS,EAAE;mDAGX;AAWD;IADC,SAAS,EAAE;oDAGX;AAWD;IADC,SAAS,EAAE;yDAGX;AAWD;IADC,SAAS,EAAE;uDAGX;AAWD;IADC,SAAS,EAAE;8DAGX;AAWD;IADC,SAAS,EAAE;gDAGX;AAWD;IADC,SAAS,EAAE;mDAGX","sourcesContent":["import { SerializationHelper } from \"../Misc/decorators.serialization\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { serialize } from \"../Misc/decorators\";\r\nimport type { IStencilState } from \"../States/IStencilState\";\r\n\r\nimport type { Scene } from \"../scene\";\r\n\r\n/**\r\n * Class that holds the different stencil states of a material\r\n * Usage example: https://playground.babylonjs.com/#CW5PRI#10\r\n */\r\nexport class MaterialStencilState implements IStencilState {\r\n /**\r\n * Creates a material stencil state instance\r\n */\r\n public constructor() {\r\n this.reset();\r\n }\r\n\r\n /**\r\n * Resets all the stencil states to default values\r\n */\r\n public reset() {\r\n this.enabled = false;\r\n this.mask = 0xff;\r\n\r\n this.func = Constants.ALWAYS;\r\n this.funcRef = 1;\r\n this.funcMask = 0xff;\r\n\r\n this.opStencilFail = Constants.KEEP;\r\n this.opDepthFail = Constants.KEEP;\r\n this.opStencilDepthPass = Constants.REPLACE;\r\n }\r\n\r\n private _func: number;\r\n /**\r\n * Gets or sets the stencil function\r\n */\r\n @serialize()\r\n public get func(): number {\r\n return this._func;\r\n }\r\n\r\n public set func(value: number) {\r\n this._func = value;\r\n }\r\n\r\n private _funcRef: number;\r\n /**\r\n * Gets or sets the stencil function reference\r\n */\r\n @serialize()\r\n public get funcRef(): number {\r\n return this._funcRef;\r\n }\r\n\r\n public set funcRef(value: number) {\r\n this._funcRef = value;\r\n }\r\n\r\n private _funcMask: number;\r\n /**\r\n * Gets or sets the stencil function mask\r\n */\r\n @serialize()\r\n public get funcMask(): number {\r\n return this._funcMask;\r\n }\r\n\r\n public set funcMask(value: number) {\r\n this._funcMask = value;\r\n }\r\n\r\n private _opStencilFail: number;\r\n /**\r\n * Gets or sets the operation when the stencil test fails\r\n */\r\n @serialize()\r\n public get opStencilFail(): number {\r\n return this._opStencilFail;\r\n }\r\n\r\n public set opStencilFail(value: number) {\r\n this._opStencilFail = value;\r\n }\r\n\r\n private _opDepthFail: number;\r\n /**\r\n * Gets or sets the operation when the depth test fails\r\n */\r\n @serialize()\r\n public get opDepthFail(): number {\r\n return this._opDepthFail;\r\n }\r\n\r\n public set opDepthFail(value: number) {\r\n this._opDepthFail = value;\r\n }\r\n\r\n private _opStencilDepthPass: number;\r\n /**\r\n * Gets or sets the operation when the stencil+depth test succeeds\r\n */\r\n @serialize()\r\n public get opStencilDepthPass(): number {\r\n return this._opStencilDepthPass;\r\n }\r\n\r\n public set opStencilDepthPass(value: number) {\r\n this._opStencilDepthPass = value;\r\n }\r\n\r\n private _mask: number;\r\n /**\r\n * Gets or sets the stencil mask\r\n */\r\n @serialize()\r\n public get mask(): number {\r\n return this._mask;\r\n }\r\n\r\n public set mask(value: number) {\r\n this._mask = value;\r\n }\r\n\r\n private _enabled: boolean;\r\n /**\r\n * Enables or disables the stencil test\r\n */\r\n @serialize()\r\n public get enabled(): boolean {\r\n return this._enabled;\r\n }\r\n\r\n public set enabled(value: boolean) {\r\n this._enabled = value;\r\n }\r\n\r\n /**\r\n * Get the current class name, useful for serialization or dynamic coding.\r\n * @returns \"MaterialStencilState\"\r\n */\r\n public getClassName(): string {\r\n return \"MaterialStencilState\";\r\n }\r\n\r\n /**\r\n * Makes a duplicate of the current configuration into another one.\r\n * @param stencilState defines stencil state where to copy the info\r\n */\r\n public copyTo(stencilState: MaterialStencilState): void {\r\n SerializationHelper.Clone(() => stencilState, this);\r\n }\r\n\r\n /**\r\n * Serializes this stencil configuration.\r\n * @returns - An object with the serialized config.\r\n */\r\n public serialize(): any {\r\n return SerializationHelper.Serialize(this);\r\n }\r\n\r\n /**\r\n * Parses a stencil state configuration from a serialized object.\r\n * @param source - Serialized object.\r\n * @param scene Defines the scene we are parsing for\r\n * @param rootUrl Defines the rootUrl to load from\r\n */\r\n public parse(source: any, scene: Scene, rootUrl: string): void {\r\n SerializationHelper.Parse(() => this, source, scene, rootUrl);\r\n }\r\n}\r\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SerializationHelper } from "../Misc/decorators.js";
|
|
1
|
+
import { SerializationHelper } from "../Misc/decorators.serialization.js";
|
|
2
2
|
import { Scene } from "../scene.js";
|
|
3
3
|
import { Matrix, Vector3, Vector2, Vector4, Quaternion } from "../Maths/math.vector.js";
|
|
4
4
|
import { VertexBuffer } from "../Buffers/buffer.js";
|