@babylonjs/core 7.30.0 → 7.30.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Engines/WebGPU/webgpuCacheBindGroups.js +13 -2
- package/Engines/WebGPU/webgpuCacheBindGroups.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheSampler.js +2 -3
- package/Engines/WebGPU/webgpuCacheSampler.js.map +1 -1
- package/Engines/abstractEngine.js +2 -2
- package/Engines/abstractEngine.js.map +1 -1
- package/Materials/Background/backgroundMaterial.js +1 -11
- package/Materials/Background/backgroundMaterial.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.d.ts +8 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js +43 -34
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianBlock.d.ts +32 -0
- package/Materials/Node/Blocks/GaussianSplatting/gaussianBlock.js +64 -0
- package/Materials/Node/Blocks/GaussianSplatting/gaussianBlock.js.map +1 -0
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.d.ts +48 -0
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js +102 -0
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.js.map +1 -0
- package/Materials/Node/Blocks/GaussianSplatting/index.d.ts +3 -0
- package/Materials/Node/Blocks/GaussianSplatting/index.js +4 -0
- package/Materials/Node/Blocks/GaussianSplatting/index.js.map +1 -0
- package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.d.ts +40 -0
- package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js +96 -0
- package/Materials/Node/Blocks/GaussianSplatting/splatReaderBlock.js.map +1 -0
- package/Materials/Node/Blocks/Input/inputBlock.js +6 -0
- package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
- package/Materials/Node/Blocks/index.d.ts +1 -0
- package/Materials/Node/Blocks/index.js +1 -0
- package/Materials/Node/Blocks/index.js.map +1 -1
- package/Materials/Node/Enums/nodeMaterialModes.d.ts +3 -1
- package/Materials/Node/Enums/nodeMaterialModes.js +2 -0
- package/Materials/Node/Enums/nodeMaterialModes.js.map +1 -1
- package/Materials/Node/index.d.ts +1 -0
- package/Materials/Node/index.js +1 -0
- package/Materials/Node/index.js.map +1 -1
- package/Materials/Node/nodeMaterialDefault.d.ts +6 -0
- package/Materials/Node/nodeMaterialDefault.js +53 -0
- package/Materials/Node/nodeMaterialDefault.js.map +1 -0
- package/Materials/PBR/pbrBaseMaterial.js +1 -11
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/texture.js +7 -3
- package/Materials/Textures/texture.js.map +1 -1
- package/Materials/Textures/textureSampler.d.ts +1 -1
- package/Materials/Textures/textureSampler.js.map +1 -1
- package/Materials/material.d.ts +5 -1
- package/Materials/material.js +19 -1
- package/Materials/material.js.map +1 -1
- package/Materials/materialPluginManager.js +2 -2
- package/Materials/materialPluginManager.js.map +1 -1
- package/Materials/pushMaterial.d.ts +1 -1
- package/Materials/pushMaterial.js +2 -2
- package/Materials/pushMaterial.js.map +1 -1
- package/Materials/standardMaterial.js +1 -11
- package/Materials/standardMaterial.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.d.ts +11 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js +72 -37
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.js.map +1 -1
- package/Meshes/Node/Blocks/Set/aggregatorBlock.d.ts +76 -0
- package/Meshes/Node/Blocks/Set/aggregatorBlock.js +210 -0
- package/Meshes/Node/Blocks/Set/aggregatorBlock.js.map +1 -0
- package/Meshes/Node/Blocks/booleanGeometryBlock.d.ts +6 -0
- package/Meshes/Node/Blocks/booleanGeometryBlock.js +16 -4
- package/Meshes/Node/Blocks/booleanGeometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTransformBlock.d.ts +6 -0
- package/Meshes/Node/Blocks/geometryTransformBlock.js +14 -2
- package/Meshes/Node/Blocks/geometryTransformBlock.js.map +1 -1
- package/Meshes/Node/index.d.ts +1 -0
- package/Meshes/Node/index.js +1 -0
- package/Meshes/Node/index.js.map +1 -1
- package/Meshes/Node/nodeGeometry.d.ts +1 -1
- package/Meshes/Node/nodeGeometry.js +14 -1
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.d.ts +4 -0
- package/Meshes/Node/nodeGeometryBlock.js +6 -0
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/csg.d.ts +1 -0
- package/Meshes/csg.js +1 -0
- package/Meshes/csg.js.map +1 -1
- package/Meshes/csg2.d.ts +126 -0
- package/Meshes/csg2.js +350 -0
- package/Meshes/csg2.js.map +1 -0
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/mesh.js +3 -1
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/mesh.vertexData.d.ts +66 -1
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Misc/dumpTools.js +1 -0
- package/Misc/dumpTools.js.map +1 -1
- package/Misc/tools.d.ts +2 -1
- package/Misc/tools.internals.d.ts +13 -0
- package/Misc/tools.internals.js +48 -0
- package/Misc/tools.internals.js.map +1 -0
- package/Misc/tools.js +13 -4
- package/Misc/tools.js.map +1 -1
- package/Morph/morphTarget.js +1 -0
- package/Morph/morphTarget.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.d.ts +5 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js +33 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -0
- package/Shaders/ShadersInclude/gaussianSplattingFragmentDeclaration.d.ts +7 -0
- package/Shaders/ShadersInclude/gaussianSplattingFragmentDeclaration.js +19 -0
- package/Shaders/ShadersInclude/gaussianSplattingFragmentDeclaration.js.map +1 -0
- package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/gaussianSplattingUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js +1 -2
- package/Shaders/ShadersInclude/gaussianSplattingVertexDeclaration.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.d.ts +1 -2
- package/Shaders/gaussianSplatting.fragment.js +5 -10
- package/Shaders/gaussianSplatting.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.d.ts +1 -0
- package/Shaders/gaussianSplatting.vertex.js +4 -21
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Materials/Node/Blocks/Input/inputBlock.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAE1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAGhF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAIlF,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAEzD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,kBAAkB,GAA+B;IACnD,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,KAAK;IAClB,cAAc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S,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAE1D,IAAI,SAAS,EAAE;gBACX,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;aACtE;SACJ;IACL,CAAC;CACJ;AAED,aAAa,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { NodeMaterialBlock } from \"../../nodeMaterialBlock\";\r\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes\";\r\nimport { NodeMaterialBlockConnectionPointMode } from \"../../Enums/nodeMaterialBlockConnectionPointMode\";\r\nimport { NodeMaterialSystemValues } from \"../../Enums/nodeMaterialSystemValues\";\r\nimport type { Nullable } from \"../../../../types\";\r\nimport type { Effect } from \"../../../../Materials/effect\";\r\nimport { Matrix, Vector2, Vector3, Vector4 } from \"../../../../Maths/math.vector\";\r\nimport type { Scene } from \"../../../../scene\";\r\nimport type { NodeMaterialConnectionPoint } from \"../../nodeMaterialBlockConnectionPoint\";\r\nimport type { NodeMaterialBuildState } from \"../../nodeMaterialBuildState\";\r\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets\";\r\nimport { GetClass, RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { Color3, Color4, TmpColors } from \"../../../../Maths/math\";\r\nimport { AnimatedInputBlockTypes } from \"./animatedInputBlockTypes\";\r\nimport { Observable } from \"../../../../Misc/observable\";\r\nimport type { NodeMaterial } from \"../../nodeMaterial\";\r\nimport { PrecisionDate } from \"../../../../Misc/precisionDate\";\r\nimport { ShaderLanguage } from \"../../../../Materials/shaderLanguage\";\r\n\r\nconst remapAttributeName: { [name: string]: string } = {\r\n position2d: \"position\",\r\n particle_uv: \"vUV\",\r\n particle_color: \"vColor\",\r\n particle_texturemask: \"textureMask\",\r\n particle_positionw: \"vPositionW\",\r\n};\r\n\r\nconst attributeInFragmentOnly: { [name: string]: boolean } = {\r\n particle_uv: true,\r\n particle_color: true,\r\n particle_texturemask: true,\r\n particle_positionw: true,\r\n};\r\n\r\nconst attributeAsUniform: { [name: string]: boolean } = {\r\n particle_texturemask: true,\r\n};\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class InputBlock extends NodeMaterialBlock {\r\n private _mode = NodeMaterialBlockConnectionPointMode.Undefined;\r\n private _associatedVariableName: string;\r\n private _storedValue: any;\r\n private _valueCallback: () => any;\r\n private _type: NodeMaterialBlockConnectionPointTypes;\r\n private _animationType = AnimatedInputBlockTypes.None;\r\n private _prefix = \"\";\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public min: number = 0;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public max: number = 0;\r\n\r\n /** Gets or set a value indicating that this input can only get 0 and 1 values */\r\n public isBoolean: boolean = false;\r\n\r\n /** Gets or sets a value used by the Node Material editor to determine how to configure the current value if it is a matrix */\r\n public matrixMode: number = 0;\r\n\r\n /** @internal */\r\n public _systemValue: Nullable<NodeMaterialSystemValues> = null;\r\n\r\n /** Gets or sets a boolean indicating that the value of this input will not change after a build */\r\n public isConstant = false;\r\n\r\n /** Gets or sets the group to use to display this block in the Inspector */\r\n public groupInInspector = \"\";\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<InputBlock>();\r\n\r\n /** Gets or sets a boolean indicating if content needs to be converted to gamma space (for color3/4 only) */\r\n public convertToGammaSpace = false;\r\n\r\n /** Gets or sets a boolean indicating if content needs to be converted to linear space (for color3/4 only) */\r\n public convertToLinearSpace = false;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeMaterialBlockConnectionPointTypes {\r\n if (this._type === NodeMaterialBlockConnectionPointTypes.AutoDetect) {\r\n if (this.isUniform && this.value != null) {\r\n if (!isNaN(this.value)) {\r\n this._type = NodeMaterialBlockConnectionPointTypes.Float;\r\n return this._type;\r\n }\r\n\r\n switch (this.value.getClassName()) {\r\n case \"Vector2\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"Vector3\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"Vector4\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"Color3\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color3;\r\n return this._type;\r\n case \"Color4\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color4;\r\n return this._type;\r\n case \"Matrix\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n }\r\n }\r\n\r\n if (this.isAttribute) {\r\n switch (this.name) {\r\n case \"position\":\r\n case \"normal\":\r\n case \"particle_positionw\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"uv\":\r\n case \"uv2\":\r\n case \"uv3\":\r\n case \"uv4\":\r\n case \"uv5\":\r\n case \"uv6\":\r\n case \"position2d\":\r\n case \"particle_uv\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"matricesIndices\":\r\n case \"matricesWeights\":\r\n case \"matricesIndicesExtra\":\r\n case \"matricesWeightsExtra\":\r\n case \"world0\":\r\n case \"world1\":\r\n case \"world2\":\r\n case \"world3\":\r\n case \"tangent\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"color\":\r\n case \"instanceColor\":\r\n case \"particle_color\":\r\n case \"particle_texturemask\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color4;\r\n return this._type;\r\n }\r\n }\r\n\r\n if (this.isSystemValue) {\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.World:\r\n case NodeMaterialSystemValues.WorldView:\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n case NodeMaterialSystemValues.View:\r\n case NodeMaterialSystemValues.ViewProjection:\r\n case NodeMaterialSystemValues.Projection:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n case NodeMaterialSystemValues.CameraPosition:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case NodeMaterialSystemValues.FogColor:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color3;\r\n return this._type;\r\n case NodeMaterialSystemValues.DeltaTime:\r\n case NodeMaterialSystemValues.MaterialAlpha:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Float;\r\n return this._type;\r\n case NodeMaterialSystemValues.CameraParameters:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n }\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Creates a new InputBlock\r\n * @param name defines the block name\r\n * @param target defines the target of that block (Vertex by default)\r\n * @param type defines the type of the input (can be set to NodeMaterialBlockConnectionPointTypes.AutoDetect)\r\n */\r\n public constructor(name: string, target = NodeMaterialBlockTargets.Vertex, type: NodeMaterialBlockConnectionPointTypes = NodeMaterialBlockConnectionPointTypes.AutoDetect) {\r\n super(name, target, false);\r\n\r\n this._type = type;\r\n\r\n this.setDefaultValue();\r\n\r\n this.registerOutput(\"output\", type);\r\n }\r\n\r\n /**\r\n * Validates if a name is a reserve word.\r\n * @param newName the new name to be given to the node.\r\n * @returns false if the name is a reserve word, else true.\r\n */\r\n public override validateBlockName(newName: string) {\r\n if (!this.isAttribute) {\r\n return super.validateBlockName(newName);\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeMaterialConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Set the source of this connection point to a vertex attribute\r\n * @param attributeName defines the attribute name (position, uv, normal, etc...). If not specified it will take the connection point name\r\n * @returns the current connection point\r\n */\r\n public setAsAttribute(attributeName?: string): InputBlock {\r\n this._mode = NodeMaterialBlockConnectionPointMode.Attribute;\r\n if (attributeName) {\r\n this.name = attributeName;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Set the source of this connection point to a system value\r\n * @param value define the system value to use (world, view, etc...) or null to switch to manual value\r\n * @returns the current connection point\r\n */\r\n public setAsSystemValue(value: Nullable<NodeMaterialSystemValues>): InputBlock {\r\n this.systemValue = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n * Please note that this value will be ignored if valueCallback is defined\r\n */\r\n public get value(): any {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: any) {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n if (this.isBoolean) {\r\n value = value ? 1 : 0;\r\n } else if (this.min !== this.max) {\r\n value = Math.max(this.min, value);\r\n value = Math.min(this.max, value);\r\n }\r\n }\r\n\r\n this._storedValue = value;\r\n this._mode = NodeMaterialBlockConnectionPointMode.Uniform;\r\n\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets or sets a callback used to get the value of that point.\r\n * Please note that setting this value will force the connection point to ignore the value property\r\n */\r\n public get valueCallback(): () => any {\r\n return this._valueCallback;\r\n }\r\n\r\n public set valueCallback(value: () => any) {\r\n this._valueCallback = value;\r\n this._mode = NodeMaterialBlockConnectionPointMode.Uniform;\r\n }\r\n\r\n /**\r\n * Gets the declaration variable name in the shader\r\n */\r\n public get declarationVariableName(): string {\r\n return this._associatedVariableName;\r\n }\r\n\r\n /**\r\n * Gets or sets the associated variable name in the shader\r\n */\r\n public get associatedVariableName(): string {\r\n return this._prefix + this._associatedVariableName;\r\n }\r\n\r\n public set associatedVariableName(value: string) {\r\n this._associatedVariableName = value;\r\n }\r\n\r\n /** Gets or sets the type of animation applied to the input */\r\n public get animationType() {\r\n return this._animationType;\r\n }\r\n\r\n public set animationType(value: AnimatedInputBlockTypes) {\r\n this._animationType = value;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that this connection point not defined yet\r\n */\r\n public get isUndefined(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Undefined;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is coming from an uniform.\r\n * In this case the connection point name must be the name of the uniform to use.\r\n * Can only be set on inputs\r\n */\r\n public get isUniform(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Uniform;\r\n }\r\n\r\n public set isUniform(value: boolean) {\r\n this._mode = value ? NodeMaterialBlockConnectionPointMode.Uniform : NodeMaterialBlockConnectionPointMode.Undefined;\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is coming from an attribute.\r\n * In this case the connection point name must be the name of the attribute to use\r\n * Can only be set on inputs\r\n */\r\n public get isAttribute(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Attribute;\r\n }\r\n\r\n public set isAttribute(value: boolean) {\r\n this._mode = value ? NodeMaterialBlockConnectionPointMode.Attribute : NodeMaterialBlockConnectionPointMode.Undefined;\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is generating a varying variable.\r\n * Can only be set on exit points\r\n */\r\n public get isVarying(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Varying;\r\n }\r\n\r\n public set isVarying(value: boolean) {\r\n this._mode = value ? NodeMaterialBlockConnectionPointMode.Varying : NodeMaterialBlockConnectionPointMode.Undefined;\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the current connection point is a system value\r\n */\r\n public get isSystemValue(): boolean {\r\n return this._systemValue != null;\r\n }\r\n\r\n /**\r\n * Gets or sets the current well known value or null if not defined as a system value\r\n */\r\n public get systemValue(): Nullable<NodeMaterialSystemValues> {\r\n return this._systemValue;\r\n }\r\n\r\n public set systemValue(value: Nullable<NodeMaterialSystemValues>) {\r\n this._mode = NodeMaterialBlockConnectionPointMode.Uniform;\r\n this.associatedVariableName = \"\";\r\n this._systemValue = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"InputBlock\";\r\n }\r\n\r\n /**\r\n * Animate the input if animationType !== None\r\n * @param scene defines the rendering scene\r\n */\r\n public animate(scene: Scene) {\r\n switch (this._animationType) {\r\n case AnimatedInputBlockTypes.Time: {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n this.value += scene.getAnimationRatio() * 0.01;\r\n }\r\n break;\r\n }\r\n case AnimatedInputBlockTypes.RealTime: {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n this.value = (PrecisionDate.Now - scene.getEngine().startTime) / 1000;\r\n }\r\n break;\r\n }\r\n case AnimatedInputBlockTypes.MouseInfo: {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Vector4) {\r\n const event = scene._inputManager._originMouseEvent;\r\n if (event) {\r\n const x = event.offsetX;\r\n const y = event.offsetY;\r\n const z = (event.buttons & 1) != 0 ? 1 : 0;\r\n const w = (event.buttons & 2) != 0 ? 1 : 0;\r\n this.value = new Vector4(x, y, z, w);\r\n } else {\r\n this.value = new Vector4(0, 0, 0, 0);\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n private _emitDefine(define: string): string {\r\n if (define[0] === \"!\") {\r\n return `#ifndef ${define.substring(1)}\\n`;\r\n }\r\n\r\n return `#ifdef ${define}\\n`;\r\n }\r\n\r\n public override initialize() {\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n this.value = 0;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n this.value = Vector2.Zero();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n this.value = Vector3.Zero();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n this.value = Vector4.Zero();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n this.value = Color3.White();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n this.value = new Color4(1, 1, 1, 1);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Matrix:\r\n this.value = Matrix.Identity();\r\n break;\r\n }\r\n }\r\n\r\n private _emitConstant(state: NodeMaterialBuildState) {\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n return `${state._emitFloat(this.value)}`;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n return `vec2(${this.value.x}, ${this.value.y})`;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n return `vec3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n return `vec4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n TmpColors.Color3[0].set(this.value.r, this.value.g, this.value.b);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color3[0].toGammaSpaceToRef(TmpColors.Color3[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color3[0].toLinearSpaceToRef(TmpColors.Color3[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n return `vec3(${TmpColors.Color3[0].r}, ${TmpColors.Color3[0].g}, ${TmpColors.Color3[0].b})`;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n TmpColors.Color4[0].set(this.value.r, this.value.g, this.value.b, this.value.a);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color4[0].toGammaSpaceToRef(TmpColors.Color4[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color4[0].toLinearSpaceToRef(TmpColors.Color4[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n return `vec4(${TmpColors.Color4[0].r}, ${TmpColors.Color4[0].g}, ${TmpColors.Color4[0].b}, ${TmpColors.Color4[0].a})`;\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n /** @internal */\r\n public get _noContextSwitch(): boolean {\r\n return attributeInFragmentOnly[this.name];\r\n }\r\n\r\n private _emit(state: NodeMaterialBuildState, define?: string) {\r\n // Uniforms\r\n if (this.isUniform) {\r\n if (!this._associatedVariableName) {\r\n this._associatedVariableName = state._getFreeVariableName(\"u_\" + this.name);\r\n }\r\n\r\n if (this.isConstant) {\r\n if (state.constants.indexOf(this.associatedVariableName) !== -1) {\r\n return;\r\n }\r\n state.constants.push(this.associatedVariableName);\r\n state._constantDeclaration += state._declareOutput(this.output, true) + ` = ${this._emitConstant(state)};\\n`;\r\n return;\r\n }\r\n\r\n if (state.uniforms.indexOf(this.associatedVariableName) !== -1) {\r\n return;\r\n }\r\n\r\n state.uniforms.push(this.associatedVariableName);\r\n if (define) {\r\n state._uniformDeclaration += this._emitDefine(define);\r\n }\r\n const shaderType = state._getShaderType(this.type);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n state._uniformDeclaration += `uniform ${this._associatedVariableName}: ${shaderType};\\n`;\r\n this._prefix = \"uniforms.\";\r\n } else {\r\n state._uniformDeclaration += `uniform ${shaderType} ${this.associatedVariableName};\\n`;\r\n }\r\n if (define) {\r\n state._uniformDeclaration += `#endif\\n`;\r\n }\r\n\r\n // well known\r\n const hints = state.sharedData.hints;\r\n if (this._systemValue !== null && this._systemValue !== undefined) {\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.WorldView:\r\n hints.needWorldViewMatrix = true;\r\n break;\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n hints.needWorldViewProjectionMatrix = true;\r\n break;\r\n }\r\n } else {\r\n if (this._animationType !== AnimatedInputBlockTypes.None) {\r\n state.sharedData.animatedInputs.push(this);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Attribute\r\n if (this.isAttribute) {\r\n this.associatedVariableName = remapAttributeName[this.name] ?? this.name;\r\n\r\n if (this.target === NodeMaterialBlockTargets.Vertex && state._vertexState) {\r\n // Attribute for fragment need to be carried over by varyings\r\n if (attributeInFragmentOnly[this.name]) {\r\n if (attributeAsUniform[this.name]) {\r\n state._emitUniformFromString(this.declarationVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `vertexInputs.`;\r\n }\r\n } else {\r\n state._emitVaryingFromString(this.declarationVariableName, this.type, define);\r\n }\r\n } else {\r\n this._emit(state._vertexState, define);\r\n }\r\n return;\r\n }\r\n\r\n if (state.attributes.indexOf(this.declarationVariableName) !== -1) {\r\n return;\r\n }\r\n\r\n state.attributes.push(this.declarationVariableName);\r\n\r\n if (attributeInFragmentOnly[this.name]) {\r\n if (attributeAsUniform[this.name]) {\r\n state._emitUniformFromString(this.declarationVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `uniforms.`;\r\n }\r\n } else {\r\n state._emitVaryingFromString(this.declarationVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `fragmentInputs.`;\r\n }\r\n }\r\n } else {\r\n if (define) {\r\n state._attributeDeclaration += this._emitDefine(define);\r\n }\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n state._attributeDeclaration += `attribute ${this.declarationVariableName}: ${state._getShaderType(this.type)};\\n`;\r\n this._prefix = `vertexInputs.`;\r\n } else {\r\n state._attributeDeclaration += `attribute ${state._getShaderType(this.type)} ${this.declarationVariableName};\\n`;\r\n }\r\n if (define) {\r\n state._attributeDeclaration += `#endif\\n`;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _transmitWorld(effect: Effect, world: Matrix, worldView: Matrix, worldViewProjection: Matrix) {\r\n if (!this._systemValue) {\r\n return;\r\n }\r\n\r\n const variableName = this._associatedVariableName;\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.World:\r\n effect.setMatrix(variableName, world);\r\n break;\r\n case NodeMaterialSystemValues.WorldView:\r\n effect.setMatrix(variableName, worldView);\r\n break;\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n effect.setMatrix(variableName, worldViewProjection);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _transmit(effect: Effect, scene: Scene, material: NodeMaterial) {\r\n if (this.isAttribute) {\r\n return;\r\n }\r\n\r\n const variableName = this._associatedVariableName;\r\n if (this._systemValue) {\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.World:\r\n case NodeMaterialSystemValues.WorldView:\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n return;\r\n case NodeMaterialSystemValues.View:\r\n effect.setMatrix(variableName, scene.getViewMatrix());\r\n break;\r\n case NodeMaterialSystemValues.Projection:\r\n effect.setMatrix(variableName, scene.getProjectionMatrix());\r\n break;\r\n case NodeMaterialSystemValues.ViewProjection:\r\n effect.setMatrix(variableName, scene.getTransformMatrix());\r\n break;\r\n case NodeMaterialSystemValues.CameraPosition:\r\n scene.bindEyePosition(effect, variableName, true);\r\n break;\r\n case NodeMaterialSystemValues.FogColor:\r\n effect.setColor3(variableName, scene.fogColor);\r\n break;\r\n case NodeMaterialSystemValues.DeltaTime:\r\n effect.setFloat(variableName, scene.deltaTime / 1000.0);\r\n break;\r\n case NodeMaterialSystemValues.CameraParameters:\r\n if (scene.activeCamera) {\r\n effect.setFloat4(\r\n variableName,\r\n scene.getEngine().hasOriginBottomLeft ? -1 : 1,\r\n scene.activeCamera.minZ,\r\n scene.activeCamera.maxZ,\r\n 1 / scene.activeCamera.maxZ\r\n );\r\n }\r\n break;\r\n case NodeMaterialSystemValues.MaterialAlpha:\r\n effect.setFloat(variableName, material.alpha);\r\n break;\r\n }\r\n return;\r\n }\r\n\r\n const value = this._valueCallback ? this._valueCallback() : this._storedValue;\r\n\r\n if (value === null) {\r\n return;\r\n }\r\n\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n effect.setFloat(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Int:\r\n effect.setInt(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n TmpColors.Color3[0].set(this.value.r, this.value.g, this.value.b);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color3[0].toGammaSpaceToRef(TmpColors.Color3[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color3[0].toLinearSpaceToRef(TmpColors.Color3[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n effect.setColor3(variableName, TmpColors.Color3[0]);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n TmpColors.Color4[0].set(this.value.r, this.value.g, this.value.b, this.value.a);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color4[0].toGammaSpaceToRef(TmpColors.Color4[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color4[0].toLinearSpaceToRef(TmpColors.Color4[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n effect.setDirectColor4(variableName, TmpColors.Color4[0]);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n effect.setVector2(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n effect.setVector3(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n effect.setVector4(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Matrix:\r\n effect.setMatrix(variableName, value);\r\n break;\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeMaterialBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isUniform || this.isSystemValue) {\r\n state.sharedData.inputBlocks.push(this);\r\n }\r\n\r\n this._emit(state);\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const variableName = this._codeVariableName;\r\n\r\n if (this.isAttribute) {\r\n return super._dumpPropertiesCode() + `${variableName}.setAsAttribute(\"${this.name}\");\\n`;\r\n }\r\n if (this.isSystemValue) {\r\n return super._dumpPropertiesCode() + `${variableName}.setAsSystemValue(BABYLON.NodeMaterialSystemValues.${NodeMaterialSystemValues[this._systemValue!]});\\n`;\r\n }\r\n if (this.isUniform) {\r\n const codes: string[] = [];\r\n\r\n let valueString = \"\";\r\n\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n valueString = `${this.value}`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n valueString = `new BABYLON.Vector2(${this.value.x}, ${this.value.y})`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n valueString = `new BABYLON.Vector3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n valueString = `new BABYLON.Vector4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n valueString = `new BABYLON.Color3(${this.value.r}, ${this.value.g}, ${this.value.b})`;\r\n if (this.convertToGammaSpace) {\r\n valueString += \".toGammaSpace()\";\r\n }\r\n if (this.convertToLinearSpace) {\r\n valueString += \".toLinearSpace()\";\r\n }\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n valueString = `new BABYLON.Color4(${this.value.r}, ${this.value.g}, ${this.value.b}, ${this.value.a})`;\r\n if (this.convertToGammaSpace) {\r\n valueString += \".toGammaSpace()\";\r\n }\r\n if (this.convertToLinearSpace) {\r\n valueString += \".toLinearSpace()\";\r\n }\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Matrix:\r\n valueString = `BABYLON.Matrix.FromArray([${(this.value as Matrix).m}])`;\r\n break;\r\n }\r\n\r\n // Common Property \"Value\"\r\n codes.push(`${variableName}.value = ${valueString}`);\r\n\r\n // Float-Value-Specific Properties\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n codes.push(\r\n `${variableName}.min = ${this.min}`,\r\n `${variableName}.max = ${this.max}`,\r\n `${variableName}.isBoolean = ${this.isBoolean}`,\r\n `${variableName}.matrixMode = ${this.matrixMode}`,\r\n `${variableName}.animationType = BABYLON.AnimatedInputBlockTypes.${AnimatedInputBlockTypes[this.animationType]}`\r\n );\r\n }\r\n\r\n // Common Property \"Type\"\r\n codes.push(`${variableName}.isConstant = ${this.isConstant}`);\r\n\r\n codes.push(\"\");\r\n\r\n return super._dumpPropertiesCode() + codes.join(\";\\n\");\r\n }\r\n return super._dumpPropertiesCode();\r\n }\r\n\r\n public override dispose() {\r\n this.onValueChangedObservable.clear();\r\n\r\n super.dispose();\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n serializationObject.mode = this._mode;\r\n serializationObject.systemValue = this._systemValue;\r\n serializationObject.animationType = this._animationType;\r\n serializationObject.min = this.min;\r\n serializationObject.max = this.max;\r\n serializationObject.isBoolean = this.isBoolean;\r\n serializationObject.matrixMode = this.matrixMode;\r\n serializationObject.isConstant = this.isConstant;\r\n serializationObject.groupInInspector = this.groupInInspector;\r\n serializationObject.convertToGammaSpace = this.convertToGammaSpace;\r\n serializationObject.convertToLinearSpace = this.convertToLinearSpace;\r\n\r\n if (this._storedValue != null && this._mode === NodeMaterialBlockConnectionPointMode.Uniform) {\r\n if (this._storedValue.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this._storedValue.getClassName();\r\n serializationObject.value = this._storedValue.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this._storedValue;\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any, scene: Scene, rootUrl: string) {\r\n this._mode = serializationObject.mode;\r\n super._deserialize(serializationObject, scene, rootUrl);\r\n\r\n this._type = serializationObject.type;\r\n\r\n this._systemValue = serializationObject.systemValue || serializationObject.wellKnownValue;\r\n this._animationType = serializationObject.animationType;\r\n this.min = serializationObject.min || 0;\r\n this.max = serializationObject.max || 0;\r\n this.isBoolean = !!serializationObject.isBoolean;\r\n this.matrixMode = serializationObject.matrixMode || 0;\r\n this.isConstant = !!serializationObject.isConstant;\r\n this.groupInInspector = serializationObject.groupInInspector || \"\";\r\n this.convertToGammaSpace = !!serializationObject.convertToGammaSpace;\r\n this.convertToLinearSpace = !!serializationObject.convertToLinearSpace;\r\n\r\n // Tangents back compat\r\n if (\r\n serializationObject.name === \"tangent\" &&\r\n serializationObject.mode === NodeMaterialBlockConnectionPointMode.Attribute &&\r\n serializationObject.type === NodeMaterialBlockConnectionPointTypes.Vector3\r\n ) {\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n }\r\n\r\n if (!serializationObject.valueType) {\r\n return;\r\n }\r\n\r\n if (serializationObject.valueType === \"number\") {\r\n this._storedValue = serializationObject.value;\r\n } else {\r\n const valueType = GetClass(serializationObject.valueType);\r\n\r\n if (valueType) {\r\n this._storedValue = valueType.FromArray(serializationObject.value);\r\n }\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.InputBlock\", InputBlock);\r\n"]}
|
|
1
|
+
{"version":3,"file":"inputBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Materials/Node/Blocks/Input/inputBlock.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAE1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAGhF,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAIlF,OAAO,EAAE,wB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AG,mBAAmB,CAAC,gBAAgB,IAAI,EAAE,CAAC;QACnE,IAAI,CAAC,mBAAmB,GAAG,CAAC,CAAC,mBAAmB,CAAC,mBAAmB,CAAC;QACrE,IAAI,CAAC,oBAAoB,GAAG,CAAC,CAAC,mBAAmB,CAAC,oBAAoB,CAAC;QAEvE,uBAAuB;QACvB,IACI,mBAAmB,CAAC,IAAI,KAAK,SAAS;YACtC,mBAAmB,CAAC,IAAI,2DAAmD;YAC3E,mBAAmB,CAAC,IAAI,KAAK,qCAAqC,CAAC,OAAO,EAC5E;YACE,IAAI,CAAC,KAAK,GAAG,qCAAqC,CAAC,OAAO,CAAC;SAC9D;QAED,IAAI,CAAC,mBAAmB,CAAC,SAAS,EAAE;YAChC,OAAO;SACV;QAED,IAAI,mBAAmB,CAAC,SAAS,KAAK,QAAQ,EAAE;YAC5C,IAAI,CAAC,YAAY,GAAG,mBAAmB,CAAC,KAAK,CAAC;SACjD;aAAM;YACH,MAAM,SAAS,GAAG,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;YAE1D,IAAI,SAAS,EAAE;gBACX,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC,SAAS,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;aACtE;SACJ;IACL,CAAC;CACJ;AAED,aAAa,CAAC,oBAAoB,EAAE,UAAU,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\r\nimport { NodeMaterialBlock } from \"../../nodeMaterialBlock\";\r\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes\";\r\nimport { NodeMaterialBlockConnectionPointMode } from \"../../Enums/nodeMaterialBlockConnectionPointMode\";\r\nimport { NodeMaterialSystemValues } from \"../../Enums/nodeMaterialSystemValues\";\r\nimport type { Nullable } from \"../../../../types\";\r\nimport type { Effect } from \"../../../../Materials/effect\";\r\nimport { Matrix, Vector2, Vector3, Vector4 } from \"../../../../Maths/math.vector\";\r\nimport type { Scene } from \"../../../../scene\";\r\nimport type { NodeMaterialConnectionPoint } from \"../../nodeMaterialBlockConnectionPoint\";\r\nimport type { NodeMaterialBuildState } from \"../../nodeMaterialBuildState\";\r\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets\";\r\nimport { GetClass, RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport { Color3, Color4, TmpColors } from \"../../../../Maths/math\";\r\nimport { AnimatedInputBlockTypes } from \"./animatedInputBlockTypes\";\r\nimport { Observable } from \"../../../../Misc/observable\";\r\nimport type { NodeMaterial } from \"../../nodeMaterial\";\r\nimport { PrecisionDate } from \"../../../../Misc/precisionDate\";\r\nimport { ShaderLanguage } from \"../../../../Materials/shaderLanguage\";\r\n\r\nconst remapAttributeName: { [name: string]: string } = {\r\n position2d: \"position\",\r\n particle_uv: \"vUV\",\r\n particle_color: \"vColor\",\r\n particle_texturemask: \"textureMask\",\r\n particle_positionw: \"vPositionW\",\r\n};\r\n\r\nconst attributeInFragmentOnly: { [name: string]: boolean } = {\r\n particle_uv: true,\r\n particle_color: true,\r\n particle_texturemask: true,\r\n particle_positionw: true,\r\n};\r\n\r\nconst attributeAsUniform: { [name: string]: boolean } = {\r\n particle_texturemask: true,\r\n};\r\n\r\n/**\r\n * Block used to expose an input value\r\n */\r\nexport class InputBlock extends NodeMaterialBlock {\r\n private _mode = NodeMaterialBlockConnectionPointMode.Undefined;\r\n private _associatedVariableName: string;\r\n private _storedValue: any;\r\n private _valueCallback: () => any;\r\n private _type: NodeMaterialBlockConnectionPointTypes;\r\n private _animationType = AnimatedInputBlockTypes.None;\r\n private _prefix = \"\";\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public min: number = 0;\r\n\r\n /** Gets or set a value used to limit the range of float values */\r\n public max: number = 0;\r\n\r\n /** Gets or set a value indicating that this input can only get 0 and 1 values */\r\n public isBoolean: boolean = false;\r\n\r\n /** Gets or sets a value used by the Node Material editor to determine how to configure the current value if it is a matrix */\r\n public matrixMode: number = 0;\r\n\r\n /** @internal */\r\n public _systemValue: Nullable<NodeMaterialSystemValues> = null;\r\n\r\n /** Gets or sets a boolean indicating that the value of this input will not change after a build */\r\n public isConstant = false;\r\n\r\n /** Gets or sets the group to use to display this block in the Inspector */\r\n public groupInInspector = \"\";\r\n\r\n /** Gets an observable raised when the value is changed */\r\n public onValueChangedObservable = new Observable<InputBlock>();\r\n\r\n /** Gets or sets a boolean indicating if content needs to be converted to gamma space (for color3/4 only) */\r\n public convertToGammaSpace = false;\r\n\r\n /** Gets or sets a boolean indicating if content needs to be converted to linear space (for color3/4 only) */\r\n public convertToLinearSpace = false;\r\n\r\n /**\r\n * Gets or sets the connection point type (default is float)\r\n */\r\n public get type(): NodeMaterialBlockConnectionPointTypes {\r\n if (this._type === NodeMaterialBlockConnectionPointTypes.AutoDetect) {\r\n if (this.isUniform && this.value != null) {\r\n if (!isNaN(this.value)) {\r\n this._type = NodeMaterialBlockConnectionPointTypes.Float;\r\n return this._type;\r\n }\r\n\r\n switch (this.value.getClassName()) {\r\n case \"Vector2\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"Vector3\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"Vector4\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"Color3\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color3;\r\n return this._type;\r\n case \"Color4\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color4;\r\n return this._type;\r\n case \"Matrix\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n }\r\n }\r\n\r\n if (this.isAttribute) {\r\n switch (this.name) {\r\n case \"splatIndex\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Float;\r\n return this._type;\r\n case \"position\":\r\n case \"normal\":\r\n case \"particle_positionw\":\r\n case \"splatPosition\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case \"uv\":\r\n case \"uv2\":\r\n case \"uv3\":\r\n case \"uv4\":\r\n case \"uv5\":\r\n case \"uv6\":\r\n case \"position2d\":\r\n case \"particle_uv\":\r\n case \"splatScale\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector2;\r\n return this._type;\r\n case \"matricesIndices\":\r\n case \"matricesWeights\":\r\n case \"matricesIndicesExtra\":\r\n case \"matricesWeightsExtra\":\r\n case \"world0\":\r\n case \"world1\":\r\n case \"world2\":\r\n case \"world3\":\r\n case \"tangent\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n case \"color\":\r\n case \"instanceColor\":\r\n case \"particle_color\":\r\n case \"particle_texturemask\":\r\n case \"splatColor\":\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color4;\r\n return this._type;\r\n }\r\n }\r\n\r\n if (this.isSystemValue) {\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.World:\r\n case NodeMaterialSystemValues.WorldView:\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n case NodeMaterialSystemValues.View:\r\n case NodeMaterialSystemValues.ViewProjection:\r\n case NodeMaterialSystemValues.Projection:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Matrix;\r\n return this._type;\r\n case NodeMaterialSystemValues.CameraPosition:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector3;\r\n return this._type;\r\n case NodeMaterialSystemValues.FogColor:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Color3;\r\n return this._type;\r\n case NodeMaterialSystemValues.DeltaTime:\r\n case NodeMaterialSystemValues.MaterialAlpha:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Float;\r\n return this._type;\r\n case NodeMaterialSystemValues.CameraParameters:\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n return this._type;\r\n }\r\n }\r\n }\r\n\r\n return this._type;\r\n }\r\n\r\n /**\r\n * Creates a new InputBlock\r\n * @param name defines the block name\r\n * @param target defines the target of that block (Vertex by default)\r\n * @param type defines the type of the input (can be set to NodeMaterialBlockConnectionPointTypes.AutoDetect)\r\n */\r\n public constructor(name: string, target = NodeMaterialBlockTargets.Vertex, type: NodeMaterialBlockConnectionPointTypes = NodeMaterialBlockConnectionPointTypes.AutoDetect) {\r\n super(name, target, false);\r\n\r\n this._type = type;\r\n\r\n this.setDefaultValue();\r\n\r\n this.registerOutput(\"output\", type);\r\n }\r\n\r\n /**\r\n * Validates if a name is a reserve word.\r\n * @param newName the new name to be given to the node.\r\n * @returns false if the name is a reserve word, else true.\r\n */\r\n public override validateBlockName(newName: string) {\r\n if (!this.isAttribute) {\r\n return super.validateBlockName(newName);\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets the output component\r\n */\r\n public get output(): NodeMaterialConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Set the source of this connection point to a vertex attribute\r\n * @param attributeName defines the attribute name (position, uv, normal, etc...). If not specified it will take the connection point name\r\n * @returns the current connection point\r\n */\r\n public setAsAttribute(attributeName?: string): InputBlock {\r\n this._mode = NodeMaterialBlockConnectionPointMode.Attribute;\r\n if (attributeName) {\r\n this.name = attributeName;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * Set the source of this connection point to a system value\r\n * @param value define the system value to use (world, view, etc...) or null to switch to manual value\r\n * @returns the current connection point\r\n */\r\n public setAsSystemValue(value: Nullable<NodeMaterialSystemValues>): InputBlock {\r\n this.systemValue = value;\r\n return this;\r\n }\r\n\r\n /**\r\n * Gets or sets the value of that point.\r\n * Please note that this value will be ignored if valueCallback is defined\r\n */\r\n public get value(): any {\r\n return this._storedValue;\r\n }\r\n\r\n public set value(value: any) {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n if (this.isBoolean) {\r\n value = value ? 1 : 0;\r\n } else if (this.min !== this.max) {\r\n value = Math.max(this.min, value);\r\n value = Math.min(this.max, value);\r\n }\r\n }\r\n\r\n this._storedValue = value;\r\n this._mode = NodeMaterialBlockConnectionPointMode.Uniform;\r\n\r\n this.onValueChangedObservable.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets or sets a callback used to get the value of that point.\r\n * Please note that setting this value will force the connection point to ignore the value property\r\n */\r\n public get valueCallback(): () => any {\r\n return this._valueCallback;\r\n }\r\n\r\n public set valueCallback(value: () => any) {\r\n this._valueCallback = value;\r\n this._mode = NodeMaterialBlockConnectionPointMode.Uniform;\r\n }\r\n\r\n /**\r\n * Gets the declaration variable name in the shader\r\n */\r\n public get declarationVariableName(): string {\r\n return this._associatedVariableName;\r\n }\r\n\r\n /**\r\n * Gets or sets the associated variable name in the shader\r\n */\r\n public get associatedVariableName(): string {\r\n return this._prefix + this._associatedVariableName;\r\n }\r\n\r\n public set associatedVariableName(value: string) {\r\n this._associatedVariableName = value;\r\n }\r\n\r\n /** Gets or sets the type of animation applied to the input */\r\n public get animationType() {\r\n return this._animationType;\r\n }\r\n\r\n public set animationType(value: AnimatedInputBlockTypes) {\r\n this._animationType = value;\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that this connection point not defined yet\r\n */\r\n public get isUndefined(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Undefined;\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is coming from an uniform.\r\n * In this case the connection point name must be the name of the uniform to use.\r\n * Can only be set on inputs\r\n */\r\n public get isUniform(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Uniform;\r\n }\r\n\r\n public set isUniform(value: boolean) {\r\n this._mode = value ? NodeMaterialBlockConnectionPointMode.Uniform : NodeMaterialBlockConnectionPointMode.Undefined;\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is coming from an attribute.\r\n * In this case the connection point name must be the name of the attribute to use\r\n * Can only be set on inputs\r\n */\r\n public get isAttribute(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Attribute;\r\n }\r\n\r\n public set isAttribute(value: boolean) {\r\n this._mode = value ? NodeMaterialBlockConnectionPointMode.Attribute : NodeMaterialBlockConnectionPointMode.Undefined;\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Gets or sets a boolean indicating that this connection point is generating a varying variable.\r\n * Can only be set on exit points\r\n */\r\n public get isVarying(): boolean {\r\n return this._mode === NodeMaterialBlockConnectionPointMode.Varying;\r\n }\r\n\r\n public set isVarying(value: boolean) {\r\n this._mode = value ? NodeMaterialBlockConnectionPointMode.Varying : NodeMaterialBlockConnectionPointMode.Undefined;\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the current connection point is a system value\r\n */\r\n public get isSystemValue(): boolean {\r\n return this._systemValue != null;\r\n }\r\n\r\n /**\r\n * Gets or sets the current well known value or null if not defined as a system value\r\n */\r\n public get systemValue(): Nullable<NodeMaterialSystemValues> {\r\n return this._systemValue;\r\n }\r\n\r\n public set systemValue(value: Nullable<NodeMaterialSystemValues>) {\r\n this._mode = NodeMaterialBlockConnectionPointMode.Uniform;\r\n this.associatedVariableName = \"\";\r\n this._systemValue = value;\r\n }\r\n\r\n /**\r\n * Gets the current class name\r\n * @returns the class name\r\n */\r\n public override getClassName() {\r\n return \"InputBlock\";\r\n }\r\n\r\n /**\r\n * Animate the input if animationType !== None\r\n * @param scene defines the rendering scene\r\n */\r\n public animate(scene: Scene) {\r\n switch (this._animationType) {\r\n case AnimatedInputBlockTypes.Time: {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n this.value += scene.getAnimationRatio() * 0.01;\r\n }\r\n break;\r\n }\r\n case AnimatedInputBlockTypes.RealTime: {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n this.value = (PrecisionDate.Now - scene.getEngine().startTime) / 1000;\r\n }\r\n break;\r\n }\r\n case AnimatedInputBlockTypes.MouseInfo: {\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Vector4) {\r\n const event = scene._inputManager._originMouseEvent;\r\n if (event) {\r\n const x = event.offsetX;\r\n const y = event.offsetY;\r\n const z = (event.buttons & 1) != 0 ? 1 : 0;\r\n const w = (event.buttons & 2) != 0 ? 1 : 0;\r\n this.value = new Vector4(x, y, z, w);\r\n } else {\r\n this.value = new Vector4(0, 0, 0, 0);\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n\r\n private _emitDefine(define: string): string {\r\n if (define[0] === \"!\") {\r\n return `#ifndef ${define.substring(1)}\\n`;\r\n }\r\n\r\n return `#ifdef ${define}\\n`;\r\n }\r\n\r\n public override initialize() {\r\n this.associatedVariableName = \"\";\r\n }\r\n\r\n /**\r\n * Set the input block to its default value (based on its type)\r\n */\r\n public setDefaultValue() {\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n this.value = 0;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n this.value = Vector2.Zero();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n this.value = Vector3.Zero();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n this.value = Vector4.Zero();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n this.value = Color3.White();\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n this.value = new Color4(1, 1, 1, 1);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Matrix:\r\n this.value = Matrix.Identity();\r\n break;\r\n }\r\n }\r\n\r\n private _emitConstant(state: NodeMaterialBuildState) {\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n return `${state._emitFloat(this.value)}`;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n return `vec2(${this.value.x}, ${this.value.y})`;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n return `vec3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n return `vec4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n TmpColors.Color3[0].set(this.value.r, this.value.g, this.value.b);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color3[0].toGammaSpaceToRef(TmpColors.Color3[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color3[0].toLinearSpaceToRef(TmpColors.Color3[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n return `vec3(${TmpColors.Color3[0].r}, ${TmpColors.Color3[0].g}, ${TmpColors.Color3[0].b})`;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n TmpColors.Color4[0].set(this.value.r, this.value.g, this.value.b, this.value.a);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color4[0].toGammaSpaceToRef(TmpColors.Color4[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color4[0].toLinearSpaceToRef(TmpColors.Color4[0], state.sharedData.scene.getEngine().useExactSrgbConversions);\r\n }\r\n return `vec4(${TmpColors.Color4[0].r}, ${TmpColors.Color4[0].g}, ${TmpColors.Color4[0].b}, ${TmpColors.Color4[0].a})`;\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n /** @internal */\r\n public get _noContextSwitch(): boolean {\r\n return attributeInFragmentOnly[this.name];\r\n }\r\n\r\n private _emit(state: NodeMaterialBuildState, define?: string) {\r\n // Uniforms\r\n if (this.isUniform) {\r\n if (!this._associatedVariableName) {\r\n this._associatedVariableName = state._getFreeVariableName(\"u_\" + this.name);\r\n }\r\n\r\n if (this.isConstant) {\r\n if (state.constants.indexOf(this.associatedVariableName) !== -1) {\r\n return;\r\n }\r\n state.constants.push(this.associatedVariableName);\r\n state._constantDeclaration += state._declareOutput(this.output, true) + ` = ${this._emitConstant(state)};\\n`;\r\n return;\r\n }\r\n\r\n if (state.uniforms.indexOf(this.associatedVariableName) !== -1) {\r\n return;\r\n }\r\n\r\n state.uniforms.push(this.associatedVariableName);\r\n if (define) {\r\n state._uniformDeclaration += this._emitDefine(define);\r\n }\r\n const shaderType = state._getShaderType(this.type);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n state._uniformDeclaration += `uniform ${this._associatedVariableName}: ${shaderType};\\n`;\r\n this._prefix = \"uniforms.\";\r\n } else {\r\n state._uniformDeclaration += `uniform ${shaderType} ${this.associatedVariableName};\\n`;\r\n }\r\n if (define) {\r\n state._uniformDeclaration += `#endif\\n`;\r\n }\r\n\r\n // well known\r\n const hints = state.sharedData.hints;\r\n if (this._systemValue !== null && this._systemValue !== undefined) {\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.WorldView:\r\n hints.needWorldViewMatrix = true;\r\n break;\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n hints.needWorldViewProjectionMatrix = true;\r\n break;\r\n }\r\n } else {\r\n if (this._animationType !== AnimatedInputBlockTypes.None) {\r\n state.sharedData.animatedInputs.push(this);\r\n }\r\n }\r\n\r\n return;\r\n }\r\n\r\n // Attribute\r\n if (this.isAttribute) {\r\n this.associatedVariableName = remapAttributeName[this.name] ?? this.name;\r\n\r\n if (this.target === NodeMaterialBlockTargets.Vertex && state._vertexState) {\r\n // Attribute for fragment need to be carried over by varyings\r\n if (attributeInFragmentOnly[this.name]) {\r\n if (attributeAsUniform[this.name]) {\r\n state._emitUniformFromString(this.declarationVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `vertexInputs.`;\r\n }\r\n } else {\r\n state._emitVaryingFromString(this.declarationVariableName, this.type, define);\r\n }\r\n } else {\r\n this._emit(state._vertexState, define);\r\n }\r\n return;\r\n }\r\n\r\n if (state.attributes.indexOf(this.declarationVariableName) !== -1) {\r\n return;\r\n }\r\n\r\n state.attributes.push(this.declarationVariableName);\r\n\r\n if (attributeInFragmentOnly[this.name]) {\r\n if (attributeAsUniform[this.name]) {\r\n state._emitUniformFromString(this.declarationVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `uniforms.`;\r\n }\r\n } else {\r\n state._emitVaryingFromString(this.declarationVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `fragmentInputs.`;\r\n }\r\n }\r\n } else {\r\n if (define) {\r\n state._attributeDeclaration += this._emitDefine(define);\r\n }\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n state._attributeDeclaration += `attribute ${this.declarationVariableName}: ${state._getShaderType(this.type)};\\n`;\r\n this._prefix = `vertexInputs.`;\r\n } else {\r\n state._attributeDeclaration += `attribute ${state._getShaderType(this.type)} ${this.declarationVariableName};\\n`;\r\n }\r\n if (define) {\r\n state._attributeDeclaration += `#endif\\n`;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _transmitWorld(effect: Effect, world: Matrix, worldView: Matrix, worldViewProjection: Matrix) {\r\n if (!this._systemValue) {\r\n return;\r\n }\r\n\r\n const variableName = this._associatedVariableName;\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.World:\r\n effect.setMatrix(variableName, world);\r\n break;\r\n case NodeMaterialSystemValues.WorldView:\r\n effect.setMatrix(variableName, worldView);\r\n break;\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n effect.setMatrix(variableName, worldViewProjection);\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _transmit(effect: Effect, scene: Scene, material: NodeMaterial) {\r\n if (this.isAttribute) {\r\n return;\r\n }\r\n\r\n const variableName = this._associatedVariableName;\r\n if (this._systemValue) {\r\n switch (this._systemValue) {\r\n case NodeMaterialSystemValues.World:\r\n case NodeMaterialSystemValues.WorldView:\r\n case NodeMaterialSystemValues.WorldViewProjection:\r\n return;\r\n case NodeMaterialSystemValues.View:\r\n effect.setMatrix(variableName, scene.getViewMatrix());\r\n break;\r\n case NodeMaterialSystemValues.Projection:\r\n effect.setMatrix(variableName, scene.getProjectionMatrix());\r\n break;\r\n case NodeMaterialSystemValues.ViewProjection:\r\n effect.setMatrix(variableName, scene.getTransformMatrix());\r\n break;\r\n case NodeMaterialSystemValues.CameraPosition:\r\n scene.bindEyePosition(effect, variableName, true);\r\n break;\r\n case NodeMaterialSystemValues.FogColor:\r\n effect.setColor3(variableName, scene.fogColor);\r\n break;\r\n case NodeMaterialSystemValues.DeltaTime:\r\n effect.setFloat(variableName, scene.deltaTime / 1000.0);\r\n break;\r\n case NodeMaterialSystemValues.CameraParameters:\r\n if (scene.activeCamera) {\r\n effect.setFloat4(\r\n variableName,\r\n scene.getEngine().hasOriginBottomLeft ? -1 : 1,\r\n scene.activeCamera.minZ,\r\n scene.activeCamera.maxZ,\r\n 1 / scene.activeCamera.maxZ\r\n );\r\n }\r\n break;\r\n case NodeMaterialSystemValues.MaterialAlpha:\r\n effect.setFloat(variableName, material.alpha);\r\n break;\r\n }\r\n return;\r\n }\r\n\r\n const value = this._valueCallback ? this._valueCallback() : this._storedValue;\r\n\r\n if (value === null) {\r\n return;\r\n }\r\n\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n effect.setFloat(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Int:\r\n effect.setInt(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n TmpColors.Color3[0].set(this.value.r, this.value.g, this.value.b);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color3[0].toGammaSpaceToRef(TmpColors.Color3[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color3[0].toLinearSpaceToRef(TmpColors.Color3[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n effect.setColor3(variableName, TmpColors.Color3[0]);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n TmpColors.Color4[0].set(this.value.r, this.value.g, this.value.b, this.value.a);\r\n if (this.convertToGammaSpace) {\r\n TmpColors.Color4[0].toGammaSpaceToRef(TmpColors.Color4[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n if (this.convertToLinearSpace) {\r\n TmpColors.Color4[0].toLinearSpaceToRef(TmpColors.Color4[0], scene.getEngine().useExactSrgbConversions);\r\n }\r\n effect.setDirectColor4(variableName, TmpColors.Color4[0]);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n effect.setVector2(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n effect.setVector3(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n effect.setVector4(variableName, value);\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Matrix:\r\n effect.setMatrix(variableName, value);\r\n break;\r\n }\r\n }\r\n\r\n protected override _buildBlock(state: NodeMaterialBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (this.isUniform || this.isSystemValue) {\r\n state.sharedData.inputBlocks.push(this);\r\n }\r\n\r\n this._emit(state);\r\n }\r\n\r\n protected override _dumpPropertiesCode() {\r\n const variableName = this._codeVariableName;\r\n\r\n if (this.isAttribute) {\r\n return super._dumpPropertiesCode() + `${variableName}.setAsAttribute(\"${this.name}\");\\n`;\r\n }\r\n if (this.isSystemValue) {\r\n return super._dumpPropertiesCode() + `${variableName}.setAsSystemValue(BABYLON.NodeMaterialSystemValues.${NodeMaterialSystemValues[this._systemValue!]});\\n`;\r\n }\r\n if (this.isUniform) {\r\n const codes: string[] = [];\r\n\r\n let valueString = \"\";\r\n\r\n switch (this.type) {\r\n case NodeMaterialBlockConnectionPointTypes.Float:\r\n valueString = `${this.value}`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector2:\r\n valueString = `new BABYLON.Vector2(${this.value.x}, ${this.value.y})`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector3:\r\n valueString = `new BABYLON.Vector3(${this.value.x}, ${this.value.y}, ${this.value.z})`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Vector4:\r\n valueString = `new BABYLON.Vector4(${this.value.x}, ${this.value.y}, ${this.value.z}, ${this.value.w})`;\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color3:\r\n valueString = `new BABYLON.Color3(${this.value.r}, ${this.value.g}, ${this.value.b})`;\r\n if (this.convertToGammaSpace) {\r\n valueString += \".toGammaSpace()\";\r\n }\r\n if (this.convertToLinearSpace) {\r\n valueString += \".toLinearSpace()\";\r\n }\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Color4:\r\n valueString = `new BABYLON.Color4(${this.value.r}, ${this.value.g}, ${this.value.b}, ${this.value.a})`;\r\n if (this.convertToGammaSpace) {\r\n valueString += \".toGammaSpace()\";\r\n }\r\n if (this.convertToLinearSpace) {\r\n valueString += \".toLinearSpace()\";\r\n }\r\n break;\r\n case NodeMaterialBlockConnectionPointTypes.Matrix:\r\n valueString = `BABYLON.Matrix.FromArray([${(this.value as Matrix).m}])`;\r\n break;\r\n }\r\n\r\n // Common Property \"Value\"\r\n codes.push(`${variableName}.value = ${valueString}`);\r\n\r\n // Float-Value-Specific Properties\r\n if (this.type === NodeMaterialBlockConnectionPointTypes.Float) {\r\n codes.push(\r\n `${variableName}.min = ${this.min}`,\r\n `${variableName}.max = ${this.max}`,\r\n `${variableName}.isBoolean = ${this.isBoolean}`,\r\n `${variableName}.matrixMode = ${this.matrixMode}`,\r\n `${variableName}.animationType = BABYLON.AnimatedInputBlockTypes.${AnimatedInputBlockTypes[this.animationType]}`\r\n );\r\n }\r\n\r\n // Common Property \"Type\"\r\n codes.push(`${variableName}.isConstant = ${this.isConstant}`);\r\n\r\n codes.push(\"\");\r\n\r\n return super._dumpPropertiesCode() + codes.join(\";\\n\");\r\n }\r\n return super._dumpPropertiesCode();\r\n }\r\n\r\n public override dispose() {\r\n this.onValueChangedObservable.clear();\r\n\r\n super.dispose();\r\n }\r\n\r\n public override serialize(): any {\r\n const serializationObject = super.serialize();\r\n\r\n serializationObject.type = this.type;\r\n serializationObject.mode = this._mode;\r\n serializationObject.systemValue = this._systemValue;\r\n serializationObject.animationType = this._animationType;\r\n serializationObject.min = this.min;\r\n serializationObject.max = this.max;\r\n serializationObject.isBoolean = this.isBoolean;\r\n serializationObject.matrixMode = this.matrixMode;\r\n serializationObject.isConstant = this.isConstant;\r\n serializationObject.groupInInspector = this.groupInInspector;\r\n serializationObject.convertToGammaSpace = this.convertToGammaSpace;\r\n serializationObject.convertToLinearSpace = this.convertToLinearSpace;\r\n\r\n if (this._storedValue != null && this._mode === NodeMaterialBlockConnectionPointMode.Uniform) {\r\n if (this._storedValue.asArray) {\r\n serializationObject.valueType = \"BABYLON.\" + this._storedValue.getClassName();\r\n serializationObject.value = this._storedValue.asArray();\r\n } else {\r\n serializationObject.valueType = \"number\";\r\n serializationObject.value = this._storedValue;\r\n }\r\n }\r\n\r\n return serializationObject;\r\n }\r\n\r\n public override _deserialize(serializationObject: any, scene: Scene, rootUrl: string) {\r\n this._mode = serializationObject.mode;\r\n super._deserialize(serializationObject, scene, rootUrl);\r\n\r\n this._type = serializationObject.type;\r\n\r\n this._systemValue = serializationObject.systemValue || serializationObject.wellKnownValue;\r\n this._animationType = serializationObject.animationType;\r\n this.min = serializationObject.min || 0;\r\n this.max = serializationObject.max || 0;\r\n this.isBoolean = !!serializationObject.isBoolean;\r\n this.matrixMode = serializationObject.matrixMode || 0;\r\n this.isConstant = !!serializationObject.isConstant;\r\n this.groupInInspector = serializationObject.groupInInspector || \"\";\r\n this.convertToGammaSpace = !!serializationObject.convertToGammaSpace;\r\n this.convertToLinearSpace = !!serializationObject.convertToLinearSpace;\r\n\r\n // Tangents back compat\r\n if (\r\n serializationObject.name === \"tangent\" &&\r\n serializationObject.mode === NodeMaterialBlockConnectionPointMode.Attribute &&\r\n serializationObject.type === NodeMaterialBlockConnectionPointTypes.Vector3\r\n ) {\r\n this._type = NodeMaterialBlockConnectionPointTypes.Vector4;\r\n }\r\n\r\n if (!serializationObject.valueType) {\r\n return;\r\n }\r\n\r\n if (serializationObject.valueType === \"number\") {\r\n this._storedValue = serializationObject.value;\r\n } else {\r\n const valueType = GetClass(serializationObject.valueType);\r\n\r\n if (valueType) {\r\n this._storedValue = valueType.FromArray(serializationObject.value);\r\n }\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.InputBlock\", InputBlock);\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Materials/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./Vertex/index\";\r\nexport * from \"./Fragment/index\";\r\nexport * from \"./Dual/index\";\r\nexport * from \"./Input/index\";\r\nexport * from \"./Teleport/index\";\r\nexport * from \"./multiplyBlock\";\r\nexport * from \"./addBlock\";\r\nexport * from \"./scaleBlock\";\r\nexport * from \"./clampBlock\";\r\nexport * from \"./crossBlock\";\r\nexport * from \"./customBlock\";\r\nexport * from \"./dotBlock\";\r\nexport * from \"./transformBlock\";\r\nexport * from \"./remapBlock\";\r\nexport * from \"./normalizeBlock\";\r\nexport * from \"./trigonometryBlock\";\r\nexport * from \"./colorMergerBlock\";\r\nexport * from \"./vectorMergerBlock\";\r\nexport * from \"./colorSplitterBlock\";\r\nexport * from \"./vectorSplitterBlock\";\r\nexport * from \"./lerpBlock\";\r\nexport * from \"./divideBlock\";\r\nexport * from \"./subtractBlock\";\r\nexport * from \"./stepBlock\";\r\nexport * from \"./oneMinusBlock\";\r\nexport * from \"./viewDirectionBlock\";\r\nexport * from \"./fresnelBlock\";\r\nexport * from \"./maxBlock\";\r\nexport * from \"./minBlock\";\r\nexport * from \"./distanceBlock\";\r\nexport * from \"./lengthBlock\";\r\nexport * from \"./negateBlock\";\r\nexport * from \"./powBlock\";\r\nexport * from \"./randomNumberBlock\";\r\nexport * from \"./arcTan2Block\";\r\nexport * from \"./smoothStepBlock\";\r\nexport * from \"./reciprocalBlock\";\r\nexport * from \"./replaceColorBlock\";\r\nexport * from \"./posterizeBlock\";\r\nexport * from \"./waveBlock\";\r\nexport * from \"./gradientBlock\";\r\nexport * from \"./nLerpBlock\";\r\nexport * from \"./worleyNoise3DBlock\";\r\nexport * from \"./simplexPerlin3DBlock\";\r\nexport * from \"./normalBlendBlock\";\r\nexport * from \"./rotate2dBlock\";\r\nexport * from \"./reflectBlock\";\r\nexport * from \"./refractBlock\";\r\nexport * from \"./desaturateBlock\";\r\nexport * from \"./PBR/index\";\r\nexport * from \"./Particle/index\";\r\nexport * from \"./modBlock\";\r\nexport * from \"./matrixBuilderBlock\";\r\nexport * from \"./conditionalBlock\";\r\nexport * from \"./cloudBlock\";\r\nexport * from \"./voronoiNoiseBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./triPlanarBlock\";\r\nexport * from \"./biPlanarBlock\";\r\nexport * from \"./matrixDeterminantBlock\";\r\nexport * from \"./matrixTransposeBlock\";\r\nexport * from \"./meshAttributeExistsBlock\";\r\nexport * from \"./curveBlock\";\r\nexport * from \"./colorConverterBlock\";\r\nexport * from \"./loopBlock\";\r\nexport * from \"./storageReadBlock\";\r\nexport * from \"./storageWriteBlock\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Materials/Node/Blocks/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./Vertex/index\";\r\nexport * from \"./Fragment/index\";\r\nexport * from \"./Dual/index\";\r\nexport * from \"./Input/index\";\r\nexport * from \"./Teleport/index\";\r\nexport * from \"./multiplyBlock\";\r\nexport * from \"./addBlock\";\r\nexport * from \"./scaleBlock\";\r\nexport * from \"./clampBlock\";\r\nexport * from \"./crossBlock\";\r\nexport * from \"./customBlock\";\r\nexport * from \"./dotBlock\";\r\nexport * from \"./transformBlock\";\r\nexport * from \"./remapBlock\";\r\nexport * from \"./normalizeBlock\";\r\nexport * from \"./trigonometryBlock\";\r\nexport * from \"./colorMergerBlock\";\r\nexport * from \"./vectorMergerBlock\";\r\nexport * from \"./colorSplitterBlock\";\r\nexport * from \"./vectorSplitterBlock\";\r\nexport * from \"./lerpBlock\";\r\nexport * from \"./divideBlock\";\r\nexport * from \"./subtractBlock\";\r\nexport * from \"./stepBlock\";\r\nexport * from \"./oneMinusBlock\";\r\nexport * from \"./viewDirectionBlock\";\r\nexport * from \"./fresnelBlock\";\r\nexport * from \"./maxBlock\";\r\nexport * from \"./minBlock\";\r\nexport * from \"./distanceBlock\";\r\nexport * from \"./lengthBlock\";\r\nexport * from \"./negateBlock\";\r\nexport * from \"./powBlock\";\r\nexport * from \"./randomNumberBlock\";\r\nexport * from \"./arcTan2Block\";\r\nexport * from \"./smoothStepBlock\";\r\nexport * from \"./reciprocalBlock\";\r\nexport * from \"./replaceColorBlock\";\r\nexport * from \"./posterizeBlock\";\r\nexport * from \"./waveBlock\";\r\nexport * from \"./gradientBlock\";\r\nexport * from \"./nLerpBlock\";\r\nexport * from \"./worleyNoise3DBlock\";\r\nexport * from \"./simplexPerlin3DBlock\";\r\nexport * from \"./normalBlendBlock\";\r\nexport * from \"./rotate2dBlock\";\r\nexport * from \"./reflectBlock\";\r\nexport * from \"./refractBlock\";\r\nexport * from \"./desaturateBlock\";\r\nexport * from \"./PBR/index\";\r\nexport * from \"./Particle/index\";\r\nexport * from \"./modBlock\";\r\nexport * from \"./matrixBuilderBlock\";\r\nexport * from \"./conditionalBlock\";\r\nexport * from \"./cloudBlock\";\r\nexport * from \"./voronoiNoiseBlock\";\r\nexport * from \"./elbowBlock\";\r\nexport * from \"./triPlanarBlock\";\r\nexport * from \"./biPlanarBlock\";\r\nexport * from \"./matrixDeterminantBlock\";\r\nexport * from \"./matrixTransposeBlock\";\r\nexport * from \"./meshAttributeExistsBlock\";\r\nexport * from \"./curveBlock\";\r\nexport * from \"./colorConverterBlock\";\r\nexport * from \"./loopBlock\";\r\nexport * from \"./storageReadBlock\";\r\nexport * from \"./storageWriteBlock\";\r\nexport * from \"./GaussianSplatting/index\";\r\n"]}
|
|
@@ -11,5 +11,7 @@ export var NodeMaterialModes;
|
|
|
11
11
|
NodeMaterialModes[NodeMaterialModes["Particle"] = 2] = "Particle";
|
|
12
12
|
/** For procedural texture */
|
|
13
13
|
NodeMaterialModes[NodeMaterialModes["ProceduralTexture"] = 3] = "ProceduralTexture";
|
|
14
|
+
/** For gaussian splatting */
|
|
15
|
+
NodeMaterialModes[NodeMaterialModes["GaussianSplatting"] = 4] = "GaussianSplatting";
|
|
14
16
|
})(NodeMaterialModes || (NodeMaterialModes = {}));
|
|
15
17
|
//# sourceMappingURL=nodeMaterialModes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodeMaterialModes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Materials/Node/Enums/nodeMaterialModes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"nodeMaterialModes.js","sourceRoot":"","sources":["../../../../../../dev/core/src/Materials/Node/Enums/nodeMaterialModes.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAN,IAAY,iBAWX;AAXD,WAAY,iBAAiB;IACzB,uBAAuB;IACvB,iEAAY,CAAA;IACZ,uBAAuB;IACvB,uEAAe,CAAA;IACf,0BAA0B;IAC1B,iEAAY,CAAA;IACZ,6BAA6B;IAC7B,mFAAqB,CAAA;IACrB,6BAA6B;IAC7B,mFAAqB,CAAA;AACzB,CAAC,EAXW,iBAAiB,KAAjB,iBAAiB,QAW5B","sourcesContent":["/**\r\n * Enum used to define the material modes\r\n */\r\nexport enum NodeMaterialModes {\r\n /** Regular material */\r\n Material = 0,\r\n /** For post process */\r\n PostProcess = 1,\r\n /** For particle system */\r\n Particle = 2,\r\n /** For procedural texture */\r\n ProceduralTexture = 3,\r\n /** For gaussian splatting */\r\n GaussianSplatting = 4,\r\n}\r\n"]}
|
|
@@ -2,6 +2,7 @@ export * from "./Enums/index";
|
|
|
2
2
|
export * from "./nodeMaterialConnectionPointCustomObject";
|
|
3
3
|
export * from "./nodeMaterialBlockConnectionPoint";
|
|
4
4
|
export * from "./nodeMaterialBlock";
|
|
5
|
+
export * from "./nodeMaterialDefault";
|
|
5
6
|
export * from "./nodeMaterial";
|
|
6
7
|
export * from "./Blocks/index";
|
|
7
8
|
export * from "./Optimizers/index";
|
package/Materials/Node/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./Enums/index.js";
|
|
|
3
3
|
export * from "./nodeMaterialConnectionPointCustomObject.js";
|
|
4
4
|
export * from "./nodeMaterialBlockConnectionPoint.js";
|
|
5
5
|
export * from "./nodeMaterialBlock.js";
|
|
6
|
+
export * from "./nodeMaterialDefault.js";
|
|
6
7
|
export * from "./nodeMaterial.js";
|
|
7
8
|
export * from "./Blocks/index.js";
|
|
8
9
|
export * from "./Optimizers/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Node/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./Enums/index\";\r\nexport * from \"./nodeMaterialConnectionPointCustomObject\";\r\nexport * from \"./nodeMaterialBlockConnectionPoint\";\r\nexport * from \"./nodeMaterialBlock\";\r\nexport * from \"./nodeMaterial\";\r\nexport * from \"./Blocks/index\";\r\nexport * from \"./Optimizers/index\";\r\nexport * from \"../../Decorators/nodeDecorator\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Node/index.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,cAAc,eAAe,CAAC;AAC9B,cAAc,2CAA2C,CAAC;AAC1D,cAAc,oCAAoC,CAAC;AACnD,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC","sourcesContent":["/* eslint-disable import/no-internal-modules */\r\nexport * from \"./Enums/index\";\r\nexport * from \"./nodeMaterialConnectionPointCustomObject\";\r\nexport * from \"./nodeMaterialBlockConnectionPoint\";\r\nexport * from \"./nodeMaterialBlock\";\r\nexport * from \"./nodeMaterialDefault\";\r\nexport * from \"./nodeMaterial\";\r\nexport * from \"./Blocks/index\";\r\nexport * from \"./Optimizers/index\";\r\nexport * from \"../../Decorators/nodeDecorator\";\r\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { NodeMaterial } from "./nodeMaterial";
|
|
2
|
+
/**
|
|
3
|
+
* Clear the material and set it to a default state for gaussian splatting
|
|
4
|
+
* @param nodeMaterial node material to use
|
|
5
|
+
*/
|
|
6
|
+
export declare function SetToDefaultGaussianSplatting(nodeMaterial: NodeMaterial): void;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TransformBlock } from "./Blocks/transformBlock.js";
|
|
2
|
+
import { VertexOutputBlock } from "./Blocks/Vertex/vertexOutputBlock.js";
|
|
3
|
+
import { FragmentOutputBlock } from "./Blocks/Fragment/fragmentOutputBlock.js";
|
|
4
|
+
import { InputBlock } from "./Blocks/Input/inputBlock.js";
|
|
5
|
+
import { GaussianSplattingBlock } from "./Blocks/GaussianSplatting/gaussianSplattingBlock.js";
|
|
6
|
+
import { GaussianBlock } from "./Blocks/GaussianSplatting/gaussianBlock.js";
|
|
7
|
+
import { SplatReaderBlock } from "./Blocks/GaussianSplatting/splatReaderBlock.js";
|
|
8
|
+
import { NodeMaterialModes } from "./Enums/nodeMaterialModes.js";
|
|
9
|
+
import { NodeMaterialSystemValues } from "./Enums/nodeMaterialSystemValues.js";
|
|
10
|
+
/**
|
|
11
|
+
* Clear the material and set it to a default state for gaussian splatting
|
|
12
|
+
* @param nodeMaterial node material to use
|
|
13
|
+
*/
|
|
14
|
+
export function SetToDefaultGaussianSplatting(nodeMaterial) {
|
|
15
|
+
nodeMaterial.clear();
|
|
16
|
+
nodeMaterial.editorData = null;
|
|
17
|
+
// reading splat datas
|
|
18
|
+
const splatIndex = new InputBlock("SplatIndex");
|
|
19
|
+
splatIndex.setAsAttribute("splatIndex");
|
|
20
|
+
const splatReader = new SplatReaderBlock("SplatReader");
|
|
21
|
+
splatIndex.connectTo(splatReader);
|
|
22
|
+
// transforming datas into renderable positions
|
|
23
|
+
const gs = new GaussianSplattingBlock("GaussianSplatting");
|
|
24
|
+
splatReader.connectTo(gs);
|
|
25
|
+
// world transformation
|
|
26
|
+
const worldInput = new InputBlock("World");
|
|
27
|
+
worldInput.setAsSystemValue(NodeMaterialSystemValues.World);
|
|
28
|
+
const worldPos = new TransformBlock("WorldPos");
|
|
29
|
+
splatReader.connectTo(worldPos);
|
|
30
|
+
worldInput.connectTo(worldPos);
|
|
31
|
+
worldPos.connectTo(gs, { output: "xyz", input: "splatPosition" });
|
|
32
|
+
// view and projections
|
|
33
|
+
const view = new InputBlock("view");
|
|
34
|
+
view.setAsSystemValue(NodeMaterialSystemValues.View);
|
|
35
|
+
const projection = new InputBlock("Projection");
|
|
36
|
+
projection.setAsSystemValue(NodeMaterialSystemValues.Projection);
|
|
37
|
+
worldInput.connectTo(gs, { input: "world" });
|
|
38
|
+
view.connectTo(gs, { input: "view" });
|
|
39
|
+
projection.connectTo(gs, { input: "projection" });
|
|
40
|
+
// from color to gaussian color
|
|
41
|
+
const gaussian = new GaussianBlock("Gaussian");
|
|
42
|
+
splatReader.connectTo(gaussian, { input: "splatColor", output: "splatColor" });
|
|
43
|
+
// fragment and vertex outputs
|
|
44
|
+
const fragmentOutput = new FragmentOutputBlock("FragmentOutput");
|
|
45
|
+
gaussian.connectTo(fragmentOutput);
|
|
46
|
+
const vertexOutput = new VertexOutputBlock("VertexOutput");
|
|
47
|
+
gs.connectTo(vertexOutput);
|
|
48
|
+
// Add to nodes
|
|
49
|
+
nodeMaterial.addOutputNode(vertexOutput);
|
|
50
|
+
nodeMaterial.addOutputNode(fragmentOutput);
|
|
51
|
+
nodeMaterial._mode = NodeMaterialModes.GaussianSplatting;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=nodeMaterialDefault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nodeMaterialDefault.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Node/nodeMaterialDefault.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,mDAAmD,CAAC;AAC3F,OAAO,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAG5E;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAC,YAA0B;IACpE,YAAY,CAAC,KAAK,EAAE,CAAC;IAErB,YAAY,CAAC,UAAU,GAAG,IAAI,CAAC;IAE/B,sBAAsB;IACtB,MAAM,UAAU,GAAG,IAAI,UAAU,CAAC,YAAY,CAAC,CAAC;IAChD,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAExC,MAAM,WAAW,GAAG,IA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C,WAAW,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IAE/E,8BAA8B;IAC9B,MAAM,cAAc,GAAG,IAAI,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACjE,QAAQ,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAEnC,MAAM,YAAY,GAAG,IAAI,iBAAiB,CAAC,cAAc,CAAC,CAAC;IAC3D,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAE3B,eAAe;IACf,YAAY,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC,YAAY,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC;IAE3C,YAAY,CAAC,KAAK,GAAG,iBAAiB,CAAC,iBAAiB,CAAC;AAC7D,CAAC","sourcesContent":["import { TransformBlock } from \"./Blocks/transformBlock\";\r\nimport { VertexOutputBlock } from \"./Blocks/Vertex/vertexOutputBlock\";\r\nimport { FragmentOutputBlock } from \"./Blocks/Fragment/fragmentOutputBlock\";\r\nimport { InputBlock } from \"./Blocks/Input/inputBlock\";\r\nimport { GaussianSplattingBlock } from \"./Blocks/GaussianSplatting/gaussianSplattingBlock\";\r\nimport { GaussianBlock } from \"./Blocks/GaussianSplatting/gaussianBlock\";\r\nimport { SplatReaderBlock } from \"./Blocks/GaussianSplatting/splatReaderBlock\";\r\nimport { NodeMaterialModes } from \"./Enums/nodeMaterialModes\";\r\nimport { NodeMaterialSystemValues } from \"./Enums/nodeMaterialSystemValues\";\r\nimport type { NodeMaterial } from \"./nodeMaterial\";\r\n\r\n/**\r\n * Clear the material and set it to a default state for gaussian splatting\r\n * @param nodeMaterial node material to use\r\n */\r\nexport function SetToDefaultGaussianSplatting(nodeMaterial: NodeMaterial): void {\r\n nodeMaterial.clear();\r\n\r\n nodeMaterial.editorData = null;\r\n\r\n // reading splat datas\r\n const splatIndex = new InputBlock(\"SplatIndex\");\r\n splatIndex.setAsAttribute(\"splatIndex\");\r\n\r\n const splatReader = new SplatReaderBlock(\"SplatReader\");\r\n splatIndex.connectTo(splatReader);\r\n\r\n // transforming datas into renderable positions\r\n const gs = new GaussianSplattingBlock(\"GaussianSplatting\");\r\n splatReader.connectTo(gs);\r\n\r\n // world transformation\r\n const worldInput = new InputBlock(\"World\");\r\n worldInput.setAsSystemValue(NodeMaterialSystemValues.World);\r\n\r\n const worldPos = new TransformBlock(\"WorldPos\");\r\n\r\n splatReader.connectTo(worldPos);\r\n worldInput.connectTo(worldPos);\r\n worldPos.connectTo(gs, { output: \"xyz\", input: \"splatPosition\" });\r\n\r\n // view and projections\r\n\r\n const view = new InputBlock(\"view\");\r\n view.setAsSystemValue(NodeMaterialSystemValues.View);\r\n\r\n const projection = new InputBlock(\"Projection\");\r\n projection.setAsSystemValue(NodeMaterialSystemValues.Projection);\r\n\r\n worldInput.connectTo(gs, { input: \"world\" });\r\n view.connectTo(gs, { input: \"view\" });\r\n projection.connectTo(gs, { input: \"projection\" });\r\n\r\n // from color to gaussian color\r\n const gaussian = new GaussianBlock(\"Gaussian\");\r\n splatReader.connectTo(gaussian, { input: \"splatColor\", output: \"splatColor\" });\r\n\r\n // fragment and vertex outputs\r\n const fragmentOutput = new FragmentOutputBlock(\"FragmentOutput\");\r\n gaussian.connectTo(fragmentOutput);\r\n\r\n const vertexOutput = new VertexOutputBlock(\"VertexOutput\");\r\n gs.connectTo(vertexOutput);\r\n\r\n // Add to nodes\r\n nodeMaterial.addOutputNode(vertexOutput);\r\n nodeMaterial.addOutputNode(fragmentOutput);\r\n\r\n nodeMaterial._mode = NodeMaterialModes.GaussianSplatting;\r\n}\r\n"]}
|
|
@@ -27,7 +27,6 @@ import { PBRSubSurfaceConfiguration } from "./pbrSubSurfaceConfiguration.js";
|
|
|
27
27
|
import { DetailMapConfiguration } from "../material.detailMapConfiguration.js";
|
|
28
28
|
import { addClipPlaneUniforms, bindClipPlane } from "../clipPlaneMaterialHelper.js";
|
|
29
29
|
import { BindBonesParameters, BindFogParameters, BindLights, BindLogDepth, BindMorphTargetParameters, BindTextureMatrix, HandleFallbacksForShadows, PrepareAttributesForBakedVertexAnimation, PrepareAttributesForBones, PrepareAttributesForInstances, PrepareAttributesForMorphTargets, PrepareDefinesForAttributes, PrepareDefinesForFrameBoundValues, PrepareDefinesForLights, PrepareDefinesForMergedUV, PrepareDefinesForMisc, PrepareDefinesForMultiview, PrepareDefinesForOIT, PrepareDefinesForPrePass, PrepareUniformsAndSamplersList, } from "../materialHelper.functions.js";
|
|
30
|
-
import { UniformBuffer } from "../uniformBuffer.js";
|
|
31
30
|
const onCreatedEffectParameters = { effect: null, subMesh: null };
|
|
32
31
|
/**
|
|
33
32
|
* Manages the defines for the PBR Material.
|
|
@@ -299,7 +298,7 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
299
298
|
* @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
|
|
300
299
|
*/
|
|
301
300
|
constructor(name, scene, forceGLSL = false) {
|
|
302
|
-
super(name, scene);
|
|
301
|
+
super(name, scene, undefined, forceGLSL || PBRBaseMaterial.ForceGLSL);
|
|
303
302
|
/**
|
|
304
303
|
* Intensity of the direct lights e.g. the four lights available in your scene.
|
|
305
304
|
* This impacts both the direct diffuse and specular highlights.
|
|
@@ -696,15 +695,6 @@ export class PBRBaseMaterial extends PushMaterial {
|
|
|
696
695
|
*/
|
|
697
696
|
this.debugFactor = 1;
|
|
698
697
|
this._cacheHasRenderTargetTextures = false;
|
|
699
|
-
const engine = this.getScene().getEngine();
|
|
700
|
-
if (engine.isWebGPU && !forceGLSL && !PBRBaseMaterial.ForceGLSL) {
|
|
701
|
-
// Switch main UBO to non UBO to connect to leftovers UBO in webgpu
|
|
702
|
-
if (this._uniformBuffer) {
|
|
703
|
-
this._uniformBuffer.dispose();
|
|
704
|
-
}
|
|
705
|
-
this._uniformBuffer = new UniformBuffer(engine, undefined, undefined, this.name, true);
|
|
706
|
-
this._shaderLanguage = 1 /* ShaderLanguage.WGSL */;
|
|
707
|
-
}
|
|
708
698
|
this.brdf = new PBRBRDFConfiguration(this);
|
|
709
699
|
this.clearCoat = new PBRClearCoatConfiguration(this);
|
|
710
700
|
this.iridescence = new PBRIridescenceConfiguration(this);
|