@babylonjs/core 7.12.0 → 7.13.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/Animations/animation.js +1 -2
- package/Animations/animation.js.map +1 -1
- package/Animations/animationGroupMask.d.ts +1 -1
- package/Animations/animationGroupMask.js +2 -2
- package/Animations/animationGroupMask.js.map +1 -1
- package/Animations/animationKey.d.ts +1 -1
- package/Animations/animationKey.js.map +1 -1
- package/Behaviors/Meshes/handConstraintBehavior.d.ts +3 -3
- package/Behaviors/Meshes/handConstraintBehavior.js +16 -17
- package/Behaviors/Meshes/handConstraintBehavior.js.map +1 -1
- package/Behaviors/Meshes/sixDofDragBehavior.js +2 -3
- package/Behaviors/Meshes/sixDofDragBehavior.js.map +1 -1
- package/Bones/bone.js +31 -32
- package/Bones/bone.js.map +1 -1
- package/Bones/boneIKController.js +5 -6
- package/Bones/boneIKController.js.map +1 -1
- package/Bones/boneLookController.js +13 -13
- package/Bones/boneLookController.js.map +1 -1
- package/Buffers/bufferUtils.d.ts +13 -0
- package/Buffers/bufferUtils.js +42 -0
- package/Buffers/bufferUtils.js.map +1 -0
- package/Buffers/index.d.ts +1 -0
- package/Buffers/index.js +1 -0
- package/Buffers/index.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.js +5 -6
- package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraVirtualJoystickInput.js +5 -5
- package/Cameras/Inputs/freeCameraVirtualJoystickInput.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.js +8 -10
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Compute/computeEffect.js +2 -3
- package/Compute/computeEffect.js.map +1 -1
- package/Compute/computeShader.js +19 -20
- package/Compute/computeShader.js.map +1 -1
- package/Culling/Helper/IBoundingInfoHelperPlatform.d.ts +4 -0
- package/Culling/Helper/IBoundingInfoHelperPlatform.js.map +1 -1
- package/Culling/Helper/boundingInfoHelper.d.ts +26 -4
- package/Culling/Helper/boundingInfoHelper.js +41 -10
- package/Culling/Helper/boundingInfoHelper.js.map +1 -1
- package/Culling/Helper/computeShaderBoundingHelper.d.ts +12 -3
- package/Culling/Helper/computeShaderBoundingHelper.js +164 -76
- package/Culling/Helper/computeShaderBoundingHelper.js.map +1 -1
- package/Culling/Helper/transformFeedbackBoundingHelper.d.ts +11 -0
- package/Culling/Helper/transformFeedbackBoundingHelper.js +46 -14
- package/Culling/Helper/transformFeedbackBoundingHelper.js.map +1 -1
- package/Debug/debugLayer.d.ts +1 -1
- package/Debug/debugLayer.js.map +1 -1
- package/Decorators/nodeDecorator.d.ts +1 -1
- package/Decorators/nodeDecorator.js +1 -1
- package/Decorators/nodeDecorator.js.map +1 -1
- package/DeviceInput/InputDevices/deviceEnums.d.ts +5 -5
- package/DeviceInput/InputDevices/deviceEnums.js.map +1 -1
- package/DeviceInput/eventFactory.js +3 -3
- package/DeviceInput/eventFactory.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.cubeTexture.js +2 -2
- package/Engines/AbstractEngine/abstractEngine.cubeTexture.js.map +1 -1
- package/Engines/Extensions/engine.computeShader.d.ts +1 -1
- package/Engines/Extensions/engine.computeShader.js.map +1 -1
- package/Engines/Extensions/engine.cubeTexture.js +2 -2
- package/Engines/Extensions/engine.cubeTexture.js.map +1 -1
- package/Engines/Extensions/engine.dynamicTexture.js +2 -2
- package/Engines/Extensions/engine.dynamicTexture.js.map +1 -1
- package/Engines/Extensions/engine.multiRender.js +3 -3
- package/Engines/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/Extensions/engine.multiview.js +2 -2
- package/Engines/Extensions/engine.multiview.js.map +1 -1
- package/Engines/Extensions/engine.prefilteredCubeTexture.js +3 -3
- package/Engines/Extensions/engine.prefilteredCubeTexture.js.map +1 -1
- package/Engines/Extensions/engine.rawTexture.js +4 -4
- package/Engines/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/Extensions/engine.renderTarget.js +3 -3
- package/Engines/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/Extensions/engine.renderTargetCube.js +2 -2
- package/Engines/Extensions/engine.renderTargetCube.js.map +1 -1
- package/Engines/Native/nativeShaderProcessors.js +1 -2
- package/Engines/Native/nativeShaderProcessors.js.map +1 -1
- package/Engines/Processors/shaderProcessor.js +2 -3
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGL/webGL2ShaderProcessors.js +1 -2
- package/Engines/WebGL/webGL2ShaderProcessors.js.map +1 -1
- package/Engines/WebGL/webGLShaderProcessors.js +1 -2
- package/Engines/WebGL/webGLShaderProcessors.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.computeShader.js +1 -2
- package/Engines/WebGPU/Extensions/engine.computeShader.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.cubeTexture.js +2 -2
- package/Engines/WebGPU/Extensions/engine.cubeTexture.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.dynamicTexture.js +2 -2
- package/Engines/WebGPU/Extensions/engine.dynamicTexture.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.js +2 -2
- package/Engines/WebGPU/Extensions/engine.multiRender.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.rawTexture.js +5 -5
- package/Engines/WebGPU/Extensions/engine.rawTexture.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTarget.js +3 -3
- package/Engines/WebGPU/Extensions/engine.renderTarget.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.renderTargetCube.js +2 -2
- package/Engines/WebGPU/Extensions/engine.renderTargetCube.js.map +1 -1
- package/Engines/WebGPU/webgpuBufferManager.js +1 -1
- package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js +81 -82
- package/Engines/WebGPU/webgpuCacheRenderPipeline.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheSampler.js +60 -64
- package/Engines/WebGPU/webgpuCacheSampler.js.map +1 -1
- package/Engines/WebGPU/webgpuClearQuad.js +1 -2
- package/Engines/WebGPU/webgpuClearQuad.js.map +1 -1
- package/Engines/WebGPU/webgpuComputeContext.js +13 -15
- package/Engines/WebGPU/webgpuComputeContext.js.map +1 -1
- package/Engines/WebGPU/webgpuConstants.d.ts +39 -39
- package/Engines/WebGPU/webgpuConstants.js.map +1 -1
- package/Engines/WebGPU/webgpuHardwareTexture.js +6 -8
- package/Engines/WebGPU/webgpuHardwareTexture.js.map +1 -1
- package/Engines/WebGPU/webgpuOcclusionQuery.js +1 -2
- package/Engines/WebGPU/webgpuOcclusionQuery.js.map +1 -1
- package/Engines/WebGPU/webgpuQuerySet.js +3 -3
- package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessor.js +15 -19
- package/Engines/WebGPU/webgpuShaderProcessor.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js +8 -10
- package/Engines/WebGPU/webgpuShaderProcessorsGLSL.js.map +1 -1
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js +26 -28
- package/Engines/WebGPU/webgpuShaderProcessorsWGSL.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureHelper.js +413 -416
- package/Engines/WebGPU/webgpuTextureHelper.js.map +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +50 -51
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/WebGPU/webgpuTimestampQuery.js +1 -2
- package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
- package/Engines/abstractEngine.js +4 -4
- package/Engines/abstractEngine.js.map +1 -1
- package/Engines/engine.js +2 -2
- package/Engines/engine.js.map +1 -1
- package/Engines/nativeEngine.js +9 -9
- package/Engines/nativeEngine.js.map +1 -1
- package/Engines/nullEngine.js +5 -5
- package/Engines/nullEngine.js.map +1 -1
- package/Engines/renderTargetWrapper.js +1 -2
- package/Engines/renderTargetWrapper.js.map +1 -1
- package/Engines/shaderStore.js +6 -7
- package/Engines/shaderStore.js.map +1 -1
- package/Engines/thinEngine.js +4 -5
- package/Engines/thinEngine.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +11 -0
- package/Engines/webgpuEngine.js +91 -72
- package/Engines/webgpuEngine.js.map +1 -1
- package/Events/deviceInputEvents.d.ts +1 -1
- package/Events/deviceInputEvents.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +1 -1
- package/FlowGraph/flowGraph.js +5 -5
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphBlock.js +2 -3
- package/FlowGraph/flowGraphBlock.js.map +1 -1
- package/FlowGraph/flowGraphConnection.d.ts +1 -1
- package/FlowGraph/flowGraphConnection.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.js +3 -3
- package/FlowGraph/flowGraphDataConnection.js.map +1 -1
- package/FlowGraph/flowGraphExecutionBlock.js +2 -3
- package/FlowGraph/flowGraphExecutionBlock.js.map +1 -1
- package/FlowGraph/flowGraphSignalConnection.js +3 -3
- package/FlowGraph/flowGraphSignalConnection.js.map +1 -1
- package/Gamepads/dualShockGamepad.d.ts +2 -2
- package/Gamepads/dualShockGamepad.js +14 -14
- package/Gamepads/dualShockGamepad.js.map +1 -1
- package/Gamepads/xboxGamepad.d.ts +2 -2
- package/Gamepads/xboxGamepad.js +14 -14
- package/Gamepads/xboxGamepad.js.map +1 -1
- package/Gizmos/gizmo.d.ts +2 -2
- package/Gizmos/gizmo.js +4 -4
- package/Gizmos/gizmo.js.map +1 -1
- package/Gizmos/gizmoManager.js +2 -2
- package/Gizmos/gizmoManager.js.map +1 -1
- package/Gizmos/scaleGizmo.js +3 -3
- package/Gizmos/scaleGizmo.js.map +1 -1
- package/Loading/sceneLoader.d.ts +1 -1
- package/Loading/sceneLoader.js +6 -6
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/GreasedLine/greasedLineMaterialInterfaces.d.ts +3 -3
- package/Materials/GreasedLine/greasedLineMaterialInterfaces.js.map +1 -1
- package/Materials/GreasedLine/greasedLinePluginMaterial.js +10 -11
- package/Materials/GreasedLine/greasedLinePluginMaterial.js.map +1 -1
- package/Materials/GreasedLine/greasedLineSimpleMaterial.js +8 -9
- package/Materials/GreasedLine/greasedLineSimpleMaterial.js.map +1 -1
- package/Materials/Node/Blocks/Dual/currentScreenBlock.js +3 -4
- package/Materials/Node/Blocks/Dual/currentScreenBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/fogBlock.js +2 -3
- package/Materials/Node/Blocks/Dual/fogBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js +1 -2
- package/Materials/Node/Blocks/Dual/imageSourceBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.js +5 -6
- package/Materials/Node/Blocks/Dual/lightBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js +4 -5
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.js +7 -8
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.js +4 -6
- package/Materials/Node/Blocks/Dual/textureBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/TBNBlock.js +2 -4
- package/Materials/Node/Blocks/Fragment/TBNBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/derivativeBlock.js +1 -2
- package/Materials/Node/Blocks/Fragment/derivativeBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragCoordBlock.js +1 -2
- package/Materials/Node/Blocks/Fragment/fragCoordBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragDepthBlock.js +1 -2
- package/Materials/Node/Blocks/Fragment/fragDepthBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js +5 -6
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/frontFacingBlock.js +1 -2
- package/Materials/Node/Blocks/Fragment/frontFacingBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js +5 -6
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js +3 -4
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js +7 -9
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js +1 -2
- package/Materials/Node/Blocks/Fragment/screenSizeBlock.js.map +1 -1
- package/Materials/Node/Blocks/Input/inputBlock.js +19 -21
- package/Materials/Node/Blocks/Input/inputBlock.js.map +1 -1
- package/Materials/Node/Blocks/Input/prePassTextureBlock.js +3 -4
- package/Materials/Node/Blocks/Input/prePassTextureBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js +2 -3
- package/Materials/Node/Blocks/PBR/anisotropyBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.js +4 -5
- package/Materials/Node/Blocks/PBR/clearCoatBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/iridescenceBlock.js +1 -2
- package/Materials/Node/Blocks/PBR/iridescenceBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js +28 -29
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.js +4 -5
- package/Materials/Node/Blocks/PBR/reflectionBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.js +5 -6
- package/Materials/Node/Blocks/PBR/refractionBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/sheenBlock.js +4 -5
- package/Materials/Node/Blocks/PBR/sheenBlock.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js +2 -3
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/instancesBlock.js +1 -2
- package/Materials/Node/Blocks/Vertex/instancesBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/lightInformationBlock.js +1 -2
- package/Materials/Node/Blocks/Vertex/lightInformationBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js +1 -2
- package/Materials/Node/Blocks/Vertex/morphTargetsBlock.js.map +1 -1
- package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js +1 -2
- package/Materials/Node/Blocks/Vertex/vertexOutputBlock.js.map +1 -1
- package/Materials/Node/Blocks/arcTan2Block.js +1 -2
- package/Materials/Node/Blocks/arcTan2Block.js.map +1 -1
- package/Materials/Node/Blocks/biPlanarBlock.js +3 -4
- package/Materials/Node/Blocks/biPlanarBlock.js.map +1 -1
- package/Materials/Node/Blocks/clampBlock.js +4 -5
- package/Materials/Node/Blocks/clampBlock.js.map +1 -1
- package/Materials/Node/Blocks/cloudBlock.js +3 -4
- package/Materials/Node/Blocks/cloudBlock.js.map +1 -1
- package/Materials/Node/Blocks/curveBlock.js +1 -2
- package/Materials/Node/Blocks/curveBlock.js.map +1 -1
- package/Materials/Node/Blocks/customBlock.js +1 -2
- package/Materials/Node/Blocks/customBlock.js.map +1 -1
- package/Materials/Node/Blocks/matrixBuilderBlock.js +1 -2
- package/Materials/Node/Blocks/matrixBuilderBlock.js.map +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.d.ts +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.js +35 -35
- package/Materials/Node/Blocks/meshAttributeExistsBlock.js.map +1 -1
- package/Materials/Node/Blocks/modBlock.js +1 -2
- package/Materials/Node/Blocks/modBlock.js.map +1 -1
- package/Materials/Node/Blocks/remapBlock.js +3 -3
- package/Materials/Node/Blocks/remapBlock.js.map +1 -1
- package/Materials/Node/Blocks/simplexPerlin3DBlock.js +1 -2
- package/Materials/Node/Blocks/simplexPerlin3DBlock.js.map +1 -1
- package/Materials/Node/Blocks/transformBlock.js +1 -2
- package/Materials/Node/Blocks/transformBlock.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.js +10 -12
- package/Materials/Node/Blocks/triPlanarBlock.js.map +1 -1
- package/Materials/Node/Blocks/voronoiNoiseBlock.js +3 -4
- package/Materials/Node/Blocks/voronoiNoiseBlock.js.map +1 -1
- package/Materials/Node/Blocks/waveBlock.d.ts +1 -1
- package/Materials/Node/Blocks/waveBlock.js +4 -4
- package/Materials/Node/Blocks/waveBlock.js.map +1 -1
- package/Materials/Node/Blocks/worleyNoise3DBlock.js +3 -4
- package/Materials/Node/Blocks/worleyNoise3DBlock.js.map +1 -1
- package/Materials/Node/Enums/nodeMaterialBlockConnectionPointMode.d.ts +1 -1
- package/Materials/Node/Enums/nodeMaterialBlockConnectionPointMode.js.map +1 -1
- package/Materials/Node/nodeMaterial.js +3 -4
- package/Materials/Node/nodeMaterial.js.map +1 -1
- package/Materials/Node/nodeMaterialBlock.js +5 -6
- package/Materials/Node/nodeMaterialBlock.js.map +1 -1
- package/Materials/Node/nodeMaterialBlockConnectionPoint.d.ts +2 -2
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js +10 -10
- package/Materials/Node/nodeMaterialBlockConnectionPoint.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.js +18 -19
- package/Materials/Node/nodeMaterialBuildState.js.map +1 -1
- package/Materials/Node/nodeMaterialConnectionPointCustomObject.js +3 -3
- package/Materials/Node/nodeMaterialConnectionPointCustomObject.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.js +3 -4
- package/Materials/PBR/pbrBaseMaterial.js.map +1 -1
- package/Materials/Textures/internalTexture.d.ts +1 -1
- package/Materials/Textures/internalTexture.js +13 -13
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/Textures/ktx2decoderTypes.d.ts +1 -1
- package/Materials/Textures/ktx2decoderTypes.js.map +1 -1
- package/Materials/Textures/rawCubeTexture.js +1 -2
- package/Materials/Textures/rawCubeTexture.js.map +1 -1
- package/Materials/effect.functions.js +2 -3
- package/Materials/effect.functions.js.map +1 -1
- package/Materials/effect.js +3 -4
- package/Materials/effect.js.map +1 -1
- package/Materials/effect.webgl.functions.js +1 -2
- package/Materials/effect.webgl.functions.js.map +1 -1
- package/Materials/material.js +7 -9
- package/Materials/material.js.map +1 -1
- package/Materials/materialPluginEvent.d.ts +1 -1
- package/Materials/materialPluginEvent.js.map +1 -1
- package/Materials/materialPluginManager.js +9 -11
- package/Materials/materialPluginManager.js.map +1 -1
- package/Materials/meshDebugPluginMaterial.d.ts +1 -1
- package/Materials/meshDebugPluginMaterial.js +2 -2
- package/Materials/meshDebugPluginMaterial.js.map +1 -1
- package/Materials/shaderLanguage.d.ts +1 -1
- package/Materials/shaderLanguage.js.map +1 -1
- package/Materials/shadowDepthWrapper.js +1 -2
- package/Materials/shadowDepthWrapper.js.map +1 -1
- package/Materials/standardMaterial.js +2 -3
- package/Materials/standardMaterial.js.map +1 -1
- package/Maths/math.axis.d.ts +2 -2
- package/Maths/math.axis.js.map +1 -1
- package/Maths/math.path.d.ts +1 -1
- package/Maths/math.path.js +3 -3
- package/Maths/math.path.js.map +1 -1
- package/Maths/math.vector.js +32 -6
- package/Maths/math.vector.js.map +1 -1
- package/Meshes/Builders/greasedLineBuilder.d.ts +2 -2
- package/Meshes/Builders/greasedLineBuilder.js +21 -23
- package/Meshes/Builders/greasedLineBuilder.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineBaseMesh.d.ts +3 -3
- package/Meshes/GreasedLine/greasedLineBaseMesh.js.map +1 -1
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js +14 -14
- package/Meshes/GreasedLine/greasedLineRibbonMesh.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +2 -2
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js +2 -2
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js +3 -3
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js +3 -3
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setColorsBlock.js +2 -2
- package/Meshes/Node/Blocks/Set/setColorsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js +2 -2
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setNormalsBlock.js +2 -2
- package/Meshes/Node/Blocks/Set/setNormalsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setPositionsBlock.js +2 -2
- package/Meshes/Node/Blocks/Set/setPositionsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setTangentsBlock.js +2 -2
- package/Meshes/Node/Blocks/Set/setTangentsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.js +3 -3
- package/Meshes/Node/Blocks/Set/setUVsBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/boxBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/boxBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/capsuleBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/capsuleBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/cylinderBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/cylinderBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/discBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/discBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/gridBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/gridBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/meshBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/meshBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/planeBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/planeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/sphereBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/sphereBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/torusBlock.js +2 -2
- package/Meshes/Node/Blocks/Sources/torusBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js +2 -2
- package/Meshes/Node/Blocks/Textures/geometryTextureBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js +2 -2
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.js +3 -3
- package/Meshes/Node/Blocks/booleanGeometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.js +2 -2
- package/Meshes/Node/Blocks/conditionBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryClampBlock.js +3 -3
- package/Meshes/Node/Blocks/geometryClampBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCollectionBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryCollectionBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryCurveBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js +3 -3
- package/Meshes/Node/Blocks/geometryOptimizeBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTransformBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryTransformBlock.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.js +2 -2
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.js +2 -2
- package/Meshes/Node/Blocks/mappingBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mathBlock.js +2 -2
- package/Meshes/Node/Blocks/mathBlock.js.map +1 -1
- package/Meshes/Node/Blocks/mergeGeometryBlock.js +2 -2
- package/Meshes/Node/Blocks/mergeGeometryBlock.js.map +1 -1
- package/Meshes/Node/Blocks/randomBlock.js +2 -2
- package/Meshes/Node/Blocks/randomBlock.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +3 -3
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.d.ts +2 -2
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js +7 -7
- package/Meshes/Node/nodeGeometryBlockConnectionPoint.js.map +1 -1
- package/Meshes/abstractMesh.d.ts +49 -17
- package/Meshes/abstractMesh.js +128 -133
- package/Meshes/abstractMesh.js.map +1 -1
- package/Meshes/geometry.d.ts +8 -0
- package/Meshes/geometry.js +17 -0
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/instancedMesh.d.ts +5 -8
- package/Meshes/instancedMesh.js +15 -9
- package/Meshes/instancedMesh.js.map +1 -1
- package/Meshes/mesh.d.ts +7 -3
- package/Meshes/mesh.js +21 -13
- package/Meshes/mesh.js.map +1 -1
- package/Meshes/meshSimplification.d.ts +1 -1
- package/Meshes/meshSimplification.js +1 -1
- package/Meshes/meshSimplification.js.map +1 -1
- package/Meshes/meshSimplificationSceneComponent.js +2 -2
- package/Meshes/meshSimplificationSceneComponent.js.map +1 -1
- package/Meshes/transformNode.js +7 -8
- package/Meshes/transformNode.js.map +1 -1
- package/Misc/assetsManager.d.ts +1 -1
- package/Misc/assetsManager.js +9 -9
- package/Misc/assetsManager.js.map +1 -1
- package/Misc/basis.js +2 -2
- package/Misc/basis.js.map +1 -1
- package/Misc/copyTextureToTexture.d.ts +1 -1
- package/Misc/copyTextureToTexture.js +1 -1
- package/Misc/copyTextureToTexture.js.map +1 -1
- package/Misc/environmentTextureTools.js +3 -3
- package/Misc/environmentTextureTools.js.map +1 -1
- package/Misc/iInspectable.d.ts +1 -1
- package/Misc/iInspectable.js.map +1 -1
- package/Misc/khronosTextureContainer2.js +2 -2
- package/Misc/khronosTextureContainer2.js.map +1 -1
- package/Misc/timer.d.ts +1 -1
- package/Misc/timer.js +5 -5
- package/Misc/timer.js.map +1 -1
- package/Misc/virtualJoystick.d.ts +1 -1
- package/Misc/virtualJoystick.js +16 -16
- package/Misc/virtualJoystick.js.map +1 -1
- package/Particles/particleSystem.js +3 -3
- package/Particles/particleSystem.js.map +1 -1
- package/Particles/particleSystemComponent.js +1 -2
- package/Particles/particleSystemComponent.js.map +1 -1
- package/Particles/pointsCloudSystem.d.ts +1 -1
- package/Particles/pointsCloudSystem.js +14 -14
- package/Particles/pointsCloudSystem.js.map +1 -1
- package/Particles/subEmitter.d.ts +1 -1
- package/Particles/subEmitter.js +1 -1
- package/Particles/subEmitter.js.map +1 -1
- package/Physics/physicsHelper.d.ts +2 -2
- package/Physics/physicsHelper.js +6 -7
- package/Physics/physicsHelper.js.map +1 -1
- package/Physics/v1/physicsImpostor.js +4 -5
- package/Physics/v1/physicsImpostor.js.map +1 -1
- package/Physics/v2/IPhysicsEnginePlugin.d.ts +16 -8
- package/Physics/v2/IPhysicsEnginePlugin.js +9 -0
- package/Physics/v2/IPhysicsEnginePlugin.js.map +1 -1
- package/Physics/v2/Plugins/havokPlugin.js +96 -79
- package/Physics/v2/Plugins/havokPlugin.js.map +1 -1
- package/Physics/v2/physicsAggregate.js +8 -9
- package/Physics/v2/physicsAggregate.js.map +1 -1
- package/Physics/v2/physicsBody.d.ts +14 -2
- package/Physics/v2/physicsBody.js +30 -11
- package/Physics/v2/physicsBody.js.map +1 -1
- package/Physics/v2/physicsConstraint.js +8 -9
- package/Physics/v2/physicsConstraint.js.map +1 -1
- package/Physics/v2/physicsMaterial.d.ts +1 -1
- package/Physics/v2/physicsMaterial.js.map +1 -1
- package/Physics/v2/physicsShape.js +9 -10
- package/Physics/v2/physicsShape.js.map +1 -1
- package/Physics/v2/ragdoll.js +11 -12
- package/Physics/v2/ragdoll.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js +2 -2
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js.map +1 -1
- package/PostProcesses/depthOfFieldEffect.d.ts +1 -1
- package/PostProcesses/depthOfFieldEffect.js +3 -3
- package/PostProcesses/depthOfFieldEffect.js.map +1 -1
- package/PostProcesses/postProcess.js +2 -3
- package/PostProcesses/postProcess.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.d.ts +1 -1
- package/PostProcesses/tonemapPostProcess.js +4 -4
- package/PostProcesses/tonemapPostProcess.js.map +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.d.ts +1 -1
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js +10 -10
- package/Rendering/fluidRenderer/fluidRenderingTargetRenderer.js.map +1 -1
- package/Shaders/spriteMap.fragment.js +3 -2
- package/Shaders/spriteMap.fragment.js.map +1 -1
- package/ShadersWGSL/boundingInfo.compute.js +8 -8
- package/ShadersWGSL/boundingInfo.compute.js.map +1 -1
- package/XR/features/WebXRDepthSensing.js +2 -2
- package/XR/features/WebXRDepthSensing.js.map +1 -1
- package/XR/features/WebXRHandTracking.d.ts +2 -2
- package/XR/features/WebXRHandTracking.js +76 -76
- package/XR/features/WebXRHandTracking.js.map +1 -1
- package/XR/features/WebXRLightEstimation.js +2 -2
- package/XR/features/WebXRLightEstimation.js.map +1 -1
- package/XR/features/WebXRNearInteraction.d.ts +1 -1
- package/XR/features/WebXRNearInteraction.js +5 -5
- package/XR/features/WebXRNearInteraction.js.map +1 -1
- package/XR/features/WebXRRawCameraAccess.js +2 -2
- package/XR/features/WebXRRawCameraAccess.js.map +1 -1
- package/XR/motionController/webXRProfiledMotionController.js +2 -2
- package/XR/motionController/webXRProfiledMotionController.js.map +1 -1
- package/XR/webXRCamera.js +3 -4
- package/XR/webXRCamera.js.map +1 -1
- package/XR/webXREnterExitUI.js +3 -4
- package/XR/webXREnterExitUI.js.map +1 -1
- package/XR/webXRExperienceHelper.js +12 -13
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRManagedOutputCanvas.d.ts +1 -1
- package/XR/webXRManagedOutputCanvas.js +15 -6
- package/XR/webXRManagedOutputCanvas.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.js +2 -2
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRTypes.d.ts +2 -2
- package/XR/webXRTypes.js.map +1 -1
- package/package.json +1 -1
- package/scene.d.ts +1 -1
- package/scene.js +4 -4
- package/scene.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenSizeBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Materials/Node/Blocks/Fragment/screenSizeBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAG1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"screenSizeBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Materials/Node/Blocks/Fragment/screenSizeBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAG1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAK3D;;GAEG;AACH,MAAM,OAAO,e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AAC,cAAc,CAAC,MAAM,CAAC,MAAM,OAAO,IAAI,MAAM,CAAC,IAAI,KAAK,CAAC;aAC5E;SACJ;QAED,OAAO,IAAI,CAAC;IAChB,CAAC;IAEkB,WAAW,CAAC,KAA6B;QACxD,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QAEzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC;QAErC,IAAI,KAAK,CAAC,MAAM,KAAK,wBAAwB,CAAC,MAAM,EAAE;YAClD,4CAA4C;YAC5C,MAAM,wDAAwD,CAAC;SAClE;QAED,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAE3C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC;QACzD,KAAK,CAAC,sBAAsB,CAAC,IAAI,CAAC,QAAQ,EAAE,qCAAqC,CAAC,OAAO,CAAC,CAAC;QAE3F,MAAM,MAAM,GAAG,KAAK,CAAC,cAAc,gCAAwB,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/E,KAAK,CAAC,iBAAiB,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;QAE5E,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AAED,aAAa,CAAC,yBAAyB,EAAE,eAAe,CAAC,CAAC","sourcesContent":["import { NodeMaterialBlock } from \"../../nodeMaterialBlock\";\r\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes\";\r\nimport type { NodeMaterialBuildState } from \"../../nodeMaterialBuildState\";\r\nimport type { NodeMaterialConnectionPoint } from \"../../nodeMaterialBlockConnectionPoint\";\r\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { Effect } from \"../../../effect\";\r\nimport type { Scene } from \"../../../../scene\";\r\nimport { ShaderLanguage } from \"../../../../Materials/shaderLanguage\";\r\n\r\n/**\r\n * Block used to get the screen sizes\r\n */\r\nexport class ScreenSizeBlock extends NodeMaterialBlock {\r\n private _varName: string;\r\n private _scene: Scene;\r\n\r\n /**\r\n * Creates a new ScreenSizeBlock\r\n * @param name defines the block name\r\n */\r\n public constructor(name: string) {\r\n super(name, NodeMaterialBlockTargets.Fragment);\r\n\r\n this.registerOutput(\"xy\", NodeMaterialBlockConnectionPointTypes.Vector2, NodeMaterialBlockTargets.Fragment);\r\n this.registerOutput(\"x\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Fragment);\r\n this.registerOutput(\"y\", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Fragment);\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 \"ScreenSizeBlock\";\r\n }\r\n\r\n /**\r\n * Gets the xy component\r\n */\r\n public get xy(): NodeMaterialConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the x component\r\n */\r\n public get x(): NodeMaterialConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the y component\r\n */\r\n public get y(): NodeMaterialConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n public override bind(effect: Effect) {\r\n const engine = this._scene.getEngine();\r\n\r\n effect.setFloat2(this._varName, engine.getRenderWidth(), engine.getRenderHeight());\r\n }\r\n\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n protected writeOutputs(state: NodeMaterialBuildState, varName: string): string {\r\n let code = \"\";\r\n\r\n for (const output of this._outputs) {\r\n if (output.hasEndpoints) {\r\n code += `${state._declareOutput(output)} = ${varName}.${output.name};\\n`;\r\n }\r\n }\r\n\r\n return code;\r\n }\r\n\r\n protected override _buildBlock(state: NodeMaterialBuildState) {\r\n super._buildBlock(state);\r\n\r\n this._scene = state.sharedData.scene;\r\n\r\n if (state.target === NodeMaterialBlockTargets.Vertex) {\r\n // eslint-disable-next-line no-throw-literal\r\n throw \"ScreenSizeBlock must only be used in a fragment shader\";\r\n }\r\n\r\n state.sharedData.bindableBlocks.push(this);\r\n\r\n this._varName = state._getFreeVariableName(\"screenSize\");\r\n state._emitUniformFromString(this._varName, NodeMaterialBlockConnectionPointTypes.Vector2);\r\n\r\n const prefix = state.shaderLanguage === ShaderLanguage.WGSL ? \"uniforms.\" : \"\";\r\n state.compilationString += this.writeOutputs(state, prefix + this._varName);\r\n\r\n return this;\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.ScreenSizeBlock\", ScreenSizeBlock);\r\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/naming-convention */
|
|
2
2
|
import { NodeMaterialBlock } from "../../nodeMaterialBlock.js";
|
|
3
3
|
import { NodeMaterialBlockConnectionPointTypes } from "../../Enums/nodeMaterialBlockConnectionPointTypes.js";
|
|
4
|
-
import { NodeMaterialBlockConnectionPointMode } from "../../Enums/nodeMaterialBlockConnectionPointMode.js";
|
|
5
4
|
import { NodeMaterialSystemValues } from "../../Enums/nodeMaterialSystemValues.js";
|
|
6
5
|
import { Matrix, Vector2, Vector3, Vector4 } from "../../../../Maths/math.vector.js";
|
|
7
6
|
import { NodeMaterialBlockTargets } from "../../Enums/nodeMaterialBlockTargets.js";
|
|
@@ -10,7 +9,6 @@ import { Color3, Color4, TmpColors } from "../../../../Maths/math.js";
|
|
|
10
9
|
import { AnimatedInputBlockTypes } from "./animatedInputBlockTypes.js";
|
|
11
10
|
import { Observable } from "../../../../Misc/observable.js";
|
|
12
11
|
import { PrecisionDate } from "../../../../Misc/precisionDate.js";
|
|
13
|
-
import { ShaderLanguage } from "../../../../Materials/shaderLanguage.js";
|
|
14
12
|
const remapAttributeName = {
|
|
15
13
|
position2d: "position",
|
|
16
14
|
particle_uv: "vUV",
|
|
@@ -134,7 +132,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
134
132
|
*/
|
|
135
133
|
constructor(name, target = NodeMaterialBlockTargets.Vertex, type = NodeMaterialBlockConnectionPointTypes.AutoDetect) {
|
|
136
134
|
super(name, target, false);
|
|
137
|
-
this._mode = NodeMaterialBlockConnectionPointMode.Undefined
|
|
135
|
+
this._mode = 3 /* NodeMaterialBlockConnectionPointMode.Undefined */;
|
|
138
136
|
this._animationType = AnimatedInputBlockTypes.None;
|
|
139
137
|
this._prefix = "";
|
|
140
138
|
/** Gets or set a value used to limit the range of float values */
|
|
@@ -184,7 +182,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
184
182
|
* @returns the current connection point
|
|
185
183
|
*/
|
|
186
184
|
setAsAttribute(attributeName) {
|
|
187
|
-
this._mode = NodeMaterialBlockConnectionPointMode.Attribute
|
|
185
|
+
this._mode = 1 /* NodeMaterialBlockConnectionPointMode.Attribute */;
|
|
188
186
|
if (attributeName) {
|
|
189
187
|
this.name = attributeName;
|
|
190
188
|
}
|
|
@@ -217,7 +215,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
217
215
|
}
|
|
218
216
|
}
|
|
219
217
|
this._storedValue = value;
|
|
220
|
-
this._mode = NodeMaterialBlockConnectionPointMode.Uniform
|
|
218
|
+
this._mode = 0 /* NodeMaterialBlockConnectionPointMode.Uniform */;
|
|
221
219
|
this.onValueChangedObservable.notifyObservers(this);
|
|
222
220
|
}
|
|
223
221
|
/**
|
|
@@ -229,7 +227,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
229
227
|
}
|
|
230
228
|
set valueCallback(value) {
|
|
231
229
|
this._valueCallback = value;
|
|
232
|
-
this._mode = NodeMaterialBlockConnectionPointMode.Uniform
|
|
230
|
+
this._mode = 0 /* NodeMaterialBlockConnectionPointMode.Uniform */;
|
|
233
231
|
}
|
|
234
232
|
/**
|
|
235
233
|
* Gets the declaration variable name in the shader
|
|
@@ -257,7 +255,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
257
255
|
* Gets a boolean indicating that this connection point not defined yet
|
|
258
256
|
*/
|
|
259
257
|
get isUndefined() {
|
|
260
|
-
return this._mode === NodeMaterialBlockConnectionPointMode.Undefined
|
|
258
|
+
return this._mode === 3 /* NodeMaterialBlockConnectionPointMode.Undefined */;
|
|
261
259
|
}
|
|
262
260
|
/**
|
|
263
261
|
* Gets or sets a boolean indicating that this connection point is coming from an uniform.
|
|
@@ -265,10 +263,10 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
265
263
|
* Can only be set on inputs
|
|
266
264
|
*/
|
|
267
265
|
get isUniform() {
|
|
268
|
-
return this._mode === NodeMaterialBlockConnectionPointMode.Uniform
|
|
266
|
+
return this._mode === 0 /* NodeMaterialBlockConnectionPointMode.Uniform */;
|
|
269
267
|
}
|
|
270
268
|
set isUniform(value) {
|
|
271
|
-
this._mode = value ? NodeMaterialBlockConnectionPointMode.Uniform : NodeMaterialBlockConnectionPointMode.Undefined
|
|
269
|
+
this._mode = value ? 0 /* NodeMaterialBlockConnectionPointMode.Uniform */ : 3 /* NodeMaterialBlockConnectionPointMode.Undefined */;
|
|
272
270
|
this.associatedVariableName = "";
|
|
273
271
|
}
|
|
274
272
|
/**
|
|
@@ -277,10 +275,10 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
277
275
|
* Can only be set on inputs
|
|
278
276
|
*/
|
|
279
277
|
get isAttribute() {
|
|
280
|
-
return this._mode === NodeMaterialBlockConnectionPointMode.Attribute
|
|
278
|
+
return this._mode === 1 /* NodeMaterialBlockConnectionPointMode.Attribute */;
|
|
281
279
|
}
|
|
282
280
|
set isAttribute(value) {
|
|
283
|
-
this._mode = value ? NodeMaterialBlockConnectionPointMode.Attribute : NodeMaterialBlockConnectionPointMode.Undefined
|
|
281
|
+
this._mode = value ? 1 /* NodeMaterialBlockConnectionPointMode.Attribute */ : 3 /* NodeMaterialBlockConnectionPointMode.Undefined */;
|
|
284
282
|
this.associatedVariableName = "";
|
|
285
283
|
}
|
|
286
284
|
/**
|
|
@@ -288,10 +286,10 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
288
286
|
* Can only be set on exit points
|
|
289
287
|
*/
|
|
290
288
|
get isVarying() {
|
|
291
|
-
return this._mode === NodeMaterialBlockConnectionPointMode.Varying
|
|
289
|
+
return this._mode === 2 /* NodeMaterialBlockConnectionPointMode.Varying */;
|
|
292
290
|
}
|
|
293
291
|
set isVarying(value) {
|
|
294
|
-
this._mode = value ? NodeMaterialBlockConnectionPointMode.Varying : NodeMaterialBlockConnectionPointMode.Undefined
|
|
292
|
+
this._mode = value ? 2 /* NodeMaterialBlockConnectionPointMode.Varying */ : 3 /* NodeMaterialBlockConnectionPointMode.Undefined */;
|
|
295
293
|
this.associatedVariableName = "";
|
|
296
294
|
}
|
|
297
295
|
/**
|
|
@@ -307,7 +305,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
307
305
|
return this._systemValue;
|
|
308
306
|
}
|
|
309
307
|
set systemValue(value) {
|
|
310
|
-
this._mode = NodeMaterialBlockConnectionPointMode.Uniform
|
|
308
|
+
this._mode = 0 /* NodeMaterialBlockConnectionPointMode.Uniform */;
|
|
311
309
|
this.associatedVariableName = "";
|
|
312
310
|
this._systemValue = value;
|
|
313
311
|
}
|
|
@@ -448,7 +446,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
448
446
|
state._uniformDeclaration += this._emitDefine(define);
|
|
449
447
|
}
|
|
450
448
|
const shaderType = state._getShaderType(this.type);
|
|
451
|
-
if (state.shaderLanguage === ShaderLanguage.WGSL) {
|
|
449
|
+
if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
452
450
|
state._uniformDeclaration += `uniform ${this._associatedVariableName}: ${shaderType};\n`;
|
|
453
451
|
this._prefix = "uniforms.";
|
|
454
452
|
}
|
|
@@ -485,7 +483,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
485
483
|
if (attributeInFragmentOnly[this.name]) {
|
|
486
484
|
if (attributeAsUniform[this.name]) {
|
|
487
485
|
state._emitUniformFromString(this.associatedVariableName, this.type, define);
|
|
488
|
-
if (state.shaderLanguage === ShaderLanguage.WGSL) {
|
|
486
|
+
if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
489
487
|
this._prefix = `vertexInputs.`;
|
|
490
488
|
}
|
|
491
489
|
}
|
|
@@ -506,14 +504,14 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
506
504
|
if (attributeAsUniform[this.name]) {
|
|
507
505
|
this._prefix = ``;
|
|
508
506
|
state._emitUniformFromString(this.associatedVariableName, this.type, define);
|
|
509
|
-
if (state.shaderLanguage === ShaderLanguage.WGSL) {
|
|
507
|
+
if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
510
508
|
this._prefix = `uniforms.`;
|
|
511
509
|
}
|
|
512
510
|
}
|
|
513
511
|
else {
|
|
514
512
|
this._prefix = ``;
|
|
515
513
|
state._emitVaryingFromString(this.associatedVariableName, this.type, define);
|
|
516
|
-
if (state.shaderLanguage === ShaderLanguage.WGSL) {
|
|
514
|
+
if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
517
515
|
this._prefix = `fragmentInputs.`;
|
|
518
516
|
}
|
|
519
517
|
}
|
|
@@ -522,7 +520,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
522
520
|
if (define) {
|
|
523
521
|
state._attributeDeclaration += this._emitDefine(define);
|
|
524
522
|
}
|
|
525
|
-
if (state.shaderLanguage === ShaderLanguage.WGSL) {
|
|
523
|
+
if (state.shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
526
524
|
this._prefix = ``;
|
|
527
525
|
state._attributeDeclaration += `attribute ${this.associatedVariableName}: ${state._getShaderType(this.type)};\n`;
|
|
528
526
|
this._prefix = `vertexInputs.`;
|
|
@@ -728,7 +726,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
728
726
|
serializationObject.groupInInspector = this.groupInInspector;
|
|
729
727
|
serializationObject.convertToGammaSpace = this.convertToGammaSpace;
|
|
730
728
|
serializationObject.convertToLinearSpace = this.convertToLinearSpace;
|
|
731
|
-
if (this._storedValue != null && this._mode === NodeMaterialBlockConnectionPointMode.Uniform) {
|
|
729
|
+
if (this._storedValue != null && this._mode === 0 /* NodeMaterialBlockConnectionPointMode.Uniform */) {
|
|
732
730
|
if (this._storedValue.asArray) {
|
|
733
731
|
serializationObject.valueType = "BABYLON." + this._storedValue.getClassName();
|
|
734
732
|
serializationObject.value = this._storedValue.asArray();
|
|
@@ -756,7 +754,7 @@ export class InputBlock extends NodeMaterialBlock {
|
|
|
756
754
|
this.convertToLinearSpace = !!serializationObject.convertToLinearSpace;
|
|
757
755
|
// Tangents back compat
|
|
758
756
|
if (serializationObject.name === "tangent" &&
|
|
759
|
-
serializationObject.mode === NodeMaterialBlockConnectionPointMode.Attribute &&
|
|
757
|
+
serializationObject.mode === 1 /* NodeMaterialBlockConnectionPointMode.Attribute */ &&
|
|
760
758
|
serializationObject.type === NodeMaterialBlockConnectionPointTypes.Vector3) {
|
|
761
759
|
this._type = NodeMaterialBlockConnectionPointTypes.Vector4;
|
|
762
760
|
}
|
|
@@ -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;AAC1G,OAAO,EAAE,oCAAoC,EAAE,MAAM,kDAAkD,CAAC;AACxG,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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E,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.associatedVariableName, 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.associatedVariableName, 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.associatedVariableName) !== -1) {\r\n return;\r\n }\r\n\r\n state.attributes.push(this.associatedVariableName);\r\n\r\n if (attributeInFragmentOnly[this.name]) {\r\n if (attributeAsUniform[this.name]) {\r\n this._prefix = ``;\r\n state._emitUniformFromString(this.associatedVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `uniforms.`;\r\n }\r\n } else {\r\n this._prefix = ``;\r\n state._emitVaryingFromString(this.associatedVariableName, 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 this._prefix = ``;\r\n state._attributeDeclaration += `attribute ${this.associatedVariableName}: ${state._getShaderType(this.type)};\\n`;\r\n this._prefix = `vertexInputs.`;\r\n } else {\r\n state._attributeDeclaration += `attribute ${state._getShaderType(this.type)} ${this.associatedVariableName};\\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,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,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,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 \"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.associatedVariableName, 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.associatedVariableName, 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.associatedVariableName) !== -1) {\r\n return;\r\n }\r\n\r\n state.attributes.push(this.associatedVariableName);\r\n\r\n if (attributeInFragmentOnly[this.name]) {\r\n if (attributeAsUniform[this.name]) {\r\n this._prefix = ``;\r\n state._emitUniformFromString(this.associatedVariableName, this.type, define);\r\n if (state.shaderLanguage === ShaderLanguage.WGSL) {\r\n this._prefix = `uniforms.`;\r\n }\r\n } else {\r\n this._prefix = ``;\r\n state._emitVaryingFromString(this.associatedVariableName, 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 this._prefix = ``;\r\n state._attributeDeclaration += `attribute ${this.associatedVariableName}: ${state._getShaderType(this.type)};\\n`;\r\n this._prefix = `vertexInputs.`;\r\n } else {\r\n state._attributeDeclaration += `attribute ${state._getShaderType(this.type)} ${this.associatedVariableName};\\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,6 +1,5 @@
|
|
|
1
1
|
import { NodeMaterialBlock } from "../../nodeMaterialBlock.js";
|
|
2
2
|
import { NodeMaterialBlockConnectionPointTypes } from "../../Enums/nodeMaterialBlockConnectionPointTypes.js";
|
|
3
|
-
import { NodeMaterialConnectionPointDirection } from "../../nodeMaterialBlockConnectionPoint.js";
|
|
4
3
|
import { NodeMaterialBlockTargets } from "../../Enums/nodeMaterialBlockTargets.js";
|
|
5
4
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
6
5
|
import { NodeMaterialConnectionPointCustomObject } from "../../nodeMaterialConnectionPointCustomObject.js";
|
|
@@ -26,9 +25,9 @@ export class PrePassTextureBlock extends NodeMaterialBlock {
|
|
|
26
25
|
*/
|
|
27
26
|
constructor(name, target = NodeMaterialBlockTargets.VertexAndFragment) {
|
|
28
27
|
super(name, target, false);
|
|
29
|
-
this.registerOutput("position", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("position", this, NodeMaterialConnectionPointDirection.Output
|
|
30
|
-
this.registerOutput("depth", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("depth", this, NodeMaterialConnectionPointDirection.Output
|
|
31
|
-
this.registerOutput("normal", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("normal", this, NodeMaterialConnectionPointDirection.Output
|
|
28
|
+
this.registerOutput("position", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("position", this, 1 /* NodeMaterialConnectionPointDirection.Output */, ImageSourceBlock, "ImageSourceBlock"));
|
|
29
|
+
this.registerOutput("depth", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("depth", this, 1 /* NodeMaterialConnectionPointDirection.Output */, ImageSourceBlock, "ImageSourceBlock"));
|
|
30
|
+
this.registerOutput("normal", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("normal", this, 1 /* NodeMaterialConnectionPointDirection.Output */, ImageSourceBlock, "ImageSourceBlock"));
|
|
32
31
|
}
|
|
33
32
|
/**
|
|
34
33
|
* Returns the sampler name associated with the node connection point
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prePassTextureBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Materials/Node/Blocks/Input/prePassTextureBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAE1G,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAG9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,EAAE,uCAAuC,EAAE,MAAM,+CAA+C,CAAC;AACxG,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,iBAAiB;IAKtD;;OAEG;IACH,IAAW,OAAO;QACd,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAW,OAAO,CAAC,KAAU;QACzB,OAAO;IACX,CAAC;IAED;;;;OAIG;IACH,YAAmB,IAAY,EAAE,MAAM,GAAG,wBAAwB,CAAC,iBAAiB;QAChF,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;QAE3B,IAAI,CAAC,cAAc,CACf,UAAU,EACV,qCAAqC,CAAC,MAAM,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OAAO,IAAI,CAAC;IAChB,CAAC;IAEe,IAAI,CAAC,MAAc,EAAE,YAA0B;QAC3D,MAAM,KAAK,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;QACtC,MAAM,eAAe,GAAG,KAAK,CAAC,qBAAqB,EAAE,CAAC;QACtD,IAAI,CAAC,eAAe,EAAE;YAClB,OAAO;SACV;QAED,MAAM,OAAO,GAAG,eAAe,CAAC,SAAS,CAAC;QAC1C,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE;YACnB,OAAO;SACV;QAED,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE;YAC3B,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC,CAAC,CAAC;SACrI;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE;YACxB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAAC;SAC/H;QACD,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE;YACzB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;SACjI;IACL,CAAC;CACJ;AAED,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { NodeMaterialBlock } from \"../../nodeMaterialBlock\";\r\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes\";\r\nimport type { Effect } from \"../../../../Materials/effect\";\r\nimport { NodeMaterialConnectionPointDirection } from \"../../nodeMaterialBlockConnectionPoint\";\r\nimport type { NodeMaterialConnectionPoint } from \"../../nodeMaterialBlockConnectionPoint\";\r\nimport type { NodeMaterialBuildState } from \"../../nodeMaterialBuildState\";\r\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { NodeMaterial } from \"../../nodeMaterial\";\r\nimport { NodeMaterialConnectionPointCustomObject } from \"../../nodeMaterialConnectionPointCustomObject\";\r\nimport { Constants } from \"../../../../Engines/constants\";\r\nimport { ImageSourceBlock } from \"../Dual/imageSourceBlock\";\r\n\r\n/**\r\n * Block used to read from prepass textures\r\n */\r\nexport class PrePassTextureBlock extends NodeMaterialBlock {\r\n private _positionSamplerName: string;\r\n private _depthSamplerName: string;\r\n private _normalSamplerName: string;\r\n\r\n /**\r\n * The texture associated with the node is the prepass texture\r\n */\r\n public get texture() {\r\n return null;\r\n }\r\n\r\n public set texture(value: any) {\r\n return;\r\n }\r\n\r\n /**\r\n * Creates a new PrePassTextureBlock\r\n * @param name defines the block name\r\n * @param target defines the target of that block (VertexAndFragment by default)\r\n */\r\n public constructor(name: string, target = NodeMaterialBlockTargets.VertexAndFragment) {\r\n super(name, target, false);\r\n\r\n this.registerOutput(\r\n \"position\",\r\n NodeMaterialBlockConnectionPointTypes.Object,\r\n NodeMaterialBlockTargets.VertexAndFragment,\r\n new NodeMaterialConnectionPointCustomObject(\"position\", this, NodeMaterialConnectionPointDirection.Output, ImageSourceBlock, \"ImageSourceBlock\")\r\n );\r\n this.registerOutput(\r\n \"depth\",\r\n NodeMaterialBlockConnectionPointTypes.Object,\r\n NodeMaterialBlockTargets.VertexAndFragment,\r\n new NodeMaterialConnectionPointCustomObject(\"depth\", this, NodeMaterialConnectionPointDirection.Output, ImageSourceBlock, \"ImageSourceBlock\")\r\n );\r\n this.registerOutput(\r\n \"normal\",\r\n NodeMaterialBlockConnectionPointTypes.Object,\r\n NodeMaterialBlockTargets.VertexAndFragment,\r\n new NodeMaterialConnectionPointCustomObject(\"normal\", this, NodeMaterialConnectionPointDirection.Output, ImageSourceBlock, \"ImageSourceBlock\")\r\n );\r\n }\r\n\r\n /**\r\n * Returns the sampler name associated with the node connection point\r\n * @param output defines the connection point to get the associated sampler name\r\n * @returns\r\n */\r\n public getSamplerName(output: NodeMaterialConnectionPoint): string {\r\n if (output === this._outputs[0]) {\r\n return this._positionSamplerName;\r\n }\r\n\r\n if (output === this._outputs[1]) {\r\n return this._depthSamplerName;\r\n }\r\n\r\n if (output === this._outputs[2]) {\r\n return this._normalSamplerName;\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Gets the position texture\r\n */\r\n public get position(): NodeMaterialConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture\r\n */\r\n public get depth(): NodeMaterialConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the normal texture\r\n */\r\n public get normal(): NodeMaterialConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n /**\r\n * Gets the sampler name associated with this image source\r\n */\r\n public get positionSamplerName(): string {\r\n return this._positionSamplerName;\r\n }\r\n\r\n /**\r\n * Gets the sampler name associated with this image source\r\n */\r\n public get normalSamplerName(): string {\r\n return this._normalSamplerName;\r\n }\r\n /**\r\n * Gets the sampler name associated with this image source\r\n */\r\n public get depthSamplerName(): string {\r\n return this._depthSamplerName;\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 \"PrePassTextureBlock\";\r\n }\r\n\r\n protected override _buildBlock(state: NodeMaterialBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (state.target === NodeMaterialBlockTargets.Vertex) {\r\n return;\r\n }\r\n\r\n this._positionSamplerName = \"prepassPositionSampler\";\r\n this._depthSamplerName = \"prepassDepthSampler\";\r\n this._normalSamplerName = \"prepassNormalSampler\";\r\n\r\n // Unique sampler names for every prepasstexture block\r\n state.sharedData.variableNames.prepassPositionSampler = 0;\r\n state.sharedData.variableNames.prepassDepthSampler = 0;\r\n state.sharedData.variableNames.prepassNormalSampler = 0;\r\n\r\n // Declarations\r\n state.sharedData.textureBlocks.push(this);\r\n state.sharedData.bindableBlocks.push(this);\r\n\r\n state._emit2DSampler(this._positionSamplerName);\r\n state._emit2DSampler(this._depthSamplerName);\r\n state._emit2DSampler(this._normalSamplerName);\r\n\r\n return this;\r\n }\r\n\r\n public override bind(effect: Effect, nodeMaterial: NodeMaterial) {\r\n const scene = nodeMaterial.getScene();\r\n const prePassRenderer = scene.enablePrePassRenderer();\r\n if (!prePassRenderer) {\r\n return;\r\n }\r\n\r\n const sceneRT = prePassRenderer.defaultRT;\r\n if (!sceneRT.textures) {\r\n return;\r\n }\r\n\r\n if (this.position.isConnected) {\r\n effect.setTexture(this._positionSamplerName, sceneRT.textures[prePassRenderer.getIndex(Constants.PREPASS_POSITION_TEXTURE_TYPE)]);\r\n }\r\n if (this.depth.isConnected) {\r\n effect.setTexture(this._depthSamplerName, sceneRT.textures[prePassRenderer.getIndex(Constants.PREPASS_DEPTH_TEXTURE_TYPE)]);\r\n }\r\n if (this.normal.isConnected) {\r\n effect.setTexture(this._normalSamplerName, sceneRT.textures[prePassRenderer.getIndex(Constants.PREPASS_NORMAL_TEXTURE_TYPE)]);\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.PrePassTextureBlock\", PrePassTextureBlock);\r\n"]}
|
|
1
|
+
{"version":3,"file":"prePassTextureBlock.js","sourceRoot":"","sources":["../../../../../../../dev/core/src/Materials/Node/Blocks/Input/prePassTextureBlock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,qCAAqC,EAAE,MAAM,mDAAmD,CAAC;AAK1G,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO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EAAE;YACzB,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,kBAAkB,EAAE,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC;SACjI;IACL,CAAC;CACJ;AAED,aAAa,CAAC,6BAA6B,EAAE,mBAAmB,CAAC,CAAC","sourcesContent":["import { NodeMaterialBlock } from \"../../nodeMaterialBlock\";\r\nimport { NodeMaterialBlockConnectionPointTypes } from \"../../Enums/nodeMaterialBlockConnectionPointTypes\";\r\nimport type { Effect } from \"../../../../Materials/effect\";\r\nimport { NodeMaterialConnectionPointDirection } from \"../../nodeMaterialBlockConnectionPoint\";\r\nimport type { NodeMaterialConnectionPoint } from \"../../nodeMaterialBlockConnectionPoint\";\r\nimport type { NodeMaterialBuildState } from \"../../nodeMaterialBuildState\";\r\nimport { NodeMaterialBlockTargets } from \"../../Enums/nodeMaterialBlockTargets\";\r\nimport { RegisterClass } from \"../../../../Misc/typeStore\";\r\nimport type { NodeMaterial } from \"../../nodeMaterial\";\r\nimport { NodeMaterialConnectionPointCustomObject } from \"../../nodeMaterialConnectionPointCustomObject\";\r\nimport { Constants } from \"../../../../Engines/constants\";\r\nimport { ImageSourceBlock } from \"../Dual/imageSourceBlock\";\r\n\r\n/**\r\n * Block used to read from prepass textures\r\n */\r\nexport class PrePassTextureBlock extends NodeMaterialBlock {\r\n private _positionSamplerName: string;\r\n private _depthSamplerName: string;\r\n private _normalSamplerName: string;\r\n\r\n /**\r\n * The texture associated with the node is the prepass texture\r\n */\r\n public get texture() {\r\n return null;\r\n }\r\n\r\n public set texture(value: any) {\r\n return;\r\n }\r\n\r\n /**\r\n * Creates a new PrePassTextureBlock\r\n * @param name defines the block name\r\n * @param target defines the target of that block (VertexAndFragment by default)\r\n */\r\n public constructor(name: string, target = NodeMaterialBlockTargets.VertexAndFragment) {\r\n super(name, target, false);\r\n\r\n this.registerOutput(\r\n \"position\",\r\n NodeMaterialBlockConnectionPointTypes.Object,\r\n NodeMaterialBlockTargets.VertexAndFragment,\r\n new NodeMaterialConnectionPointCustomObject(\"position\", this, NodeMaterialConnectionPointDirection.Output, ImageSourceBlock, \"ImageSourceBlock\")\r\n );\r\n this.registerOutput(\r\n \"depth\",\r\n NodeMaterialBlockConnectionPointTypes.Object,\r\n NodeMaterialBlockTargets.VertexAndFragment,\r\n new NodeMaterialConnectionPointCustomObject(\"depth\", this, NodeMaterialConnectionPointDirection.Output, ImageSourceBlock, \"ImageSourceBlock\")\r\n );\r\n this.registerOutput(\r\n \"normal\",\r\n NodeMaterialBlockConnectionPointTypes.Object,\r\n NodeMaterialBlockTargets.VertexAndFragment,\r\n new NodeMaterialConnectionPointCustomObject(\"normal\", this, NodeMaterialConnectionPointDirection.Output, ImageSourceBlock, \"ImageSourceBlock\")\r\n );\r\n }\r\n\r\n /**\r\n * Returns the sampler name associated with the node connection point\r\n * @param output defines the connection point to get the associated sampler name\r\n * @returns\r\n */\r\n public getSamplerName(output: NodeMaterialConnectionPoint): string {\r\n if (output === this._outputs[0]) {\r\n return this._positionSamplerName;\r\n }\r\n\r\n if (output === this._outputs[1]) {\r\n return this._depthSamplerName;\r\n }\r\n\r\n if (output === this._outputs[2]) {\r\n return this._normalSamplerName;\r\n }\r\n\r\n return \"\";\r\n }\r\n\r\n /**\r\n * Gets the position texture\r\n */\r\n public get position(): NodeMaterialConnectionPoint {\r\n return this._outputs[0];\r\n }\r\n\r\n /**\r\n * Gets the depth texture\r\n */\r\n public get depth(): NodeMaterialConnectionPoint {\r\n return this._outputs[1];\r\n }\r\n\r\n /**\r\n * Gets the normal texture\r\n */\r\n public get normal(): NodeMaterialConnectionPoint {\r\n return this._outputs[2];\r\n }\r\n\r\n /**\r\n * Gets the sampler name associated with this image source\r\n */\r\n public get positionSamplerName(): string {\r\n return this._positionSamplerName;\r\n }\r\n\r\n /**\r\n * Gets the sampler name associated with this image source\r\n */\r\n public get normalSamplerName(): string {\r\n return this._normalSamplerName;\r\n }\r\n /**\r\n * Gets the sampler name associated with this image source\r\n */\r\n public get depthSamplerName(): string {\r\n return this._depthSamplerName;\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 \"PrePassTextureBlock\";\r\n }\r\n\r\n protected override _buildBlock(state: NodeMaterialBuildState) {\r\n super._buildBlock(state);\r\n\r\n if (state.target === NodeMaterialBlockTargets.Vertex) {\r\n return;\r\n }\r\n\r\n this._positionSamplerName = \"prepassPositionSampler\";\r\n this._depthSamplerName = \"prepassDepthSampler\";\r\n this._normalSamplerName = \"prepassNormalSampler\";\r\n\r\n // Unique sampler names for every prepasstexture block\r\n state.sharedData.variableNames.prepassPositionSampler = 0;\r\n state.sharedData.variableNames.prepassDepthSampler = 0;\r\n state.sharedData.variableNames.prepassNormalSampler = 0;\r\n\r\n // Declarations\r\n state.sharedData.textureBlocks.push(this);\r\n state.sharedData.bindableBlocks.push(this);\r\n\r\n state._emit2DSampler(this._positionSamplerName);\r\n state._emit2DSampler(this._depthSamplerName);\r\n state._emit2DSampler(this._normalSamplerName);\r\n\r\n return this;\r\n }\r\n\r\n public override bind(effect: Effect, nodeMaterial: NodeMaterial) {\r\n const scene = nodeMaterial.getScene();\r\n const prePassRenderer = scene.enablePrePassRenderer();\r\n if (!prePassRenderer) {\r\n return;\r\n }\r\n\r\n const sceneRT = prePassRenderer.defaultRT;\r\n if (!sceneRT.textures) {\r\n return;\r\n }\r\n\r\n if (this.position.isConnected) {\r\n effect.setTexture(this._positionSamplerName, sceneRT.textures[prePassRenderer.getIndex(Constants.PREPASS_POSITION_TEXTURE_TYPE)]);\r\n }\r\n if (this.depth.isConnected) {\r\n effect.setTexture(this._depthSamplerName, sceneRT.textures[prePassRenderer.getIndex(Constants.PREPASS_DEPTH_TEXTURE_TYPE)]);\r\n }\r\n if (this.normal.isConnected) {\r\n effect.setTexture(this._normalSamplerName, sceneRT.textures[prePassRenderer.getIndex(Constants.PREPASS_NORMAL_TEXTURE_TYPE)]);\r\n }\r\n }\r\n}\r\n\r\nRegisterClass(\"BABYLON.PrePassTextureBlock\", PrePassTextureBlock);\r\n"]}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { NodeMaterialBlock } from "../../nodeMaterialBlock.js";
|
|
2
2
|
import { NodeMaterialBlockConnectionPointTypes } from "../../Enums/nodeMaterialBlockConnectionPointTypes.js";
|
|
3
|
-
import { NodeMaterialConnectionPointDirection } from "../../nodeMaterialBlockConnectionPoint.js";
|
|
4
3
|
import { NodeMaterialBlockTargets } from "../../Enums/nodeMaterialBlockTargets.js";
|
|
5
4
|
import { RegisterClass } from "../../../../Misc/typeStore.js";
|
|
6
5
|
import { NodeMaterialConnectionPointCustomObject } from "../../nodeMaterialConnectionPointCustomObject.js";
|
|
@@ -22,9 +21,9 @@ export class AnisotropyBlock extends NodeMaterialBlock {
|
|
|
22
21
|
this.registerInput("direction", NodeMaterialBlockConnectionPointTypes.Vector2, true, NodeMaterialBlockTargets.Fragment);
|
|
23
22
|
this.registerInput("uv", NodeMaterialBlockConnectionPointTypes.Vector2, true); // need this property and the next one in case there's no PerturbNormal block connected to the main PBR block
|
|
24
23
|
this.registerInput("worldTangent", NodeMaterialBlockConnectionPointTypes.Vector4, true);
|
|
25
|
-
this.registerInput("TBN", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("TBN", this, NodeMaterialConnectionPointDirection.Input
|
|
24
|
+
this.registerInput("TBN", NodeMaterialBlockConnectionPointTypes.Object, true, NodeMaterialBlockTargets.VertexAndFragment, new NodeMaterialConnectionPointCustomObject("TBN", this, 0 /* NodeMaterialConnectionPointDirection.Input */, TBNBlock, "TBNBlock"));
|
|
26
25
|
this.registerInput("roughness", NodeMaterialBlockConnectionPointTypes.Float, true, NodeMaterialBlockTargets.Fragment);
|
|
27
|
-
this.registerOutput("anisotropy", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.Fragment, new NodeMaterialConnectionPointCustomObject("anisotropy", this, NodeMaterialConnectionPointDirection.Output
|
|
26
|
+
this.registerOutput("anisotropy", NodeMaterialBlockConnectionPointTypes.Object, NodeMaterialBlockTargets.Fragment, new NodeMaterialConnectionPointCustomObject("anisotropy", this, 1 /* NodeMaterialConnectionPointDirection.Output */, AnisotropyBlock, "AnisotropyBlock"));
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
30
29
|
* Initialize the block and prepare the context for build
|