@onerjs/core 8.53.5 → 8.53.6
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/animationGroup.d.ts +0 -1
- package/Animations/animationGroup.js +0 -1
- package/Animations/animationGroup.js.map +1 -1
- package/Animations/animationGroup.pure.js +2 -0
- package/Animations/animationGroup.pure.js.map +1 -1
- package/Animations/runtimeAnimation.js +11 -0
- package/Animations/runtimeAnimation.js.map +1 -1
- package/Audio/audioSceneComponent.pure.js +1 -1
- package/AudioV2/abstractAudio/abstractSound.d.ts +2 -1
- package/AudioV2/abstractAudio/abstractSound.js +7 -2
- package/AudioV2/abstractAudio/abstractSound.js.map +1 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.d.ts +3 -1
- package/AudioV2/abstractAudio/abstractSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/staticSound.d.ts +6 -0
- package/AudioV2/abstractAudio/staticSound.js +17 -1
- package/AudioV2/abstractAudio/staticSound.js.map +1 -1
- package/AudioV2/abstractAudio/staticSoundInstance.d.ts +4 -2
- package/AudioV2/abstractAudio/staticSoundInstance.js.map +1 -1
- package/AudioV2/abstractAudio/streamingSound.d.ts +6 -0
- package/AudioV2/abstractAudio/streamingSound.js +9 -1
- package/AudioV2/abstractAudio/streamingSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStaticSound.d.ts +7 -1
- package/AudioV2/webAudio/webAudioStaticSound.js +56 -8
- package/AudioV2/webAudio/webAudioStaticSound.js.map +1 -1
- package/AudioV2/webAudio/webAudioStreamingSound.d.ts +3 -1
- package/AudioV2/webAudio/webAudioStreamingSound.js +16 -4
- package/AudioV2/webAudio/webAudioStreamingSound.js.map +1 -1
- package/BakedVertexAnimation/bakedVertexAnimationManager.d.ts +2 -2
- package/BakedVertexAnimation/bakedVertexAnimationManager.js +151 -121
- package/BakedVertexAnimation/bakedVertexAnimationManager.js.map +1 -1
- package/Behaviors/Cameras/interpolatingBehavior.d.ts +17 -2
- package/Behaviors/Cameras/interpolatingBehavior.js +53 -23
- package/Behaviors/Cameras/interpolatingBehavior.js.map +1 -1
- package/Bones/bone.pure.js +3 -3
- package/Buffers/buffer.pure.js +0 -12
- package/Buffers/buffer.pure.js.map +1 -1
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js +141 -126
- package/Cameras/Inputs/BaseCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/BaseCameraPointersInput.d.ts +2 -1
- package/Cameras/Inputs/BaseCameraPointersInput.js +290 -277
- package/Cameras/Inputs/BaseCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js +115 -102
- package/Cameras/Inputs/arcRotateCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.d.ts +3 -0
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js +334 -273
- package/Cameras/Inputs/arcRotateCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js +273 -258
- package/Cameras/Inputs/arcRotateCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/arcRotateCameraPointersInput.js +237 -213
- package/Cameras/Inputs/arcRotateCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraKeyboardInput.js +199 -168
- package/Cameras/Inputs/flyCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/flyCameraMouseInput.js +243 -229
- package/Cameras/Inputs/flyCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js +311 -266
- package/Cameras/Inputs/followCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/followCameraMouseWheelInput.js +139 -119
- package/Cameras/Inputs/followCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/followCameraPointersInput.js +239 -203
- package/Cameras/Inputs/followCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraGamepadInput.js +127 -114
- package/Cameras/Inputs/freeCameraGamepadInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js +278 -244
- package/Cameras/Inputs/freeCameraKeyboardMoveInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseInput.js +216 -202
- package/Cameras/Inputs/freeCameraMouseInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraMouseWheelInput.js +368 -353
- package/Cameras/Inputs/freeCameraMouseWheelInput.js.map +1 -1
- package/Cameras/Inputs/freeCameraTouchInput.js +185 -172
- package/Cameras/Inputs/freeCameraTouchInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraKeyboardInput.d.ts +2 -0
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js +291 -246
- package/Cameras/Inputs/geospatialCameraKeyboardInput.js.map +1 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.d.ts +11 -1
- package/Cameras/Inputs/geospatialCameraPointersInput.js +18 -2
- package/Cameras/Inputs/geospatialCameraPointersInput.js.map +1 -1
- package/Cameras/Inputs/orbitCameraPointersInput.js +112 -96
- package/Cameras/Inputs/orbitCameraPointersInput.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.d.ts +0 -2
- package/Cameras/VR/vrExperienceHelper.js +0 -2
- package/Cameras/VR/vrExperienceHelper.js.map +1 -1
- package/Cameras/VR/vrExperienceHelper.pure.js +5 -0
- package/Cameras/VR/vrExperienceHelper.pure.js.map +1 -1
- package/Cameras/arcRotateCamera.pure.js +1559 -1479
- package/Cameras/arcRotateCamera.pure.js.map +1 -1
- package/Cameras/camera.pure.js +1225 -1178
- package/Cameras/camera.pure.js.map +1 -1
- package/Cameras/flyCamera.pure.js +369 -351
- package/Cameras/flyCamera.pure.js.map +1 -1
- package/Cameras/followCamera.pure.js +229 -192
- package/Cameras/followCamera.pure.js.map +1 -1
- package/Cameras/freeCamera.pure.js +373 -351
- package/Cameras/freeCamera.pure.js.map +1 -1
- package/Cameras/geospatialCamera.pure.d.ts +30 -7
- package/Cameras/geospatialCamera.pure.js +502 -457
- package/Cameras/geospatialCamera.pure.js.map +1 -1
- package/Cameras/geospatialCameraMovement.js +2 -2
- package/Cameras/geospatialCameraMovement.js.map +1 -1
- package/Cameras/targetCamera.pure.d.ts +7 -0
- package/Cameras/targetCamera.pure.js +550 -509
- package/Cameras/targetCamera.pure.js.map +1 -1
- package/Cameras/universalCamera.pure.js +98 -85
- package/Cameras/universalCamera.pure.js.map +1 -1
- package/Collisions/gpuPicker.d.ts +111 -4
- package/Collisions/gpuPicker.js +696 -119
- package/Collisions/gpuPicker.js.map +1 -1
- package/Compute/computeShader.pure.js +372 -355
- package/Compute/computeShader.pure.js.map +1 -1
- package/Culling/Helper/transformFeedbackBoundingHelper.pure.js +2 -2
- package/Decorators/nodeDecorator.d.ts +11 -1
- package/Decorators/nodeDecorator.js +43 -6
- package/Decorators/nodeDecorator.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js +8 -0
- package/Engines/AbstractEngine/abstractEngine.loadFile.pure.js.map +1 -1
- package/Engines/Native/nativeHelpers.js +15 -0
- package/Engines/Native/nativeHelpers.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +7 -2
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +5 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +35 -1
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderProcessor.js +5 -3
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js +16 -3
- package/Engines/WebGPU/Extensions/engine.videoTexture.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js +7 -1
- package/Engines/WebGPU/webgpuClearQuad.pure.js.map +1 -1
- package/Engines/abstractEngine.functions.d.ts +8 -2
- package/Engines/abstractEngine.functions.js +12 -4
- package/Engines/abstractEngine.functions.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +20 -1
- package/Engines/abstractEngine.pure.js +21 -134
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.d.ts +208 -0
- package/Engines/engine.pure.js +0 -15
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nullEngine.pure.d.ts +66 -0
- package/Engines/nullEngine.pure.js +97 -0
- package/Engines/nullEngine.pure.js.map +1 -1
- package/Engines/thinEngine.pure.d.ts +0 -13
- package/Engines/thinEngine.pure.js +4 -23
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.d.ts +0 -1
- package/Engines/thinNativeEngine.js +0 -1
- package/Engines/thinNativeEngine.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +27 -0
- package/Engines/thinNativeEngine.pure.js +383 -17
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.d.ts +1 -0
- package/Engines/webgpuEngine.js +1 -0
- package/Engines/webgpuEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +9 -0
- package/Engines/webgpuEngine.pure.js +7 -0
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/flowGraph.js +9 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphContext.js +597 -584
- package/FlowGraph/flowGraphContext.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.pure.d.ts +14 -0
- package/FlowGraph/flowGraphDataConnection.pure.js +38 -1
- package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +11 -0
- package/FlowGraph/serialization.js +11 -1
- package/FlowGraph/serialization.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js +182 -170
- package/FrameGraph/Node/Blocks/Layers/glowLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js +196 -184
- package/FrameGraph/Node/Blocks/Layers/highlightLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js +222 -210
- package/FrameGraph/Node/Blocks/Layers/selectionOutlineLayerBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js +123 -111
- package/FrameGraph/Node/Blocks/PostProcesses/basePostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js +158 -146
- package/FrameGraph/Node/Blocks/PostProcesses/baseWithPropertiesPostProcessBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/blackAndWhitePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js +122 -110
- package/FrameGraph/Node/Blocks/PostProcesses/bloomPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/blurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js +89 -77
- package/FrameGraph/Node/Blocks/PostProcesses/chromaticAberrationPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js +134 -122
- package/FrameGraph/Node/Blocks/PostProcesses/circleOfConfusionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js +58 -46
- package/FrameGraph/Node/Blocks/PostProcesses/colorCorrectionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js +107 -95
- package/FrameGraph/Node/Blocks/PostProcesses/convolutionPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js +181 -169
- package/FrameGraph/Node/Blocks/PostProcesses/depthOfFieldPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/extractHighlightsPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js +63 -51
- package/FrameGraph/Node/Blocks/PostProcesses/filterPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/grainPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js +246 -234
- package/FrameGraph/Node/Blocks/PostProcesses/imageProcessingPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js +108 -96
- package/FrameGraph/Node/Blocks/PostProcesses/motionBlurPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/PostProcesses/screenSpaceCurvaturePostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js +76 -64
- package/FrameGraph/Node/Blocks/PostProcesses/sharpenPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js +313 -301
- package/FrameGraph/Node/Blocks/PostProcesses/ssao2PostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js +502 -490
- package/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js +147 -135
- package/FrameGraph/Node/Blocks/PostProcesses/taaPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js +90 -78
- package/FrameGraph/Node/Blocks/PostProcesses/tonemapPostProcessBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js +179 -167
- package/FrameGraph/Node/Blocks/PostProcesses/volumetricLightingBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js +462 -451
- package/FrameGraph/Node/Blocks/Rendering/baseObjectRendererBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js +265 -253
- package/FrameGraph/Node/Blocks/Rendering/baseShadowGeneratorBlock.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js +204 -192
- package/FrameGraph/Node/Blocks/Rendering/csmShadowGeneratorBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js +611 -550
- package/FrameGraph/Node/Blocks/Rendering/geometryRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js +320 -308
- package/FrameGraph/Node/Blocks/Rendering/iblShadowsRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js +87 -75
- package/FrameGraph/Node/Blocks/Rendering/utilityLayerRendererBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js +154 -142
- package/FrameGraph/Node/Blocks/Textures/clearBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js +150 -138
- package/FrameGraph/Node/Blocks/Textures/copyTextureBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/inputBlock.pure.js +270 -256
- package/FrameGraph/Node/Blocks/inputBlock.pure.js.map +1 -1
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js +95 -83
- package/FrameGraph/Node/Blocks/lightingVolumeBlock.pure.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraph.js +715 -693
- package/FrameGraph/Node/nodeRenderGraph.js.map +1 -1
- package/FrameGraph/Node/nodeRenderGraphBlock.js +548 -533
- package/FrameGraph/Node/nodeRenderGraphBlock.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.d.ts +2 -2
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js +43 -51
- package/FrameGraph/Tasks/Rendering/iblShadows/iblShadowsAccumulationTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.js.map +1 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.d.ts +0 -1
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js +66 -35
- package/FrameGraph/Tasks/Rendering/iblShadowsRendererTask.pure.js.map +1 -1
- package/Helpers/environmentHelper.js +2 -2
- package/Helpers/environmentHelper.js.map +1 -1
- package/Layers/effectLayer.js +529 -519
- package/Layers/effectLayer.js.map +1 -1
- package/Layers/glowLayer.pure.js +428 -413
- package/Layers/glowLayer.pure.js.map +1 -1
- package/Layers/highlightLayer.pure.js +473 -458
- package/Layers/highlightLayer.pure.js.map +1 -1
- package/Layers/selectionOutlineLayer.pure.js +360 -345
- package/Layers/selectionOutlineLayer.pure.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.d.ts +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.js +583 -558
- package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
- package/Lights/Shadows/shadowGenerator.js +6 -1
- package/Lights/Shadows/shadowGenerator.js.map +1 -1
- package/Lights/areaLight.pure.js +61 -39
- package/Lights/areaLight.pure.js.map +1 -1
- package/Lights/directionalLight.pure.js +308 -284
- package/Lights/directionalLight.pure.js.map +1 -1
- package/Lights/hemisphericLight.pure.js +123 -104
- package/Lights/hemisphericLight.pure.js.map +1 -1
- package/Lights/light.d.ts +5 -3
- package/Lights/light.js +869 -827
- package/Lights/light.js.map +1 -1
- package/Lights/pointLight.pure.js +185 -174
- package/Lights/pointLight.pure.js.map +1 -1
- package/Lights/rectAreaLight.pure.d.ts +17 -0
- package/Lights/rectAreaLight.pure.js +238 -159
- package/Lights/rectAreaLight.pure.js.map +1 -1
- package/Lights/shadowLight.js +280 -268
- package/Lights/shadowLight.js.map +1 -1
- package/Lights/spotLight.pure.js +460 -427
- package/Lights/spotLight.pure.js.map +1 -1
- package/Loading/Plugins/babylonFileLoader.pure.js +17 -5
- package/Loading/Plugins/babylonFileLoader.pure.js.map +1 -1
- package/Loading/sceneLoader.d.ts +5 -1
- package/Loading/sceneLoader.js +299 -402
- package/Loading/sceneLoader.js.map +1 -1
- package/Materials/Background/backgroundMaterial.pure.d.ts +18 -18
- package/Materials/Background/backgroundMaterial.pure.js +949 -794
- package/Materials/Background/backgroundMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.d.ts +15 -0
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js +34 -1
- package/Materials/GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.d.ts +9 -0
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +26 -2
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.d.ts +2 -1
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js +169 -149
- package/Materials/GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/imageSourceBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js +442 -429
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js +396 -383
- package/Materials/Node/Blocks/Dual/reflectionTextureBaseBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js +237 -220
- package/Materials/Node/Blocks/Dual/sceneDepthBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/textureBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js +150 -133
- package/Materials/Node/Blocks/Fragment/ambientOcclusionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js +265 -250
- package/Materials/Node/Blocks/Fragment/fragmentOutputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js +159 -142
- package/Materials/Node/Blocks/Fragment/heightToNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js +214 -201
- package/Materials/Node/Blocks/Fragment/imageProcessingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js +419 -400
- package/Materials/Node/Blocks/Fragment/perturbNormalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js +3 -1
- package/Materials/Node/Blocks/GaussianSplatting/gaussianSplattingBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js +302 -289
- package/Materials/Node/Blocks/PBR/clearCoatBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +1327 -1272
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js +352 -337
- package/Materials/Node/Blocks/PBR/reflectionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js +297 -277
- package/Materials/Node/Blocks/PBR/refractionBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js +146 -131
- package/Materials/Node/Blocks/PBR/sheenBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js +158 -145
- package/Materials/Node/Blocks/PBR/subSurfaceBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/clampBlock.pure.js +92 -77
- package/Materials/Node/Blocks/clampBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/cloudBlock.pure.js +145 -132
- package/Materials/Node/Blocks/cloudBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/conditionalBlock.pure.js +182 -169
- package/Materials/Node/Blocks/conditionalBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/curveBlock.pure.js +259 -246
- package/Materials/Node/Blocks/curveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/debugBlock.pure.js +119 -106
- package/Materials/Node/Blocks/debugBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/loopBlock.pure.js +123 -110
- package/Materials/Node/Blocks/loopBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js +185 -172
- package/Materials/Node/Blocks/meshAttributeExistsBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/remapBlock.pure.js +127 -112
- package/Materials/Node/Blocks/remapBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/transformBlock.pure.js +196 -185
- package/Materials/Node/Blocks/transformBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/triPlanarBlock.pure.js +451 -438
- package/Materials/Node/Blocks/triPlanarBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/trigonometryBlock.pure.js +184 -171
- package/Materials/Node/Blocks/trigonometryBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/waveBlock.pure.js +97 -84
- package/Materials/Node/Blocks/waveBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js +276 -263
- package/Materials/Node/Blocks/worleyNoise3DBlock.pure.js.map +1 -1
- package/Materials/Node/nodeMaterial.pure.js +1765 -1737
- package/Materials/Node/nodeMaterial.pure.js.map +1 -1
- package/Materials/Node/nodeMaterialBuildState.d.ts +3 -3
- package/Materials/PBR/openpbrMaterial.pure.d.ts +102 -102
- package/Materials/PBR/openpbrMaterial.pure.js +3115 -2243
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrAnisotropicConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrAnisotropicConfiguration.js +255 -227
- package/Materials/PBR/pbrAnisotropicConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBRDFConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrBRDFConfiguration.js +203 -155
- package/Materials/PBR/pbrBRDFConfiguration.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js +1751 -1736
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +13 -13
- package/Materials/PBR/pbrBaseSimpleMaterial.js +205 -117
- package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
- package/Materials/PBR/pbrClearCoatConfiguration.d.ts +9 -9
- package/Materials/PBR/pbrClearCoatConfiguration.js +464 -406
- package/Materials/PBR/pbrClearCoatConfiguration.js.map +1 -1
- package/Materials/PBR/pbrIridescenceConfiguration.d.ts +3 -3
- package/Materials/PBR/pbrIridescenceConfiguration.js +271 -239
- package/Materials/PBR/pbrIridescenceConfiguration.js.map +1 -1
- package/Materials/PBR/pbrMaterial.pure.d.ts +66 -66
- package/Materials/PBR/pbrMaterial.pure.js +1041 -685
- package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js +176 -115
- package/Materials/PBR/pbrMetallicRoughnessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSheenConfiguration.d.ts +7 -7
- package/Materials/PBR/pbrSheenConfiguration.js +314 -270
- package/Materials/PBR/pbrSheenConfiguration.js.map +1 -1
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.d.ts +5 -5
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js +172 -117
- package/Materials/PBR/pbrSpecularGlossinessMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrSubSurfaceConfiguration.d.ts +16 -16
- package/Materials/PBR/pbrSubSurfaceConfiguration.js +864 -764
- package/Materials/PBR/pbrSubSurfaceConfiguration.js.map +1 -1
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +43 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +64 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -0
- package/Materials/Textures/HTML/htmlInteractionManager.d.ts +69 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js +130 -0
- package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.d.ts +84 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js +246 -0
- package/Materials/Textures/HTML/htmlRaycastInteractionManager.js.map +1 -0
- package/Materials/Textures/HTML/htmlTexture.d.ts +148 -0
- package/Materials/Textures/HTML/htmlTexture.js +455 -0
- package/Materials/Textures/HTML/htmlTexture.js.map +1 -0
- package/Materials/Textures/HTML/index.d.ts +4 -0
- package/Materials/Textures/HTML/index.js +5 -0
- package/Materials/Textures/HTML/index.js.map +1 -0
- package/Materials/Textures/HTML/pure.d.ts +5 -0
- package/Materials/Textures/HTML/pure.js +6 -0
- package/Materials/Textures/HTML/pure.js.map +1 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +671 -643
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/baseTexture.pure.js +880 -825
- package/Materials/Textures/baseTexture.pure.js.map +1 -1
- package/Materials/Textures/cubeTexture.d.ts +0 -1
- package/Materials/Textures/cubeTexture.js +0 -1
- package/Materials/Textures/cubeTexture.js.map +1 -1
- package/Materials/Textures/cubeTexture.pure.js +368 -333
- package/Materials/Textures/cubeTexture.pure.js.map +1 -1
- package/Materials/Textures/dynamicTexture.d.ts +0 -1
- package/Materials/Textures/dynamicTexture.js +0 -1
- package/Materials/Textures/dynamicTexture.js.map +1 -1
- package/Materials/Textures/dynamicTexture.pure.js +2 -0
- package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.d.ts +0 -2
- package/Materials/Textures/htmlElementTexture.js +0 -2
- package/Materials/Textures/htmlElementTexture.js.map +1 -1
- package/Materials/Textures/htmlElementTexture.pure.js +4 -0
- package/Materials/Textures/htmlElementTexture.pure.js.map +1 -1
- package/Materials/Textures/index.d.ts +1 -0
- package/Materials/Textures/index.js +1 -1
- package/Materials/Textures/index.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.d.ts +0 -1
- package/Materials/Textures/multiRenderTarget.js +0 -1
- package/Materials/Textures/multiRenderTarget.js.map +1 -1
- package/Materials/Textures/multiRenderTarget.pure.js +2 -0
- package/Materials/Textures/multiRenderTarget.pure.js.map +1 -1
- package/Materials/Textures/pure.d.ts +1 -0
- package/Materials/Textures/pure.js +1 -0
- package/Materials/Textures/pure.js.map +1 -1
- package/Materials/Textures/texture.pure.js +961 -923
- package/Materials/Textures/texture.pure.js.map +1 -1
- package/Materials/Textures/videoTexture.pure.d.ts +3 -0
- package/Materials/Textures/videoTexture.pure.js +450 -401
- package/Materials/Textures/videoTexture.pure.js.map +1 -1
- package/Materials/colorCurves.pure.js +510 -477
- package/Materials/colorCurves.pure.js.map +1 -1
- package/Materials/effect.pure.js +0 -7
- package/Materials/effect.pure.js.map +1 -1
- package/Materials/imageProcessing.js +12 -4
- package/Materials/imageProcessing.js.map +1 -1
- package/Materials/imageProcessingConfiguration.pure.js +647 -587
- package/Materials/imageProcessingConfiguration.pure.js.map +1 -1
- package/Materials/material.decalMapConfiguration.pure.d.ts +2 -2
- package/Materials/material.decalMapConfiguration.pure.js +149 -130
- package/Materials/material.decalMapConfiguration.pure.js.map +1 -1
- package/Materials/material.detailMapConfiguration.d.ts +3 -3
- package/Materials/material.detailMapConfiguration.js +213 -175
- package/Materials/material.detailMapConfiguration.js.map +1 -1
- package/Materials/material.pure.js +1815 -1721
- package/Materials/material.pure.js.map +1 -1
- package/Materials/materialPluginBase.pure.js +270 -249
- package/Materials/materialPluginBase.pure.js.map +1 -1
- package/Materials/materialPluginManager.pure.js +18 -8
- package/Materials/materialPluginManager.pure.js.map +1 -1
- package/Materials/materialStencilState.js +211 -200
- package/Materials/materialStencilState.js.map +1 -1
- package/Materials/meshDebugPluginMaterial.pure.d.ts +2 -2
- package/Materials/meshDebugPluginMaterial.pure.js +397 -275
- package/Materials/meshDebugPluginMaterial.pure.js.map +1 -1
- package/Materials/standardMaterial.pure.d.ts +32 -32
- package/Materials/standardMaterial.pure.js +1804 -1394
- package/Materials/standardMaterial.pure.js.map +1 -1
- package/Maths/math.color.pure.js +5 -5
- package/Maths/math.functions.js +38 -30
- package/Maths/math.functions.js.map +1 -1
- package/Maths/math.vector.pure.js +25 -25
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +18 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +86 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +255 -104
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.d.ts +39 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js +322 -0
- package/Meshes/GaussianSplatting/gaussianSplattingSortWorker.js.map +1 -0
- package/Meshes/GreasedLine/greasedLineMesh.pure.js +4 -4
- package/Meshes/GreasedLine/greasedLineRibbonMesh.pure.js +3 -3
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js +107 -94
- package/Meshes/Node/Blocks/Instances/instantiateBaseBlock.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js +276 -263
- package/Meshes/Node/Blocks/Instances/instantiateOnFacesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js +247 -232
- package/Meshes/Node/Blocks/Instances/instantiateOnVerticesBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js +299 -284
- package/Meshes/Node/Blocks/Instances/instantiateOnVolumeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js +196 -181
- package/Meshes/Node/Blocks/Set/aggregatorBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js +198 -179
- package/Meshes/Node/Blocks/Set/latticeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js +151 -138
- package/Meshes/Node/Blocks/Set/setColorsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js +107 -94
- package/Meshes/Node/Blocks/Set/setMaterialIDBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setNormalsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js +213 -200
- package/Meshes/Node/Blocks/Set/setPositionsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js +138 -125
- package/Meshes/Node/Blocks/Set/setTangentsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js +179 -164
- package/Meshes/Node/Blocks/Set/setUVsBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js +183 -170
- package/Meshes/Node/Blocks/Sources/boxBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js +125 -112
- package/Meshes/Node/Blocks/Sources/capsuleBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js +153 -140
- package/Meshes/Node/Blocks/Sources/cylinderBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/discBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js +133 -120
- package/Meshes/Node/Blocks/Sources/gridBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js +128 -115
- package/Meshes/Node/Blocks/Sources/icoSphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js +116 -103
- package/Meshes/Node/Blocks/Sources/meshBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js +160 -147
- package/Meshes/Node/Blocks/Sources/planeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js +144 -131
- package/Meshes/Node/Blocks/Sources/sphereBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js +112 -99
- package/Meshes/Node/Blocks/Sources/torusBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js +200 -185
- package/Meshes/Node/Blocks/Textures/geometryTextureFetchBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/bevelBlock.pure.js +111 -98
- package/Meshes/Node/Blocks/bevelBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js +182 -165
- package/Meshes/Node/Blocks/booleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js +89 -76
- package/Meshes/Node/Blocks/cleanGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/conditionBlock.pure.js +184 -169
- package/Meshes/Node/Blocks/conditionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js +270 -255
- package/Meshes/Node/Blocks/extrudeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js +172 -159
- package/Meshes/Node/Blocks/geometryCollectionBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js +230 -217
- package/Meshes/Node/Blocks/geometryCurveBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js +256 -245
- package/Meshes/Node/Blocks/geometryEaseBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js +206 -189
- package/Meshes/Node/Blocks/geometryOptimizeBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js +166 -153
- package/Meshes/Node/Blocks/geometryTransformBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js +221 -208
- package/Meshes/Node/Blocks/geometryTrigonometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mappingBlock.pure.js +150 -137
- package/Meshes/Node/Blocks/mappingBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mathBlock.pure.js +269 -256
- package/Meshes/Node/Blocks/mathBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js +141 -128
- package/Meshes/Node/Blocks/mergeGeometryBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/randomBlock.pure.js +161 -148
- package/Meshes/Node/Blocks/randomBlock.pure.js.map +1 -1
- package/Meshes/Node/Blocks/subdivideBlock.pure.js +102 -87
- package/Meshes/Node/Blocks/subdivideBlock.pure.js.map +1 -1
- package/Meshes/Node/nodeGeometry.js +560 -538
- package/Meshes/Node/nodeGeometry.js.map +1 -1
- package/Meshes/Node/nodeGeometryBlock.js +473 -458
- package/Meshes/Node/nodeGeometryBlock.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +2218 -2207
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/geometry.js +30 -15
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/mesh.pure.js +26 -14
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/mesh.vertexData.js +1665 -1655
- package/Meshes/mesh.vertexData.js.map +1 -1
- package/Meshes/transformNode.pure.js +1400 -1372
- package/Meshes/transformNode.pure.js.map +1 -1
- package/Misc/decorators.d.ts +34 -19
- package/Misc/decorators.functions.d.ts +33 -2
- package/Misc/decorators.functions.js +114 -35
- package/Misc/decorators.functions.js.map +1 -1
- package/Misc/decorators.js +96 -68
- package/Misc/decorators.js.map +1 -1
- package/Misc/decorators.serialization.js +47 -40
- package/Misc/decorators.serialization.js.map +1 -1
- package/Misc/decorators.serializationUtilities.d.ts +24 -0
- package/Misc/decorators.serializationUtilities.js +20 -0
- package/Misc/decorators.serializationUtilities.js.map +1 -0
- package/Misc/dumpTools.pure.js +43 -33
- package/Misc/dumpTools.pure.js.map +1 -1
- package/Misc/fileTools.pure.js +8 -0
- package/Misc/fileTools.pure.js.map +1 -1
- package/Misc/observable.pure.js +0 -7
- package/Misc/observable.pure.js.map +1 -1
- package/Misc/snapshotRenderingHelper.d.ts +4 -1
- package/Misc/snapshotRenderingHelper.js.map +1 -1
- package/Misc/symbolMetadataPolyfill.d.ts +11 -0
- package/Misc/symbolMetadataPolyfill.js +22 -0
- package/Misc/symbolMetadataPolyfill.js.map +1 -0
- package/Misc/tools.pure.js +2 -2
- package/Misc/tools.pure.js.map +1 -1
- package/Morph/morphTarget.js +382 -365
- package/Morph/morphTarget.js.map +1 -1
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js +160 -145
- package/Particles/Node/Blocks/Conditions/particleConditionBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js +187 -174
- package/Particles/Node/Blocks/Emitters/coneShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js +238 -219
- package/Particles/Node/Blocks/Emitters/meshShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js +140 -115
- package/Particles/Node/Blocks/Emitters/setupSpriteSheetBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js +157 -144
- package/Particles/Node/Blocks/Emitters/sphereShapeBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js +133 -119
- package/Particles/Node/Blocks/Triggers/particleTriggerBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js +93 -80
- package/Particles/Node/Blocks/Update/alignAngleBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleDebugBlock.pure.js +117 -105
- package/Particles/Node/Blocks/particleDebugBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js +105 -92
- package/Particles/Node/Blocks/particleFloatToIntBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js +82 -69
- package/Particles/Node/Blocks/particleGradientValueBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js +113 -101
- package/Particles/Node/Blocks/particleLocalVariableBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleMathBlock.pure.js +278 -265
- package/Particles/Node/Blocks/particleMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js +155 -142
- package/Particles/Node/Blocks/particleNumberMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleRandomBlock.pure.js +156 -143
- package/Particles/Node/Blocks/particleRandomBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js +217 -204
- package/Particles/Node/Blocks/particleTrigonometryBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js +106 -93
- package/Particles/Node/Blocks/particleVectorMathBlock.pure.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.js +366 -330
- package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
- package/Particles/Node/nodeParticleBlock.js +339 -324
- package/Particles/Node/nodeParticleBlock.js.map +1 -1
- package/Particles/Node/nodeParticleSystemSet.js +494 -473
- package/Particles/Node/nodeParticleSystemSet.js.map +1 -1
- package/Particles/gpuParticleSystem.d.ts +0 -1
- package/Particles/gpuParticleSystem.js +0 -1
- package/Particles/gpuParticleSystem.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +4 -3
- package/Particles/gpuParticleSystem.pure.js +27 -16
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/particleSystem.pure.js +57 -2
- package/Particles/particleSystem.pure.js.map +1 -1
- package/Particles/thinParticleSystem.d.ts +0 -1
- package/Particles/thinParticleSystem.js +0 -1
- package/Particles/thinParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.pure.js +2 -0
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/Particles/webgl2ParticleSystem.pure.js +2 -0
- package/Particles/webgl2ParticleSystem.pure.js.map +1 -1
- package/Physics/v1/physicsImpostor.pure.js +4 -4
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js +675 -656
- package/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js +521 -486
- package/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.d.ts +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js +0 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js +241 -220
- package/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js +852 -835
- package/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js +1135 -1073
- package/PostProcesses/RenderPipeline/Pipelines/standardRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js +319 -303
- package/PostProcesses/RenderPipeline/Pipelines/taaRenderingPipeline.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js +212 -199
- package/PostProcesses/RenderPipeline/postProcessRenderPipeline.js.map +1 -1
- package/PostProcesses/blackAndWhitePostProcess.pure.js +67 -55
- package/PostProcesses/blackAndWhitePostProcess.pure.js.map +1 -1
- package/PostProcesses/bloomMergePostProcess.pure.js +74 -62
- package/PostProcesses/bloomMergePostProcess.pure.js.map +1 -1
- package/PostProcesses/blurPostProcess.pure.js +127 -115
- package/PostProcesses/blurPostProcess.pure.js.map +1 -1
- package/PostProcesses/chromaticAberrationPostProcess.pure.js +130 -118
- package/PostProcesses/chromaticAberrationPostProcess.pure.js.map +1 -1
- package/PostProcesses/circleOfConfusionPostProcess.pure.js +115 -104
- package/PostProcesses/circleOfConfusionPostProcess.pure.js.map +1 -1
- package/PostProcesses/colorCorrectionPostProcess.pure.js +55 -43
- package/PostProcesses/colorCorrectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/convolutionPostProcess.pure.js +96 -84
- package/PostProcesses/convolutionPostProcess.pure.js.map +1 -1
- package/PostProcesses/extractHighlightsPostProcess.pure.js +68 -57
- package/PostProcesses/extractHighlightsPostProcess.pure.js.map +1 -1
- package/PostProcesses/filterPostProcess.pure.js +66 -54
- package/PostProcesses/filterPostProcess.pure.js.map +1 -1
- package/PostProcesses/fxaaPostProcess.pure.js.map +1 -1
- package/PostProcesses/grainPostProcess.pure.js +82 -70
- package/PostProcesses/grainPostProcess.pure.js.map +1 -1
- package/PostProcesses/imageProcessingPostProcess.js +334 -322
- package/PostProcesses/imageProcessingPostProcess.js.map +1 -1
- package/PostProcesses/motionBlurPostProcess.pure.js +246 -235
- package/PostProcesses/motionBlurPostProcess.pure.js.map +1 -1
- package/PostProcesses/passPostProcess.pure.js +75 -63
- package/PostProcesses/passPostProcess.pure.js.map +1 -1
- package/PostProcesses/postProcess.pure.js +899 -835
- package/PostProcesses/postProcess.pure.js.map +1 -1
- package/PostProcesses/refractionPostProcess.pure.js +114 -87
- package/PostProcesses/refractionPostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js +108 -96
- package/PostProcesses/screenSpaceCurvaturePostProcess.pure.js.map +1 -1
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js +241 -220
- package/PostProcesses/screenSpaceReflectionPostProcess.pure.js.map +1 -1
- package/PostProcesses/sharpenPostProcess.pure.js +86 -74
- package/PostProcesses/sharpenPostProcess.pure.js.map +1 -1
- package/PostProcesses/tonemapPostProcess.pure.js +82 -70
- package/PostProcesses/tonemapPostProcess.pure.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +500 -465
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.d.ts +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js +0 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.js.map +1 -1
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js +2 -0
- package/PostProcesses/vrMultiviewToSingleviewPostProcess.pure.js.map +1 -1
- package/Probes/reflectionProbe.pure.js +238 -224
- package/Probes/reflectionProbe.pure.js.map +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.d.ts +1 -1
- package/Rendering/GlobalIllumination/giRSMManager.pure.js +138 -105
- package/Rendering/GlobalIllumination/giRSMManager.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.d.ts +1 -1
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js +155 -138
- package/Rendering/IBLShadows/iblShadowsPluginMaterial.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.d.ts +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js +0 -2
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js +5 -0
- package/Rendering/IBLShadows/iblShadowsRenderPipeline.pure.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.d.ts +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js +0 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.js.map +1 -1
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.d.ts +1 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js +34 -0
- package/Rendering/IBLShadows/iblShadowsVoxelRenderer.pure.js.map +1 -1
- package/Rendering/edgesRenderer.pure.js.map +1 -1
- package/Rendering/prePassRenderer.d.ts +0 -2
- package/Rendering/prePassRenderer.js +0 -2
- package/Rendering/prePassRenderer.js.map +1 -1
- package/Rendering/prePassRenderer.pure.js +2 -0
- package/Rendering/prePassRenderer.pure.js.map +1 -1
- package/Rendering/reflectiveShadowMap.pure.d.ts +1 -1
- package/Rendering/reflectiveShadowMap.pure.js +151 -130
- package/Rendering/reflectiveShadowMap.pure.js.map +1 -1
- package/Rendering/thinDepthPeelingRenderer.d.ts +0 -1
- package/Rendering/thinDepthPeelingRenderer.js +0 -1
- package/Rendering/thinDepthPeelingRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +1 -0
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js +35 -5
- package/Shaders/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/Shaders/gaussianSplatting.fragment.js +17 -1
- package/Shaders/gaussianSplatting.fragment.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +1 -1
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js +1 -1
- package/Shaders/gaussianSplattingDepth.vertex.js.map +1 -1
- package/Shaders/picking.fragment.js +39 -3
- package/Shaders/picking.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +3 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js +39 -7
- package/ShadersWGSL/ShadersInclude/openpbrEnvironmentLighting.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js +4 -3
- package/ShadersWGSL/ShadersInclude/openpbrIblFunctions.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js +14 -1
- package/ShadersWGSL/gaussianSplatting.fragment.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js +2 -2
- package/ShadersWGSL/gaussianSplattingDepth.vertex.js.map +1 -1
- package/ShadersWGSL/lightingVolume.compute.js +2 -2
- package/ShadersWGSL/lightingVolume.compute.js.map +1 -1
- package/ShadersWGSL/picking.fragment.js +22 -1
- package/ShadersWGSL/picking.fragment.js.map +1 -1
- package/XR/features/Layers/WebXRCompositionLayer.d.ts +3 -2
- package/XR/features/Layers/WebXRCompositionLayer.js +2 -2
- package/XR/features/Layers/WebXRCompositionLayer.js.map +1 -1
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.d.ts +59 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js +120 -0
- package/XR/features/Layers/WebXRWebGPUCompositionLayer.js.map +1 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.d.ts +25 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js +69 -0
- package/XR/features/Layers/WebXRWebGPUProjectionLayer.js.map +1 -0
- package/XR/features/WebXRLayers.pure.d.ts +8 -0
- package/XR/features/WebXRLayers.pure.js +43 -6
- package/XR/features/WebXRLayers.pure.js.map +1 -1
- package/XR/native/nativeXRRenderTarget.d.ts +2 -2
- package/XR/native/nativeXRRenderTarget.js +2 -2
- package/XR/native/nativeXRRenderTarget.js.map +1 -1
- package/XR/webXRExperienceHelper.js +10 -1
- package/XR/webXRExperienceHelper.js.map +1 -1
- package/XR/webXRGraphicsBinding.d.ts +90 -0
- package/XR/webXRGraphicsBinding.js +85 -0
- package/XR/webXRGraphicsBinding.js.map +1 -0
- package/XR/webXRLayerRenderTargetTexture.d.ts +24 -0
- package/XR/webXRLayerRenderTargetTexture.js +30 -0
- package/XR/webXRLayerRenderTargetTexture.js.map +1 -0
- package/XR/webXRManagedOutputCanvas.d.ts +14 -0
- package/XR/webXRManagedOutputCanvas.js +24 -5
- package/XR/webXRManagedOutputCanvas.js.map +1 -1
- package/XR/webXRRenderTargetTextureProvider.d.ts +25 -4
- package/XR/webXRRenderTargetTextureProvider.js +33 -35
- package/XR/webXRRenderTargetTextureProvider.js.map +1 -1
- package/XR/webXRSessionManager.d.ts +11 -0
- package/XR/webXRSessionManager.js +37 -0
- package/XR/webXRSessionManager.js.map +1 -1
- package/XR/webXRTypes.d.ts +9 -6
- package/XR/webXRTypes.js.map +1 -1
- package/XR/webXRWebGLLayer.d.ts +2 -2
- package/XR/webXRWebGLLayer.js +2 -2
- package/XR/webXRWebGLLayer.js.map +1 -1
- package/XR/webXRWebGLRenderTargetTextureProvider.d.ts +12 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js +58 -0
- package/XR/webXRWebGLRenderTargetTextureProvider.js.map +1 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.d.ts +69 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js +148 -0
- package/XR/webXRWebGPURenderTargetTextureProvider.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/node.js +878 -845
- package/node.js.map +1 -1
- package/package.json +8 -14
- package/scene.pure.d.ts +12 -0
- package/scene.pure.js +36 -0
- package/scene.pure.js.map +1 -1
- package/tslib.es6.js +304 -150
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** This file must only contain pure code and pure imports */
|
|
2
|
-
import {
|
|
2
|
+
import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers } from "../tslib.es6.js";
|
|
3
3
|
import { serialize, serializeAsColor3, expandToProperty, serializeAsFresnelParameters, serializeAsTexture } from "../Misc/decorators.js";
|
|
4
4
|
import { SmartArray } from "../Misc/smartArray.js";
|
|
5
5
|
import { Scene } from "../scene.pure.js";
|
|
@@ -7,7 +7,7 @@ import { Color3, TmpColors } from "../Maths/math.color.pure.js";
|
|
|
7
7
|
import { VertexBuffer } from "../Buffers/buffer.pure.js";
|
|
8
8
|
import { PrePassConfiguration } from "./prePassConfiguration.js";
|
|
9
9
|
import { ImageProcessingDefinesMixin } from "./imageProcessingConfiguration.defines.js";
|
|
10
|
-
import { ImageProcessingConfiguration } from "./imageProcessingConfiguration.pure.js";
|
|
10
|
+
import { ImageProcessingConfiguration, RegisterImageProcessingConfiguration } from "./imageProcessingConfiguration.pure.js";
|
|
11
11
|
import { Material } from "../Materials/material.pure.js";
|
|
12
12
|
import { MaterialDefines } from "../Materials/materialDefines.js";
|
|
13
13
|
import { PushMaterial } from "./pushMaterial.js";
|
|
@@ -169,1473 +169,1881 @@ class StandardMaterialBase extends ImageProcessingMixin(PushMaterial) {
|
|
|
169
169
|
* and performances.
|
|
170
170
|
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction
|
|
171
171
|
*/
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
172
|
+
let StandardMaterial = (() => {
|
|
173
|
+
var _a, _StandardMaterial_diffuseTexture_accessor_storage, _StandardMaterial_ambientTexture_accessor_storage, _StandardMaterial_opacityTexture_accessor_storage, _StandardMaterial_reflectionTexture_accessor_storage, _StandardMaterial_emissiveTexture_accessor_storage, _StandardMaterial_specularTexture_accessor_storage, _StandardMaterial_bumpTexture_accessor_storage, _StandardMaterial_lightmapTexture_accessor_storage, _StandardMaterial_refractionTexture_accessor_storage, _StandardMaterial_useAlphaFromDiffuseTexture_accessor_storage, _StandardMaterial_useEmissiveAsIllumination_accessor_storage, _StandardMaterial_linkEmissiveWithDiffuse_accessor_storage, _StandardMaterial_useSpecularOverAlpha_accessor_storage, _StandardMaterial_useReflectionOverAlpha_accessor_storage, _StandardMaterial_disableLighting_accessor_storage, _StandardMaterial_useObjectSpaceNormalMap_accessor_storage, _StandardMaterial_useParallax_accessor_storage, _StandardMaterial_useParallaxOcclusion_accessor_storage, _StandardMaterial_roughness_accessor_storage, _StandardMaterial_useLightmapAsShadowmap_accessor_storage, _StandardMaterial_diffuseFresnelParameters_accessor_storage, _StandardMaterial_opacityFresnelParameters_accessor_storage, _StandardMaterial_reflectionFresnelParameters_accessor_storage, _StandardMaterial_refractionFresnelParameters_accessor_storage, _StandardMaterial_emissiveFresnelParameters_accessor_storage, _StandardMaterial_useReflectionFresnelFromSpecular_accessor_storage, _StandardMaterial_useGlossinessFromSpecularMapAlpha_accessor_storage, _StandardMaterial_maxSimultaneousLights_accessor_storage, _StandardMaterial_invertNormalMapX_accessor_storage, _StandardMaterial_invertNormalMapY_accessor_storage, _StandardMaterial_twoSidedLighting_accessor_storage, _StandardMaterial_applyDecalMapAfterDetailMap_accessor_storage;
|
|
174
|
+
let _classSuper = StandardMaterialBase;
|
|
175
|
+
let __diffuseTexture_decorators;
|
|
176
|
+
let __diffuseTexture_initializers = [];
|
|
177
|
+
let __diffuseTexture_extraInitializers = [];
|
|
178
|
+
let _diffuseTexture_decorators;
|
|
179
|
+
let _diffuseTexture_initializers = [];
|
|
180
|
+
let _diffuseTexture_extraInitializers = [];
|
|
181
|
+
let __ambientTexture_decorators;
|
|
182
|
+
let __ambientTexture_initializers = [];
|
|
183
|
+
let __ambientTexture_extraInitializers = [];
|
|
184
|
+
let _ambientTexture_decorators;
|
|
185
|
+
let _ambientTexture_initializers = [];
|
|
186
|
+
let _ambientTexture_extraInitializers = [];
|
|
187
|
+
let __opacityTexture_decorators;
|
|
188
|
+
let __opacityTexture_initializers = [];
|
|
189
|
+
let __opacityTexture_extraInitializers = [];
|
|
190
|
+
let _opacityTexture_decorators;
|
|
191
|
+
let _opacityTexture_initializers = [];
|
|
192
|
+
let _opacityTexture_extraInitializers = [];
|
|
193
|
+
let __reflectionTexture_decorators;
|
|
194
|
+
let __reflectionTexture_initializers = [];
|
|
195
|
+
let __reflectionTexture_extraInitializers = [];
|
|
196
|
+
let _reflectionTexture_decorators;
|
|
197
|
+
let _reflectionTexture_initializers = [];
|
|
198
|
+
let _reflectionTexture_extraInitializers = [];
|
|
199
|
+
let __emissiveTexture_decorators;
|
|
200
|
+
let __emissiveTexture_initializers = [];
|
|
201
|
+
let __emissiveTexture_extraInitializers = [];
|
|
202
|
+
let _emissiveTexture_decorators;
|
|
203
|
+
let _emissiveTexture_initializers = [];
|
|
204
|
+
let _emissiveTexture_extraInitializers = [];
|
|
205
|
+
let __specularTexture_decorators;
|
|
206
|
+
let __specularTexture_initializers = [];
|
|
207
|
+
let __specularTexture_extraInitializers = [];
|
|
208
|
+
let _specularTexture_decorators;
|
|
209
|
+
let _specularTexture_initializers = [];
|
|
210
|
+
let _specularTexture_extraInitializers = [];
|
|
211
|
+
let __bumpTexture_decorators;
|
|
212
|
+
let __bumpTexture_initializers = [];
|
|
213
|
+
let __bumpTexture_extraInitializers = [];
|
|
214
|
+
let _bumpTexture_decorators;
|
|
215
|
+
let _bumpTexture_initializers = [];
|
|
216
|
+
let _bumpTexture_extraInitializers = [];
|
|
217
|
+
let __lightmapTexture_decorators;
|
|
218
|
+
let __lightmapTexture_initializers = [];
|
|
219
|
+
let __lightmapTexture_extraInitializers = [];
|
|
220
|
+
let _lightmapTexture_decorators;
|
|
221
|
+
let _lightmapTexture_initializers = [];
|
|
222
|
+
let _lightmapTexture_extraInitializers = [];
|
|
223
|
+
let __refractionTexture_decorators;
|
|
224
|
+
let __refractionTexture_initializers = [];
|
|
225
|
+
let __refractionTexture_extraInitializers = [];
|
|
226
|
+
let _refractionTexture_decorators;
|
|
227
|
+
let _refractionTexture_initializers = [];
|
|
228
|
+
let _refractionTexture_extraInitializers = [];
|
|
229
|
+
let _ambientColor_decorators;
|
|
230
|
+
let _ambientColor_initializers = [];
|
|
231
|
+
let _ambientColor_extraInitializers = [];
|
|
232
|
+
let _diffuseColor_decorators;
|
|
233
|
+
let _diffuseColor_initializers = [];
|
|
234
|
+
let _diffuseColor_extraInitializers = [];
|
|
235
|
+
let _specularColor_decorators;
|
|
236
|
+
let _specularColor_initializers = [];
|
|
237
|
+
let _specularColor_extraInitializers = [];
|
|
238
|
+
let _emissiveColor_decorators;
|
|
239
|
+
let _emissiveColor_initializers = [];
|
|
240
|
+
let _emissiveColor_extraInitializers = [];
|
|
241
|
+
let _specularPower_decorators;
|
|
242
|
+
let _specularPower_initializers = [];
|
|
243
|
+
let _specularPower_extraInitializers = [];
|
|
244
|
+
let __useAlphaFromDiffuseTexture_decorators;
|
|
245
|
+
let __useAlphaFromDiffuseTexture_initializers = [];
|
|
246
|
+
let __useAlphaFromDiffuseTexture_extraInitializers = [];
|
|
247
|
+
let _useAlphaFromDiffuseTexture_decorators;
|
|
248
|
+
let _useAlphaFromDiffuseTexture_initializers = [];
|
|
249
|
+
let _useAlphaFromDiffuseTexture_extraInitializers = [];
|
|
250
|
+
let __useEmissiveAsIllumination_decorators;
|
|
251
|
+
let __useEmissiveAsIllumination_initializers = [];
|
|
252
|
+
let __useEmissiveAsIllumination_extraInitializers = [];
|
|
253
|
+
let _useEmissiveAsIllumination_decorators;
|
|
254
|
+
let _useEmissiveAsIllumination_initializers = [];
|
|
255
|
+
let _useEmissiveAsIllumination_extraInitializers = [];
|
|
256
|
+
let __linkEmissiveWithDiffuse_decorators;
|
|
257
|
+
let __linkEmissiveWithDiffuse_initializers = [];
|
|
258
|
+
let __linkEmissiveWithDiffuse_extraInitializers = [];
|
|
259
|
+
let _linkEmissiveWithDiffuse_decorators;
|
|
260
|
+
let _linkEmissiveWithDiffuse_initializers = [];
|
|
261
|
+
let _linkEmissiveWithDiffuse_extraInitializers = [];
|
|
262
|
+
let __useSpecularOverAlpha_decorators;
|
|
263
|
+
let __useSpecularOverAlpha_initializers = [];
|
|
264
|
+
let __useSpecularOverAlpha_extraInitializers = [];
|
|
265
|
+
let _useSpecularOverAlpha_decorators;
|
|
266
|
+
let _useSpecularOverAlpha_initializers = [];
|
|
267
|
+
let _useSpecularOverAlpha_extraInitializers = [];
|
|
268
|
+
let __useReflectionOverAlpha_decorators;
|
|
269
|
+
let __useReflectionOverAlpha_initializers = [];
|
|
270
|
+
let __useReflectionOverAlpha_extraInitializers = [];
|
|
271
|
+
let _useReflectionOverAlpha_decorators;
|
|
272
|
+
let _useReflectionOverAlpha_initializers = [];
|
|
273
|
+
let _useReflectionOverAlpha_extraInitializers = [];
|
|
274
|
+
let __disableLighting_decorators;
|
|
275
|
+
let __disableLighting_initializers = [];
|
|
276
|
+
let __disableLighting_extraInitializers = [];
|
|
277
|
+
let _disableLighting_decorators;
|
|
278
|
+
let _disableLighting_initializers = [];
|
|
279
|
+
let _disableLighting_extraInitializers = [];
|
|
280
|
+
let __useObjectSpaceNormalMap_decorators;
|
|
281
|
+
let __useObjectSpaceNormalMap_initializers = [];
|
|
282
|
+
let __useObjectSpaceNormalMap_extraInitializers = [];
|
|
283
|
+
let _useObjectSpaceNormalMap_decorators;
|
|
284
|
+
let _useObjectSpaceNormalMap_initializers = [];
|
|
285
|
+
let _useObjectSpaceNormalMap_extraInitializers = [];
|
|
286
|
+
let __useParallax_decorators;
|
|
287
|
+
let __useParallax_initializers = [];
|
|
288
|
+
let __useParallax_extraInitializers = [];
|
|
289
|
+
let _useParallax_decorators;
|
|
290
|
+
let _useParallax_initializers = [];
|
|
291
|
+
let _useParallax_extraInitializers = [];
|
|
292
|
+
let __useParallaxOcclusion_decorators;
|
|
293
|
+
let __useParallaxOcclusion_initializers = [];
|
|
294
|
+
let __useParallaxOcclusion_extraInitializers = [];
|
|
295
|
+
let _useParallaxOcclusion_decorators;
|
|
296
|
+
let _useParallaxOcclusion_initializers = [];
|
|
297
|
+
let _useParallaxOcclusion_extraInitializers = [];
|
|
298
|
+
let _parallaxScaleBias_decorators;
|
|
299
|
+
let _parallaxScaleBias_initializers = [];
|
|
300
|
+
let _parallaxScaleBias_extraInitializers = [];
|
|
301
|
+
let __roughness_decorators;
|
|
302
|
+
let __roughness_initializers = [];
|
|
303
|
+
let __roughness_extraInitializers = [];
|
|
304
|
+
let _roughness_decorators;
|
|
305
|
+
let _roughness_initializers = [];
|
|
306
|
+
let _roughness_extraInitializers = [];
|
|
307
|
+
let _indexOfRefraction_decorators;
|
|
308
|
+
let _indexOfRefraction_initializers = [];
|
|
309
|
+
let _indexOfRefraction_extraInitializers = [];
|
|
310
|
+
let _invertRefractionY_decorators;
|
|
311
|
+
let _invertRefractionY_initializers = [];
|
|
312
|
+
let _invertRefractionY_extraInitializers = [];
|
|
313
|
+
let _alphaCutOff_decorators;
|
|
314
|
+
let _alphaCutOff_initializers = [];
|
|
315
|
+
let _alphaCutOff_extraInitializers = [];
|
|
316
|
+
let __useLightmapAsShadowmap_decorators;
|
|
317
|
+
let __useLightmapAsShadowmap_initializers = [];
|
|
318
|
+
let __useLightmapAsShadowmap_extraInitializers = [];
|
|
319
|
+
let _useLightmapAsShadowmap_decorators;
|
|
320
|
+
let _useLightmapAsShadowmap_initializers = [];
|
|
321
|
+
let _useLightmapAsShadowmap_extraInitializers = [];
|
|
322
|
+
let __diffuseFresnelParameters_decorators;
|
|
323
|
+
let __diffuseFresnelParameters_initializers = [];
|
|
324
|
+
let __diffuseFresnelParameters_extraInitializers = [];
|
|
325
|
+
let _diffuseFresnelParameters_decorators;
|
|
326
|
+
let _diffuseFresnelParameters_initializers = [];
|
|
327
|
+
let _diffuseFresnelParameters_extraInitializers = [];
|
|
328
|
+
let __opacityFresnelParameters_decorators;
|
|
329
|
+
let __opacityFresnelParameters_initializers = [];
|
|
330
|
+
let __opacityFresnelParameters_extraInitializers = [];
|
|
331
|
+
let _opacityFresnelParameters_decorators;
|
|
332
|
+
let _opacityFresnelParameters_initializers = [];
|
|
333
|
+
let _opacityFresnelParameters_extraInitializers = [];
|
|
334
|
+
let __reflectionFresnelParameters_decorators;
|
|
335
|
+
let __reflectionFresnelParameters_initializers = [];
|
|
336
|
+
let __reflectionFresnelParameters_extraInitializers = [];
|
|
337
|
+
let _reflectionFresnelParameters_decorators;
|
|
338
|
+
let _reflectionFresnelParameters_initializers = [];
|
|
339
|
+
let _reflectionFresnelParameters_extraInitializers = [];
|
|
340
|
+
let __refractionFresnelParameters_decorators;
|
|
341
|
+
let __refractionFresnelParameters_initializers = [];
|
|
342
|
+
let __refractionFresnelParameters_extraInitializers = [];
|
|
343
|
+
let _refractionFresnelParameters_decorators;
|
|
344
|
+
let _refractionFresnelParameters_initializers = [];
|
|
345
|
+
let _refractionFresnelParameters_extraInitializers = [];
|
|
346
|
+
let __emissiveFresnelParameters_decorators;
|
|
347
|
+
let __emissiveFresnelParameters_initializers = [];
|
|
348
|
+
let __emissiveFresnelParameters_extraInitializers = [];
|
|
349
|
+
let _emissiveFresnelParameters_decorators;
|
|
350
|
+
let _emissiveFresnelParameters_initializers = [];
|
|
351
|
+
let _emissiveFresnelParameters_extraInitializers = [];
|
|
352
|
+
let __useReflectionFresnelFromSpecular_decorators;
|
|
353
|
+
let __useReflectionFresnelFromSpecular_initializers = [];
|
|
354
|
+
let __useReflectionFresnelFromSpecular_extraInitializers = [];
|
|
355
|
+
let _useReflectionFresnelFromSpecular_decorators;
|
|
356
|
+
let _useReflectionFresnelFromSpecular_initializers = [];
|
|
357
|
+
let _useReflectionFresnelFromSpecular_extraInitializers = [];
|
|
358
|
+
let __useGlossinessFromSpecularMapAlpha_decorators;
|
|
359
|
+
let __useGlossinessFromSpecularMapAlpha_initializers = [];
|
|
360
|
+
let __useGlossinessFromSpecularMapAlpha_extraInitializers = [];
|
|
361
|
+
let _useGlossinessFromSpecularMapAlpha_decorators;
|
|
362
|
+
let _useGlossinessFromSpecularMapAlpha_initializers = [];
|
|
363
|
+
let _useGlossinessFromSpecularMapAlpha_extraInitializers = [];
|
|
364
|
+
let __maxSimultaneousLights_decorators;
|
|
365
|
+
let __maxSimultaneousLights_initializers = [];
|
|
366
|
+
let __maxSimultaneousLights_extraInitializers = [];
|
|
367
|
+
let _maxSimultaneousLights_decorators;
|
|
368
|
+
let _maxSimultaneousLights_initializers = [];
|
|
369
|
+
let _maxSimultaneousLights_extraInitializers = [];
|
|
370
|
+
let __invertNormalMapX_decorators;
|
|
371
|
+
let __invertNormalMapX_initializers = [];
|
|
372
|
+
let __invertNormalMapX_extraInitializers = [];
|
|
373
|
+
let _invertNormalMapX_decorators;
|
|
374
|
+
let _invertNormalMapX_initializers = [];
|
|
375
|
+
let _invertNormalMapX_extraInitializers = [];
|
|
376
|
+
let __invertNormalMapY_decorators;
|
|
377
|
+
let __invertNormalMapY_initializers = [];
|
|
378
|
+
let __invertNormalMapY_extraInitializers = [];
|
|
379
|
+
let _invertNormalMapY_decorators;
|
|
380
|
+
let _invertNormalMapY_initializers = [];
|
|
381
|
+
let _invertNormalMapY_extraInitializers = [];
|
|
382
|
+
let __twoSidedLighting_decorators;
|
|
383
|
+
let __twoSidedLighting_initializers = [];
|
|
384
|
+
let __twoSidedLighting_extraInitializers = [];
|
|
385
|
+
let _twoSidedLighting_decorators;
|
|
386
|
+
let _twoSidedLighting_initializers = [];
|
|
387
|
+
let _twoSidedLighting_extraInitializers = [];
|
|
388
|
+
let __applyDecalMapAfterDetailMap_decorators;
|
|
389
|
+
let __applyDecalMapAfterDetailMap_initializers = [];
|
|
390
|
+
let __applyDecalMapAfterDetailMap_extraInitializers = [];
|
|
391
|
+
let _applyDecalMapAfterDetailMap_decorators;
|
|
392
|
+
let _applyDecalMapAfterDetailMap_initializers = [];
|
|
393
|
+
let _applyDecalMapAfterDetailMap_extraInitializers = [];
|
|
394
|
+
return _a = class StandardMaterial extends _classSuper {
|
|
395
|
+
/**
|
|
396
|
+
* The basic texture of the material as viewed under a light.
|
|
397
|
+
*/
|
|
398
|
+
get diffuseTexture() { return __classPrivateFieldGet(this, _StandardMaterial_diffuseTexture_accessor_storage, "f"); }
|
|
399
|
+
set diffuseTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_diffuseTexture_accessor_storage, value, "f"); }
|
|
400
|
+
/**
|
|
401
|
+
* AKA Occlusion Texture in other nomenclature, it helps adding baked shadows into your material.
|
|
402
|
+
*/
|
|
403
|
+
get ambientTexture() { return __classPrivateFieldGet(this, _StandardMaterial_ambientTexture_accessor_storage, "f"); }
|
|
404
|
+
set ambientTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_ambientTexture_accessor_storage, value, "f"); }
|
|
405
|
+
/**
|
|
406
|
+
* Define the transparency of the material from a texture.
|
|
407
|
+
* The final alpha value can be read either from the red channel (if texture.getAlphaFromRGB is false)
|
|
408
|
+
* or from the luminance or the current texel (if texture.getAlphaFromRGB is true)
|
|
409
|
+
*/
|
|
410
|
+
get opacityTexture() { return __classPrivateFieldGet(this, _StandardMaterial_opacityTexture_accessor_storage, "f"); }
|
|
411
|
+
set opacityTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_opacityTexture_accessor_storage, value, "f"); }
|
|
412
|
+
/**
|
|
413
|
+
* Define the texture used to display the reflection.
|
|
414
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions
|
|
415
|
+
*/
|
|
416
|
+
get reflectionTexture() { return __classPrivateFieldGet(this, _StandardMaterial_reflectionTexture_accessor_storage, "f"); }
|
|
417
|
+
set reflectionTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_reflectionTexture_accessor_storage, value, "f"); }
|
|
418
|
+
/**
|
|
419
|
+
* Define texture of the material as if self lit.
|
|
420
|
+
* This will be mixed in the final result even in the absence of light.
|
|
421
|
+
*/
|
|
422
|
+
get emissiveTexture() { return __classPrivateFieldGet(this, _StandardMaterial_emissiveTexture_accessor_storage, "f"); }
|
|
423
|
+
set emissiveTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_emissiveTexture_accessor_storage, value, "f"); }
|
|
424
|
+
/**
|
|
425
|
+
* Define how the color and intensity of the highlight given by the light in the material.
|
|
426
|
+
*/
|
|
427
|
+
get specularTexture() { return __classPrivateFieldGet(this, _StandardMaterial_specularTexture_accessor_storage, "f"); }
|
|
428
|
+
set specularTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_specularTexture_accessor_storage, value, "f"); }
|
|
429
|
+
/**
|
|
430
|
+
* Bump mapping is a technique to simulate bump and dents on a rendered surface.
|
|
431
|
+
* These are made by creating a normal map from an image. The means to do this can be found on the web, a search for 'normal map generator' will bring up free and paid for methods of doing this.
|
|
432
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/moreMaterials#bump-map
|
|
433
|
+
*/
|
|
434
|
+
get bumpTexture() { return __classPrivateFieldGet(this, _StandardMaterial_bumpTexture_accessor_storage, "f"); }
|
|
435
|
+
set bumpTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_bumpTexture_accessor_storage, value, "f"); }
|
|
436
|
+
/**
|
|
437
|
+
* Complex lighting can be computationally expensive to compute at runtime.
|
|
438
|
+
* To save on computation, lightmaps may be used to store calculated lighting in a texture which will be applied to a given mesh.
|
|
439
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/lights/lights_introduction#lightmaps
|
|
440
|
+
*/
|
|
441
|
+
get lightmapTexture() { return __classPrivateFieldGet(this, _StandardMaterial_lightmapTexture_accessor_storage, "f"); }
|
|
442
|
+
set lightmapTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_lightmapTexture_accessor_storage, value, "f"); }
|
|
443
|
+
/**
|
|
444
|
+
* Define the texture used to display the refraction.
|
|
445
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions
|
|
446
|
+
*/
|
|
447
|
+
get refractionTexture() { return __classPrivateFieldGet(this, _StandardMaterial_refractionTexture_accessor_storage, "f"); }
|
|
448
|
+
set refractionTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_refractionTexture_accessor_storage, value, "f"); }
|
|
449
|
+
/**
|
|
450
|
+
* Does the transparency come from the diffuse texture alpha channel.
|
|
451
|
+
*/
|
|
452
|
+
get useAlphaFromDiffuseTexture() { return __classPrivateFieldGet(this, _StandardMaterial_useAlphaFromDiffuseTexture_accessor_storage, "f"); }
|
|
453
|
+
set useAlphaFromDiffuseTexture(value) { __classPrivateFieldSet(this, _StandardMaterial_useAlphaFromDiffuseTexture_accessor_storage, value, "f"); }
|
|
454
|
+
/**
|
|
455
|
+
* If true, the emissive value is added into the end result, otherwise it is multiplied in.
|
|
456
|
+
*/
|
|
457
|
+
get useEmissiveAsIllumination() { return __classPrivateFieldGet(this, _StandardMaterial_useEmissiveAsIllumination_accessor_storage, "f"); }
|
|
458
|
+
set useEmissiveAsIllumination(value) { __classPrivateFieldSet(this, _StandardMaterial_useEmissiveAsIllumination_accessor_storage, value, "f"); }
|
|
459
|
+
/**
|
|
460
|
+
* If true, some kind of energy conservation will prevent the end result to be more than 1 by reducing
|
|
461
|
+
* the emissive level when the final color is close to one.
|
|
462
|
+
*/
|
|
463
|
+
get linkEmissiveWithDiffuse() { return __classPrivateFieldGet(this, _StandardMaterial_linkEmissiveWithDiffuse_accessor_storage, "f"); }
|
|
464
|
+
set linkEmissiveWithDiffuse(value) { __classPrivateFieldSet(this, _StandardMaterial_linkEmissiveWithDiffuse_accessor_storage, value, "f"); }
|
|
465
|
+
/**
|
|
466
|
+
* Specifies that the material will keep the specular highlights over a transparent surface (only the most luminous ones).
|
|
467
|
+
* A car glass is a good exemple of that. When sun reflects on it you can not see what is behind.
|
|
468
|
+
*/
|
|
469
|
+
get useSpecularOverAlpha() { return __classPrivateFieldGet(this, _StandardMaterial_useSpecularOverAlpha_accessor_storage, "f"); }
|
|
470
|
+
set useSpecularOverAlpha(value) { __classPrivateFieldSet(this, _StandardMaterial_useSpecularOverAlpha_accessor_storage, value, "f"); }
|
|
471
|
+
/**
|
|
472
|
+
* Specifies that the material will keeps the reflection highlights over a transparent surface (only the most luminous ones).
|
|
473
|
+
* A car glass is a good exemple of that. When the street lights reflects on it you can not see what is behind.
|
|
474
|
+
*/
|
|
475
|
+
get useReflectionOverAlpha() { return __classPrivateFieldGet(this, _StandardMaterial_useReflectionOverAlpha_accessor_storage, "f"); }
|
|
476
|
+
set useReflectionOverAlpha(value) { __classPrivateFieldSet(this, _StandardMaterial_useReflectionOverAlpha_accessor_storage, value, "f"); }
|
|
477
|
+
/**
|
|
478
|
+
* Does lights from the scene impacts this material.
|
|
479
|
+
* It can be a nice trick for performance to disable lighting on a fully emissive material.
|
|
480
|
+
*/
|
|
481
|
+
get disableLighting() { return __classPrivateFieldGet(this, _StandardMaterial_disableLighting_accessor_storage, "f"); }
|
|
482
|
+
set disableLighting(value) { __classPrivateFieldSet(this, _StandardMaterial_disableLighting_accessor_storage, value, "f"); }
|
|
483
|
+
/**
|
|
484
|
+
* Allows using an object space normal map (instead of tangent space).
|
|
485
|
+
*/
|
|
486
|
+
get useObjectSpaceNormalMap() { return __classPrivateFieldGet(this, _StandardMaterial_useObjectSpaceNormalMap_accessor_storage, "f"); }
|
|
487
|
+
set useObjectSpaceNormalMap(value) { __classPrivateFieldSet(this, _StandardMaterial_useObjectSpaceNormalMap_accessor_storage, value, "f"); }
|
|
488
|
+
/**
|
|
489
|
+
* Is parallax enabled or not.
|
|
490
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/parallaxMapping
|
|
491
|
+
*/
|
|
492
|
+
get useParallax() { return __classPrivateFieldGet(this, _StandardMaterial_useParallax_accessor_storage, "f"); }
|
|
493
|
+
set useParallax(value) { __classPrivateFieldSet(this, _StandardMaterial_useParallax_accessor_storage, value, "f"); }
|
|
494
|
+
/**
|
|
495
|
+
* Is parallax occlusion enabled or not.
|
|
496
|
+
* If true, the outcome is way more realistic than traditional Parallax but you can expect a performance hit that worthes consideration.
|
|
497
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/parallaxMapping
|
|
498
|
+
*/
|
|
499
|
+
get useParallaxOcclusion() { return __classPrivateFieldGet(this, _StandardMaterial_useParallaxOcclusion_accessor_storage, "f"); }
|
|
500
|
+
set useParallaxOcclusion(value) { __classPrivateFieldSet(this, _StandardMaterial_useParallaxOcclusion_accessor_storage, value, "f"); }
|
|
501
|
+
/**
|
|
502
|
+
* Helps to define how blurry the reflections should appears in the material.
|
|
503
|
+
*/
|
|
504
|
+
get roughness() { return __classPrivateFieldGet(this, _StandardMaterial_roughness_accessor_storage, "f"); }
|
|
505
|
+
set roughness(value) { __classPrivateFieldSet(this, _StandardMaterial_roughness_accessor_storage, value, "f"); }
|
|
506
|
+
/**
|
|
507
|
+
* In case of light mapping, define whether the map contains light or shadow informations.
|
|
508
|
+
*/
|
|
509
|
+
get useLightmapAsShadowmap() { return __classPrivateFieldGet(this, _StandardMaterial_useLightmapAsShadowmap_accessor_storage, "f"); }
|
|
510
|
+
set useLightmapAsShadowmap(value) { __classPrivateFieldSet(this, _StandardMaterial_useLightmapAsShadowmap_accessor_storage, value, "f"); }
|
|
511
|
+
/**
|
|
512
|
+
* Define the diffuse fresnel parameters of the material.
|
|
513
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters
|
|
514
|
+
*/
|
|
515
|
+
get diffuseFresnelParameters() { return __classPrivateFieldGet(this, _StandardMaterial_diffuseFresnelParameters_accessor_storage, "f"); }
|
|
516
|
+
set diffuseFresnelParameters(value) { __classPrivateFieldSet(this, _StandardMaterial_diffuseFresnelParameters_accessor_storage, value, "f"); }
|
|
517
|
+
/**
|
|
518
|
+
* Define the opacity fresnel parameters of the material.
|
|
519
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters
|
|
520
|
+
*/
|
|
521
|
+
get opacityFresnelParameters() { return __classPrivateFieldGet(this, _StandardMaterial_opacityFresnelParameters_accessor_storage, "f"); }
|
|
522
|
+
set opacityFresnelParameters(value) { __classPrivateFieldSet(this, _StandardMaterial_opacityFresnelParameters_accessor_storage, value, "f"); }
|
|
523
|
+
/**
|
|
524
|
+
* Define the reflection fresnel parameters of the material.
|
|
525
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters
|
|
526
|
+
*/
|
|
527
|
+
get reflectionFresnelParameters() { return __classPrivateFieldGet(this, _StandardMaterial_reflectionFresnelParameters_accessor_storage, "f"); }
|
|
528
|
+
set reflectionFresnelParameters(value) { __classPrivateFieldSet(this, _StandardMaterial_reflectionFresnelParameters_accessor_storage, value, "f"); }
|
|
529
|
+
/**
|
|
530
|
+
* Define the refraction fresnel parameters of the material.
|
|
531
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters
|
|
532
|
+
*/
|
|
533
|
+
get refractionFresnelParameters() { return __classPrivateFieldGet(this, _StandardMaterial_refractionFresnelParameters_accessor_storage, "f"); }
|
|
534
|
+
set refractionFresnelParameters(value) { __classPrivateFieldSet(this, _StandardMaterial_refractionFresnelParameters_accessor_storage, value, "f"); }
|
|
535
|
+
/**
|
|
536
|
+
* Define the emissive fresnel parameters of the material.
|
|
537
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters
|
|
538
|
+
*/
|
|
539
|
+
get emissiveFresnelParameters() { return __classPrivateFieldGet(this, _StandardMaterial_emissiveFresnelParameters_accessor_storage, "f"); }
|
|
540
|
+
set emissiveFresnelParameters(value) { __classPrivateFieldSet(this, _StandardMaterial_emissiveFresnelParameters_accessor_storage, value, "f"); }
|
|
541
|
+
/**
|
|
542
|
+
* If true automatically deducts the fresnels values from the material specularity.
|
|
543
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/fresnelParameters
|
|
544
|
+
*/
|
|
545
|
+
get useReflectionFresnelFromSpecular() { return __classPrivateFieldGet(this, _StandardMaterial_useReflectionFresnelFromSpecular_accessor_storage, "f"); }
|
|
546
|
+
set useReflectionFresnelFromSpecular(value) { __classPrivateFieldSet(this, _StandardMaterial_useReflectionFresnelFromSpecular_accessor_storage, value, "f"); }
|
|
547
|
+
/**
|
|
548
|
+
* Defines if the glossiness/roughness of the material should be read from the specular map alpha channel
|
|
549
|
+
*/
|
|
550
|
+
get useGlossinessFromSpecularMapAlpha() { return __classPrivateFieldGet(this, _StandardMaterial_useGlossinessFromSpecularMapAlpha_accessor_storage, "f"); }
|
|
551
|
+
set useGlossinessFromSpecularMapAlpha(value) { __classPrivateFieldSet(this, _StandardMaterial_useGlossinessFromSpecularMapAlpha_accessor_storage, value, "f"); }
|
|
552
|
+
/**
|
|
553
|
+
* Defines the maximum number of lights that can be used in the material
|
|
554
|
+
*/
|
|
555
|
+
get maxSimultaneousLights() { return __classPrivateFieldGet(this, _StandardMaterial_maxSimultaneousLights_accessor_storage, "f"); }
|
|
556
|
+
set maxSimultaneousLights(value) { __classPrivateFieldSet(this, _StandardMaterial_maxSimultaneousLights_accessor_storage, value, "f"); }
|
|
557
|
+
/**
|
|
558
|
+
* If sets to true, x component of normal map value will invert (x = 1.0 - x).
|
|
559
|
+
*/
|
|
560
|
+
get invertNormalMapX() { return __classPrivateFieldGet(this, _StandardMaterial_invertNormalMapX_accessor_storage, "f"); }
|
|
561
|
+
set invertNormalMapX(value) { __classPrivateFieldSet(this, _StandardMaterial_invertNormalMapX_accessor_storage, value, "f"); }
|
|
562
|
+
/**
|
|
563
|
+
* If sets to true, y component of normal map value will invert (y = 1.0 - y).
|
|
564
|
+
*/
|
|
565
|
+
get invertNormalMapY() { return __classPrivateFieldGet(this, _StandardMaterial_invertNormalMapY_accessor_storage, "f"); }
|
|
566
|
+
set invertNormalMapY(value) { __classPrivateFieldSet(this, _StandardMaterial_invertNormalMapY_accessor_storage, value, "f"); }
|
|
567
|
+
/**
|
|
568
|
+
* If sets to true and backfaceCulling is false, normals will be flipped on the backside.
|
|
569
|
+
*/
|
|
570
|
+
get twoSidedLighting() { return __classPrivateFieldGet(this, _StandardMaterial_twoSidedLighting_accessor_storage, "f"); }
|
|
571
|
+
set twoSidedLighting(value) { __classPrivateFieldSet(this, _StandardMaterial_twoSidedLighting_accessor_storage, value, "f"); }
|
|
572
|
+
/**
|
|
573
|
+
* If sets to true, the decal map will be applied after the detail map. Else, it is applied before (default: false)
|
|
574
|
+
*/
|
|
575
|
+
get applyDecalMapAfterDetailMap() { return __classPrivateFieldGet(this, _StandardMaterial_applyDecalMapAfterDetailMap_accessor_storage, "f"); }
|
|
576
|
+
set applyDecalMapAfterDetailMap(value) { __classPrivateFieldSet(this, _StandardMaterial_applyDecalMapAfterDetailMap_accessor_storage, value, "f"); }
|
|
577
|
+
/**
|
|
578
|
+
* Can this material render to prepass
|
|
579
|
+
*/
|
|
580
|
+
get isPrePassCapable() {
|
|
581
|
+
return !this.disableDepthWrite;
|
|
282
582
|
}
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* Gets a boolean indicating that current material needs to register RTT
|
|
290
|
-
*/
|
|
291
|
-
get hasRenderTargetTextures() {
|
|
292
|
-
if (StandardMaterial.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
|
|
293
|
-
return true;
|
|
294
|
-
}
|
|
295
|
-
if (StandardMaterial.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {
|
|
296
|
-
return true;
|
|
297
|
-
}
|
|
298
|
-
return this._cacheHasRenderTargetTextures;
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Gets the current class name of the material e.g. "StandardMaterial"
|
|
302
|
-
* Mainly use in serialization.
|
|
303
|
-
* @returns the class name
|
|
304
|
-
*/
|
|
305
|
-
getClassName() {
|
|
306
|
-
return "StandardMaterial";
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Specifies if the material will require alpha blending
|
|
310
|
-
* @returns a boolean specifying if alpha blending is needed
|
|
311
|
-
*/
|
|
312
|
-
needAlphaBlending() {
|
|
313
|
-
if (this._hasTransparencyMode) {
|
|
314
|
-
return this._transparencyModeIsBlend;
|
|
315
|
-
}
|
|
316
|
-
if (this._disableAlphaBlending) {
|
|
317
|
-
return false;
|
|
318
|
-
}
|
|
319
|
-
return (this.alpha < 1.0 ||
|
|
320
|
-
this._opacityTexture != null ||
|
|
321
|
-
this._shouldUseAlphaFromDiffuseTexture() ||
|
|
322
|
-
(this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled));
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Specifies if this material should be rendered in alpha test mode
|
|
326
|
-
* @returns a boolean specifying if an alpha test is needed.
|
|
327
|
-
*/
|
|
328
|
-
needAlphaTesting() {
|
|
329
|
-
if (this._hasTransparencyMode) {
|
|
330
|
-
return this._transparencyModeIsTest;
|
|
331
|
-
}
|
|
332
|
-
return this._hasAlphaChannel() && (this._transparencyMode == null || this._transparencyMode === Material.MATERIAL_ALPHATEST);
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* @returns whether or not the alpha value of the diffuse texture should be used for alpha blending.
|
|
336
|
-
*/
|
|
337
|
-
_shouldUseAlphaFromDiffuseTexture() {
|
|
338
|
-
return this._diffuseTexture != null && this._diffuseTexture.hasAlpha && this._useAlphaFromDiffuseTexture && this._transparencyMode !== Material.MATERIAL_OPAQUE;
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* @returns whether or not there is a usable alpha channel for transparency.
|
|
342
|
-
*/
|
|
343
|
-
_hasAlphaChannel() {
|
|
344
|
-
return (this._diffuseTexture != null && this._diffuseTexture.hasAlpha) || this._opacityTexture != null;
|
|
345
|
-
}
|
|
346
|
-
/**
|
|
347
|
-
* Get the texture used for alpha test purpose.
|
|
348
|
-
* @returns the diffuse texture in case of the standard material.
|
|
349
|
-
*/
|
|
350
|
-
getAlphaTestTexture() {
|
|
351
|
-
return this._diffuseTexture;
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Get if the submesh is ready to be used and all its information available.
|
|
355
|
-
* Child classes can use it to update shaders
|
|
356
|
-
* @param mesh defines the mesh to check
|
|
357
|
-
* @param subMesh defines which submesh to check
|
|
358
|
-
* @param useInstances specifies that instances should be used
|
|
359
|
-
* @returns a boolean indicating that the submesh is ready or not
|
|
360
|
-
*/
|
|
361
|
-
isReadyForSubMesh(mesh, subMesh, useInstances = false) {
|
|
362
|
-
if (!this._uniformBufferLayoutBuilt) {
|
|
363
|
-
this.buildUniformLayout();
|
|
364
|
-
}
|
|
365
|
-
const drawWrapper = subMesh._drawWrapper;
|
|
366
|
-
if (drawWrapper.effect && this.isFrozen) {
|
|
367
|
-
if (drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
|
|
583
|
+
/**
|
|
584
|
+
* Can this material render to several textures at once
|
|
585
|
+
*/
|
|
586
|
+
get canRenderToMRT() {
|
|
368
587
|
return true;
|
|
369
588
|
}
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
589
|
+
/**
|
|
590
|
+
* Instantiates a new standard material.
|
|
591
|
+
* This is the default material used in Babylon. It is the best trade off between quality
|
|
592
|
+
* and performances.
|
|
593
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction
|
|
594
|
+
* @param name Define the name of the material in the scene
|
|
595
|
+
* @param scene Define the scene the material belong to
|
|
596
|
+
* @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
|
|
597
|
+
*/
|
|
598
|
+
constructor(name, scene, forceGLSL = false) {
|
|
599
|
+
super(name, scene, undefined, forceGLSL || _a.ForceGLSL);
|
|
600
|
+
this._diffuseTexture = __runInitializers(this, __diffuseTexture_initializers, null);
|
|
601
|
+
_StandardMaterial_diffuseTexture_accessor_storage.set(this, (__runInitializers(this, __diffuseTexture_extraInitializers), __runInitializers(this, _diffuseTexture_initializers, void 0)));
|
|
602
|
+
this._ambientTexture = (__runInitializers(this, _diffuseTexture_extraInitializers), __runInitializers(this, __ambientTexture_initializers, null));
|
|
603
|
+
_StandardMaterial_ambientTexture_accessor_storage.set(this, (__runInitializers(this, __ambientTexture_extraInitializers), __runInitializers(this, _ambientTexture_initializers, void 0)));
|
|
604
|
+
this._opacityTexture = (__runInitializers(this, _ambientTexture_extraInitializers), __runInitializers(this, __opacityTexture_initializers, null));
|
|
605
|
+
_StandardMaterial_opacityTexture_accessor_storage.set(this, (__runInitializers(this, __opacityTexture_extraInitializers), __runInitializers(this, _opacityTexture_initializers, void 0)));
|
|
606
|
+
this._reflectionTexture = (__runInitializers(this, _opacityTexture_extraInitializers), __runInitializers(this, __reflectionTexture_initializers, null));
|
|
607
|
+
_StandardMaterial_reflectionTexture_accessor_storage.set(this, (__runInitializers(this, __reflectionTexture_extraInitializers), __runInitializers(this, _reflectionTexture_initializers, void 0)));
|
|
608
|
+
this._emissiveTexture = (__runInitializers(this, _reflectionTexture_extraInitializers), __runInitializers(this, __emissiveTexture_initializers, null));
|
|
609
|
+
_StandardMaterial_emissiveTexture_accessor_storage.set(this, (__runInitializers(this, __emissiveTexture_extraInitializers), __runInitializers(this, _emissiveTexture_initializers, void 0)));
|
|
610
|
+
this._specularTexture = (__runInitializers(this, _emissiveTexture_extraInitializers), __runInitializers(this, __specularTexture_initializers, null));
|
|
611
|
+
_StandardMaterial_specularTexture_accessor_storage.set(this, (__runInitializers(this, __specularTexture_extraInitializers), __runInitializers(this, _specularTexture_initializers, void 0)));
|
|
612
|
+
this._bumpTexture = (__runInitializers(this, _specularTexture_extraInitializers), __runInitializers(this, __bumpTexture_initializers, null));
|
|
613
|
+
_StandardMaterial_bumpTexture_accessor_storage.set(this, (__runInitializers(this, __bumpTexture_extraInitializers), __runInitializers(this, _bumpTexture_initializers, void 0)));
|
|
614
|
+
this._lightmapTexture = (__runInitializers(this, _bumpTexture_extraInitializers), __runInitializers(this, __lightmapTexture_initializers, null));
|
|
615
|
+
_StandardMaterial_lightmapTexture_accessor_storage.set(this, (__runInitializers(this, __lightmapTexture_extraInitializers), __runInitializers(this, _lightmapTexture_initializers, void 0)));
|
|
616
|
+
this._refractionTexture = (__runInitializers(this, _lightmapTexture_extraInitializers), __runInitializers(this, __refractionTexture_initializers, null));
|
|
617
|
+
_StandardMaterial_refractionTexture_accessor_storage.set(this, (__runInitializers(this, __refractionTexture_extraInitializers), __runInitializers(this, _refractionTexture_initializers, void 0)));
|
|
618
|
+
/**
|
|
619
|
+
* The color of the material lit by the environmental background lighting.
|
|
620
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#ambient-color-example
|
|
621
|
+
*/
|
|
622
|
+
this.ambientColor = (__runInitializers(this, _refractionTexture_extraInitializers), __runInitializers(this, _ambientColor_initializers, new Color3(0, 0, 0)));
|
|
623
|
+
/**
|
|
624
|
+
* The basic color of the material as viewed under a light.
|
|
625
|
+
*/
|
|
626
|
+
this.diffuseColor = (__runInitializers(this, _ambientColor_extraInitializers), __runInitializers(this, _diffuseColor_initializers, new Color3(1, 1, 1)));
|
|
627
|
+
/**
|
|
628
|
+
* Define how the color and intensity of the highlight given by the light in the material.
|
|
629
|
+
*/
|
|
630
|
+
this.specularColor = (__runInitializers(this, _diffuseColor_extraInitializers), __runInitializers(this, _specularColor_initializers, new Color3(1, 1, 1)));
|
|
631
|
+
/**
|
|
632
|
+
* Define the color of the material as if self lit.
|
|
633
|
+
* This will be mixed in the final result even in the absence of light.
|
|
634
|
+
*/
|
|
635
|
+
this.emissiveColor = (__runInitializers(this, _specularColor_extraInitializers), __runInitializers(this, _emissiveColor_initializers, new Color3(0, 0, 0)));
|
|
636
|
+
/**
|
|
637
|
+
* Defines how sharp are the highlights in the material.
|
|
638
|
+
* The bigger the value the sharper giving a more glossy feeling to the result.
|
|
639
|
+
* Reversely, the smaller the value the blurrier giving a more rough feeling to the result.
|
|
640
|
+
*/
|
|
641
|
+
this.specularPower = (__runInitializers(this, _emissiveColor_extraInitializers), __runInitializers(this, _specularPower_initializers, 64));
|
|
642
|
+
this._useAlphaFromDiffuseTexture = (__runInitializers(this, _specularPower_extraInitializers), __runInitializers(this, __useAlphaFromDiffuseTexture_initializers, false));
|
|
643
|
+
_StandardMaterial_useAlphaFromDiffuseTexture_accessor_storage.set(this, (__runInitializers(this, __useAlphaFromDiffuseTexture_extraInitializers), __runInitializers(this, _useAlphaFromDiffuseTexture_initializers, void 0)));
|
|
644
|
+
this._useEmissiveAsIllumination = (__runInitializers(this, _useAlphaFromDiffuseTexture_extraInitializers), __runInitializers(this, __useEmissiveAsIllumination_initializers, false));
|
|
645
|
+
_StandardMaterial_useEmissiveAsIllumination_accessor_storage.set(this, (__runInitializers(this, __useEmissiveAsIllumination_extraInitializers), __runInitializers(this, _useEmissiveAsIllumination_initializers, void 0)));
|
|
646
|
+
this._linkEmissiveWithDiffuse = (__runInitializers(this, _useEmissiveAsIllumination_extraInitializers), __runInitializers(this, __linkEmissiveWithDiffuse_initializers, false));
|
|
647
|
+
_StandardMaterial_linkEmissiveWithDiffuse_accessor_storage.set(this, (__runInitializers(this, __linkEmissiveWithDiffuse_extraInitializers), __runInitializers(this, _linkEmissiveWithDiffuse_initializers, void 0)));
|
|
648
|
+
this._useSpecularOverAlpha = (__runInitializers(this, _linkEmissiveWithDiffuse_extraInitializers), __runInitializers(this, __useSpecularOverAlpha_initializers, false));
|
|
649
|
+
_StandardMaterial_useSpecularOverAlpha_accessor_storage.set(this, (__runInitializers(this, __useSpecularOverAlpha_extraInitializers), __runInitializers(this, _useSpecularOverAlpha_initializers, void 0)));
|
|
650
|
+
this._useReflectionOverAlpha = (__runInitializers(this, _useSpecularOverAlpha_extraInitializers), __runInitializers(this, __useReflectionOverAlpha_initializers, false));
|
|
651
|
+
_StandardMaterial_useReflectionOverAlpha_accessor_storage.set(this, (__runInitializers(this, __useReflectionOverAlpha_extraInitializers), __runInitializers(this, _useReflectionOverAlpha_initializers, void 0)));
|
|
652
|
+
this._disableLighting = (__runInitializers(this, _useReflectionOverAlpha_extraInitializers), __runInitializers(this, __disableLighting_initializers, false));
|
|
653
|
+
_StandardMaterial_disableLighting_accessor_storage.set(this, (__runInitializers(this, __disableLighting_extraInitializers), __runInitializers(this, _disableLighting_initializers, void 0)));
|
|
654
|
+
this._useObjectSpaceNormalMap = (__runInitializers(this, _disableLighting_extraInitializers), __runInitializers(this, __useObjectSpaceNormalMap_initializers, false));
|
|
655
|
+
_StandardMaterial_useObjectSpaceNormalMap_accessor_storage.set(this, (__runInitializers(this, __useObjectSpaceNormalMap_extraInitializers), __runInitializers(this, _useObjectSpaceNormalMap_initializers, void 0)));
|
|
656
|
+
this._useParallax = (__runInitializers(this, _useObjectSpaceNormalMap_extraInitializers), __runInitializers(this, __useParallax_initializers, false));
|
|
657
|
+
_StandardMaterial_useParallax_accessor_storage.set(this, (__runInitializers(this, __useParallax_extraInitializers), __runInitializers(this, _useParallax_initializers, void 0)));
|
|
658
|
+
this._useParallaxOcclusion = (__runInitializers(this, _useParallax_extraInitializers), __runInitializers(this, __useParallaxOcclusion_initializers, false));
|
|
659
|
+
_StandardMaterial_useParallaxOcclusion_accessor_storage.set(this, (__runInitializers(this, __useParallaxOcclusion_extraInitializers), __runInitializers(this, _useParallaxOcclusion_initializers, void 0)));
|
|
660
|
+
/**
|
|
661
|
+
* Apply a scaling factor that determine which "depth" the height map should reprensent. A value between 0.05 and 0.1 is reasonnable in Parallax, you can reach 0.2 using Parallax Occlusion.
|
|
662
|
+
*/
|
|
663
|
+
this.parallaxScaleBias = (__runInitializers(this, _useParallaxOcclusion_extraInitializers), __runInitializers(this, _parallaxScaleBias_initializers, 0.05));
|
|
664
|
+
this._roughness = (__runInitializers(this, _parallaxScaleBias_extraInitializers), __runInitializers(this, __roughness_initializers, 0));
|
|
665
|
+
_StandardMaterial_roughness_accessor_storage.set(this, (__runInitializers(this, __roughness_extraInitializers), __runInitializers(this, _roughness_initializers, void 0)));
|
|
666
|
+
/**
|
|
667
|
+
* In case of refraction, define the value of the index of refraction.
|
|
668
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions
|
|
669
|
+
*/
|
|
670
|
+
this.indexOfRefraction = (__runInitializers(this, _roughness_extraInitializers), __runInitializers(this, _indexOfRefraction_initializers, 0.98));
|
|
671
|
+
/**
|
|
672
|
+
* Invert the refraction texture alongside the y axis.
|
|
673
|
+
* It can be useful with procedural textures or probe for instance.
|
|
674
|
+
* @see https://doc.babylonjs.com/features/featuresDeepDive/materials/using/reflectionTexture#how-to-obtain-reflections-and-refractions
|
|
675
|
+
*/
|
|
676
|
+
this.invertRefractionY = (__runInitializers(this, _indexOfRefraction_extraInitializers), __runInitializers(this, _invertRefractionY_initializers, true));
|
|
677
|
+
/**
|
|
678
|
+
* Defines the alpha limits in alpha test mode.
|
|
679
|
+
*/
|
|
680
|
+
this.alphaCutOff = (__runInitializers(this, _invertRefractionY_extraInitializers), __runInitializers(this, _alphaCutOff_initializers, 0.4));
|
|
681
|
+
this._useLightmapAsShadowmap = (__runInitializers(this, _alphaCutOff_extraInitializers), __runInitializers(this, __useLightmapAsShadowmap_initializers, false));
|
|
682
|
+
_StandardMaterial_useLightmapAsShadowmap_accessor_storage.set(this, (__runInitializers(this, __useLightmapAsShadowmap_extraInitializers), __runInitializers(this, _useLightmapAsShadowmap_initializers, void 0)));
|
|
683
|
+
// Fresnel
|
|
684
|
+
this._diffuseFresnelParameters = (__runInitializers(this, _useLightmapAsShadowmap_extraInitializers), __runInitializers(this, __diffuseFresnelParameters_initializers, void 0));
|
|
685
|
+
_StandardMaterial_diffuseFresnelParameters_accessor_storage.set(this, (__runInitializers(this, __diffuseFresnelParameters_extraInitializers), __runInitializers(this, _diffuseFresnelParameters_initializers, void 0)));
|
|
686
|
+
this._opacityFresnelParameters = (__runInitializers(this, _diffuseFresnelParameters_extraInitializers), __runInitializers(this, __opacityFresnelParameters_initializers, void 0));
|
|
687
|
+
_StandardMaterial_opacityFresnelParameters_accessor_storage.set(this, (__runInitializers(this, __opacityFresnelParameters_extraInitializers), __runInitializers(this, _opacityFresnelParameters_initializers, void 0)));
|
|
688
|
+
this._reflectionFresnelParameters = (__runInitializers(this, _opacityFresnelParameters_extraInitializers), __runInitializers(this, __reflectionFresnelParameters_initializers, void 0));
|
|
689
|
+
_StandardMaterial_reflectionFresnelParameters_accessor_storage.set(this, (__runInitializers(this, __reflectionFresnelParameters_extraInitializers), __runInitializers(this, _reflectionFresnelParameters_initializers, void 0)));
|
|
690
|
+
this._refractionFresnelParameters = (__runInitializers(this, _reflectionFresnelParameters_extraInitializers), __runInitializers(this, __refractionFresnelParameters_initializers, void 0));
|
|
691
|
+
_StandardMaterial_refractionFresnelParameters_accessor_storage.set(this, (__runInitializers(this, __refractionFresnelParameters_extraInitializers), __runInitializers(this, _refractionFresnelParameters_initializers, void 0)));
|
|
692
|
+
this._emissiveFresnelParameters = (__runInitializers(this, _refractionFresnelParameters_extraInitializers), __runInitializers(this, __emissiveFresnelParameters_initializers, void 0));
|
|
693
|
+
_StandardMaterial_emissiveFresnelParameters_accessor_storage.set(this, (__runInitializers(this, __emissiveFresnelParameters_extraInitializers), __runInitializers(this, _emissiveFresnelParameters_initializers, void 0)));
|
|
694
|
+
this._useReflectionFresnelFromSpecular = (__runInitializers(this, _emissiveFresnelParameters_extraInitializers), __runInitializers(this, __useReflectionFresnelFromSpecular_initializers, false));
|
|
695
|
+
_StandardMaterial_useReflectionFresnelFromSpecular_accessor_storage.set(this, (__runInitializers(this, __useReflectionFresnelFromSpecular_extraInitializers), __runInitializers(this, _useReflectionFresnelFromSpecular_initializers, void 0)));
|
|
696
|
+
this._useGlossinessFromSpecularMapAlpha = (__runInitializers(this, _useReflectionFresnelFromSpecular_extraInitializers), __runInitializers(this, __useGlossinessFromSpecularMapAlpha_initializers, false));
|
|
697
|
+
_StandardMaterial_useGlossinessFromSpecularMapAlpha_accessor_storage.set(this, (__runInitializers(this, __useGlossinessFromSpecularMapAlpha_extraInitializers), __runInitializers(this, _useGlossinessFromSpecularMapAlpha_initializers, void 0)));
|
|
698
|
+
this._maxSimultaneousLights = (__runInitializers(this, _useGlossinessFromSpecularMapAlpha_extraInitializers), __runInitializers(this, __maxSimultaneousLights_initializers, 4));
|
|
699
|
+
_StandardMaterial_maxSimultaneousLights_accessor_storage.set(this, (__runInitializers(this, __maxSimultaneousLights_extraInitializers), __runInitializers(this, _maxSimultaneousLights_initializers, void 0)));
|
|
700
|
+
this._invertNormalMapX = (__runInitializers(this, _maxSimultaneousLights_extraInitializers), __runInitializers(this, __invertNormalMapX_initializers, false));
|
|
701
|
+
_StandardMaterial_invertNormalMapX_accessor_storage.set(this, (__runInitializers(this, __invertNormalMapX_extraInitializers), __runInitializers(this, _invertNormalMapX_initializers, void 0)));
|
|
702
|
+
this._invertNormalMapY = (__runInitializers(this, _invertNormalMapX_extraInitializers), __runInitializers(this, __invertNormalMapY_initializers, false));
|
|
703
|
+
_StandardMaterial_invertNormalMapY_accessor_storage.set(this, (__runInitializers(this, __invertNormalMapY_extraInitializers), __runInitializers(this, _invertNormalMapY_initializers, void 0)));
|
|
704
|
+
this._twoSidedLighting = (__runInitializers(this, _invertNormalMapY_extraInitializers), __runInitializers(this, __twoSidedLighting_initializers, false));
|
|
705
|
+
_StandardMaterial_twoSidedLighting_accessor_storage.set(this, (__runInitializers(this, __twoSidedLighting_extraInitializers), __runInitializers(this, _twoSidedLighting_initializers, void 0)));
|
|
706
|
+
this._applyDecalMapAfterDetailMap = (__runInitializers(this, _twoSidedLighting_extraInitializers), __runInitializers(this, __applyDecalMapAfterDetailMap_initializers, false));
|
|
707
|
+
_StandardMaterial_applyDecalMapAfterDetailMap_accessor_storage.set(this, (__runInitializers(this, __applyDecalMapAfterDetailMap_extraInitializers), __runInitializers(this, _applyDecalMapAfterDetailMap_initializers, void 0)));
|
|
708
|
+
this._shadersLoaded = (__runInitializers(this, _applyDecalMapAfterDetailMap_extraInitializers), false);
|
|
709
|
+
this._vertexPullingMetadata = null;
|
|
710
|
+
this._renderTargets = new SmartArray(16);
|
|
711
|
+
this._globalAmbientColor = new Color3(0, 0, 0);
|
|
712
|
+
this._cacheHasRenderTargetTextures = false;
|
|
713
|
+
this.detailMap = new DetailMapConfiguration(this);
|
|
714
|
+
// Setup the default processing configuration to the scene.
|
|
715
|
+
this._attachImageProcessingConfiguration(null);
|
|
716
|
+
this.prePassConfiguration = new PrePassConfiguration();
|
|
717
|
+
this.getRenderTargetTextures = () => {
|
|
718
|
+
this._renderTargets.reset();
|
|
719
|
+
if (_a.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
|
|
720
|
+
this._renderTargets.push(this._reflectionTexture);
|
|
414
721
|
}
|
|
415
|
-
|
|
416
|
-
|
|
722
|
+
if (_a.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {
|
|
723
|
+
this._renderTargets.push(this._refractionTexture);
|
|
417
724
|
}
|
|
725
|
+
this._eventInfo.renderTargets = this._renderTargets;
|
|
726
|
+
this._callbackPluginEventFillRenderTargetTextures(this._eventInfo);
|
|
727
|
+
return this._renderTargets;
|
|
728
|
+
};
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Gets a boolean indicating that current material needs to register RTT
|
|
732
|
+
*/
|
|
733
|
+
get hasRenderTargetTextures() {
|
|
734
|
+
if (_a.ReflectionTextureEnabled && this._reflectionTexture && this._reflectionTexture.isRenderTarget) {
|
|
735
|
+
return true;
|
|
418
736
|
}
|
|
419
|
-
|
|
420
|
-
|
|
737
|
+
if (_a.RefractionTextureEnabled && this._refractionTexture && this._refractionTexture.isRenderTarget) {
|
|
738
|
+
return true;
|
|
421
739
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
740
|
+
return this._cacheHasRenderTargetTextures;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Gets the current class name of the material e.g. "StandardMaterial"
|
|
744
|
+
* Mainly use in serialization.
|
|
745
|
+
* @returns the class name
|
|
746
|
+
*/
|
|
747
|
+
getClassName() {
|
|
748
|
+
return "StandardMaterial";
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Specifies if the material will require alpha blending
|
|
752
|
+
* @returns a boolean specifying if alpha blending is needed
|
|
753
|
+
*/
|
|
754
|
+
needAlphaBlending() {
|
|
755
|
+
if (this._hasTransparencyMode) {
|
|
756
|
+
return this._transparencyModeIsBlend;
|
|
429
757
|
}
|
|
430
|
-
|
|
431
|
-
|
|
758
|
+
if (this._disableAlphaBlending) {
|
|
759
|
+
return false;
|
|
432
760
|
}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
761
|
+
return (this.alpha < 1.0 ||
|
|
762
|
+
this._opacityTexture != null ||
|
|
763
|
+
this._shouldUseAlphaFromDiffuseTexture() ||
|
|
764
|
+
(this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled));
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Specifies if this material should be rendered in alpha test mode
|
|
768
|
+
* @returns a boolean specifying if an alpha test is needed.
|
|
769
|
+
*/
|
|
770
|
+
needAlphaTesting() {
|
|
771
|
+
if (this._hasTransparencyMode) {
|
|
772
|
+
return this._transparencyModeIsTest;
|
|
441
773
|
}
|
|
442
|
-
|
|
443
|
-
|
|
774
|
+
return this._hasAlphaChannel() && (this._transparencyMode == null || this._transparencyMode === Material.MATERIAL_ALPHATEST);
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* @returns whether or not the alpha value of the diffuse texture should be used for alpha blending.
|
|
778
|
+
*/
|
|
779
|
+
_shouldUseAlphaFromDiffuseTexture() {
|
|
780
|
+
return this._diffuseTexture != null && this._diffuseTexture.hasAlpha && this._useAlphaFromDiffuseTexture && this._transparencyMode !== Material.MATERIAL_OPAQUE;
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* @returns whether or not there is a usable alpha channel for transparency.
|
|
784
|
+
*/
|
|
785
|
+
_hasAlphaChannel() {
|
|
786
|
+
return (this._diffuseTexture != null && this._diffuseTexture.hasAlpha) || this._opacityTexture != null;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Get the texture used for alpha test purpose.
|
|
790
|
+
* @returns the diffuse texture in case of the standard material.
|
|
791
|
+
*/
|
|
792
|
+
getAlphaTestTexture() {
|
|
793
|
+
return this._diffuseTexture;
|
|
794
|
+
}
|
|
795
|
+
/**
|
|
796
|
+
* Get if the submesh is ready to be used and all its information available.
|
|
797
|
+
* Child classes can use it to update shaders
|
|
798
|
+
* @param mesh defines the mesh to check
|
|
799
|
+
* @param subMesh defines which submesh to check
|
|
800
|
+
* @param useInstances specifies that instances should be used
|
|
801
|
+
* @returns a boolean indicating that the submesh is ready or not
|
|
802
|
+
*/
|
|
803
|
+
isReadyForSubMesh(mesh, subMesh, useInstances = false) {
|
|
804
|
+
if (!this._uniformBufferLayoutBuilt) {
|
|
805
|
+
this.buildUniformLayout();
|
|
444
806
|
}
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
807
|
+
const drawWrapper = subMesh._drawWrapper;
|
|
808
|
+
if (drawWrapper.effect && this.isFrozen) {
|
|
809
|
+
if (drawWrapper._wasPreviouslyReady && drawWrapper._wasPreviouslyUsingInstances === useInstances) {
|
|
810
|
+
return true;
|
|
811
|
+
}
|
|
448
812
|
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
813
|
+
if (!subMesh.materialDefines) {
|
|
814
|
+
this._callbackPluginEventGeneric(4 /* MaterialPluginEvent.GetDefineNames */, this._eventInfo);
|
|
815
|
+
subMesh.materialDefines = new StandardMaterialDefines(this._eventInfo.defineNames);
|
|
816
|
+
}
|
|
817
|
+
const scene = this.getScene();
|
|
818
|
+
const defines = subMesh.materialDefines;
|
|
819
|
+
if (this._isReadyForSubMesh(subMesh)) {
|
|
820
|
+
return true;
|
|
452
821
|
}
|
|
453
|
-
|
|
822
|
+
const engine = scene.getEngine();
|
|
823
|
+
// Lights
|
|
824
|
+
defines._needNormals = PrepareDefinesForLights(scene, mesh, defines, true, this._maxSimultaneousLights, this._disableLighting);
|
|
825
|
+
if (!AreLightsTexturesReady(scene, mesh, this._maxSimultaneousLights, this._disableLighting)) {
|
|
454
826
|
return false;
|
|
455
827
|
}
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
828
|
+
// Multiview
|
|
829
|
+
PrepareDefinesForMultiview(scene, defines);
|
|
830
|
+
// PrePass
|
|
831
|
+
const oit = this.needAlphaBlendingForMesh(mesh) && this.getScene().useOrderIndependentTransparency;
|
|
832
|
+
PrepareDefinesForPrePass(scene, defines, this.canRenderToMRT && !oit);
|
|
833
|
+
// Order independant transparency
|
|
834
|
+
PrepareDefinesForOIT(scene, defines, oit);
|
|
835
|
+
MaterialHelperGeometryRendering.PrepareDefines(engine.currentRenderPassId, mesh, defines);
|
|
836
|
+
// Textures
|
|
837
|
+
if (defines._areTexturesDirty) {
|
|
838
|
+
this._eventInfo.hasRenderTargetTextures = false;
|
|
839
|
+
this._callbackPluginEventHasRenderTargetTextures(this._eventInfo);
|
|
840
|
+
this._cacheHasRenderTargetTextures = this._eventInfo.hasRenderTargetTextures;
|
|
841
|
+
defines._needUVs = false;
|
|
842
|
+
for (let i = 1; i <= 6; ++i) {
|
|
843
|
+
defines["MAINUV" + i] = false;
|
|
844
|
+
}
|
|
845
|
+
if (scene.texturesEnabled) {
|
|
846
|
+
defines.DIFFUSEDIRECTUV = 0;
|
|
847
|
+
defines.BUMPDIRECTUV = 0;
|
|
848
|
+
defines.AMBIENTDIRECTUV = 0;
|
|
849
|
+
defines.OPACITYDIRECTUV = 0;
|
|
850
|
+
defines.EMISSIVEDIRECTUV = 0;
|
|
851
|
+
defines.SPECULARDIRECTUV = 0;
|
|
852
|
+
defines.LIGHTMAPDIRECTUV = 0;
|
|
853
|
+
if (this._diffuseTexture && _a.DiffuseTextureEnabled) {
|
|
854
|
+
if (!this._diffuseTexture.isReadyOrNotBlocking()) {
|
|
855
|
+
return false;
|
|
856
|
+
}
|
|
857
|
+
else {
|
|
858
|
+
PrepareDefinesForMergedUV(this._diffuseTexture, defines, "DIFFUSE");
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
else {
|
|
862
|
+
defines.DIFFUSE = false;
|
|
863
|
+
}
|
|
864
|
+
if (this._ambientTexture && _a.AmbientTextureEnabled) {
|
|
865
|
+
if (!this._ambientTexture.isReadyOrNotBlocking()) {
|
|
866
|
+
return false;
|
|
867
|
+
}
|
|
868
|
+
else {
|
|
869
|
+
PrepareDefinesForMergedUV(this._ambientTexture, defines, "AMBIENT");
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
else {
|
|
873
|
+
defines.AMBIENT = false;
|
|
874
|
+
}
|
|
875
|
+
if (this._opacityTexture && _a.OpacityTextureEnabled) {
|
|
876
|
+
if (!this._opacityTexture.isReadyOrNotBlocking()) {
|
|
877
|
+
return false;
|
|
878
|
+
}
|
|
879
|
+
else {
|
|
880
|
+
PrepareDefinesForMergedUV(this._opacityTexture, defines, "OPACITY");
|
|
881
|
+
defines.OPACITYRGB = this._opacityTexture.getAlphaFromRGB;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
else {
|
|
885
|
+
defines.OPACITY = false;
|
|
886
|
+
}
|
|
887
|
+
if (this._reflectionTexture && _a.ReflectionTextureEnabled) {
|
|
888
|
+
defines.ROUGHNESS = this._roughness > 0;
|
|
889
|
+
defines.REFLECTIONOVERALPHA = this._useReflectionOverAlpha;
|
|
890
|
+
}
|
|
891
|
+
else {
|
|
892
|
+
defines.ROUGHNESS = false;
|
|
893
|
+
defines.REFLECTIONOVERALPHA = false;
|
|
894
|
+
}
|
|
895
|
+
if (!PrepareDefinesForIBL(scene, this._reflectionTexture, defines)) {
|
|
896
|
+
return false;
|
|
897
|
+
}
|
|
898
|
+
if (this._emissiveTexture && _a.EmissiveTextureEnabled) {
|
|
899
|
+
if (!this._emissiveTexture.isReadyOrNotBlocking()) {
|
|
900
|
+
return false;
|
|
901
|
+
}
|
|
902
|
+
else {
|
|
903
|
+
PrepareDefinesForMergedUV(this._emissiveTexture, defines, "EMISSIVE");
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
else {
|
|
907
|
+
defines.EMISSIVE = false;
|
|
908
|
+
}
|
|
909
|
+
if (this._lightmapTexture && _a.LightmapTextureEnabled) {
|
|
910
|
+
if (!this._lightmapTexture.isReadyOrNotBlocking()) {
|
|
911
|
+
return false;
|
|
912
|
+
}
|
|
913
|
+
else {
|
|
914
|
+
PrepareDefinesForMergedUV(this._lightmapTexture, defines, "LIGHTMAP");
|
|
915
|
+
defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;
|
|
916
|
+
defines.RGBDLIGHTMAP = this._lightmapTexture.isRGBD;
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
else {
|
|
920
|
+
defines.LIGHTMAP = false;
|
|
921
|
+
}
|
|
922
|
+
if (this._specularTexture && _a.SpecularTextureEnabled) {
|
|
923
|
+
if (!this._specularTexture.isReadyOrNotBlocking()) {
|
|
924
|
+
return false;
|
|
925
|
+
}
|
|
926
|
+
else {
|
|
927
|
+
PrepareDefinesForMergedUV(this._specularTexture, defines, "SPECULAR");
|
|
928
|
+
defines.GLOSSINESS = this._useGlossinessFromSpecularMapAlpha;
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
else {
|
|
932
|
+
defines.SPECULAR = false;
|
|
933
|
+
}
|
|
934
|
+
if (scene.getEngine().getCaps().standardDerivatives && this._bumpTexture && _a.BumpTextureEnabled) {
|
|
935
|
+
// Bump texture can not be not blocking.
|
|
936
|
+
if (!this._bumpTexture.isReady()) {
|
|
937
|
+
return false;
|
|
938
|
+
}
|
|
939
|
+
else {
|
|
940
|
+
PrepareDefinesForMergedUV(this._bumpTexture, defines, "BUMP");
|
|
941
|
+
defines.PARALLAX = this._useParallax;
|
|
942
|
+
defines.PARALLAX_RHS = scene.useRightHandedSystem;
|
|
943
|
+
defines.PARALLAXOCCLUSION = this._useParallaxOcclusion;
|
|
944
|
+
}
|
|
945
|
+
defines.OBJECTSPACE_NORMALMAP = this._useObjectSpaceNormalMap;
|
|
946
|
+
}
|
|
947
|
+
else {
|
|
948
|
+
defines.BUMP = false;
|
|
949
|
+
defines.PARALLAX = false;
|
|
950
|
+
defines.PARALLAX_RHS = false;
|
|
951
|
+
defines.PARALLAXOCCLUSION = false;
|
|
952
|
+
}
|
|
953
|
+
if (this._refractionTexture && _a.RefractionTextureEnabled) {
|
|
954
|
+
if (!this._refractionTexture.isReadyOrNotBlocking()) {
|
|
955
|
+
return false;
|
|
956
|
+
}
|
|
957
|
+
else {
|
|
958
|
+
defines._needUVs = true;
|
|
959
|
+
defines.REFRACTION = true;
|
|
960
|
+
defines.REFRACTIONMAP_3D = this._refractionTexture.isCube;
|
|
961
|
+
defines.RGBDREFRACTION = this._refractionTexture.isRGBD;
|
|
962
|
+
defines.USE_LOCAL_REFRACTIONMAP_CUBIC = this._refractionTexture.boundingBoxSize ? true : false;
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
else {
|
|
966
|
+
defines.REFRACTION = false;
|
|
967
|
+
}
|
|
968
|
+
defines.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting;
|
|
459
969
|
}
|
|
460
970
|
else {
|
|
461
|
-
|
|
971
|
+
defines.DIFFUSE = false;
|
|
972
|
+
defines.AMBIENT = false;
|
|
973
|
+
defines.OPACITY = false;
|
|
974
|
+
defines.REFLECTION = false;
|
|
975
|
+
defines.EMISSIVE = false;
|
|
976
|
+
defines.LIGHTMAP = false;
|
|
977
|
+
defines.BUMP = false;
|
|
978
|
+
defines.REFRACTION = false;
|
|
462
979
|
}
|
|
980
|
+
defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();
|
|
981
|
+
defines.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination;
|
|
982
|
+
defines.LINKEMISSIVEWITHDIFFUSE = this._linkEmissiveWithDiffuse;
|
|
983
|
+
defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;
|
|
984
|
+
defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;
|
|
985
|
+
defines.ALPHATEST_AFTERALLALPHACOMPUTATIONS = this.transparencyMode !== null;
|
|
986
|
+
defines.ALPHABLEND = this.transparencyMode === null || this.needAlphaBlendingForMesh(mesh); // check on null for backward compatibility
|
|
987
|
+
defines.TEXTURE_REPETITION_MODE = engine.version > 1 || engine.isWebGPU ? this.textureRepetitionMode : 0;
|
|
463
988
|
}
|
|
464
|
-
|
|
465
|
-
|
|
989
|
+
this._eventInfo.isReadyForSubMesh = true;
|
|
990
|
+
this._eventInfo.defines = defines;
|
|
991
|
+
this._eventInfo.subMesh = subMesh;
|
|
992
|
+
this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);
|
|
993
|
+
if (!this._eventInfo.isReadyForSubMesh) {
|
|
994
|
+
return false;
|
|
466
995
|
}
|
|
467
|
-
if (
|
|
468
|
-
if (!this.
|
|
996
|
+
if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {
|
|
997
|
+
if (!this._imageProcessingConfiguration.isReady()) {
|
|
469
998
|
return false;
|
|
470
999
|
}
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
defines.RGBDLIGHTMAP = this._lightmapTexture.isRGBD;
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
else {
|
|
478
|
-
defines.LIGHTMAP = false;
|
|
1000
|
+
this._imageProcessingConfiguration.prepareDefines(defines);
|
|
1001
|
+
defines.IS_REFLECTION_LINEAR = this.reflectionTexture != null && !this.reflectionTexture.gammaSpace;
|
|
1002
|
+
defines.IS_REFRACTION_LINEAR = this.refractionTexture != null && !this.refractionTexture.gammaSpace;
|
|
479
1003
|
}
|
|
480
|
-
if (
|
|
481
|
-
if (
|
|
482
|
-
|
|
1004
|
+
if (defines._areFresnelDirty) {
|
|
1005
|
+
if (_a.FresnelEnabled) {
|
|
1006
|
+
// Fresnel
|
|
1007
|
+
if (this._diffuseFresnelParameters ||
|
|
1008
|
+
this._opacityFresnelParameters ||
|
|
1009
|
+
this._emissiveFresnelParameters ||
|
|
1010
|
+
this._refractionFresnelParameters ||
|
|
1011
|
+
this._reflectionFresnelParameters) {
|
|
1012
|
+
defines.DIFFUSEFRESNEL = this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled;
|
|
1013
|
+
defines.OPACITYFRESNEL = this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;
|
|
1014
|
+
defines.REFLECTIONFRESNEL = this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled;
|
|
1015
|
+
defines.REFLECTIONFRESNELFROMSPECULAR = this._useReflectionFresnelFromSpecular;
|
|
1016
|
+
defines.REFRACTIONFRESNEL = this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled;
|
|
1017
|
+
defines.EMISSIVEFRESNEL = this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled;
|
|
1018
|
+
defines._needNormals = true;
|
|
1019
|
+
defines.FRESNEL = true;
|
|
1020
|
+
}
|
|
483
1021
|
}
|
|
484
1022
|
else {
|
|
485
|
-
|
|
486
|
-
defines.GLOSSINESS = this._useGlossinessFromSpecularMapAlpha;
|
|
1023
|
+
defines.FRESNEL = false;
|
|
487
1024
|
}
|
|
488
1025
|
}
|
|
489
|
-
|
|
490
|
-
|
|
1026
|
+
// Check if lights are ready
|
|
1027
|
+
if (defines["AREALIGHTUSED"] || defines["CLUSTLIGHT_BATCH"]) {
|
|
1028
|
+
for (let index = 0; index < mesh.lightSources.length; index++) {
|
|
1029
|
+
if (!mesh.lightSources[index]._isReady()) {
|
|
1030
|
+
return false;
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
491
1033
|
}
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
1034
|
+
// Misc.
|
|
1035
|
+
PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, this._applyDecalMapAfterDetailMap, this._useVertexPulling, subMesh.getRenderingMesh(), this._isVertexOutputInvariant);
|
|
1036
|
+
// Values that need to be evaluated on every frame
|
|
1037
|
+
PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);
|
|
1038
|
+
// External config
|
|
1039
|
+
this._eventInfo.defines = defines;
|
|
1040
|
+
this._eventInfo.mesh = mesh;
|
|
1041
|
+
this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo);
|
|
1042
|
+
// Attribs
|
|
1043
|
+
PrepareDefinesForAttributes(mesh, defines, true, true, true);
|
|
1044
|
+
// External config
|
|
1045
|
+
this._callbackPluginEventPrepareDefines(this._eventInfo);
|
|
1046
|
+
// Get correct effect
|
|
1047
|
+
let forceWasNotReadyPreviously = false;
|
|
1048
|
+
if (defines.isDirty) {
|
|
1049
|
+
const lightDisposed = defines._areLightsDisposed;
|
|
1050
|
+
defines.markAsProcessed();
|
|
1051
|
+
// Fallbacks
|
|
1052
|
+
const fallbacks = new EffectFallbacks();
|
|
1053
|
+
if (defines.REFLECTION) {
|
|
1054
|
+
fallbacks.addFallback(0, "REFLECTION");
|
|
496
1055
|
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
defines.PARALLAX = this._useParallax;
|
|
500
|
-
defines.PARALLAX_RHS = scene.useRightHandedSystem;
|
|
501
|
-
defines.PARALLAXOCCLUSION = this._useParallaxOcclusion;
|
|
1056
|
+
if (defines.SPECULAR) {
|
|
1057
|
+
fallbacks.addFallback(0, "SPECULAR");
|
|
502
1058
|
}
|
|
503
|
-
defines.
|
|
504
|
-
|
|
505
|
-
else {
|
|
506
|
-
defines.BUMP = false;
|
|
507
|
-
defines.PARALLAX = false;
|
|
508
|
-
defines.PARALLAX_RHS = false;
|
|
509
|
-
defines.PARALLAXOCCLUSION = false;
|
|
510
|
-
}
|
|
511
|
-
if (this._refractionTexture && StandardMaterial.RefractionTextureEnabled) {
|
|
512
|
-
if (!this._refractionTexture.isReadyOrNotBlocking()) {
|
|
513
|
-
return false;
|
|
1059
|
+
if (defines.BUMP) {
|
|
1060
|
+
fallbacks.addFallback(0, "BUMP");
|
|
514
1061
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
defines.REFRACTION = true;
|
|
518
|
-
defines.REFRACTIONMAP_3D = this._refractionTexture.isCube;
|
|
519
|
-
defines.RGBDREFRACTION = this._refractionTexture.isRGBD;
|
|
520
|
-
defines.USE_LOCAL_REFRACTIONMAP_CUBIC = this._refractionTexture.boundingBoxSize ? true : false;
|
|
1062
|
+
if (defines.PARALLAX) {
|
|
1063
|
+
fallbacks.addFallback(1, "PARALLAX");
|
|
521
1064
|
}
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
defines.REFRACTION = false;
|
|
525
|
-
}
|
|
526
|
-
defines.TWOSIDEDLIGHTING = !this._backFaceCulling && this._twoSidedLighting;
|
|
527
|
-
}
|
|
528
|
-
else {
|
|
529
|
-
defines.DIFFUSE = false;
|
|
530
|
-
defines.AMBIENT = false;
|
|
531
|
-
defines.OPACITY = false;
|
|
532
|
-
defines.REFLECTION = false;
|
|
533
|
-
defines.EMISSIVE = false;
|
|
534
|
-
defines.LIGHTMAP = false;
|
|
535
|
-
defines.BUMP = false;
|
|
536
|
-
defines.REFRACTION = false;
|
|
537
|
-
}
|
|
538
|
-
defines.ALPHAFROMDIFFUSE = this._shouldUseAlphaFromDiffuseTexture();
|
|
539
|
-
defines.EMISSIVEASILLUMINATION = this._useEmissiveAsIllumination;
|
|
540
|
-
defines.LINKEMISSIVEWITHDIFFUSE = this._linkEmissiveWithDiffuse;
|
|
541
|
-
defines.SPECULAROVERALPHA = this._useSpecularOverAlpha;
|
|
542
|
-
defines.PREMULTIPLYALPHA = this.alphaMode === 7 || this.alphaMode === 8;
|
|
543
|
-
defines.ALPHATEST_AFTERALLALPHACOMPUTATIONS = this.transparencyMode !== null;
|
|
544
|
-
defines.ALPHABLEND = this.transparencyMode === null || this.needAlphaBlendingForMesh(mesh); // check on null for backward compatibility
|
|
545
|
-
defines.TEXTURE_REPETITION_MODE = engine.version > 1 || engine.isWebGPU ? this.textureRepetitionMode : 0;
|
|
546
|
-
}
|
|
547
|
-
this._eventInfo.isReadyForSubMesh = true;
|
|
548
|
-
this._eventInfo.defines = defines;
|
|
549
|
-
this._eventInfo.subMesh = subMesh;
|
|
550
|
-
this._callbackPluginEventIsReadyForSubMesh(this._eventInfo);
|
|
551
|
-
if (!this._eventInfo.isReadyForSubMesh) {
|
|
552
|
-
return false;
|
|
553
|
-
}
|
|
554
|
-
if (defines._areImageProcessingDirty && this._imageProcessingConfiguration) {
|
|
555
|
-
if (!this._imageProcessingConfiguration.isReady()) {
|
|
556
|
-
return false;
|
|
557
|
-
}
|
|
558
|
-
this._imageProcessingConfiguration.prepareDefines(defines);
|
|
559
|
-
defines.IS_REFLECTION_LINEAR = this.reflectionTexture != null && !this.reflectionTexture.gammaSpace;
|
|
560
|
-
defines.IS_REFRACTION_LINEAR = this.refractionTexture != null && !this.refractionTexture.gammaSpace;
|
|
561
|
-
}
|
|
562
|
-
if (defines._areFresnelDirty) {
|
|
563
|
-
if (StandardMaterial.FresnelEnabled) {
|
|
564
|
-
// Fresnel
|
|
565
|
-
if (this._diffuseFresnelParameters ||
|
|
566
|
-
this._opacityFresnelParameters ||
|
|
567
|
-
this._emissiveFresnelParameters ||
|
|
568
|
-
this._refractionFresnelParameters ||
|
|
569
|
-
this._reflectionFresnelParameters) {
|
|
570
|
-
defines.DIFFUSEFRESNEL = this._diffuseFresnelParameters && this._diffuseFresnelParameters.isEnabled;
|
|
571
|
-
defines.OPACITYFRESNEL = this._opacityFresnelParameters && this._opacityFresnelParameters.isEnabled;
|
|
572
|
-
defines.REFLECTIONFRESNEL = this._reflectionFresnelParameters && this._reflectionFresnelParameters.isEnabled;
|
|
573
|
-
defines.REFLECTIONFRESNELFROMSPECULAR = this._useReflectionFresnelFromSpecular;
|
|
574
|
-
defines.REFRACTIONFRESNEL = this._refractionFresnelParameters && this._refractionFresnelParameters.isEnabled;
|
|
575
|
-
defines.EMISSIVEFRESNEL = this._emissiveFresnelParameters && this._emissiveFresnelParameters.isEnabled;
|
|
576
|
-
defines._needNormals = true;
|
|
577
|
-
defines.FRESNEL = true;
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
else {
|
|
581
|
-
defines.FRESNEL = false;
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
// Check if lights are ready
|
|
585
|
-
if (defines["AREALIGHTUSED"] || defines["CLUSTLIGHT_BATCH"]) {
|
|
586
|
-
for (let index = 0; index < mesh.lightSources.length; index++) {
|
|
587
|
-
if (!mesh.lightSources[index]._isReady()) {
|
|
588
|
-
return false;
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
// Misc.
|
|
593
|
-
PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, this._applyDecalMapAfterDetailMap, this._useVertexPulling, subMesh.getRenderingMesh(), this._isVertexOutputInvariant);
|
|
594
|
-
// Values that need to be evaluated on every frame
|
|
595
|
-
PrepareDefinesForFrameBoundValues(scene, engine, this, defines, useInstances, null, subMesh.getRenderingMesh().hasThinInstances);
|
|
596
|
-
// External config
|
|
597
|
-
this._eventInfo.defines = defines;
|
|
598
|
-
this._eventInfo.mesh = mesh;
|
|
599
|
-
this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo);
|
|
600
|
-
// Attribs
|
|
601
|
-
PrepareDefinesForAttributes(mesh, defines, true, true, true);
|
|
602
|
-
// External config
|
|
603
|
-
this._callbackPluginEventPrepareDefines(this._eventInfo);
|
|
604
|
-
// Get correct effect
|
|
605
|
-
let forceWasNotReadyPreviously = false;
|
|
606
|
-
if (defines.isDirty) {
|
|
607
|
-
const lightDisposed = defines._areLightsDisposed;
|
|
608
|
-
defines.markAsProcessed();
|
|
609
|
-
// Fallbacks
|
|
610
|
-
const fallbacks = new EffectFallbacks();
|
|
611
|
-
if (defines.REFLECTION) {
|
|
612
|
-
fallbacks.addFallback(0, "REFLECTION");
|
|
613
|
-
}
|
|
614
|
-
if (defines.SPECULAR) {
|
|
615
|
-
fallbacks.addFallback(0, "SPECULAR");
|
|
616
|
-
}
|
|
617
|
-
if (defines.BUMP) {
|
|
618
|
-
fallbacks.addFallback(0, "BUMP");
|
|
619
|
-
}
|
|
620
|
-
if (defines.PARALLAX) {
|
|
621
|
-
fallbacks.addFallback(1, "PARALLAX");
|
|
622
|
-
}
|
|
623
|
-
if (defines.PARALLAX_RHS) {
|
|
624
|
-
fallbacks.addFallback(1, "PARALLAX_RHS");
|
|
625
|
-
}
|
|
626
|
-
if (defines.PARALLAXOCCLUSION) {
|
|
627
|
-
fallbacks.addFallback(0, "PARALLAXOCCLUSION");
|
|
628
|
-
}
|
|
629
|
-
if (defines.SPECULAROVERALPHA) {
|
|
630
|
-
fallbacks.addFallback(0, "SPECULAROVERALPHA");
|
|
631
|
-
}
|
|
632
|
-
if (defines.FOG) {
|
|
633
|
-
fallbacks.addFallback(1, "FOG");
|
|
634
|
-
}
|
|
635
|
-
if (defines.POINTSIZE) {
|
|
636
|
-
fallbacks.addFallback(0, "POINTSIZE");
|
|
637
|
-
}
|
|
638
|
-
if (defines.LOGARITHMICDEPTH) {
|
|
639
|
-
fallbacks.addFallback(0, "LOGARITHMICDEPTH");
|
|
640
|
-
}
|
|
641
|
-
HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);
|
|
642
|
-
if (defines.SPECULARTERM) {
|
|
643
|
-
fallbacks.addFallback(0, "SPECULARTERM");
|
|
644
|
-
}
|
|
645
|
-
if (defines.DIFFUSEFRESNEL) {
|
|
646
|
-
fallbacks.addFallback(1, "DIFFUSEFRESNEL");
|
|
647
|
-
}
|
|
648
|
-
if (defines.OPACITYFRESNEL) {
|
|
649
|
-
fallbacks.addFallback(2, "OPACITYFRESNEL");
|
|
650
|
-
}
|
|
651
|
-
if (defines.REFLECTIONFRESNEL) {
|
|
652
|
-
fallbacks.addFallback(3, "REFLECTIONFRESNEL");
|
|
653
|
-
}
|
|
654
|
-
if (defines.EMISSIVEFRESNEL) {
|
|
655
|
-
fallbacks.addFallback(4, "EMISSIVEFRESNEL");
|
|
656
|
-
}
|
|
657
|
-
if (defines.FRESNEL) {
|
|
658
|
-
fallbacks.addFallback(4, "FRESNEL");
|
|
659
|
-
}
|
|
660
|
-
if (defines.MULTIVIEW) {
|
|
661
|
-
fallbacks.addFallback(0, "MULTIVIEW");
|
|
662
|
-
}
|
|
663
|
-
//Attributes
|
|
664
|
-
const attribs = [VertexBuffer.PositionKind];
|
|
665
|
-
if (defines.NORMAL) {
|
|
666
|
-
attribs.push(VertexBuffer.NormalKind);
|
|
667
|
-
}
|
|
668
|
-
if (defines.TANGENT) {
|
|
669
|
-
attribs.push(VertexBuffer.TangentKind);
|
|
670
|
-
}
|
|
671
|
-
for (let i = 1; i <= 6; ++i) {
|
|
672
|
-
if (defines["UV" + i]) {
|
|
673
|
-
attribs.push(`uv${i === 1 ? "" : i}`);
|
|
674
|
-
}
|
|
675
|
-
}
|
|
676
|
-
if (defines.VERTEXCOLOR) {
|
|
677
|
-
attribs.push(VertexBuffer.ColorKind);
|
|
678
|
-
}
|
|
679
|
-
PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
|
|
680
|
-
PrepareAttributesForInstances(attribs, defines);
|
|
681
|
-
PrepareAttributesForMorphTargets(attribs, mesh, defines);
|
|
682
|
-
PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);
|
|
683
|
-
let shaderName = "default";
|
|
684
|
-
const uniforms = [
|
|
685
|
-
"world",
|
|
686
|
-
"view",
|
|
687
|
-
"viewProjection",
|
|
688
|
-
"vEyePosition",
|
|
689
|
-
"vLightsType",
|
|
690
|
-
"vAmbientColor",
|
|
691
|
-
"vDiffuseColor",
|
|
692
|
-
"vSpecularColor",
|
|
693
|
-
"vEmissiveColor",
|
|
694
|
-
"visibility",
|
|
695
|
-
"vFogInfos",
|
|
696
|
-
"vFogColor",
|
|
697
|
-
"pointSize",
|
|
698
|
-
"vDiffuseInfos",
|
|
699
|
-
"vAmbientInfos",
|
|
700
|
-
"vOpacityInfos",
|
|
701
|
-
"vEmissiveInfos",
|
|
702
|
-
"vSpecularInfos",
|
|
703
|
-
"vBumpInfos",
|
|
704
|
-
"vLightmapInfos",
|
|
705
|
-
"vRefractionInfos",
|
|
706
|
-
"mBones",
|
|
707
|
-
"diffuseMatrix",
|
|
708
|
-
"ambientMatrix",
|
|
709
|
-
"opacityMatrix",
|
|
710
|
-
"emissiveMatrix",
|
|
711
|
-
"specularMatrix",
|
|
712
|
-
"bumpMatrix",
|
|
713
|
-
"normalMatrix",
|
|
714
|
-
"lightmapMatrix",
|
|
715
|
-
"refractionMatrix",
|
|
716
|
-
"diffuseLeftColor",
|
|
717
|
-
"diffuseRightColor",
|
|
718
|
-
"opacityParts",
|
|
719
|
-
"reflectionLeftColor",
|
|
720
|
-
"reflectionRightColor",
|
|
721
|
-
"emissiveLeftColor",
|
|
722
|
-
"emissiveRightColor",
|
|
723
|
-
"refractionLeftColor",
|
|
724
|
-
"refractionRightColor",
|
|
725
|
-
"vRefractionPosition",
|
|
726
|
-
"vRefractionSize",
|
|
727
|
-
"logarithmicDepthConstant",
|
|
728
|
-
"vTangentSpaceParams",
|
|
729
|
-
"alphaCutOff",
|
|
730
|
-
"boneTextureInfo",
|
|
731
|
-
"morphTargetTextureInfo",
|
|
732
|
-
"morphTargetTextureIndices",
|
|
733
|
-
"cameraInfo",
|
|
734
|
-
"vTextureRepetitionHexTilingParams",
|
|
735
|
-
];
|
|
736
|
-
const samplers = [
|
|
737
|
-
"diffuseSampler",
|
|
738
|
-
"ambientSampler",
|
|
739
|
-
"opacitySampler",
|
|
740
|
-
"reflectionCubeSampler",
|
|
741
|
-
"reflection2DSampler",
|
|
742
|
-
"emissiveSampler",
|
|
743
|
-
"specularSampler",
|
|
744
|
-
"bumpSampler",
|
|
745
|
-
"lightmapSampler",
|
|
746
|
-
"refractionCubeSampler",
|
|
747
|
-
"refraction2DSampler",
|
|
748
|
-
"boneSampler",
|
|
749
|
-
"morphTargets",
|
|
750
|
-
"oitDepthSampler",
|
|
751
|
-
"oitFrontColorSampler",
|
|
752
|
-
"areaLightsLTC1Sampler",
|
|
753
|
-
"areaLightsLTC2Sampler",
|
|
754
|
-
];
|
|
755
|
-
PrepareUniformsAndSamplersForIBL(uniforms, samplers, false);
|
|
756
|
-
const uniformBuffers = ["Material", "Scene", "Mesh"];
|
|
757
|
-
const indexParameters = { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: defines.NUM_MORPH_INFLUENCERS };
|
|
758
|
-
this._eventInfo.fallbacks = fallbacks;
|
|
759
|
-
this._eventInfo.fallbackRank = 0;
|
|
760
|
-
this._eventInfo.defines = defines;
|
|
761
|
-
this._eventInfo.uniforms = uniforms;
|
|
762
|
-
this._eventInfo.attributes = attribs;
|
|
763
|
-
this._eventInfo.samplers = samplers;
|
|
764
|
-
this._eventInfo.uniformBuffersNames = uniformBuffers;
|
|
765
|
-
this._eventInfo.customCode = undefined;
|
|
766
|
-
this._eventInfo.mesh = mesh;
|
|
767
|
-
this._eventInfo.indexParameters = indexParameters;
|
|
768
|
-
this._callbackPluginEventGeneric(128 /* MaterialPluginEvent.PrepareEffect */, this._eventInfo);
|
|
769
|
-
MaterialHelperGeometryRendering.AddUniformsAndSamplers(uniforms, samplers);
|
|
770
|
-
PrePassConfiguration.AddUniforms(uniforms);
|
|
771
|
-
PrePassConfiguration.AddSamplers(samplers);
|
|
772
|
-
if (ImageProcessingConfiguration) {
|
|
773
|
-
ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);
|
|
774
|
-
ImageProcessingConfiguration.PrepareSamplers(samplers, defines);
|
|
775
|
-
}
|
|
776
|
-
PrepareUniformsAndSamplersList({
|
|
777
|
-
uniformsNames: uniforms,
|
|
778
|
-
uniformBuffersNames: uniformBuffers,
|
|
779
|
-
samplers: samplers,
|
|
780
|
-
defines: defines,
|
|
781
|
-
maxSimultaneousLights: this._maxSimultaneousLights,
|
|
782
|
-
shaderLanguage: this._shaderLanguage,
|
|
783
|
-
});
|
|
784
|
-
AddClipPlaneUniforms(uniforms);
|
|
785
|
-
// Vertex pulling metadata uniforms
|
|
786
|
-
if (this._useVertexPulling) {
|
|
787
|
-
const renderingMesh = subMesh.getRenderingMesh();
|
|
788
|
-
const geometry = renderingMesh?.geometry;
|
|
789
|
-
if (geometry) {
|
|
790
|
-
this._vertexPullingMetadata = PrepareVertexPullingUniforms(geometry);
|
|
791
|
-
if (this._vertexPullingMetadata) {
|
|
792
|
-
this._vertexPullingMetadata.forEach((_, attribute) => {
|
|
793
|
-
uniforms.push(`vp_${attribute}_info`);
|
|
794
|
-
});
|
|
1065
|
+
if (defines.PARALLAX_RHS) {
|
|
1066
|
+
fallbacks.addFallback(1, "PARALLAX_RHS");
|
|
795
1067
|
}
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
else {
|
|
799
|
-
this._vertexPullingMetadata = null;
|
|
800
|
-
}
|
|
801
|
-
const csnrOptions = {};
|
|
802
|
-
if (this.customShaderNameResolve) {
|
|
803
|
-
shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);
|
|
804
|
-
}
|
|
805
|
-
const join = defines.toString();
|
|
806
|
-
const previousEffect = subMesh.effect;
|
|
807
|
-
const effect = scene.getEngine().createEffect(shaderName, {
|
|
808
|
-
attributes: attribs,
|
|
809
|
-
uniformsNames: uniforms,
|
|
810
|
-
uniformBuffersNames: uniformBuffers,
|
|
811
|
-
samplers: samplers,
|
|
812
|
-
defines: join,
|
|
813
|
-
fallbacks: fallbacks,
|
|
814
|
-
onCompiled: this.onCompiled,
|
|
815
|
-
onError: this.onError,
|
|
816
|
-
indexParameters,
|
|
817
|
-
processFinalCode: csnrOptions.processFinalCode,
|
|
818
|
-
processCodeAfterIncludes: this._eventInfo.customCode,
|
|
819
|
-
multiTarget: defines.PREPASS,
|
|
820
|
-
shaderLanguage: this._shaderLanguage,
|
|
821
|
-
extraInitializationsAsync: this._shadersLoaded
|
|
822
|
-
? undefined
|
|
823
|
-
: async () => {
|
|
824
|
-
if (this._shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
825
|
-
await Promise.all([import("../ShadersWGSL/default.vertex.js"), import("../ShadersWGSL/default.fragment.js")]);
|
|
826
|
-
}
|
|
827
|
-
else {
|
|
828
|
-
await Promise.all([import("../Shaders/default.vertex.js"), import("../Shaders/default.fragment.js")]);
|
|
829
|
-
}
|
|
830
|
-
this._shadersLoaded = true;
|
|
831
|
-
},
|
|
832
|
-
}, engine);
|
|
833
|
-
this._eventInfo.customCode = undefined;
|
|
834
|
-
if (effect) {
|
|
835
|
-
if (this._onEffectCreatedObservable) {
|
|
836
|
-
onCreatedEffectParameters.effect = effect;
|
|
837
|
-
onCreatedEffectParameters.subMesh = subMesh;
|
|
838
|
-
this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);
|
|
839
|
-
}
|
|
840
|
-
// Use previous effect while new one is compiling
|
|
841
|
-
if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {
|
|
842
|
-
defines.markAsUnprocessed();
|
|
843
|
-
forceWasNotReadyPreviously = this.isFrozen;
|
|
844
|
-
if (lightDisposed) {
|
|
845
|
-
// re register in case it takes more than one frame.
|
|
846
|
-
defines._areLightsDisposed = true;
|
|
847
|
-
return false;
|
|
1068
|
+
if (defines.PARALLAXOCCLUSION) {
|
|
1069
|
+
fallbacks.addFallback(0, "PARALLAXOCCLUSION");
|
|
848
1070
|
}
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
scene.resetCachedMaterial();
|
|
852
|
-
subMesh.setEffect(effect, defines, this._materialContext);
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
857
|
-
return false;
|
|
858
|
-
}
|
|
859
|
-
defines._renderId = scene.getRenderId();
|
|
860
|
-
drawWrapper._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;
|
|
861
|
-
drawWrapper._wasPreviouslyUsingInstances = useInstances;
|
|
862
|
-
this._checkScenePerformancePriority();
|
|
863
|
-
return true;
|
|
864
|
-
}
|
|
865
|
-
/**
|
|
866
|
-
* Builds the material UBO layouts.
|
|
867
|
-
* Used internally during the effect preparation.
|
|
868
|
-
*/
|
|
869
|
-
buildUniformLayout() {
|
|
870
|
-
// Order is important !
|
|
871
|
-
const ubo = this._uniformBuffer;
|
|
872
|
-
ubo.addUniform("diffuseLeftColor", 4);
|
|
873
|
-
ubo.addUniform("diffuseRightColor", 4);
|
|
874
|
-
ubo.addUniform("opacityParts", 4);
|
|
875
|
-
ubo.addUniform("reflectionLeftColor", 4);
|
|
876
|
-
ubo.addUniform("reflectionRightColor", 4);
|
|
877
|
-
ubo.addUniform("refractionLeftColor", 4);
|
|
878
|
-
ubo.addUniform("refractionRightColor", 4);
|
|
879
|
-
ubo.addUniform("emissiveLeftColor", 4);
|
|
880
|
-
ubo.addUniform("emissiveRightColor", 4);
|
|
881
|
-
ubo.addUniform("vDiffuseInfos", 2);
|
|
882
|
-
ubo.addUniform("vAmbientInfos", 2);
|
|
883
|
-
ubo.addUniform("vOpacityInfos", 2);
|
|
884
|
-
ubo.addUniform("vEmissiveInfos", 2);
|
|
885
|
-
ubo.addUniform("vLightmapInfos", 2);
|
|
886
|
-
ubo.addUniform("vSpecularInfos", 2);
|
|
887
|
-
ubo.addUniform("vBumpInfos", 3);
|
|
888
|
-
ubo.addUniform("diffuseMatrix", 16);
|
|
889
|
-
ubo.addUniform("ambientMatrix", 16);
|
|
890
|
-
ubo.addUniform("opacityMatrix", 16);
|
|
891
|
-
ubo.addUniform("emissiveMatrix", 16);
|
|
892
|
-
ubo.addUniform("lightmapMatrix", 16);
|
|
893
|
-
ubo.addUniform("specularMatrix", 16);
|
|
894
|
-
ubo.addUniform("bumpMatrix", 16);
|
|
895
|
-
ubo.addUniform("vTangentSpaceParams", 2);
|
|
896
|
-
ubo.addUniform("pointSize", 1);
|
|
897
|
-
ubo.addUniform("alphaCutOff", 1);
|
|
898
|
-
ubo.addUniform("refractionMatrix", 16);
|
|
899
|
-
ubo.addUniform("vRefractionInfos", 4);
|
|
900
|
-
ubo.addUniform("vRefractionPosition", 3);
|
|
901
|
-
ubo.addUniform("vRefractionSize", 3);
|
|
902
|
-
ubo.addUniform("vSpecularColor", 4);
|
|
903
|
-
ubo.addUniform("vEmissiveColor", 3);
|
|
904
|
-
ubo.addUniform("vDiffuseColor", 4);
|
|
905
|
-
ubo.addUniform("vAmbientColor", 3);
|
|
906
|
-
ubo.addUniform("cameraInfo", 4);
|
|
907
|
-
ubo.addUniform("vTextureRepetitionHexTilingParams", 4);
|
|
908
|
-
PrepareUniformLayoutForIBL(ubo, false, true);
|
|
909
|
-
super.buildUniformLayout();
|
|
910
|
-
}
|
|
911
|
-
/**
|
|
912
|
-
* Binds the submesh to this material by preparing the effect and shader to draw
|
|
913
|
-
* @param world defines the world transformation matrix
|
|
914
|
-
* @param mesh defines the mesh containing the submesh
|
|
915
|
-
* @param subMesh defines the submesh to bind the material to
|
|
916
|
-
*/
|
|
917
|
-
bindForSubMesh(world, mesh, subMesh) {
|
|
918
|
-
const scene = this.getScene();
|
|
919
|
-
const defines = subMesh.materialDefines;
|
|
920
|
-
if (!defines) {
|
|
921
|
-
return;
|
|
922
|
-
}
|
|
923
|
-
const effect = subMesh.effect;
|
|
924
|
-
if (!effect) {
|
|
925
|
-
return;
|
|
926
|
-
}
|
|
927
|
-
this._activeEffect = effect;
|
|
928
|
-
// Matrices Mesh.
|
|
929
|
-
mesh.getMeshUniformBuffer().bindToEffect(effect, "Mesh");
|
|
930
|
-
mesh.transferToEffect(world);
|
|
931
|
-
// Binding unconditionally
|
|
932
|
-
this._uniformBuffer.bindToEffect(effect, "Material");
|
|
933
|
-
this.prePassConfiguration.bindForSubMesh(this._activeEffect, scene, mesh, world, this.isFrozen);
|
|
934
|
-
MaterialHelperGeometryRendering.Bind(scene.getEngine().currentRenderPassId, this._activeEffect, mesh, world, this);
|
|
935
|
-
const camera = scene.activeCamera;
|
|
936
|
-
if (camera) {
|
|
937
|
-
this._uniformBuffer.updateFloat4("cameraInfo", camera.minZ, camera.maxZ, 0, 0);
|
|
938
|
-
}
|
|
939
|
-
else {
|
|
940
|
-
this._uniformBuffer.updateFloat4("cameraInfo", 0, 0, 0, 0);
|
|
941
|
-
}
|
|
942
|
-
const hexParams = this.textureRepetitionHexTilingParams;
|
|
943
|
-
this._uniformBuffer.updateFloat4("vTextureRepetitionHexTilingParams", hexParams[0], hexParams[1], hexParams[2], hexParams[3]);
|
|
944
|
-
this._eventInfo.subMesh = subMesh;
|
|
945
|
-
this._callbackPluginEventHardBindForSubMesh(this._eventInfo);
|
|
946
|
-
// Normal Matrix
|
|
947
|
-
if (defines.OBJECTSPACE_NORMALMAP) {
|
|
948
|
-
world.toNormalMatrix(this._normalMatrix);
|
|
949
|
-
this.bindOnlyNormalMatrix(this._normalMatrix);
|
|
950
|
-
}
|
|
951
|
-
const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);
|
|
952
|
-
const needToAlwaysBindUniformBuffers = scene.getEngine()._features.needToAlwaysBindUniformBuffers;
|
|
953
|
-
// Bones
|
|
954
|
-
BindBonesParameters(mesh, effect);
|
|
955
|
-
// Vertex pulling
|
|
956
|
-
if (this._vertexPullingMetadata) {
|
|
957
|
-
BindVertexPullingUniforms(effect, this._vertexPullingMetadata);
|
|
958
|
-
}
|
|
959
|
-
const ubo = this._uniformBuffer;
|
|
960
|
-
if (mustRebind) {
|
|
961
|
-
this.bindViewProjection(effect);
|
|
962
|
-
if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {
|
|
963
|
-
if (StandardMaterial.FresnelEnabled && defines.FRESNEL) {
|
|
964
|
-
// Fresnel
|
|
965
|
-
if (this.diffuseFresnelParameters && this.diffuseFresnelParameters.isEnabled) {
|
|
966
|
-
ubo.updateColor4("diffuseLeftColor", this.diffuseFresnelParameters.leftColor, this.diffuseFresnelParameters.power);
|
|
967
|
-
ubo.updateColor4("diffuseRightColor", this.diffuseFresnelParameters.rightColor, this.diffuseFresnelParameters.bias);
|
|
1071
|
+
if (defines.SPECULAROVERALPHA) {
|
|
1072
|
+
fallbacks.addFallback(0, "SPECULAROVERALPHA");
|
|
968
1073
|
}
|
|
969
|
-
if (
|
|
970
|
-
|
|
971
|
-
opacityParts.set(this.opacityFresnelParameters.leftColor.toLuminance(), this.opacityFresnelParameters.rightColor.toLuminance(), this.opacityFresnelParameters.bias);
|
|
972
|
-
ubo.updateColor4("opacityParts", opacityParts, this.opacityFresnelParameters.power);
|
|
1074
|
+
if (defines.FOG) {
|
|
1075
|
+
fallbacks.addFallback(1, "FOG");
|
|
973
1076
|
}
|
|
974
|
-
if (
|
|
975
|
-
|
|
976
|
-
ubo.updateColor4("reflectionRightColor", this.reflectionFresnelParameters.rightColor, this.reflectionFresnelParameters.bias);
|
|
1077
|
+
if (defines.POINTSIZE) {
|
|
1078
|
+
fallbacks.addFallback(0, "POINTSIZE");
|
|
977
1079
|
}
|
|
978
|
-
if (
|
|
979
|
-
|
|
980
|
-
ubo.updateColor4("refractionRightColor", this.refractionFresnelParameters.rightColor, this.refractionFresnelParameters.bias);
|
|
1080
|
+
if (defines.LOGARITHMICDEPTH) {
|
|
1081
|
+
fallbacks.addFallback(0, "LOGARITHMICDEPTH");
|
|
981
1082
|
}
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
1083
|
+
HandleFallbacksForShadows(defines, fallbacks, this._maxSimultaneousLights);
|
|
1084
|
+
if (defines.SPECULARTERM) {
|
|
1085
|
+
fallbacks.addFallback(0, "SPECULARTERM");
|
|
985
1086
|
}
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
if (scene.texturesEnabled) {
|
|
989
|
-
if (this._diffuseTexture && StandardMaterial.DiffuseTextureEnabled) {
|
|
990
|
-
ubo.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
|
|
991
|
-
BindTextureMatrix(this._diffuseTexture, ubo, "diffuse");
|
|
1087
|
+
if (defines.DIFFUSEFRESNEL) {
|
|
1088
|
+
fallbacks.addFallback(1, "DIFFUSEFRESNEL");
|
|
992
1089
|
}
|
|
993
|
-
if (
|
|
994
|
-
|
|
995
|
-
BindTextureMatrix(this._ambientTexture, ubo, "ambient");
|
|
1090
|
+
if (defines.OPACITYFRESNEL) {
|
|
1091
|
+
fallbacks.addFallback(2, "OPACITYFRESNEL");
|
|
996
1092
|
}
|
|
997
|
-
if (
|
|
998
|
-
|
|
999
|
-
BindTextureMatrix(this._opacityTexture, ubo, "opacity");
|
|
1093
|
+
if (defines.REFLECTIONFRESNEL) {
|
|
1094
|
+
fallbacks.addFallback(3, "REFLECTIONFRESNEL");
|
|
1000
1095
|
}
|
|
1001
|
-
if (
|
|
1002
|
-
|
|
1096
|
+
if (defines.EMISSIVEFRESNEL) {
|
|
1097
|
+
fallbacks.addFallback(4, "EMISSIVEFRESNEL");
|
|
1003
1098
|
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
ubo.updateFloat2("vReflectionInfos", 0.0, this.roughness);
|
|
1099
|
+
if (defines.FRESNEL) {
|
|
1100
|
+
fallbacks.addFallback(4, "FRESNEL");
|
|
1007
1101
|
}
|
|
1008
|
-
if (
|
|
1009
|
-
|
|
1010
|
-
BindTextureMatrix(this._emissiveTexture, ubo, "emissive");
|
|
1102
|
+
if (defines.MULTIVIEW) {
|
|
1103
|
+
fallbacks.addFallback(0, "MULTIVIEW");
|
|
1011
1104
|
}
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1105
|
+
//Attributes
|
|
1106
|
+
const attribs = [VertexBuffer.PositionKind];
|
|
1107
|
+
if (defines.NORMAL) {
|
|
1108
|
+
attribs.push(VertexBuffer.NormalKind);
|
|
1015
1109
|
}
|
|
1016
|
-
if (
|
|
1017
|
-
|
|
1018
|
-
BindTextureMatrix(this._specularTexture, ubo, "specular");
|
|
1110
|
+
if (defines.TANGENT) {
|
|
1111
|
+
attribs.push(VertexBuffer.TangentKind);
|
|
1019
1112
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
if (scene._mirroredCameraPosition) {
|
|
1024
|
-
ubo.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);
|
|
1113
|
+
for (let i = 1; i <= 6; ++i) {
|
|
1114
|
+
if (defines["UV" + i]) {
|
|
1115
|
+
attribs.push(`uv${i === 1 ? "" : i}`);
|
|
1025
1116
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1117
|
+
}
|
|
1118
|
+
if (defines.VERTEXCOLOR) {
|
|
1119
|
+
attribs.push(VertexBuffer.ColorKind);
|
|
1120
|
+
}
|
|
1121
|
+
PrepareAttributesForBones(attribs, mesh, defines, fallbacks);
|
|
1122
|
+
PrepareAttributesForInstances(attribs, defines);
|
|
1123
|
+
PrepareAttributesForMorphTargets(attribs, mesh, defines);
|
|
1124
|
+
PrepareAttributesForBakedVertexAnimation(attribs, mesh, defines);
|
|
1125
|
+
let shaderName = "default";
|
|
1126
|
+
const uniforms = [
|
|
1127
|
+
"world",
|
|
1128
|
+
"view",
|
|
1129
|
+
"viewProjection",
|
|
1130
|
+
"vEyePosition",
|
|
1131
|
+
"vLightsType",
|
|
1132
|
+
"vAmbientColor",
|
|
1133
|
+
"vDiffuseColor",
|
|
1134
|
+
"vSpecularColor",
|
|
1135
|
+
"vEmissiveColor",
|
|
1136
|
+
"visibility",
|
|
1137
|
+
"vFogInfos",
|
|
1138
|
+
"vFogColor",
|
|
1139
|
+
"pointSize",
|
|
1140
|
+
"vDiffuseInfos",
|
|
1141
|
+
"vAmbientInfos",
|
|
1142
|
+
"vOpacityInfos",
|
|
1143
|
+
"vEmissiveInfos",
|
|
1144
|
+
"vSpecularInfos",
|
|
1145
|
+
"vBumpInfos",
|
|
1146
|
+
"vLightmapInfos",
|
|
1147
|
+
"vRefractionInfos",
|
|
1148
|
+
"mBones",
|
|
1149
|
+
"diffuseMatrix",
|
|
1150
|
+
"ambientMatrix",
|
|
1151
|
+
"opacityMatrix",
|
|
1152
|
+
"emissiveMatrix",
|
|
1153
|
+
"specularMatrix",
|
|
1154
|
+
"bumpMatrix",
|
|
1155
|
+
"normalMatrix",
|
|
1156
|
+
"lightmapMatrix",
|
|
1157
|
+
"refractionMatrix",
|
|
1158
|
+
"diffuseLeftColor",
|
|
1159
|
+
"diffuseRightColor",
|
|
1160
|
+
"opacityParts",
|
|
1161
|
+
"reflectionLeftColor",
|
|
1162
|
+
"reflectionRightColor",
|
|
1163
|
+
"emissiveLeftColor",
|
|
1164
|
+
"emissiveRightColor",
|
|
1165
|
+
"refractionLeftColor",
|
|
1166
|
+
"refractionRightColor",
|
|
1167
|
+
"vRefractionPosition",
|
|
1168
|
+
"vRefractionSize",
|
|
1169
|
+
"logarithmicDepthConstant",
|
|
1170
|
+
"vTangentSpaceParams",
|
|
1171
|
+
"alphaCutOff",
|
|
1172
|
+
"boneTextureInfo",
|
|
1173
|
+
"morphTargetTextureInfo",
|
|
1174
|
+
"morphTargetTextureIndices",
|
|
1175
|
+
"cameraInfo",
|
|
1176
|
+
"vTextureRepetitionHexTilingParams",
|
|
1177
|
+
];
|
|
1178
|
+
const samplers = [
|
|
1179
|
+
"diffuseSampler",
|
|
1180
|
+
"ambientSampler",
|
|
1181
|
+
"opacitySampler",
|
|
1182
|
+
"reflectionCubeSampler",
|
|
1183
|
+
"reflection2DSampler",
|
|
1184
|
+
"emissiveSampler",
|
|
1185
|
+
"specularSampler",
|
|
1186
|
+
"bumpSampler",
|
|
1187
|
+
"lightmapSampler",
|
|
1188
|
+
"refractionCubeSampler",
|
|
1189
|
+
"refraction2DSampler",
|
|
1190
|
+
"boneSampler",
|
|
1191
|
+
"morphTargets",
|
|
1192
|
+
"oitDepthSampler",
|
|
1193
|
+
"oitFrontColorSampler",
|
|
1194
|
+
"areaLightsLTC1Sampler",
|
|
1195
|
+
"areaLightsLTC2Sampler",
|
|
1196
|
+
];
|
|
1197
|
+
PrepareUniformsAndSamplersForIBL(uniforms, samplers, false);
|
|
1198
|
+
const uniformBuffers = ["Material", "Scene", "Mesh"];
|
|
1199
|
+
const indexParameters = { maxSimultaneousLights: this._maxSimultaneousLights, maxSimultaneousMorphTargets: defines.NUM_MORPH_INFLUENCERS };
|
|
1200
|
+
this._eventInfo.fallbacks = fallbacks;
|
|
1201
|
+
this._eventInfo.fallbackRank = 0;
|
|
1202
|
+
this._eventInfo.defines = defines;
|
|
1203
|
+
this._eventInfo.uniforms = uniforms;
|
|
1204
|
+
this._eventInfo.attributes = attribs;
|
|
1205
|
+
this._eventInfo.samplers = samplers;
|
|
1206
|
+
this._eventInfo.uniformBuffersNames = uniformBuffers;
|
|
1207
|
+
this._eventInfo.customCode = undefined;
|
|
1208
|
+
this._eventInfo.mesh = mesh;
|
|
1209
|
+
this._eventInfo.indexParameters = indexParameters;
|
|
1210
|
+
this._callbackPluginEventGeneric(128 /* MaterialPluginEvent.PrepareEffect */, this._eventInfo);
|
|
1211
|
+
MaterialHelperGeometryRendering.AddUniformsAndSamplers(uniforms, samplers);
|
|
1212
|
+
PrePassConfiguration.AddUniforms(uniforms);
|
|
1213
|
+
PrePassConfiguration.AddSamplers(samplers);
|
|
1214
|
+
if (ImageProcessingConfiguration) {
|
|
1215
|
+
ImageProcessingConfiguration.PrepareUniforms(uniforms, defines);
|
|
1216
|
+
ImageProcessingConfiguration.PrepareSamplers(samplers, defines);
|
|
1217
|
+
}
|
|
1218
|
+
PrepareUniformsAndSamplersList({
|
|
1219
|
+
uniformsNames: uniforms,
|
|
1220
|
+
uniformBuffersNames: uniformBuffers,
|
|
1221
|
+
samplers: samplers,
|
|
1222
|
+
defines: defines,
|
|
1223
|
+
maxSimultaneousLights: this._maxSimultaneousLights,
|
|
1224
|
+
shaderLanguage: this._shaderLanguage,
|
|
1225
|
+
});
|
|
1226
|
+
AddClipPlaneUniforms(uniforms);
|
|
1227
|
+
// Vertex pulling metadata uniforms
|
|
1228
|
+
if (this._useVertexPulling) {
|
|
1229
|
+
const renderingMesh = subMesh.getRenderingMesh();
|
|
1230
|
+
const geometry = renderingMesh?.geometry;
|
|
1231
|
+
if (geometry) {
|
|
1232
|
+
this._vertexPullingMetadata = PrepareVertexPullingUniforms(geometry);
|
|
1233
|
+
if (this._vertexPullingMetadata) {
|
|
1234
|
+
this._vertexPullingMetadata.forEach((_, attribute) => {
|
|
1235
|
+
uniforms.push(`vp_${attribute}_info`);
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1028
1238
|
}
|
|
1029
1239
|
}
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1240
|
+
else {
|
|
1241
|
+
this._vertexPullingMetadata = null;
|
|
1242
|
+
}
|
|
1243
|
+
const csnrOptions = {};
|
|
1244
|
+
if (this.customShaderNameResolve) {
|
|
1245
|
+
shaderName = this.customShaderNameResolve(shaderName, uniforms, uniformBuffers, samplers, defines, attribs, csnrOptions);
|
|
1246
|
+
}
|
|
1247
|
+
const join = defines.toString();
|
|
1248
|
+
const previousEffect = subMesh.effect;
|
|
1249
|
+
const effect = scene.getEngine().createEffect(shaderName, {
|
|
1250
|
+
attributes: attribs,
|
|
1251
|
+
uniformsNames: uniforms,
|
|
1252
|
+
uniformBuffersNames: uniformBuffers,
|
|
1253
|
+
samplers: samplers,
|
|
1254
|
+
defines: join,
|
|
1255
|
+
fallbacks: fallbacks,
|
|
1256
|
+
onCompiled: this.onCompiled,
|
|
1257
|
+
onError: this.onError,
|
|
1258
|
+
indexParameters,
|
|
1259
|
+
processFinalCode: csnrOptions.processFinalCode,
|
|
1260
|
+
processCodeAfterIncludes: this._eventInfo.customCode,
|
|
1261
|
+
multiTarget: defines.PREPASS,
|
|
1262
|
+
shaderLanguage: this._shaderLanguage,
|
|
1263
|
+
extraInitializationsAsync: this._shadersLoaded
|
|
1264
|
+
? undefined
|
|
1265
|
+
: async () => {
|
|
1266
|
+
if (this._shaderLanguage === 1 /* ShaderLanguage.WGSL */) {
|
|
1267
|
+
await Promise.all([import("../ShadersWGSL/default.vertex.js"), import("../ShadersWGSL/default.fragment.js")]);
|
|
1268
|
+
}
|
|
1269
|
+
else {
|
|
1270
|
+
await Promise.all([import("../Shaders/default.vertex.js"), import("../Shaders/default.fragment.js")]);
|
|
1271
|
+
}
|
|
1272
|
+
this._shadersLoaded = true;
|
|
1273
|
+
},
|
|
1274
|
+
}, engine);
|
|
1275
|
+
this._eventInfo.customCode = undefined;
|
|
1276
|
+
if (effect) {
|
|
1277
|
+
if (this._onEffectCreatedObservable) {
|
|
1278
|
+
onCreatedEffectParameters.effect = effect;
|
|
1279
|
+
onCreatedEffectParameters.subMesh = subMesh;
|
|
1280
|
+
this._onEffectCreatedObservable.notifyObservers(onCreatedEffectParameters);
|
|
1281
|
+
}
|
|
1282
|
+
// Use previous effect while new one is compiling
|
|
1283
|
+
if (this.allowShaderHotSwapping && previousEffect && !effect.isReady()) {
|
|
1284
|
+
defines.markAsUnprocessed();
|
|
1285
|
+
forceWasNotReadyPreviously = this.isFrozen;
|
|
1286
|
+
if (lightDisposed) {
|
|
1287
|
+
// re register in case it takes more than one frame.
|
|
1288
|
+
defines._areLightsDisposed = true;
|
|
1289
|
+
return false;
|
|
1036
1290
|
}
|
|
1037
1291
|
}
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
ubo.updateVector3("vRefractionPosition", cubeTexture.boundingBoxPosition);
|
|
1042
|
-
ubo.updateVector3("vRefractionSize", cubeTexture.boundingBoxSize);
|
|
1292
|
+
else {
|
|
1293
|
+
scene.resetCachedMaterial();
|
|
1294
|
+
subMesh.setEffect(effect, defines, this._materialContext);
|
|
1043
1295
|
}
|
|
1044
1296
|
}
|
|
1045
1297
|
}
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
ubo.updateFloat("pointSize", this.pointSize);
|
|
1298
|
+
if (!subMesh.effect || !subMesh.effect.isReady()) {
|
|
1299
|
+
return false;
|
|
1049
1300
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1301
|
+
defines._renderId = scene.getRenderId();
|
|
1302
|
+
drawWrapper._wasPreviouslyReady = forceWasNotReadyPreviously ? false : true;
|
|
1303
|
+
drawWrapper._wasPreviouslyUsingInstances = useInstances;
|
|
1304
|
+
this._checkScenePerformancePriority();
|
|
1305
|
+
return true;
|
|
1306
|
+
}
|
|
1307
|
+
/**
|
|
1308
|
+
* Builds the material UBO layouts.
|
|
1309
|
+
* Used internally during the effect preparation.
|
|
1310
|
+
*/
|
|
1311
|
+
buildUniformLayout() {
|
|
1312
|
+
// Order is important !
|
|
1313
|
+
const ubo = this._uniformBuffer;
|
|
1314
|
+
ubo.addUniform("diffuseLeftColor", 4);
|
|
1315
|
+
ubo.addUniform("diffuseRightColor", 4);
|
|
1316
|
+
ubo.addUniform("opacityParts", 4);
|
|
1317
|
+
ubo.addUniform("reflectionLeftColor", 4);
|
|
1318
|
+
ubo.addUniform("reflectionRightColor", 4);
|
|
1319
|
+
ubo.addUniform("refractionLeftColor", 4);
|
|
1320
|
+
ubo.addUniform("refractionRightColor", 4);
|
|
1321
|
+
ubo.addUniform("emissiveLeftColor", 4);
|
|
1322
|
+
ubo.addUniform("emissiveRightColor", 4);
|
|
1323
|
+
ubo.addUniform("vDiffuseInfos", 2);
|
|
1324
|
+
ubo.addUniform("vAmbientInfos", 2);
|
|
1325
|
+
ubo.addUniform("vOpacityInfos", 2);
|
|
1326
|
+
ubo.addUniform("vEmissiveInfos", 2);
|
|
1327
|
+
ubo.addUniform("vLightmapInfos", 2);
|
|
1328
|
+
ubo.addUniform("vSpecularInfos", 2);
|
|
1329
|
+
ubo.addUniform("vBumpInfos", 3);
|
|
1330
|
+
ubo.addUniform("diffuseMatrix", 16);
|
|
1331
|
+
ubo.addUniform("ambientMatrix", 16);
|
|
1332
|
+
ubo.addUniform("opacityMatrix", 16);
|
|
1333
|
+
ubo.addUniform("emissiveMatrix", 16);
|
|
1334
|
+
ubo.addUniform("lightmapMatrix", 16);
|
|
1335
|
+
ubo.addUniform("specularMatrix", 16);
|
|
1336
|
+
ubo.addUniform("bumpMatrix", 16);
|
|
1337
|
+
ubo.addUniform("vTangentSpaceParams", 2);
|
|
1338
|
+
ubo.addUniform("pointSize", 1);
|
|
1339
|
+
ubo.addUniform("alphaCutOff", 1);
|
|
1340
|
+
ubo.addUniform("refractionMatrix", 16);
|
|
1341
|
+
ubo.addUniform("vRefractionInfos", 4);
|
|
1342
|
+
ubo.addUniform("vRefractionPosition", 3);
|
|
1343
|
+
ubo.addUniform("vRefractionSize", 3);
|
|
1344
|
+
ubo.addUniform("vSpecularColor", 4);
|
|
1345
|
+
ubo.addUniform("vEmissiveColor", 3);
|
|
1346
|
+
ubo.addUniform("vDiffuseColor", 4);
|
|
1347
|
+
ubo.addUniform("vAmbientColor", 3);
|
|
1348
|
+
ubo.addUniform("cameraInfo", 4);
|
|
1349
|
+
ubo.addUniform("vTextureRepetitionHexTilingParams", 4);
|
|
1350
|
+
PrepareUniformLayoutForIBL(ubo, false, true);
|
|
1351
|
+
super.buildUniformLayout();
|
|
1055
1352
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1353
|
+
/**
|
|
1354
|
+
* Binds the submesh to this material by preparing the effect and shader to draw
|
|
1355
|
+
* @param world defines the world transformation matrix
|
|
1356
|
+
* @param mesh defines the mesh containing the submesh
|
|
1357
|
+
* @param subMesh defines the submesh to bind the material to
|
|
1358
|
+
*/
|
|
1359
|
+
bindForSubMesh(world, mesh, subMesh) {
|
|
1360
|
+
const scene = this.getScene();
|
|
1361
|
+
const defines = subMesh.materialDefines;
|
|
1362
|
+
if (!defines) {
|
|
1363
|
+
return;
|
|
1060
1364
|
}
|
|
1061
|
-
|
|
1062
|
-
|
|
1365
|
+
const effect = subMesh.effect;
|
|
1366
|
+
if (!effect) {
|
|
1367
|
+
return;
|
|
1063
1368
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1369
|
+
this._activeEffect = effect;
|
|
1370
|
+
// Matrices Mesh.
|
|
1371
|
+
mesh.getMeshUniformBuffer().bindToEffect(effect, "Mesh");
|
|
1372
|
+
mesh.transferToEffect(world);
|
|
1373
|
+
// Binding unconditionally
|
|
1374
|
+
this._uniformBuffer.bindToEffect(effect, "Material");
|
|
1375
|
+
this.prePassConfiguration.bindForSubMesh(this._activeEffect, scene, mesh, world, this.isFrozen);
|
|
1376
|
+
MaterialHelperGeometryRendering.Bind(scene.getEngine().currentRenderPassId, this._activeEffect, mesh, world, this);
|
|
1377
|
+
const camera = scene.activeCamera;
|
|
1378
|
+
if (camera) {
|
|
1379
|
+
this._uniformBuffer.updateFloat4("cameraInfo", camera.minZ, camera.maxZ, 0, 0);
|
|
1066
1380
|
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
effect.setTexture("reflectionCubeSampler", this._reflectionTexture);
|
|
1070
|
-
}
|
|
1071
|
-
else {
|
|
1072
|
-
effect.setTexture("reflection2DSampler", this._reflectionTexture);
|
|
1073
|
-
}
|
|
1381
|
+
else {
|
|
1382
|
+
this._uniformBuffer.updateFloat4("cameraInfo", 0, 0, 0, 0);
|
|
1074
1383
|
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1384
|
+
const hexParams = this.textureRepetitionHexTilingParams;
|
|
1385
|
+
this._uniformBuffer.updateFloat4("vTextureRepetitionHexTilingParams", hexParams[0], hexParams[1], hexParams[2], hexParams[3]);
|
|
1386
|
+
this._eventInfo.subMesh = subMesh;
|
|
1387
|
+
this._callbackPluginEventHardBindForSubMesh(this._eventInfo);
|
|
1388
|
+
// Normal Matrix
|
|
1389
|
+
if (defines.OBJECTSPACE_NORMALMAP) {
|
|
1390
|
+
world.toNormalMatrix(this._normalMatrix);
|
|
1391
|
+
this.bindOnlyNormalMatrix(this._normalMatrix);
|
|
1077
1392
|
}
|
|
1078
|
-
|
|
1079
|
-
|
|
1393
|
+
const mustRebind = this._mustRebind(scene, effect, subMesh, mesh.visibility);
|
|
1394
|
+
const needToAlwaysBindUniformBuffers = scene.getEngine()._features.needToAlwaysBindUniformBuffers;
|
|
1395
|
+
// Bones
|
|
1396
|
+
BindBonesParameters(mesh, effect);
|
|
1397
|
+
// Vertex pulling
|
|
1398
|
+
if (this._vertexPullingMetadata) {
|
|
1399
|
+
BindVertexPullingUniforms(effect, this._vertexPullingMetadata);
|
|
1080
1400
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1401
|
+
const ubo = this._uniformBuffer;
|
|
1402
|
+
if (mustRebind) {
|
|
1403
|
+
this.bindViewProjection(effect);
|
|
1404
|
+
if (!ubo.useUbo || !this.isFrozen || !ubo.isSync || subMesh._drawWrapper._forceRebindOnNextCall) {
|
|
1405
|
+
if (_a.FresnelEnabled && defines.FRESNEL) {
|
|
1406
|
+
// Fresnel
|
|
1407
|
+
if (this.diffuseFresnelParameters && this.diffuseFresnelParameters.isEnabled) {
|
|
1408
|
+
ubo.updateColor4("diffuseLeftColor", this.diffuseFresnelParameters.leftColor, this.diffuseFresnelParameters.power);
|
|
1409
|
+
ubo.updateColor4("diffuseRightColor", this.diffuseFresnelParameters.rightColor, this.diffuseFresnelParameters.bias);
|
|
1410
|
+
}
|
|
1411
|
+
if (this.opacityFresnelParameters && this.opacityFresnelParameters.isEnabled) {
|
|
1412
|
+
const opacityParts = TmpColors.Color3[0];
|
|
1413
|
+
opacityParts.set(this.opacityFresnelParameters.leftColor.toLuminance(), this.opacityFresnelParameters.rightColor.toLuminance(), this.opacityFresnelParameters.bias);
|
|
1414
|
+
ubo.updateColor4("opacityParts", opacityParts, this.opacityFresnelParameters.power);
|
|
1415
|
+
}
|
|
1416
|
+
if (this.reflectionFresnelParameters && this.reflectionFresnelParameters.isEnabled) {
|
|
1417
|
+
ubo.updateColor4("reflectionLeftColor", this.reflectionFresnelParameters.leftColor, this.reflectionFresnelParameters.power);
|
|
1418
|
+
ubo.updateColor4("reflectionRightColor", this.reflectionFresnelParameters.rightColor, this.reflectionFresnelParameters.bias);
|
|
1419
|
+
}
|
|
1420
|
+
if (this.refractionFresnelParameters && this.refractionFresnelParameters.isEnabled) {
|
|
1421
|
+
ubo.updateColor4("refractionLeftColor", this.refractionFresnelParameters.leftColor, this.refractionFresnelParameters.power);
|
|
1422
|
+
ubo.updateColor4("refractionRightColor", this.refractionFresnelParameters.rightColor, this.refractionFresnelParameters.bias);
|
|
1423
|
+
}
|
|
1424
|
+
if (this.emissiveFresnelParameters && this.emissiveFresnelParameters.isEnabled) {
|
|
1425
|
+
ubo.updateColor4("emissiveLeftColor", this.emissiveFresnelParameters.leftColor, this.emissiveFresnelParameters.power);
|
|
1426
|
+
ubo.updateColor4("emissiveRightColor", this.emissiveFresnelParameters.rightColor, this.emissiveFresnelParameters.bias);
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
// Textures
|
|
1430
|
+
if (scene.texturesEnabled) {
|
|
1431
|
+
if (this._diffuseTexture && _a.DiffuseTextureEnabled) {
|
|
1432
|
+
ubo.updateFloat2("vDiffuseInfos", this._diffuseTexture.coordinatesIndex, this._diffuseTexture.level);
|
|
1433
|
+
BindTextureMatrix(this._diffuseTexture, ubo, "diffuse");
|
|
1434
|
+
}
|
|
1435
|
+
if (this._ambientTexture && _a.AmbientTextureEnabled) {
|
|
1436
|
+
ubo.updateFloat2("vAmbientInfos", this._ambientTexture.coordinatesIndex, this._ambientTexture.level);
|
|
1437
|
+
BindTextureMatrix(this._ambientTexture, ubo, "ambient");
|
|
1438
|
+
}
|
|
1439
|
+
if (this._opacityTexture && _a.OpacityTextureEnabled) {
|
|
1440
|
+
ubo.updateFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);
|
|
1441
|
+
BindTextureMatrix(this._opacityTexture, ubo, "opacity");
|
|
1442
|
+
}
|
|
1443
|
+
if (this._hasAlphaChannel()) {
|
|
1444
|
+
ubo.updateFloat("alphaCutOff", this.alphaCutOff);
|
|
1445
|
+
}
|
|
1446
|
+
BindIBLParameters(scene, defines, ubo, Color3.White(), this._reflectionTexture, false, false, true, false, false, false, this.roughness);
|
|
1447
|
+
if (!this._reflectionTexture || !_a.ReflectionTextureEnabled) {
|
|
1448
|
+
ubo.updateFloat2("vReflectionInfos", 0.0, this.roughness);
|
|
1449
|
+
}
|
|
1450
|
+
if (this._emissiveTexture && _a.EmissiveTextureEnabled) {
|
|
1451
|
+
ubo.updateFloat2("vEmissiveInfos", this._emissiveTexture.coordinatesIndex, this._emissiveTexture.level);
|
|
1452
|
+
BindTextureMatrix(this._emissiveTexture, ubo, "emissive");
|
|
1453
|
+
}
|
|
1454
|
+
if (this._lightmapTexture && _a.LightmapTextureEnabled) {
|
|
1455
|
+
ubo.updateFloat2("vLightmapInfos", this._lightmapTexture.coordinatesIndex, this._lightmapTexture.level);
|
|
1456
|
+
BindTextureMatrix(this._lightmapTexture, ubo, "lightmap");
|
|
1457
|
+
}
|
|
1458
|
+
if (this._specularTexture && _a.SpecularTextureEnabled) {
|
|
1459
|
+
ubo.updateFloat2("vSpecularInfos", this._specularTexture.coordinatesIndex, this._specularTexture.level);
|
|
1460
|
+
BindTextureMatrix(this._specularTexture, ubo, "specular");
|
|
1461
|
+
}
|
|
1462
|
+
if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && _a.BumpTextureEnabled) {
|
|
1463
|
+
ubo.updateFloat3("vBumpInfos", this._bumpTexture.coordinatesIndex, 1.0 / this._bumpTexture.level, this.parallaxScaleBias);
|
|
1464
|
+
BindTextureMatrix(this._bumpTexture, ubo, "bump");
|
|
1465
|
+
if (scene._mirroredCameraPosition) {
|
|
1466
|
+
ubo.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);
|
|
1467
|
+
}
|
|
1468
|
+
else {
|
|
1469
|
+
ubo.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? -1.0 : 1.0, this._invertNormalMapY ? -1.0 : 1.0);
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
if (this._refractionTexture && _a.RefractionTextureEnabled) {
|
|
1473
|
+
let depth = 1.0;
|
|
1474
|
+
if (!this._refractionTexture.isCube) {
|
|
1475
|
+
ubo.updateMatrix("refractionMatrix", this._refractionTexture.getReflectionTextureMatrix());
|
|
1476
|
+
if (this._refractionTexture.depth) {
|
|
1477
|
+
depth = this._refractionTexture.depth;
|
|
1478
|
+
}
|
|
1479
|
+
}
|
|
1480
|
+
ubo.updateFloat4("vRefractionInfos", this._refractionTexture.level, this.indexOfRefraction, depth, this.invertRefractionY ? -1 : 1);
|
|
1481
|
+
if (this._refractionTexture.boundingBoxSize) {
|
|
1482
|
+
const cubeTexture = this._refractionTexture;
|
|
1483
|
+
ubo.updateVector3("vRefractionPosition", cubeTexture.boundingBoxPosition);
|
|
1484
|
+
ubo.updateVector3("vRefractionSize", cubeTexture.boundingBoxSize);
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
// Point size
|
|
1489
|
+
if (this.pointsCloud) {
|
|
1490
|
+
ubo.updateFloat("pointSize", this.pointSize);
|
|
1491
|
+
}
|
|
1492
|
+
ubo.updateColor4("vSpecularColor", this.specularColor, this.specularPower);
|
|
1493
|
+
ubo.updateColor3("vEmissiveColor", _a.EmissiveTextureEnabled ? this.emissiveColor : Color3.BlackReadOnly);
|
|
1494
|
+
ubo.updateColor4("vDiffuseColor", this.diffuseColor, this.alpha);
|
|
1495
|
+
scene.ambientColor.multiplyToRef(this.ambientColor, this._globalAmbientColor);
|
|
1496
|
+
ubo.updateColor3("vAmbientColor", this._globalAmbientColor);
|
|
1497
|
+
}
|
|
1498
|
+
// Textures
|
|
1499
|
+
if (scene.texturesEnabled) {
|
|
1500
|
+
if (this._diffuseTexture && _a.DiffuseTextureEnabled) {
|
|
1501
|
+
effect.setTexture("diffuseSampler", this._diffuseTexture);
|
|
1502
|
+
}
|
|
1503
|
+
if (this._ambientTexture && _a.AmbientTextureEnabled) {
|
|
1504
|
+
effect.setTexture("ambientSampler", this._ambientTexture);
|
|
1505
|
+
}
|
|
1506
|
+
if (this._opacityTexture && _a.OpacityTextureEnabled) {
|
|
1507
|
+
effect.setTexture("opacitySampler", this._opacityTexture);
|
|
1508
|
+
}
|
|
1509
|
+
if (this._reflectionTexture && _a.ReflectionTextureEnabled) {
|
|
1510
|
+
if (this._reflectionTexture.isCube) {
|
|
1511
|
+
effect.setTexture("reflectionCubeSampler", this._reflectionTexture);
|
|
1512
|
+
}
|
|
1513
|
+
else {
|
|
1514
|
+
effect.setTexture("reflection2DSampler", this._reflectionTexture);
|
|
1515
|
+
}
|
|
1516
|
+
}
|
|
1517
|
+
if (this._emissiveTexture && _a.EmissiveTextureEnabled) {
|
|
1518
|
+
effect.setTexture("emissiveSampler", this._emissiveTexture);
|
|
1519
|
+
}
|
|
1520
|
+
if (this._lightmapTexture && _a.LightmapTextureEnabled) {
|
|
1521
|
+
effect.setTexture("lightmapSampler", this._lightmapTexture);
|
|
1522
|
+
}
|
|
1523
|
+
if (this._specularTexture && _a.SpecularTextureEnabled) {
|
|
1524
|
+
effect.setTexture("specularSampler", this._specularTexture);
|
|
1525
|
+
}
|
|
1526
|
+
if (this._bumpTexture && scene.getEngine().getCaps().standardDerivatives && _a.BumpTextureEnabled) {
|
|
1527
|
+
effect.setTexture("bumpSampler", this._bumpTexture);
|
|
1528
|
+
}
|
|
1529
|
+
if (this._refractionTexture && _a.RefractionTextureEnabled) {
|
|
1530
|
+
if (this._refractionTexture.isCube) {
|
|
1531
|
+
effect.setTexture("refractionCubeSampler", this._refractionTexture);
|
|
1532
|
+
}
|
|
1533
|
+
else {
|
|
1534
|
+
effect.setTexture("refraction2DSampler", this._refractionTexture);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
// OIT with depth peeling
|
|
1539
|
+
if (this.getScene().useOrderIndependentTransparency && this.needAlphaBlendingForMesh(mesh)) {
|
|
1540
|
+
this.getScene().depthPeelingRenderer.bind(effect);
|
|
1541
|
+
}
|
|
1542
|
+
this._eventInfo.subMesh = subMesh;
|
|
1543
|
+
this._callbackPluginEventBindForSubMesh(this._eventInfo);
|
|
1544
|
+
// Clip plane
|
|
1545
|
+
BindClipPlane(effect, this, scene);
|
|
1546
|
+
// Colors
|
|
1547
|
+
this.bindEyePosition(effect);
|
|
1548
|
+
}
|
|
1549
|
+
else if (needToAlwaysBindUniformBuffers) {
|
|
1550
|
+
this._needToBindSceneUbo = true;
|
|
1083
1551
|
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1552
|
+
// Lights
|
|
1553
|
+
if ((mustRebind || !this.isFrozen || needToAlwaysBindUniformBuffers) && scene.lightsEnabled && !this._disableLighting) {
|
|
1554
|
+
BindLights(scene, mesh, effect, defines, this._maxSimultaneousLights);
|
|
1086
1555
|
}
|
|
1087
|
-
if (
|
|
1088
|
-
|
|
1089
|
-
|
|
1556
|
+
if (mustRebind || !this.isFrozen) {
|
|
1557
|
+
// View
|
|
1558
|
+
if ((scene.fogEnabled && mesh.applyFog && scene.fogMode !== Scene.FOGMODE_NONE) ||
|
|
1559
|
+
this._reflectionTexture ||
|
|
1560
|
+
this._refractionTexture ||
|
|
1561
|
+
mesh.receiveShadows ||
|
|
1562
|
+
defines.PREPASS ||
|
|
1563
|
+
defines["CLUSTLIGHT_BATCH"]) {
|
|
1564
|
+
this.bindView(effect);
|
|
1090
1565
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1566
|
+
// Fog
|
|
1567
|
+
BindFogParameters(scene, mesh, effect);
|
|
1568
|
+
// Morph targets
|
|
1569
|
+
if (defines.NUM_MORPH_INFLUENCERS) {
|
|
1570
|
+
BindMorphTargetParameters(mesh, effect);
|
|
1571
|
+
}
|
|
1572
|
+
if (defines.BAKED_VERTEX_ANIMATION_TEXTURE) {
|
|
1573
|
+
mesh.bakedVertexAnimationManager?.bind(effect, defines.INSTANCES);
|
|
1574
|
+
}
|
|
1575
|
+
// Log. depth
|
|
1576
|
+
if (this.useLogarithmicDepth) {
|
|
1577
|
+
BindLogDepth(defines, effect, scene);
|
|
1578
|
+
}
|
|
1579
|
+
// image processing
|
|
1580
|
+
if (this._imageProcessingConfiguration && !this._imageProcessingConfiguration.applyByPostProcess) {
|
|
1581
|
+
this._imageProcessingConfiguration.bind(this._activeEffect);
|
|
1093
1582
|
}
|
|
1094
1583
|
}
|
|
1584
|
+
this._afterBind(mesh, this._activeEffect, subMesh);
|
|
1585
|
+
ubo.update();
|
|
1095
1586
|
}
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1587
|
+
/**
|
|
1588
|
+
* Get the list of animatables in the material.
|
|
1589
|
+
* @returns the list of animatables object used in the material
|
|
1590
|
+
*/
|
|
1591
|
+
getAnimatables() {
|
|
1592
|
+
const results = super.getAnimatables();
|
|
1593
|
+
if (this._diffuseTexture && this._diffuseTexture.animations && this._diffuseTexture.animations.length > 0) {
|
|
1594
|
+
results.push(this._diffuseTexture);
|
|
1595
|
+
}
|
|
1596
|
+
if (this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0) {
|
|
1597
|
+
results.push(this._ambientTexture);
|
|
1598
|
+
}
|
|
1599
|
+
if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) {
|
|
1600
|
+
results.push(this._opacityTexture);
|
|
1601
|
+
}
|
|
1602
|
+
if (this._reflectionTexture && this._reflectionTexture.animations && this._reflectionTexture.animations.length > 0) {
|
|
1603
|
+
results.push(this._reflectionTexture);
|
|
1604
|
+
}
|
|
1605
|
+
if (this._emissiveTexture && this._emissiveTexture.animations && this._emissiveTexture.animations.length > 0) {
|
|
1606
|
+
results.push(this._emissiveTexture);
|
|
1607
|
+
}
|
|
1608
|
+
if (this._specularTexture && this._specularTexture.animations && this._specularTexture.animations.length > 0) {
|
|
1609
|
+
results.push(this._specularTexture);
|
|
1610
|
+
}
|
|
1611
|
+
if (this._bumpTexture && this._bumpTexture.animations && this._bumpTexture.animations.length > 0) {
|
|
1612
|
+
results.push(this._bumpTexture);
|
|
1613
|
+
}
|
|
1614
|
+
if (this._lightmapTexture && this._lightmapTexture.animations && this._lightmapTexture.animations.length > 0) {
|
|
1615
|
+
results.push(this._lightmapTexture);
|
|
1616
|
+
}
|
|
1617
|
+
if (this._refractionTexture && this._refractionTexture.animations && this._refractionTexture.animations.length > 0) {
|
|
1618
|
+
results.push(this._refractionTexture);
|
|
1619
|
+
}
|
|
1620
|
+
return results;
|
|
1099
1621
|
}
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
this.
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1622
|
+
/**
|
|
1623
|
+
* Gets the active textures from the material
|
|
1624
|
+
* @returns an array of textures
|
|
1625
|
+
*/
|
|
1626
|
+
getActiveTextures() {
|
|
1627
|
+
const activeTextures = super.getActiveTextures();
|
|
1628
|
+
if (this._diffuseTexture) {
|
|
1629
|
+
activeTextures.push(this._diffuseTexture);
|
|
1630
|
+
}
|
|
1631
|
+
if (this._ambientTexture) {
|
|
1632
|
+
activeTextures.push(this._ambientTexture);
|
|
1633
|
+
}
|
|
1634
|
+
if (this._opacityTexture) {
|
|
1635
|
+
activeTextures.push(this._opacityTexture);
|
|
1636
|
+
}
|
|
1637
|
+
if (this._reflectionTexture) {
|
|
1638
|
+
activeTextures.push(this._reflectionTexture);
|
|
1639
|
+
}
|
|
1640
|
+
if (this._emissiveTexture) {
|
|
1641
|
+
activeTextures.push(this._emissiveTexture);
|
|
1642
|
+
}
|
|
1643
|
+
if (this._specularTexture) {
|
|
1644
|
+
activeTextures.push(this._specularTexture);
|
|
1645
|
+
}
|
|
1646
|
+
if (this._bumpTexture) {
|
|
1647
|
+
activeTextures.push(this._bumpTexture);
|
|
1648
|
+
}
|
|
1649
|
+
if (this._lightmapTexture) {
|
|
1650
|
+
activeTextures.push(this._lightmapTexture);
|
|
1651
|
+
}
|
|
1652
|
+
if (this._refractionTexture) {
|
|
1653
|
+
activeTextures.push(this._refractionTexture);
|
|
1654
|
+
}
|
|
1655
|
+
return activeTextures;
|
|
1123
1656
|
}
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1657
|
+
/**
|
|
1658
|
+
* Specifies if the material uses a texture
|
|
1659
|
+
* @param texture defines the texture to check against the material
|
|
1660
|
+
* @returns a boolean specifying if the material uses the texture
|
|
1661
|
+
*/
|
|
1662
|
+
hasTexture(texture) {
|
|
1663
|
+
if (super.hasTexture(texture)) {
|
|
1664
|
+
return true;
|
|
1665
|
+
}
|
|
1666
|
+
if (this._diffuseTexture === texture) {
|
|
1667
|
+
return true;
|
|
1668
|
+
}
|
|
1669
|
+
if (this._ambientTexture === texture) {
|
|
1670
|
+
return true;
|
|
1671
|
+
}
|
|
1672
|
+
if (this._opacityTexture === texture) {
|
|
1673
|
+
return true;
|
|
1674
|
+
}
|
|
1675
|
+
if (this._reflectionTexture === texture) {
|
|
1676
|
+
return true;
|
|
1677
|
+
}
|
|
1678
|
+
if (this._emissiveTexture === texture) {
|
|
1679
|
+
return true;
|
|
1680
|
+
}
|
|
1681
|
+
if (this._specularTexture === texture) {
|
|
1682
|
+
return true;
|
|
1683
|
+
}
|
|
1684
|
+
if (this._bumpTexture === texture) {
|
|
1685
|
+
return true;
|
|
1686
|
+
}
|
|
1687
|
+
if (this._lightmapTexture === texture) {
|
|
1688
|
+
return true;
|
|
1689
|
+
}
|
|
1690
|
+
if (this._refractionTexture === texture) {
|
|
1691
|
+
return true;
|
|
1692
|
+
}
|
|
1693
|
+
return false;
|
|
1129
1694
|
}
|
|
1130
|
-
|
|
1131
|
-
|
|
1695
|
+
/**
|
|
1696
|
+
* Disposes the material
|
|
1697
|
+
* @param forceDisposeEffect specifies if effects should be forcefully disposed
|
|
1698
|
+
* @param forceDisposeTextures specifies if textures should be forcefully disposed
|
|
1699
|
+
*/
|
|
1700
|
+
dispose(forceDisposeEffect, forceDisposeTextures) {
|
|
1701
|
+
if (forceDisposeTextures) {
|
|
1702
|
+
this._diffuseTexture?.dispose();
|
|
1703
|
+
this._ambientTexture?.dispose();
|
|
1704
|
+
this._opacityTexture?.dispose();
|
|
1705
|
+
this._reflectionTexture?.dispose();
|
|
1706
|
+
this._emissiveTexture?.dispose();
|
|
1707
|
+
this._specularTexture?.dispose();
|
|
1708
|
+
this._bumpTexture?.dispose();
|
|
1709
|
+
this._lightmapTexture?.dispose();
|
|
1710
|
+
this._refractionTexture?.dispose();
|
|
1711
|
+
}
|
|
1712
|
+
if (this._imageProcessingConfiguration && this._imageProcessingObserver) {
|
|
1713
|
+
this._imageProcessingConfiguration.onUpdateParameters.remove(this._imageProcessingObserver);
|
|
1714
|
+
}
|
|
1715
|
+
super.dispose(forceDisposeEffect, forceDisposeTextures);
|
|
1132
1716
|
}
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1717
|
+
/**
|
|
1718
|
+
* Makes a duplicate of the material, and gives it a new name
|
|
1719
|
+
* @param name defines the new name for the duplicated material
|
|
1720
|
+
* @param cloneTexturesOnlyOnce - if a texture is used in more than one channel (e.g diffuse and opacity), only clone it once and reuse it on the other channels. Default false.
|
|
1721
|
+
* @param rootUrl defines the root URL to use to load textures
|
|
1722
|
+
* @returns the cloned material
|
|
1723
|
+
*/
|
|
1724
|
+
clone(name, cloneTexturesOnlyOnce = true, rootUrl = "") {
|
|
1725
|
+
const result = SerializationHelper.Clone(() => new _a(name, this.getScene()), this, { cloneTexturesOnlyOnce });
|
|
1726
|
+
result.name = name;
|
|
1727
|
+
result.id = name;
|
|
1728
|
+
this.stencil.copyTo(result.stencil);
|
|
1729
|
+
this._clonePlugins(result, rootUrl);
|
|
1730
|
+
return result;
|
|
1136
1731
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1732
|
+
/**
|
|
1733
|
+
* Creates a standard material from parsed material data
|
|
1734
|
+
* @param source defines the JSON representation of the material
|
|
1735
|
+
* @param scene defines the hosting scene
|
|
1736
|
+
* @param rootUrl defines the root URL to use to load textures and relative dependencies
|
|
1737
|
+
* @returns a new standard material
|
|
1738
|
+
*/
|
|
1739
|
+
static Parse(source, scene, rootUrl) {
|
|
1740
|
+
const material = SerializationHelper.Parse(() => new _a(source.name, scene), source, scene, rootUrl);
|
|
1741
|
+
if (source.stencil) {
|
|
1742
|
+
material.stencil.parse(source.stencil, scene, rootUrl);
|
|
1743
|
+
}
|
|
1744
|
+
Material._ParsePlugins(source, material, scene, rootUrl);
|
|
1745
|
+
return material;
|
|
1140
1746
|
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
}
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
__decorate([
|
|
1442
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1443
|
-
], StandardMaterial.prototype, "reflectionTexture", void 0);
|
|
1444
|
-
__decorate([
|
|
1445
|
-
serializeAsTexture("emissiveTexture")
|
|
1446
|
-
], StandardMaterial.prototype, "_emissiveTexture", void 0);
|
|
1447
|
-
__decorate([
|
|
1448
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1449
|
-
], StandardMaterial.prototype, "emissiveTexture", void 0);
|
|
1450
|
-
__decorate([
|
|
1451
|
-
serializeAsTexture("specularTexture")
|
|
1452
|
-
], StandardMaterial.prototype, "_specularTexture", void 0);
|
|
1453
|
-
__decorate([
|
|
1454
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1455
|
-
], StandardMaterial.prototype, "specularTexture", void 0);
|
|
1456
|
-
__decorate([
|
|
1457
|
-
serializeAsTexture("bumpTexture")
|
|
1458
|
-
], StandardMaterial.prototype, "_bumpTexture", void 0);
|
|
1459
|
-
__decorate([
|
|
1460
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1461
|
-
], StandardMaterial.prototype, "bumpTexture", void 0);
|
|
1462
|
-
__decorate([
|
|
1463
|
-
serializeAsTexture("lightmapTexture")
|
|
1464
|
-
], StandardMaterial.prototype, "_lightmapTexture", void 0);
|
|
1465
|
-
__decorate([
|
|
1466
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1467
|
-
], StandardMaterial.prototype, "lightmapTexture", void 0);
|
|
1468
|
-
__decorate([
|
|
1469
|
-
serializeAsTexture("refractionTexture")
|
|
1470
|
-
], StandardMaterial.prototype, "_refractionTexture", void 0);
|
|
1471
|
-
__decorate([
|
|
1472
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1473
|
-
], StandardMaterial.prototype, "refractionTexture", void 0);
|
|
1474
|
-
__decorate([
|
|
1475
|
-
serializeAsColor3("ambient")
|
|
1476
|
-
], StandardMaterial.prototype, "ambientColor", void 0);
|
|
1477
|
-
__decorate([
|
|
1478
|
-
serializeAsColor3("diffuse")
|
|
1479
|
-
], StandardMaterial.prototype, "diffuseColor", void 0);
|
|
1480
|
-
__decorate([
|
|
1481
|
-
serializeAsColor3("specular")
|
|
1482
|
-
], StandardMaterial.prototype, "specularColor", void 0);
|
|
1483
|
-
__decorate([
|
|
1484
|
-
serializeAsColor3("emissive")
|
|
1485
|
-
], StandardMaterial.prototype, "emissiveColor", void 0);
|
|
1486
|
-
__decorate([
|
|
1487
|
-
serialize()
|
|
1488
|
-
], StandardMaterial.prototype, "specularPower", void 0);
|
|
1489
|
-
__decorate([
|
|
1490
|
-
serialize("useAlphaFromDiffuseTexture")
|
|
1491
|
-
], StandardMaterial.prototype, "_useAlphaFromDiffuseTexture", void 0);
|
|
1492
|
-
__decorate([
|
|
1493
|
-
expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")
|
|
1494
|
-
], StandardMaterial.prototype, "useAlphaFromDiffuseTexture", void 0);
|
|
1495
|
-
__decorate([
|
|
1496
|
-
serialize("useEmissiveAsIllumination")
|
|
1497
|
-
], StandardMaterial.prototype, "_useEmissiveAsIllumination", void 0);
|
|
1498
|
-
__decorate([
|
|
1499
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1500
|
-
], StandardMaterial.prototype, "useEmissiveAsIllumination", void 0);
|
|
1501
|
-
__decorate([
|
|
1502
|
-
serialize("linkEmissiveWithDiffuse")
|
|
1503
|
-
], StandardMaterial.prototype, "_linkEmissiveWithDiffuse", void 0);
|
|
1504
|
-
__decorate([
|
|
1505
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1506
|
-
], StandardMaterial.prototype, "linkEmissiveWithDiffuse", void 0);
|
|
1507
|
-
__decorate([
|
|
1508
|
-
serialize("useSpecularOverAlpha")
|
|
1509
|
-
], StandardMaterial.prototype, "_useSpecularOverAlpha", void 0);
|
|
1510
|
-
__decorate([
|
|
1511
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1512
|
-
], StandardMaterial.prototype, "useSpecularOverAlpha", void 0);
|
|
1513
|
-
__decorate([
|
|
1514
|
-
serialize("useReflectionOverAlpha")
|
|
1515
|
-
], StandardMaterial.prototype, "_useReflectionOverAlpha", void 0);
|
|
1516
|
-
__decorate([
|
|
1517
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1518
|
-
], StandardMaterial.prototype, "useReflectionOverAlpha", void 0);
|
|
1519
|
-
__decorate([
|
|
1520
|
-
serialize("disableLighting")
|
|
1521
|
-
], StandardMaterial.prototype, "_disableLighting", void 0);
|
|
1522
|
-
__decorate([
|
|
1523
|
-
expandToProperty("_markAllSubMeshesAsLightsDirty")
|
|
1524
|
-
], StandardMaterial.prototype, "disableLighting", void 0);
|
|
1525
|
-
__decorate([
|
|
1526
|
-
serialize("useObjectSpaceNormalMap")
|
|
1527
|
-
], StandardMaterial.prototype, "_useObjectSpaceNormalMap", void 0);
|
|
1528
|
-
__decorate([
|
|
1529
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1530
|
-
], StandardMaterial.prototype, "useObjectSpaceNormalMap", void 0);
|
|
1531
|
-
__decorate([
|
|
1532
|
-
serialize("useParallax")
|
|
1533
|
-
], StandardMaterial.prototype, "_useParallax", void 0);
|
|
1534
|
-
__decorate([
|
|
1535
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1536
|
-
], StandardMaterial.prototype, "useParallax", void 0);
|
|
1537
|
-
__decorate([
|
|
1538
|
-
serialize("useParallaxOcclusion")
|
|
1539
|
-
], StandardMaterial.prototype, "_useParallaxOcclusion", void 0);
|
|
1540
|
-
__decorate([
|
|
1541
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1542
|
-
], StandardMaterial.prototype, "useParallaxOcclusion", void 0);
|
|
1543
|
-
__decorate([
|
|
1544
|
-
serialize()
|
|
1545
|
-
], StandardMaterial.prototype, "parallaxScaleBias", void 0);
|
|
1546
|
-
__decorate([
|
|
1547
|
-
serialize("roughness")
|
|
1548
|
-
], StandardMaterial.prototype, "_roughness", void 0);
|
|
1549
|
-
__decorate([
|
|
1550
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1551
|
-
], StandardMaterial.prototype, "roughness", void 0);
|
|
1552
|
-
__decorate([
|
|
1553
|
-
serialize()
|
|
1554
|
-
], StandardMaterial.prototype, "indexOfRefraction", void 0);
|
|
1555
|
-
__decorate([
|
|
1556
|
-
serialize()
|
|
1557
|
-
], StandardMaterial.prototype, "invertRefractionY", void 0);
|
|
1558
|
-
__decorate([
|
|
1559
|
-
serialize()
|
|
1560
|
-
], StandardMaterial.prototype, "alphaCutOff", void 0);
|
|
1561
|
-
__decorate([
|
|
1562
|
-
serialize("useLightmapAsShadowmap")
|
|
1563
|
-
], StandardMaterial.prototype, "_useLightmapAsShadowmap", void 0);
|
|
1564
|
-
__decorate([
|
|
1565
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1566
|
-
], StandardMaterial.prototype, "useLightmapAsShadowmap", void 0);
|
|
1567
|
-
__decorate([
|
|
1568
|
-
serializeAsFresnelParameters("diffuseFresnelParameters")
|
|
1569
|
-
], StandardMaterial.prototype, "_diffuseFresnelParameters", void 0);
|
|
1570
|
-
__decorate([
|
|
1571
|
-
expandToProperty("_markAllSubMeshesAsFresnelDirty")
|
|
1572
|
-
], StandardMaterial.prototype, "diffuseFresnelParameters", void 0);
|
|
1573
|
-
__decorate([
|
|
1574
|
-
serializeAsFresnelParameters("opacityFresnelParameters")
|
|
1575
|
-
], StandardMaterial.prototype, "_opacityFresnelParameters", void 0);
|
|
1576
|
-
__decorate([
|
|
1577
|
-
expandToProperty("_markAllSubMeshesAsFresnelAndMiscDirty")
|
|
1578
|
-
], StandardMaterial.prototype, "opacityFresnelParameters", void 0);
|
|
1579
|
-
__decorate([
|
|
1580
|
-
serializeAsFresnelParameters("reflectionFresnelParameters")
|
|
1581
|
-
], StandardMaterial.prototype, "_reflectionFresnelParameters", void 0);
|
|
1582
|
-
__decorate([
|
|
1583
|
-
expandToProperty("_markAllSubMeshesAsFresnelDirty")
|
|
1584
|
-
], StandardMaterial.prototype, "reflectionFresnelParameters", void 0);
|
|
1585
|
-
__decorate([
|
|
1586
|
-
serializeAsFresnelParameters("refractionFresnelParameters")
|
|
1587
|
-
], StandardMaterial.prototype, "_refractionFresnelParameters", void 0);
|
|
1588
|
-
__decorate([
|
|
1589
|
-
expandToProperty("_markAllSubMeshesAsFresnelDirty")
|
|
1590
|
-
], StandardMaterial.prototype, "refractionFresnelParameters", void 0);
|
|
1591
|
-
__decorate([
|
|
1592
|
-
serializeAsFresnelParameters("emissiveFresnelParameters")
|
|
1593
|
-
], StandardMaterial.prototype, "_emissiveFresnelParameters", void 0);
|
|
1594
|
-
__decorate([
|
|
1595
|
-
expandToProperty("_markAllSubMeshesAsFresnelDirty")
|
|
1596
|
-
], StandardMaterial.prototype, "emissiveFresnelParameters", void 0);
|
|
1597
|
-
__decorate([
|
|
1598
|
-
serialize("useReflectionFresnelFromSpecular")
|
|
1599
|
-
], StandardMaterial.prototype, "_useReflectionFresnelFromSpecular", void 0);
|
|
1600
|
-
__decorate([
|
|
1601
|
-
expandToProperty("_markAllSubMeshesAsFresnelDirty")
|
|
1602
|
-
], StandardMaterial.prototype, "useReflectionFresnelFromSpecular", void 0);
|
|
1603
|
-
__decorate([
|
|
1604
|
-
serialize("useGlossinessFromSpecularMapAlpha")
|
|
1605
|
-
], StandardMaterial.prototype, "_useGlossinessFromSpecularMapAlpha", void 0);
|
|
1606
|
-
__decorate([
|
|
1607
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1608
|
-
], StandardMaterial.prototype, "useGlossinessFromSpecularMapAlpha", void 0);
|
|
1609
|
-
__decorate([
|
|
1610
|
-
serialize("maxSimultaneousLights")
|
|
1611
|
-
], StandardMaterial.prototype, "_maxSimultaneousLights", void 0);
|
|
1612
|
-
__decorate([
|
|
1613
|
-
expandToProperty("_markAllSubMeshesAsLightsDirty")
|
|
1614
|
-
], StandardMaterial.prototype, "maxSimultaneousLights", void 0);
|
|
1615
|
-
__decorate([
|
|
1616
|
-
serialize("invertNormalMapX")
|
|
1617
|
-
], StandardMaterial.prototype, "_invertNormalMapX", void 0);
|
|
1618
|
-
__decorate([
|
|
1619
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1620
|
-
], StandardMaterial.prototype, "invertNormalMapX", void 0);
|
|
1621
|
-
__decorate([
|
|
1622
|
-
serialize("invertNormalMapY")
|
|
1623
|
-
], StandardMaterial.prototype, "_invertNormalMapY", void 0);
|
|
1624
|
-
__decorate([
|
|
1625
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1626
|
-
], StandardMaterial.prototype, "invertNormalMapY", void 0);
|
|
1627
|
-
__decorate([
|
|
1628
|
-
serialize("twoSidedLighting")
|
|
1629
|
-
], StandardMaterial.prototype, "_twoSidedLighting", void 0);
|
|
1630
|
-
__decorate([
|
|
1631
|
-
expandToProperty("_markAllSubMeshesAsTexturesDirty")
|
|
1632
|
-
], StandardMaterial.prototype, "twoSidedLighting", void 0);
|
|
1633
|
-
__decorate([
|
|
1634
|
-
serialize("applyDecalMapAfterDetailMap")
|
|
1635
|
-
], StandardMaterial.prototype, "_applyDecalMapAfterDetailMap", void 0);
|
|
1636
|
-
__decorate([
|
|
1637
|
-
expandToProperty("_markAllSubMeshesAsMiscDirty")
|
|
1638
|
-
], StandardMaterial.prototype, "applyDecalMapAfterDetailMap", void 0);
|
|
1747
|
+
// Flags used to enable or disable a type of texture for all Standard Materials
|
|
1748
|
+
/**
|
|
1749
|
+
* Are diffuse textures enabled in the application.
|
|
1750
|
+
*/
|
|
1751
|
+
static get DiffuseTextureEnabled() {
|
|
1752
|
+
return MaterialFlags.DiffuseTextureEnabled;
|
|
1753
|
+
}
|
|
1754
|
+
static set DiffuseTextureEnabled(value) {
|
|
1755
|
+
MaterialFlags.DiffuseTextureEnabled = value;
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Are detail textures enabled in the application.
|
|
1759
|
+
*/
|
|
1760
|
+
static get DetailTextureEnabled() {
|
|
1761
|
+
return MaterialFlags.DetailTextureEnabled;
|
|
1762
|
+
}
|
|
1763
|
+
static set DetailTextureEnabled(value) {
|
|
1764
|
+
MaterialFlags.DetailTextureEnabled = value;
|
|
1765
|
+
}
|
|
1766
|
+
/**
|
|
1767
|
+
* Are ambient textures enabled in the application.
|
|
1768
|
+
*/
|
|
1769
|
+
static get AmbientTextureEnabled() {
|
|
1770
|
+
return MaterialFlags.AmbientTextureEnabled;
|
|
1771
|
+
}
|
|
1772
|
+
static set AmbientTextureEnabled(value) {
|
|
1773
|
+
MaterialFlags.AmbientTextureEnabled = value;
|
|
1774
|
+
}
|
|
1775
|
+
/**
|
|
1776
|
+
* Are opacity textures enabled in the application.
|
|
1777
|
+
*/
|
|
1778
|
+
static get OpacityTextureEnabled() {
|
|
1779
|
+
return MaterialFlags.OpacityTextureEnabled;
|
|
1780
|
+
}
|
|
1781
|
+
static set OpacityTextureEnabled(value) {
|
|
1782
|
+
MaterialFlags.OpacityTextureEnabled = value;
|
|
1783
|
+
}
|
|
1784
|
+
/**
|
|
1785
|
+
* Are reflection textures enabled in the application.
|
|
1786
|
+
*/
|
|
1787
|
+
static get ReflectionTextureEnabled() {
|
|
1788
|
+
return MaterialFlags.ReflectionTextureEnabled;
|
|
1789
|
+
}
|
|
1790
|
+
static set ReflectionTextureEnabled(value) {
|
|
1791
|
+
MaterialFlags.ReflectionTextureEnabled = value;
|
|
1792
|
+
}
|
|
1793
|
+
/**
|
|
1794
|
+
* Are emissive textures enabled in the application.
|
|
1795
|
+
*/
|
|
1796
|
+
static get EmissiveTextureEnabled() {
|
|
1797
|
+
return MaterialFlags.EmissiveTextureEnabled;
|
|
1798
|
+
}
|
|
1799
|
+
static set EmissiveTextureEnabled(value) {
|
|
1800
|
+
MaterialFlags.EmissiveTextureEnabled = value;
|
|
1801
|
+
}
|
|
1802
|
+
/**
|
|
1803
|
+
* Are specular textures enabled in the application.
|
|
1804
|
+
*/
|
|
1805
|
+
static get SpecularTextureEnabled() {
|
|
1806
|
+
return MaterialFlags.SpecularTextureEnabled;
|
|
1807
|
+
}
|
|
1808
|
+
static set SpecularTextureEnabled(value) {
|
|
1809
|
+
MaterialFlags.SpecularTextureEnabled = value;
|
|
1810
|
+
}
|
|
1811
|
+
/**
|
|
1812
|
+
* Are bump textures enabled in the application.
|
|
1813
|
+
*/
|
|
1814
|
+
static get BumpTextureEnabled() {
|
|
1815
|
+
return MaterialFlags.BumpTextureEnabled;
|
|
1816
|
+
}
|
|
1817
|
+
static set BumpTextureEnabled(value) {
|
|
1818
|
+
MaterialFlags.BumpTextureEnabled = value;
|
|
1819
|
+
}
|
|
1820
|
+
/**
|
|
1821
|
+
* Are lightmap textures enabled in the application.
|
|
1822
|
+
*/
|
|
1823
|
+
static get LightmapTextureEnabled() {
|
|
1824
|
+
return MaterialFlags.LightmapTextureEnabled;
|
|
1825
|
+
}
|
|
1826
|
+
static set LightmapTextureEnabled(value) {
|
|
1827
|
+
MaterialFlags.LightmapTextureEnabled = value;
|
|
1828
|
+
}
|
|
1829
|
+
/**
|
|
1830
|
+
* Are refraction textures enabled in the application.
|
|
1831
|
+
*/
|
|
1832
|
+
static get RefractionTextureEnabled() {
|
|
1833
|
+
return MaterialFlags.RefractionTextureEnabled;
|
|
1834
|
+
}
|
|
1835
|
+
static set RefractionTextureEnabled(value) {
|
|
1836
|
+
MaterialFlags.RefractionTextureEnabled = value;
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* Are color grading textures enabled in the application.
|
|
1840
|
+
*/
|
|
1841
|
+
static get ColorGradingTextureEnabled() {
|
|
1842
|
+
return MaterialFlags.ColorGradingTextureEnabled;
|
|
1843
|
+
}
|
|
1844
|
+
static set ColorGradingTextureEnabled(value) {
|
|
1845
|
+
MaterialFlags.ColorGradingTextureEnabled = value;
|
|
1846
|
+
}
|
|
1847
|
+
/**
|
|
1848
|
+
* Are fresnels enabled in the application.
|
|
1849
|
+
*/
|
|
1850
|
+
static get FresnelEnabled() {
|
|
1851
|
+
return MaterialFlags.FresnelEnabled;
|
|
1852
|
+
}
|
|
1853
|
+
static set FresnelEnabled(value) {
|
|
1854
|
+
MaterialFlags.FresnelEnabled = value;
|
|
1855
|
+
}
|
|
1856
|
+
},
|
|
1857
|
+
_StandardMaterial_diffuseTexture_accessor_storage = new WeakMap(),
|
|
1858
|
+
_StandardMaterial_ambientTexture_accessor_storage = new WeakMap(),
|
|
1859
|
+
_StandardMaterial_opacityTexture_accessor_storage = new WeakMap(),
|
|
1860
|
+
_StandardMaterial_reflectionTexture_accessor_storage = new WeakMap(),
|
|
1861
|
+
_StandardMaterial_emissiveTexture_accessor_storage = new WeakMap(),
|
|
1862
|
+
_StandardMaterial_specularTexture_accessor_storage = new WeakMap(),
|
|
1863
|
+
_StandardMaterial_bumpTexture_accessor_storage = new WeakMap(),
|
|
1864
|
+
_StandardMaterial_lightmapTexture_accessor_storage = new WeakMap(),
|
|
1865
|
+
_StandardMaterial_refractionTexture_accessor_storage = new WeakMap(),
|
|
1866
|
+
_StandardMaterial_useAlphaFromDiffuseTexture_accessor_storage = new WeakMap(),
|
|
1867
|
+
_StandardMaterial_useEmissiveAsIllumination_accessor_storage = new WeakMap(),
|
|
1868
|
+
_StandardMaterial_linkEmissiveWithDiffuse_accessor_storage = new WeakMap(),
|
|
1869
|
+
_StandardMaterial_useSpecularOverAlpha_accessor_storage = new WeakMap(),
|
|
1870
|
+
_StandardMaterial_useReflectionOverAlpha_accessor_storage = new WeakMap(),
|
|
1871
|
+
_StandardMaterial_disableLighting_accessor_storage = new WeakMap(),
|
|
1872
|
+
_StandardMaterial_useObjectSpaceNormalMap_accessor_storage = new WeakMap(),
|
|
1873
|
+
_StandardMaterial_useParallax_accessor_storage = new WeakMap(),
|
|
1874
|
+
_StandardMaterial_useParallaxOcclusion_accessor_storage = new WeakMap(),
|
|
1875
|
+
_StandardMaterial_roughness_accessor_storage = new WeakMap(),
|
|
1876
|
+
_StandardMaterial_useLightmapAsShadowmap_accessor_storage = new WeakMap(),
|
|
1877
|
+
_StandardMaterial_diffuseFresnelParameters_accessor_storage = new WeakMap(),
|
|
1878
|
+
_StandardMaterial_opacityFresnelParameters_accessor_storage = new WeakMap(),
|
|
1879
|
+
_StandardMaterial_reflectionFresnelParameters_accessor_storage = new WeakMap(),
|
|
1880
|
+
_StandardMaterial_refractionFresnelParameters_accessor_storage = new WeakMap(),
|
|
1881
|
+
_StandardMaterial_emissiveFresnelParameters_accessor_storage = new WeakMap(),
|
|
1882
|
+
_StandardMaterial_useReflectionFresnelFromSpecular_accessor_storage = new WeakMap(),
|
|
1883
|
+
_StandardMaterial_useGlossinessFromSpecularMapAlpha_accessor_storage = new WeakMap(),
|
|
1884
|
+
_StandardMaterial_maxSimultaneousLights_accessor_storage = new WeakMap(),
|
|
1885
|
+
_StandardMaterial_invertNormalMapX_accessor_storage = new WeakMap(),
|
|
1886
|
+
_StandardMaterial_invertNormalMapY_accessor_storage = new WeakMap(),
|
|
1887
|
+
_StandardMaterial_twoSidedLighting_accessor_storage = new WeakMap(),
|
|
1888
|
+
_StandardMaterial_applyDecalMapAfterDetailMap_accessor_storage = new WeakMap(),
|
|
1889
|
+
(() => {
|
|
1890
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
1891
|
+
__diffuseTexture_decorators = [serializeAsTexture("diffuseTexture")];
|
|
1892
|
+
_diffuseTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")];
|
|
1893
|
+
__ambientTexture_decorators = [serializeAsTexture("ambientTexture")];
|
|
1894
|
+
_ambientTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1895
|
+
__opacityTexture_decorators = [serializeAsTexture("opacityTexture")];
|
|
1896
|
+
_opacityTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")];
|
|
1897
|
+
__reflectionTexture_decorators = [serializeAsTexture("reflectionTexture")];
|
|
1898
|
+
_reflectionTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1899
|
+
__emissiveTexture_decorators = [serializeAsTexture("emissiveTexture")];
|
|
1900
|
+
_emissiveTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1901
|
+
__specularTexture_decorators = [serializeAsTexture("specularTexture")];
|
|
1902
|
+
_specularTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1903
|
+
__bumpTexture_decorators = [serializeAsTexture("bumpTexture")];
|
|
1904
|
+
_bumpTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1905
|
+
__lightmapTexture_decorators = [serializeAsTexture("lightmapTexture")];
|
|
1906
|
+
_lightmapTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1907
|
+
__refractionTexture_decorators = [serializeAsTexture("refractionTexture")];
|
|
1908
|
+
_refractionTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1909
|
+
_ambientColor_decorators = [serializeAsColor3("ambient")];
|
|
1910
|
+
_diffuseColor_decorators = [serializeAsColor3("diffuse")];
|
|
1911
|
+
_specularColor_decorators = [serializeAsColor3("specular")];
|
|
1912
|
+
_emissiveColor_decorators = [serializeAsColor3("emissive")];
|
|
1913
|
+
_specularPower_decorators = [serialize()];
|
|
1914
|
+
__useAlphaFromDiffuseTexture_decorators = [serialize("useAlphaFromDiffuseTexture")];
|
|
1915
|
+
_useAlphaFromDiffuseTexture_decorators = [expandToProperty("_markAllSubMeshesAsTexturesAndMiscDirty")];
|
|
1916
|
+
__useEmissiveAsIllumination_decorators = [serialize("useEmissiveAsIllumination")];
|
|
1917
|
+
_useEmissiveAsIllumination_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1918
|
+
__linkEmissiveWithDiffuse_decorators = [serialize("linkEmissiveWithDiffuse")];
|
|
1919
|
+
_linkEmissiveWithDiffuse_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1920
|
+
__useSpecularOverAlpha_decorators = [serialize("useSpecularOverAlpha")];
|
|
1921
|
+
_useSpecularOverAlpha_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1922
|
+
__useReflectionOverAlpha_decorators = [serialize("useReflectionOverAlpha")];
|
|
1923
|
+
_useReflectionOverAlpha_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1924
|
+
__disableLighting_decorators = [serialize("disableLighting")];
|
|
1925
|
+
_disableLighting_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
|
|
1926
|
+
__useObjectSpaceNormalMap_decorators = [serialize("useObjectSpaceNormalMap")];
|
|
1927
|
+
_useObjectSpaceNormalMap_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1928
|
+
__useParallax_decorators = [serialize("useParallax")];
|
|
1929
|
+
_useParallax_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1930
|
+
__useParallaxOcclusion_decorators = [serialize("useParallaxOcclusion")];
|
|
1931
|
+
_useParallaxOcclusion_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1932
|
+
_parallaxScaleBias_decorators = [serialize()];
|
|
1933
|
+
__roughness_decorators = [serialize("roughness")];
|
|
1934
|
+
_roughness_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1935
|
+
_indexOfRefraction_decorators = [serialize()];
|
|
1936
|
+
_invertRefractionY_decorators = [serialize()];
|
|
1937
|
+
_alphaCutOff_decorators = [serialize()];
|
|
1938
|
+
__useLightmapAsShadowmap_decorators = [serialize("useLightmapAsShadowmap")];
|
|
1939
|
+
_useLightmapAsShadowmap_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1940
|
+
__diffuseFresnelParameters_decorators = [serializeAsFresnelParameters("diffuseFresnelParameters")];
|
|
1941
|
+
_diffuseFresnelParameters_decorators = [expandToProperty("_markAllSubMeshesAsFresnelDirty")];
|
|
1942
|
+
__opacityFresnelParameters_decorators = [serializeAsFresnelParameters("opacityFresnelParameters")];
|
|
1943
|
+
_opacityFresnelParameters_decorators = [expandToProperty("_markAllSubMeshesAsFresnelAndMiscDirty")];
|
|
1944
|
+
__reflectionFresnelParameters_decorators = [serializeAsFresnelParameters("reflectionFresnelParameters")];
|
|
1945
|
+
_reflectionFresnelParameters_decorators = [expandToProperty("_markAllSubMeshesAsFresnelDirty")];
|
|
1946
|
+
__refractionFresnelParameters_decorators = [serializeAsFresnelParameters("refractionFresnelParameters")];
|
|
1947
|
+
_refractionFresnelParameters_decorators = [expandToProperty("_markAllSubMeshesAsFresnelDirty")];
|
|
1948
|
+
__emissiveFresnelParameters_decorators = [serializeAsFresnelParameters("emissiveFresnelParameters")];
|
|
1949
|
+
_emissiveFresnelParameters_decorators = [expandToProperty("_markAllSubMeshesAsFresnelDirty")];
|
|
1950
|
+
__useReflectionFresnelFromSpecular_decorators = [serialize("useReflectionFresnelFromSpecular")];
|
|
1951
|
+
_useReflectionFresnelFromSpecular_decorators = [expandToProperty("_markAllSubMeshesAsFresnelDirty")];
|
|
1952
|
+
__useGlossinessFromSpecularMapAlpha_decorators = [serialize("useGlossinessFromSpecularMapAlpha")];
|
|
1953
|
+
_useGlossinessFromSpecularMapAlpha_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1954
|
+
__maxSimultaneousLights_decorators = [serialize("maxSimultaneousLights")];
|
|
1955
|
+
_maxSimultaneousLights_decorators = [expandToProperty("_markAllSubMeshesAsLightsDirty")];
|
|
1956
|
+
__invertNormalMapX_decorators = [serialize("invertNormalMapX")];
|
|
1957
|
+
_invertNormalMapX_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1958
|
+
__invertNormalMapY_decorators = [serialize("invertNormalMapY")];
|
|
1959
|
+
_invertNormalMapY_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1960
|
+
__twoSidedLighting_decorators = [serialize("twoSidedLighting")];
|
|
1961
|
+
_twoSidedLighting_decorators = [expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
1962
|
+
__applyDecalMapAfterDetailMap_decorators = [serialize("applyDecalMapAfterDetailMap")];
|
|
1963
|
+
_applyDecalMapAfterDetailMap_decorators = [expandToProperty("_markAllSubMeshesAsMiscDirty")];
|
|
1964
|
+
__esDecorate(_a, null, _diffuseTexture_decorators, { kind: "accessor", name: "diffuseTexture", static: false, private: false, access: { has: obj => "diffuseTexture" in obj, get: obj => obj.diffuseTexture, set: (obj, value) => { obj.diffuseTexture = value; } }, metadata: _metadata }, _diffuseTexture_initializers, _diffuseTexture_extraInitializers);
|
|
1965
|
+
__esDecorate(_a, null, _ambientTexture_decorators, { kind: "accessor", name: "ambientTexture", static: false, private: false, access: { has: obj => "ambientTexture" in obj, get: obj => obj.ambientTexture, set: (obj, value) => { obj.ambientTexture = value; } }, metadata: _metadata }, _ambientTexture_initializers, _ambientTexture_extraInitializers);
|
|
1966
|
+
__esDecorate(_a, null, _opacityTexture_decorators, { kind: "accessor", name: "opacityTexture", static: false, private: false, access: { has: obj => "opacityTexture" in obj, get: obj => obj.opacityTexture, set: (obj, value) => { obj.opacityTexture = value; } }, metadata: _metadata }, _opacityTexture_initializers, _opacityTexture_extraInitializers);
|
|
1967
|
+
__esDecorate(_a, null, _reflectionTexture_decorators, { kind: "accessor", name: "reflectionTexture", static: false, private: false, access: { has: obj => "reflectionTexture" in obj, get: obj => obj.reflectionTexture, set: (obj, value) => { obj.reflectionTexture = value; } }, metadata: _metadata }, _reflectionTexture_initializers, _reflectionTexture_extraInitializers);
|
|
1968
|
+
__esDecorate(_a, null, _emissiveTexture_decorators, { kind: "accessor", name: "emissiveTexture", static: false, private: false, access: { has: obj => "emissiveTexture" in obj, get: obj => obj.emissiveTexture, set: (obj, value) => { obj.emissiveTexture = value; } }, metadata: _metadata }, _emissiveTexture_initializers, _emissiveTexture_extraInitializers);
|
|
1969
|
+
__esDecorate(_a, null, _specularTexture_decorators, { kind: "accessor", name: "specularTexture", static: false, private: false, access: { has: obj => "specularTexture" in obj, get: obj => obj.specularTexture, set: (obj, value) => { obj.specularTexture = value; } }, metadata: _metadata }, _specularTexture_initializers, _specularTexture_extraInitializers);
|
|
1970
|
+
__esDecorate(_a, null, _bumpTexture_decorators, { kind: "accessor", name: "bumpTexture", static: false, private: false, access: { has: obj => "bumpTexture" in obj, get: obj => obj.bumpTexture, set: (obj, value) => { obj.bumpTexture = value; } }, metadata: _metadata }, _bumpTexture_initializers, _bumpTexture_extraInitializers);
|
|
1971
|
+
__esDecorate(_a, null, _lightmapTexture_decorators, { kind: "accessor", name: "lightmapTexture", static: false, private: false, access: { has: obj => "lightmapTexture" in obj, get: obj => obj.lightmapTexture, set: (obj, value) => { obj.lightmapTexture = value; } }, metadata: _metadata }, _lightmapTexture_initializers, _lightmapTexture_extraInitializers);
|
|
1972
|
+
__esDecorate(_a, null, _refractionTexture_decorators, { kind: "accessor", name: "refractionTexture", static: false, private: false, access: { has: obj => "refractionTexture" in obj, get: obj => obj.refractionTexture, set: (obj, value) => { obj.refractionTexture = value; } }, metadata: _metadata }, _refractionTexture_initializers, _refractionTexture_extraInitializers);
|
|
1973
|
+
__esDecorate(_a, null, _useAlphaFromDiffuseTexture_decorators, { kind: "accessor", name: "useAlphaFromDiffuseTexture", static: false, private: false, access: { has: obj => "useAlphaFromDiffuseTexture" in obj, get: obj => obj.useAlphaFromDiffuseTexture, set: (obj, value) => { obj.useAlphaFromDiffuseTexture = value; } }, metadata: _metadata }, _useAlphaFromDiffuseTexture_initializers, _useAlphaFromDiffuseTexture_extraInitializers);
|
|
1974
|
+
__esDecorate(_a, null, _useEmissiveAsIllumination_decorators, { kind: "accessor", name: "useEmissiveAsIllumination", static: false, private: false, access: { has: obj => "useEmissiveAsIllumination" in obj, get: obj => obj.useEmissiveAsIllumination, set: (obj, value) => { obj.useEmissiveAsIllumination = value; } }, metadata: _metadata }, _useEmissiveAsIllumination_initializers, _useEmissiveAsIllumination_extraInitializers);
|
|
1975
|
+
__esDecorate(_a, null, _linkEmissiveWithDiffuse_decorators, { kind: "accessor", name: "linkEmissiveWithDiffuse", static: false, private: false, access: { has: obj => "linkEmissiveWithDiffuse" in obj, get: obj => obj.linkEmissiveWithDiffuse, set: (obj, value) => { obj.linkEmissiveWithDiffuse = value; } }, metadata: _metadata }, _linkEmissiveWithDiffuse_initializers, _linkEmissiveWithDiffuse_extraInitializers);
|
|
1976
|
+
__esDecorate(_a, null, _useSpecularOverAlpha_decorators, { kind: "accessor", name: "useSpecularOverAlpha", static: false, private: false, access: { has: obj => "useSpecularOverAlpha" in obj, get: obj => obj.useSpecularOverAlpha, set: (obj, value) => { obj.useSpecularOverAlpha = value; } }, metadata: _metadata }, _useSpecularOverAlpha_initializers, _useSpecularOverAlpha_extraInitializers);
|
|
1977
|
+
__esDecorate(_a, null, _useReflectionOverAlpha_decorators, { kind: "accessor", name: "useReflectionOverAlpha", static: false, private: false, access: { has: obj => "useReflectionOverAlpha" in obj, get: obj => obj.useReflectionOverAlpha, set: (obj, value) => { obj.useReflectionOverAlpha = value; } }, metadata: _metadata }, _useReflectionOverAlpha_initializers, _useReflectionOverAlpha_extraInitializers);
|
|
1978
|
+
__esDecorate(_a, null, _disableLighting_decorators, { kind: "accessor", name: "disableLighting", static: false, private: false, access: { has: obj => "disableLighting" in obj, get: obj => obj.disableLighting, set: (obj, value) => { obj.disableLighting = value; } }, metadata: _metadata }, _disableLighting_initializers, _disableLighting_extraInitializers);
|
|
1979
|
+
__esDecorate(_a, null, _useObjectSpaceNormalMap_decorators, { kind: "accessor", name: "useObjectSpaceNormalMap", static: false, private: false, access: { has: obj => "useObjectSpaceNormalMap" in obj, get: obj => obj.useObjectSpaceNormalMap, set: (obj, value) => { obj.useObjectSpaceNormalMap = value; } }, metadata: _metadata }, _useObjectSpaceNormalMap_initializers, _useObjectSpaceNormalMap_extraInitializers);
|
|
1980
|
+
__esDecorate(_a, null, _useParallax_decorators, { kind: "accessor", name: "useParallax", static: false, private: false, access: { has: obj => "useParallax" in obj, get: obj => obj.useParallax, set: (obj, value) => { obj.useParallax = value; } }, metadata: _metadata }, _useParallax_initializers, _useParallax_extraInitializers);
|
|
1981
|
+
__esDecorate(_a, null, _useParallaxOcclusion_decorators, { kind: "accessor", name: "useParallaxOcclusion", static: false, private: false, access: { has: obj => "useParallaxOcclusion" in obj, get: obj => obj.useParallaxOcclusion, set: (obj, value) => { obj.useParallaxOcclusion = value; } }, metadata: _metadata }, _useParallaxOcclusion_initializers, _useParallaxOcclusion_extraInitializers);
|
|
1982
|
+
__esDecorate(_a, null, _roughness_decorators, { kind: "accessor", name: "roughness", static: false, private: false, access: { has: obj => "roughness" in obj, get: obj => obj.roughness, set: (obj, value) => { obj.roughness = value; } }, metadata: _metadata }, _roughness_initializers, _roughness_extraInitializers);
|
|
1983
|
+
__esDecorate(_a, null, _useLightmapAsShadowmap_decorators, { kind: "accessor", name: "useLightmapAsShadowmap", static: false, private: false, access: { has: obj => "useLightmapAsShadowmap" in obj, get: obj => obj.useLightmapAsShadowmap, set: (obj, value) => { obj.useLightmapAsShadowmap = value; } }, metadata: _metadata }, _useLightmapAsShadowmap_initializers, _useLightmapAsShadowmap_extraInitializers);
|
|
1984
|
+
__esDecorate(_a, null, _diffuseFresnelParameters_decorators, { kind: "accessor", name: "diffuseFresnelParameters", static: false, private: false, access: { has: obj => "diffuseFresnelParameters" in obj, get: obj => obj.diffuseFresnelParameters, set: (obj, value) => { obj.diffuseFresnelParameters = value; } }, metadata: _metadata }, _diffuseFresnelParameters_initializers, _diffuseFresnelParameters_extraInitializers);
|
|
1985
|
+
__esDecorate(_a, null, _opacityFresnelParameters_decorators, { kind: "accessor", name: "opacityFresnelParameters", static: false, private: false, access: { has: obj => "opacityFresnelParameters" in obj, get: obj => obj.opacityFresnelParameters, set: (obj, value) => { obj.opacityFresnelParameters = value; } }, metadata: _metadata }, _opacityFresnelParameters_initializers, _opacityFresnelParameters_extraInitializers);
|
|
1986
|
+
__esDecorate(_a, null, _reflectionFresnelParameters_decorators, { kind: "accessor", name: "reflectionFresnelParameters", static: false, private: false, access: { has: obj => "reflectionFresnelParameters" in obj, get: obj => obj.reflectionFresnelParameters, set: (obj, value) => { obj.reflectionFresnelParameters = value; } }, metadata: _metadata }, _reflectionFresnelParameters_initializers, _reflectionFresnelParameters_extraInitializers);
|
|
1987
|
+
__esDecorate(_a, null, _refractionFresnelParameters_decorators, { kind: "accessor", name: "refractionFresnelParameters", static: false, private: false, access: { has: obj => "refractionFresnelParameters" in obj, get: obj => obj.refractionFresnelParameters, set: (obj, value) => { obj.refractionFresnelParameters = value; } }, metadata: _metadata }, _refractionFresnelParameters_initializers, _refractionFresnelParameters_extraInitializers);
|
|
1988
|
+
__esDecorate(_a, null, _emissiveFresnelParameters_decorators, { kind: "accessor", name: "emissiveFresnelParameters", static: false, private: false, access: { has: obj => "emissiveFresnelParameters" in obj, get: obj => obj.emissiveFresnelParameters, set: (obj, value) => { obj.emissiveFresnelParameters = value; } }, metadata: _metadata }, _emissiveFresnelParameters_initializers, _emissiveFresnelParameters_extraInitializers);
|
|
1989
|
+
__esDecorate(_a, null, _useReflectionFresnelFromSpecular_decorators, { kind: "accessor", name: "useReflectionFresnelFromSpecular", static: false, private: false, access: { has: obj => "useReflectionFresnelFromSpecular" in obj, get: obj => obj.useReflectionFresnelFromSpecular, set: (obj, value) => { obj.useReflectionFresnelFromSpecular = value; } }, metadata: _metadata }, _useReflectionFresnelFromSpecular_initializers, _useReflectionFresnelFromSpecular_extraInitializers);
|
|
1990
|
+
__esDecorate(_a, null, _useGlossinessFromSpecularMapAlpha_decorators, { kind: "accessor", name: "useGlossinessFromSpecularMapAlpha", static: false, private: false, access: { has: obj => "useGlossinessFromSpecularMapAlpha" in obj, get: obj => obj.useGlossinessFromSpecularMapAlpha, set: (obj, value) => { obj.useGlossinessFromSpecularMapAlpha = value; } }, metadata: _metadata }, _useGlossinessFromSpecularMapAlpha_initializers, _useGlossinessFromSpecularMapAlpha_extraInitializers);
|
|
1991
|
+
__esDecorate(_a, null, _maxSimultaneousLights_decorators, { kind: "accessor", name: "maxSimultaneousLights", static: false, private: false, access: { has: obj => "maxSimultaneousLights" in obj, get: obj => obj.maxSimultaneousLights, set: (obj, value) => { obj.maxSimultaneousLights = value; } }, metadata: _metadata }, _maxSimultaneousLights_initializers, _maxSimultaneousLights_extraInitializers);
|
|
1992
|
+
__esDecorate(_a, null, _invertNormalMapX_decorators, { kind: "accessor", name: "invertNormalMapX", static: false, private: false, access: { has: obj => "invertNormalMapX" in obj, get: obj => obj.invertNormalMapX, set: (obj, value) => { obj.invertNormalMapX = value; } }, metadata: _metadata }, _invertNormalMapX_initializers, _invertNormalMapX_extraInitializers);
|
|
1993
|
+
__esDecorate(_a, null, _invertNormalMapY_decorators, { kind: "accessor", name: "invertNormalMapY", static: false, private: false, access: { has: obj => "invertNormalMapY" in obj, get: obj => obj.invertNormalMapY, set: (obj, value) => { obj.invertNormalMapY = value; } }, metadata: _metadata }, _invertNormalMapY_initializers, _invertNormalMapY_extraInitializers);
|
|
1994
|
+
__esDecorate(_a, null, _twoSidedLighting_decorators, { kind: "accessor", name: "twoSidedLighting", static: false, private: false, access: { has: obj => "twoSidedLighting" in obj, get: obj => obj.twoSidedLighting, set: (obj, value) => { obj.twoSidedLighting = value; } }, metadata: _metadata }, _twoSidedLighting_initializers, _twoSidedLighting_extraInitializers);
|
|
1995
|
+
__esDecorate(_a, null, _applyDecalMapAfterDetailMap_decorators, { kind: "accessor", name: "applyDecalMapAfterDetailMap", static: false, private: false, access: { has: obj => "applyDecalMapAfterDetailMap" in obj, get: obj => obj.applyDecalMapAfterDetailMap, set: (obj, value) => { obj.applyDecalMapAfterDetailMap = value; } }, metadata: _metadata }, _applyDecalMapAfterDetailMap_initializers, _applyDecalMapAfterDetailMap_extraInitializers);
|
|
1996
|
+
__esDecorate(null, null, __diffuseTexture_decorators, { kind: "field", name: "_diffuseTexture", static: false, private: false, access: { has: obj => "_diffuseTexture" in obj, get: obj => obj._diffuseTexture, set: (obj, value) => { obj._diffuseTexture = value; } }, metadata: _metadata }, __diffuseTexture_initializers, __diffuseTexture_extraInitializers);
|
|
1997
|
+
__esDecorate(null, null, __ambientTexture_decorators, { kind: "field", name: "_ambientTexture", static: false, private: false, access: { has: obj => "_ambientTexture" in obj, get: obj => obj._ambientTexture, set: (obj, value) => { obj._ambientTexture = value; } }, metadata: _metadata }, __ambientTexture_initializers, __ambientTexture_extraInitializers);
|
|
1998
|
+
__esDecorate(null, null, __opacityTexture_decorators, { kind: "field", name: "_opacityTexture", static: false, private: false, access: { has: obj => "_opacityTexture" in obj, get: obj => obj._opacityTexture, set: (obj, value) => { obj._opacityTexture = value; } }, metadata: _metadata }, __opacityTexture_initializers, __opacityTexture_extraInitializers);
|
|
1999
|
+
__esDecorate(null, null, __reflectionTexture_decorators, { kind: "field", name: "_reflectionTexture", static: false, private: false, access: { has: obj => "_reflectionTexture" in obj, get: obj => obj._reflectionTexture, set: (obj, value) => { obj._reflectionTexture = value; } }, metadata: _metadata }, __reflectionTexture_initializers, __reflectionTexture_extraInitializers);
|
|
2000
|
+
__esDecorate(null, null, __emissiveTexture_decorators, { kind: "field", name: "_emissiveTexture", static: false, private: false, access: { has: obj => "_emissiveTexture" in obj, get: obj => obj._emissiveTexture, set: (obj, value) => { obj._emissiveTexture = value; } }, metadata: _metadata }, __emissiveTexture_initializers, __emissiveTexture_extraInitializers);
|
|
2001
|
+
__esDecorate(null, null, __specularTexture_decorators, { kind: "field", name: "_specularTexture", static: false, private: false, access: { has: obj => "_specularTexture" in obj, get: obj => obj._specularTexture, set: (obj, value) => { obj._specularTexture = value; } }, metadata: _metadata }, __specularTexture_initializers, __specularTexture_extraInitializers);
|
|
2002
|
+
__esDecorate(null, null, __bumpTexture_decorators, { kind: "field", name: "_bumpTexture", static: false, private: false, access: { has: obj => "_bumpTexture" in obj, get: obj => obj._bumpTexture, set: (obj, value) => { obj._bumpTexture = value; } }, metadata: _metadata }, __bumpTexture_initializers, __bumpTexture_extraInitializers);
|
|
2003
|
+
__esDecorate(null, null, __lightmapTexture_decorators, { kind: "field", name: "_lightmapTexture", static: false, private: false, access: { has: obj => "_lightmapTexture" in obj, get: obj => obj._lightmapTexture, set: (obj, value) => { obj._lightmapTexture = value; } }, metadata: _metadata }, __lightmapTexture_initializers, __lightmapTexture_extraInitializers);
|
|
2004
|
+
__esDecorate(null, null, __refractionTexture_decorators, { kind: "field", name: "_refractionTexture", static: false, private: false, access: { has: obj => "_refractionTexture" in obj, get: obj => obj._refractionTexture, set: (obj, value) => { obj._refractionTexture = value; } }, metadata: _metadata }, __refractionTexture_initializers, __refractionTexture_extraInitializers);
|
|
2005
|
+
__esDecorate(null, null, _ambientColor_decorators, { kind: "field", name: "ambientColor", static: false, private: false, access: { has: obj => "ambientColor" in obj, get: obj => obj.ambientColor, set: (obj, value) => { obj.ambientColor = value; } }, metadata: _metadata }, _ambientColor_initializers, _ambientColor_extraInitializers);
|
|
2006
|
+
__esDecorate(null, null, _diffuseColor_decorators, { kind: "field", name: "diffuseColor", static: false, private: false, access: { has: obj => "diffuseColor" in obj, get: obj => obj.diffuseColor, set: (obj, value) => { obj.diffuseColor = value; } }, metadata: _metadata }, _diffuseColor_initializers, _diffuseColor_extraInitializers);
|
|
2007
|
+
__esDecorate(null, null, _specularColor_decorators, { kind: "field", name: "specularColor", static: false, private: false, access: { has: obj => "specularColor" in obj, get: obj => obj.specularColor, set: (obj, value) => { obj.specularColor = value; } }, metadata: _metadata }, _specularColor_initializers, _specularColor_extraInitializers);
|
|
2008
|
+
__esDecorate(null, null, _emissiveColor_decorators, { kind: "field", name: "emissiveColor", static: false, private: false, access: { has: obj => "emissiveColor" in obj, get: obj => obj.emissiveColor, set: (obj, value) => { obj.emissiveColor = value; } }, metadata: _metadata }, _emissiveColor_initializers, _emissiveColor_extraInitializers);
|
|
2009
|
+
__esDecorate(null, null, _specularPower_decorators, { kind: "field", name: "specularPower", static: false, private: false, access: { has: obj => "specularPower" in obj, get: obj => obj.specularPower, set: (obj, value) => { obj.specularPower = value; } }, metadata: _metadata }, _specularPower_initializers, _specularPower_extraInitializers);
|
|
2010
|
+
__esDecorate(null, null, __useAlphaFromDiffuseTexture_decorators, { kind: "field", name: "_useAlphaFromDiffuseTexture", static: false, private: false, access: { has: obj => "_useAlphaFromDiffuseTexture" in obj, get: obj => obj._useAlphaFromDiffuseTexture, set: (obj, value) => { obj._useAlphaFromDiffuseTexture = value; } }, metadata: _metadata }, __useAlphaFromDiffuseTexture_initializers, __useAlphaFromDiffuseTexture_extraInitializers);
|
|
2011
|
+
__esDecorate(null, null, __useEmissiveAsIllumination_decorators, { kind: "field", name: "_useEmissiveAsIllumination", static: false, private: false, access: { has: obj => "_useEmissiveAsIllumination" in obj, get: obj => obj._useEmissiveAsIllumination, set: (obj, value) => { obj._useEmissiveAsIllumination = value; } }, metadata: _metadata }, __useEmissiveAsIllumination_initializers, __useEmissiveAsIllumination_extraInitializers);
|
|
2012
|
+
__esDecorate(null, null, __linkEmissiveWithDiffuse_decorators, { kind: "field", name: "_linkEmissiveWithDiffuse", static: false, private: false, access: { has: obj => "_linkEmissiveWithDiffuse" in obj, get: obj => obj._linkEmissiveWithDiffuse, set: (obj, value) => { obj._linkEmissiveWithDiffuse = value; } }, metadata: _metadata }, __linkEmissiveWithDiffuse_initializers, __linkEmissiveWithDiffuse_extraInitializers);
|
|
2013
|
+
__esDecorate(null, null, __useSpecularOverAlpha_decorators, { kind: "field", name: "_useSpecularOverAlpha", static: false, private: false, access: { has: obj => "_useSpecularOverAlpha" in obj, get: obj => obj._useSpecularOverAlpha, set: (obj, value) => { obj._useSpecularOverAlpha = value; } }, metadata: _metadata }, __useSpecularOverAlpha_initializers, __useSpecularOverAlpha_extraInitializers);
|
|
2014
|
+
__esDecorate(null, null, __useReflectionOverAlpha_decorators, { kind: "field", name: "_useReflectionOverAlpha", static: false, private: false, access: { has: obj => "_useReflectionOverAlpha" in obj, get: obj => obj._useReflectionOverAlpha, set: (obj, value) => { obj._useReflectionOverAlpha = value; } }, metadata: _metadata }, __useReflectionOverAlpha_initializers, __useReflectionOverAlpha_extraInitializers);
|
|
2015
|
+
__esDecorate(null, null, __disableLighting_decorators, { kind: "field", name: "_disableLighting", static: false, private: false, access: { has: obj => "_disableLighting" in obj, get: obj => obj._disableLighting, set: (obj, value) => { obj._disableLighting = value; } }, metadata: _metadata }, __disableLighting_initializers, __disableLighting_extraInitializers);
|
|
2016
|
+
__esDecorate(null, null, __useObjectSpaceNormalMap_decorators, { kind: "field", name: "_useObjectSpaceNormalMap", static: false, private: false, access: { has: obj => "_useObjectSpaceNormalMap" in obj, get: obj => obj._useObjectSpaceNormalMap, set: (obj, value) => { obj._useObjectSpaceNormalMap = value; } }, metadata: _metadata }, __useObjectSpaceNormalMap_initializers, __useObjectSpaceNormalMap_extraInitializers);
|
|
2017
|
+
__esDecorate(null, null, __useParallax_decorators, { kind: "field", name: "_useParallax", static: false, private: false, access: { has: obj => "_useParallax" in obj, get: obj => obj._useParallax, set: (obj, value) => { obj._useParallax = value; } }, metadata: _metadata }, __useParallax_initializers, __useParallax_extraInitializers);
|
|
2018
|
+
__esDecorate(null, null, __useParallaxOcclusion_decorators, { kind: "field", name: "_useParallaxOcclusion", static: false, private: false, access: { has: obj => "_useParallaxOcclusion" in obj, get: obj => obj._useParallaxOcclusion, set: (obj, value) => { obj._useParallaxOcclusion = value; } }, metadata: _metadata }, __useParallaxOcclusion_initializers, __useParallaxOcclusion_extraInitializers);
|
|
2019
|
+
__esDecorate(null, null, _parallaxScaleBias_decorators, { kind: "field", name: "parallaxScaleBias", static: false, private: false, access: { has: obj => "parallaxScaleBias" in obj, get: obj => obj.parallaxScaleBias, set: (obj, value) => { obj.parallaxScaleBias = value; } }, metadata: _metadata }, _parallaxScaleBias_initializers, _parallaxScaleBias_extraInitializers);
|
|
2020
|
+
__esDecorate(null, null, __roughness_decorators, { kind: "field", name: "_roughness", static: false, private: false, access: { has: obj => "_roughness" in obj, get: obj => obj._roughness, set: (obj, value) => { obj._roughness = value; } }, metadata: _metadata }, __roughness_initializers, __roughness_extraInitializers);
|
|
2021
|
+
__esDecorate(null, null, _indexOfRefraction_decorators, { kind: "field", name: "indexOfRefraction", static: false, private: false, access: { has: obj => "indexOfRefraction" in obj, get: obj => obj.indexOfRefraction, set: (obj, value) => { obj.indexOfRefraction = value; } }, metadata: _metadata }, _indexOfRefraction_initializers, _indexOfRefraction_extraInitializers);
|
|
2022
|
+
__esDecorate(null, null, _invertRefractionY_decorators, { kind: "field", name: "invertRefractionY", static: false, private: false, access: { has: obj => "invertRefractionY" in obj, get: obj => obj.invertRefractionY, set: (obj, value) => { obj.invertRefractionY = value; } }, metadata: _metadata }, _invertRefractionY_initializers, _invertRefractionY_extraInitializers);
|
|
2023
|
+
__esDecorate(null, null, _alphaCutOff_decorators, { kind: "field", name: "alphaCutOff", static: false, private: false, access: { has: obj => "alphaCutOff" in obj, get: obj => obj.alphaCutOff, set: (obj, value) => { obj.alphaCutOff = value; } }, metadata: _metadata }, _alphaCutOff_initializers, _alphaCutOff_extraInitializers);
|
|
2024
|
+
__esDecorate(null, null, __useLightmapAsShadowmap_decorators, { kind: "field", name: "_useLightmapAsShadowmap", static: false, private: false, access: { has: obj => "_useLightmapAsShadowmap" in obj, get: obj => obj._useLightmapAsShadowmap, set: (obj, value) => { obj._useLightmapAsShadowmap = value; } }, metadata: _metadata }, __useLightmapAsShadowmap_initializers, __useLightmapAsShadowmap_extraInitializers);
|
|
2025
|
+
__esDecorate(null, null, __diffuseFresnelParameters_decorators, { kind: "field", name: "_diffuseFresnelParameters", static: false, private: false, access: { has: obj => "_diffuseFresnelParameters" in obj, get: obj => obj._diffuseFresnelParameters, set: (obj, value) => { obj._diffuseFresnelParameters = value; } }, metadata: _metadata }, __diffuseFresnelParameters_initializers, __diffuseFresnelParameters_extraInitializers);
|
|
2026
|
+
__esDecorate(null, null, __opacityFresnelParameters_decorators, { kind: "field", name: "_opacityFresnelParameters", static: false, private: false, access: { has: obj => "_opacityFresnelParameters" in obj, get: obj => obj._opacityFresnelParameters, set: (obj, value) => { obj._opacityFresnelParameters = value; } }, metadata: _metadata }, __opacityFresnelParameters_initializers, __opacityFresnelParameters_extraInitializers);
|
|
2027
|
+
__esDecorate(null, null, __reflectionFresnelParameters_decorators, { kind: "field", name: "_reflectionFresnelParameters", static: false, private: false, access: { has: obj => "_reflectionFresnelParameters" in obj, get: obj => obj._reflectionFresnelParameters, set: (obj, value) => { obj._reflectionFresnelParameters = value; } }, metadata: _metadata }, __reflectionFresnelParameters_initializers, __reflectionFresnelParameters_extraInitializers);
|
|
2028
|
+
__esDecorate(null, null, __refractionFresnelParameters_decorators, { kind: "field", name: "_refractionFresnelParameters", static: false, private: false, access: { has: obj => "_refractionFresnelParameters" in obj, get: obj => obj._refractionFresnelParameters, set: (obj, value) => { obj._refractionFresnelParameters = value; } }, metadata: _metadata }, __refractionFresnelParameters_initializers, __refractionFresnelParameters_extraInitializers);
|
|
2029
|
+
__esDecorate(null, null, __emissiveFresnelParameters_decorators, { kind: "field", name: "_emissiveFresnelParameters", static: false, private: false, access: { has: obj => "_emissiveFresnelParameters" in obj, get: obj => obj._emissiveFresnelParameters, set: (obj, value) => { obj._emissiveFresnelParameters = value; } }, metadata: _metadata }, __emissiveFresnelParameters_initializers, __emissiveFresnelParameters_extraInitializers);
|
|
2030
|
+
__esDecorate(null, null, __useReflectionFresnelFromSpecular_decorators, { kind: "field", name: "_useReflectionFresnelFromSpecular", static: false, private: false, access: { has: obj => "_useReflectionFresnelFromSpecular" in obj, get: obj => obj._useReflectionFresnelFromSpecular, set: (obj, value) => { obj._useReflectionFresnelFromSpecular = value; } }, metadata: _metadata }, __useReflectionFresnelFromSpecular_initializers, __useReflectionFresnelFromSpecular_extraInitializers);
|
|
2031
|
+
__esDecorate(null, null, __useGlossinessFromSpecularMapAlpha_decorators, { kind: "field", name: "_useGlossinessFromSpecularMapAlpha", static: false, private: false, access: { has: obj => "_useGlossinessFromSpecularMapAlpha" in obj, get: obj => obj._useGlossinessFromSpecularMapAlpha, set: (obj, value) => { obj._useGlossinessFromSpecularMapAlpha = value; } }, metadata: _metadata }, __useGlossinessFromSpecularMapAlpha_initializers, __useGlossinessFromSpecularMapAlpha_extraInitializers);
|
|
2032
|
+
__esDecorate(null, null, __maxSimultaneousLights_decorators, { kind: "field", name: "_maxSimultaneousLights", static: false, private: false, access: { has: obj => "_maxSimultaneousLights" in obj, get: obj => obj._maxSimultaneousLights, set: (obj, value) => { obj._maxSimultaneousLights = value; } }, metadata: _metadata }, __maxSimultaneousLights_initializers, __maxSimultaneousLights_extraInitializers);
|
|
2033
|
+
__esDecorate(null, null, __invertNormalMapX_decorators, { kind: "field", name: "_invertNormalMapX", static: false, private: false, access: { has: obj => "_invertNormalMapX" in obj, get: obj => obj._invertNormalMapX, set: (obj, value) => { obj._invertNormalMapX = value; } }, metadata: _metadata }, __invertNormalMapX_initializers, __invertNormalMapX_extraInitializers);
|
|
2034
|
+
__esDecorate(null, null, __invertNormalMapY_decorators, { kind: "field", name: "_invertNormalMapY", static: false, private: false, access: { has: obj => "_invertNormalMapY" in obj, get: obj => obj._invertNormalMapY, set: (obj, value) => { obj._invertNormalMapY = value; } }, metadata: _metadata }, __invertNormalMapY_initializers, __invertNormalMapY_extraInitializers);
|
|
2035
|
+
__esDecorate(null, null, __twoSidedLighting_decorators, { kind: "field", name: "_twoSidedLighting", static: false, private: false, access: { has: obj => "_twoSidedLighting" in obj, get: obj => obj._twoSidedLighting, set: (obj, value) => { obj._twoSidedLighting = value; } }, metadata: _metadata }, __twoSidedLighting_initializers, __twoSidedLighting_extraInitializers);
|
|
2036
|
+
__esDecorate(null, null, __applyDecalMapAfterDetailMap_decorators, { kind: "field", name: "_applyDecalMapAfterDetailMap", static: false, private: false, access: { has: obj => "_applyDecalMapAfterDetailMap" in obj, get: obj => obj._applyDecalMapAfterDetailMap, set: (obj, value) => { obj._applyDecalMapAfterDetailMap = value; } }, metadata: _metadata }, __applyDecalMapAfterDetailMap_initializers, __applyDecalMapAfterDetailMap_extraInitializers);
|
|
2037
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
2038
|
+
})(),
|
|
2039
|
+
/**
|
|
2040
|
+
* Force all the standard materials to compile to glsl even on WebGPU engines.
|
|
2041
|
+
* False by default. This is mostly meant for backward compatibility.
|
|
2042
|
+
*/
|
|
2043
|
+
_a.ForceGLSL = false,
|
|
2044
|
+
_a;
|
|
2045
|
+
})();
|
|
2046
|
+
export { StandardMaterial };
|
|
1639
2047
|
let _Registered = false;
|
|
1640
2048
|
/**
|
|
1641
2049
|
* Register side effects for standardMaterial.
|
|
@@ -1646,6 +2054,8 @@ export function RegisterStandardMaterial() {
|
|
|
1646
2054
|
return;
|
|
1647
2055
|
}
|
|
1648
2056
|
_Registered = true;
|
|
2057
|
+
// StandardMaterial serializes its image processing configuration, so the parser must be registered for clone/parse to work.
|
|
2058
|
+
RegisterImageProcessingConfiguration();
|
|
1649
2059
|
RegisterClass("BABYLON.StandardMaterial", StandardMaterial);
|
|
1650
2060
|
Scene.DefaultMaterialFactory = (scene) => {
|
|
1651
2061
|
return new StandardMaterial("default material", scene);
|