@onerjs/core 8.53.4 → 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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"imageProcessingConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/imageProcessingConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,iCAAiC,EAAE,iCAAiC,EAAE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MAAM,CAAC,eAAe,CAAC;IACpD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oCAAoC;IAChD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,4BAA4B,CAAC,KAAK,GAAG,iCAAiC,CAAC;IAEvE,mBAAmB,CAAC,mCAAmC,GAAG,iCAAiC,CAAC;IAE5F,sBAAsB;IACtB,aAAa,CAAC,sCAAsC,EAAE,4BAA4B,CAAC,CAAC;AACxF,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, serializeAsTexture, serializeAsColorCurves, serializeAsColor4 } from \"../Misc/decorators\";\r\nimport { Observable } from \"../Misc/observable.pure\";\r\nimport { type Nullable } from \"../types\";\r\nimport { Color4 } from \"../Maths/math.color.pure\";\r\nimport { ColorCurves, ColorCurvesBind } from \"../Materials/colorCurves.pure\";\r\nimport { type BaseTexture } from \"../Materials/Textures/baseTexture.pure\";\r\nimport { type Effect } from \"../Materials/effect.pure\";\r\nimport { Mix } from \"../Misc/tools.functions\";\r\nimport { SerializationHelper } from \"../Misc/decorators.serialization\";\r\nimport { type IImageProcessingConfigurationDefines } from \"./imageProcessingConfiguration.defines\";\r\nimport { PrepareSamplersForImageProcessing, PrepareUniformsForImageProcessing } from \"./imageProcessingConfiguration.functions\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This groups together the common properties used for image processing either in direct forward pass\r\n * or through post processing effect depending on the use of the image processing pipeline in your scene\r\n * or not.\r\n */\r\nexport class ImageProcessingConfiguration {\r\n /**\r\n * Default tone mapping applied in BabylonJS.\r\n */\r\n public static readonly TONEMAPPING_STANDARD = 0;\r\n\r\n /**\r\n * ACES Tone mapping (used by default in unreal and unity). This can help getting closer\r\n * to other engines rendering to increase portability.\r\n */\r\n public static readonly TONEMAPPING_ACES = 1;\r\n\r\n /**\r\n * Neutral Tone mapping developped by the Khronos group in order to constrain\r\n * values between 0 and 1 without shifting Hue.\r\n */\r\n public static readonly TONEMAPPING_KHR_PBR_NEUTRAL = 2;\r\n\r\n /**\r\n * Color curves setup used in the effect if colorCurvesEnabled is set to true\r\n */\r\n @serializeAsColorCurves()\r\n public colorCurves: Nullable<ColorCurves> = new ColorCurves();\r\n\r\n @serialize()\r\n private _colorCurvesEnabled = false;\r\n /**\r\n * Gets whether the color curves effect is enabled.\r\n */\r\n public get colorCurvesEnabled(): boolean {\r\n return this._colorCurvesEnabled;\r\n }\r\n /**\r\n * Sets whether the color curves effect is enabled.\r\n */\r\n public set colorCurvesEnabled(value: boolean) {\r\n if (this._colorCurvesEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorCurvesEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serializeAsTexture(\"colorGradingTexture\")\r\n private _colorGradingTexture: Nullable<BaseTexture>;\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public get colorGradingTexture(): Nullable<BaseTexture> {\r\n return this._colorGradingTexture;\r\n }\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public set colorGradingTexture(value: Nullable<BaseTexture>) {\r\n if (this._colorGradingTexture === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingTexture = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingEnabled = false;\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public get colorGradingEnabled(): boolean {\r\n return this._colorGradingEnabled;\r\n }\r\n /**\r\n * Sets whether the color grading effect is enabled.\r\n */\r\n public set colorGradingEnabled(value: boolean) {\r\n if (this._colorGradingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingWithGreenDepth = true;\r\n /**\r\n * Gets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public get colorGradingWithGreenDepth(): boolean {\r\n return this._colorGradingWithGreenDepth;\r\n }\r\n /**\r\n * Sets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public set colorGradingWithGreenDepth(value: boolean) {\r\n if (this._colorGradingWithGreenDepth === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingWithGreenDepth = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingBGR = true;\r\n /**\r\n * Gets whether the color grading texture contains BGR values.\r\n */\r\n public get colorGradingBGR(): boolean {\r\n return this._colorGradingBGR;\r\n }\r\n /**\r\n * Sets whether the color grading texture contains BGR values.\r\n */\r\n public set colorGradingBGR(value: boolean) {\r\n if (this._colorGradingBGR === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingBGR = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _exposure = 1.0;\r\n /**\r\n * Gets the Exposure used in the effect.\r\n */\r\n public get exposure(): number {\r\n return this._exposure;\r\n }\r\n /**\r\n * Sets the Exposure used in the effect.\r\n */\r\n public set exposure(value: number) {\r\n if (this._exposure === value) {\r\n return;\r\n }\r\n\r\n this._exposure = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingEnabled = false;\r\n /**\r\n * Gets whether the tone mapping effect is enabled.\r\n */\r\n public get toneMappingEnabled(): boolean {\r\n return this._toneMappingEnabled;\r\n }\r\n /**\r\n * Sets whether the tone mapping effect is enabled.\r\n */\r\n public set toneMappingEnabled(value: boolean) {\r\n if (this._toneMappingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingType = ImageProcessingConfiguration.TONEMAPPING_STANDARD;\r\n /**\r\n * Gets the type of tone mapping effect.\r\n */\r\n public get toneMappingType(): number {\r\n return this._toneMappingType;\r\n }\r\n /**\r\n * Sets the type of tone mapping effect used in BabylonJS.\r\n */\r\n public set toneMappingType(value: number) {\r\n if (this._toneMappingType === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingType = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n protected _contrast = 1.0;\r\n /**\r\n * Gets the contrast used in the effect.\r\n */\r\n public get contrast(): number {\r\n return this._contrast;\r\n }\r\n /**\r\n * Sets the contrast used in the effect.\r\n */\r\n public set contrast(value: number) {\r\n if (this._contrast === value) {\r\n return;\r\n }\r\n\r\n this._contrast = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Vignette stretch size.\r\n */\r\n @serialize()\r\n public vignetteStretch = 0;\r\n\r\n /**\r\n * Vignette center X Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterX = 0;\r\n\r\n /**\r\n * Vignette center Y Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterY = 0;\r\n\r\n /**\r\n * Back Compat: Vignette center Y Offset.\r\n * @deprecated use vignetteCenterY instead\r\n */\r\n public get vignetteCentreY(): number {\r\n return this.vignetteCenterY;\r\n }\r\n public set vignetteCentreY(value: number) {\r\n this.vignetteCenterY = value;\r\n }\r\n\r\n /**\r\n * Back Compat: Vignette center X Offset.\r\n * @deprecated use vignetteCenterX instead\r\n */\r\n public get vignetteCentreX(): number {\r\n return this.vignetteCenterX;\r\n }\r\n public set vignetteCentreX(value: number) {\r\n this.vignetteCenterX = value;\r\n }\r\n\r\n /**\r\n * Vignette weight or intensity of the vignette effect.\r\n */\r\n @serialize()\r\n public vignetteWeight = 1.5;\r\n\r\n /**\r\n * Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode)\r\n * if vignetteEnabled is set to true.\r\n */\r\n @serializeAsColor4()\r\n public vignetteColor: Color4 = new Color4(0, 0, 0, 0);\r\n\r\n /**\r\n * Camera field of view used by the Vignette effect.\r\n */\r\n @serialize()\r\n public vignetteCameraFov = 0.5;\r\n\r\n @serialize()\r\n private _vignetteBlendMode = ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY;\r\n /**\r\n * Gets the vignette blend mode allowing different kind of effect.\r\n */\r\n public get vignetteBlendMode(): number {\r\n return this._vignetteBlendMode;\r\n }\r\n /**\r\n * Sets the vignette blend mode allowing different kind of effect.\r\n */\r\n public set vignetteBlendMode(value: number) {\r\n if (this._vignetteBlendMode === value) {\r\n return;\r\n }\r\n\r\n this._vignetteBlendMode = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _vignetteEnabled = false;\r\n /**\r\n * Gets whether the vignette effect is enabled.\r\n */\r\n public get vignetteEnabled(): boolean {\r\n return this._vignetteEnabled;\r\n }\r\n /**\r\n * Sets whether the vignette effect is enabled.\r\n */\r\n public set vignetteEnabled(value: boolean) {\r\n if (this._vignetteEnabled === value) {\r\n return;\r\n }\r\n\r\n this._vignetteEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringEnabled = false;\r\n /**\r\n * Gets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public get ditheringEnabled(): boolean {\r\n return this._ditheringEnabled;\r\n }\r\n /**\r\n * Sets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public set ditheringEnabled(value: boolean) {\r\n if (this._ditheringEnabled === value) {\r\n return;\r\n }\r\n\r\n this._ditheringEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringIntensity = 1.0 / 255.0;\r\n /**\r\n * Gets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public get ditheringIntensity(): number {\r\n return this._ditheringIntensity;\r\n }\r\n /**\r\n * Sets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public set ditheringIntensity(value: number) {\r\n if (this._ditheringIntensity === value) {\r\n return;\r\n }\r\n\r\n this._ditheringIntensity = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _skipFinalColorClamp = false;\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public get skipFinalColorClamp(): boolean {\r\n return this._skipFinalColorClamp;\r\n }\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public set skipFinalColorClamp(value: boolean) {\r\n if (this._skipFinalColorClamp === value) {\r\n return;\r\n }\r\n\r\n this._skipFinalColorClamp = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _applyByPostProcess = false;\r\n /**\r\n * Gets whether the image processing is applied through a post process or not.\r\n */\r\n public get applyByPostProcess(): boolean {\r\n return this._applyByPostProcess;\r\n }\r\n /**\r\n * Sets whether the image processing is applied through a post process or not.\r\n */\r\n public set applyByPostProcess(value: boolean) {\r\n if (this._applyByPostProcess === value) {\r\n return;\r\n }\r\n\r\n this._applyByPostProcess = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _isEnabled = true;\r\n /**\r\n * Gets whether the image processing is enabled or not.\r\n */\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n /**\r\n * Sets whether the image processing is enabled or not.\r\n */\r\n public set isEnabled(value: boolean) {\r\n if (this._isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Width of the output texture used in the post process. If not provided, uses the width of the screen.\r\n */\r\n @serialize()\r\n public outputTextureWidth = 0;\r\n\r\n /**\r\n * Height of the output texture used in the post process. If not provided, uses the height of the screen.\r\n */\r\n @serialize()\r\n public outputTextureHeight = 0;\r\n\r\n /**\r\n * An event triggered when the configuration changes and requires Shader to Update some parameters.\r\n */\r\n public onUpdateParameters = new Observable<ImageProcessingConfiguration>();\r\n\r\n /**\r\n * Method called each time the image processing information changes requires to recompile the effect.\r\n */\r\n protected _updateParameters(): void {\r\n this.onUpdateParameters.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets the current class name.\r\n * @returns \"ImageProcessingConfiguration\"\r\n */\r\n public getClassName(): string {\r\n return \"ImageProcessingConfiguration\";\r\n }\r\n\r\n /**\r\n * Prepare the list of uniforms associated with the Image Processing effects.\r\n * @param uniforms The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareUniforms: (uniforms: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareUniformsForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of samplers associated with the Image Processing effects.\r\n * @param samplersList The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareSamplers: (samplersList: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareSamplersForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of defines associated to the shader.\r\n * @param defines the list of defines to complete\r\n * @param forPostProcess Define if we are currently in post process mode or not\r\n */\r\n public prepareDefines(defines: IImageProcessingConfigurationDefines, forPostProcess = false): void {\r\n if (forPostProcess !== this.applyByPostProcess || !this._isEnabled) {\r\n defines.VIGNETTE = false;\r\n defines.TONEMAPPING = 0;\r\n defines.CONTRAST = false;\r\n defines.EXPOSURE = false;\r\n defines.COLORCURVES = false;\r\n defines.COLORGRADING = false;\r\n defines.COLORGRADING3D = false;\r\n defines.DITHER = false;\r\n defines.IMAGEPROCESSING = false;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess && this._isEnabled;\r\n return;\r\n }\r\n\r\n defines.VIGNETTE = this.vignetteEnabled;\r\n defines.VIGNETTEBLENDMODEMULTIPLY = this.vignetteBlendMode === ImageProcessingConfiguration._VIGNETTEMODE_MULTIPLY;\r\n defines.VIGNETTEBLENDMODEOPAQUE = !defines.VIGNETTEBLENDMODEMULTIPLY;\r\n\r\n if (!this._toneMappingEnabled) {\r\n defines.TONEMAPPING = 0;\r\n } else {\r\n switch (this._toneMappingType) {\r\n case ImageProcessingConfiguration.TONEMAPPING_KHR_PBR_NEUTRAL:\r\n defines.TONEMAPPING = 3;\r\n break;\r\n case ImageProcessingConfiguration.TONEMAPPING_ACES:\r\n defines.TONEMAPPING = 2;\r\n break;\r\n default:\r\n defines.TONEMAPPING = 1;\r\n break;\r\n }\r\n }\r\n\r\n defines.CONTRAST = this.contrast !== 1.0;\r\n defines.EXPOSURE = this.exposure !== 1.0;\r\n defines.COLORCURVES = this.colorCurvesEnabled && !!this.colorCurves;\r\n defines.COLORGRADING = this.colorGradingEnabled && !!this.colorGradingTexture;\r\n if (defines.COLORGRADING) {\r\n defines.COLORGRADING3D = this.colorGradingTexture!.is3D;\r\n } else {\r\n defines.COLORGRADING3D = false;\r\n }\r\n defines.SAMPLER3DGREENDEPTH = this.colorGradingWithGreenDepth;\r\n defines.SAMPLER3DBGRMAP = this.colorGradingBGR;\r\n defines.DITHER = this._ditheringEnabled;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSING =\r\n defines.VIGNETTE || !!defines.TONEMAPPING || defines.CONTRAST || defines.EXPOSURE || defines.COLORCURVES || defines.COLORGRADING || defines.DITHER;\r\n }\r\n\r\n /**\r\n * Returns true if all the image processing information are ready.\r\n * @returns True if ready, otherwise, false\r\n */\r\n public isReady() {\r\n // Color Grading texture can not be none blocking.\r\n return !this.colorGradingEnabled || !this.colorGradingTexture || this.colorGradingTexture.isReady();\r\n }\r\n\r\n /**\r\n * Binds the image processing to the shader.\r\n * @param effect The effect to bind to\r\n * @param overrideAspectRatio Override the aspect ratio of the effect\r\n */\r\n public bind(effect: Effect, overrideAspectRatio?: number): void {\r\n // Color Curves\r\n if (this._colorCurvesEnabled && this.colorCurves) {\r\n ColorCurvesBind(this.colorCurves, effect);\r\n }\r\n\r\n // Vignette and dither handled together due to common uniform.\r\n if (this._vignetteEnabled || this._ditheringEnabled) {\r\n const inverseWidth = 1 / (this.outputTextureWidth || effect.getEngine().getRenderWidth());\r\n const inverseHeight = 1 / (this.outputTextureHeight || effect.getEngine().getRenderHeight());\r\n effect.setFloat2(\"vInverseScreenSize\", inverseWidth, inverseHeight);\r\n\r\n if (this._ditheringEnabled) {\r\n effect.setFloat(\"ditherIntensity\", 0.5 * this._ditheringIntensity);\r\n }\r\n\r\n if (this._vignetteEnabled) {\r\n const aspectRatio = overrideAspectRatio != null ? overrideAspectRatio : inverseHeight / inverseWidth;\r\n\r\n let vignetteScaleY = Math.tan(this.vignetteCameraFov * 0.5);\r\n let vignetteScaleX = vignetteScaleY * aspectRatio;\r\n\r\n const vignetteScaleGeometricMean = Math.sqrt(vignetteScaleX * vignetteScaleY);\r\n vignetteScaleX = Mix(vignetteScaleX, vignetteScaleGeometricMean, this.vignetteStretch);\r\n vignetteScaleY = Mix(vignetteScaleY, vignetteScaleGeometricMean, this.vignetteStretch);\r\n\r\n effect.setFloat4(\"vignetteSettings1\", vignetteScaleX, vignetteScaleY, -vignetteScaleX * this.vignetteCenterX, -vignetteScaleY * this.vignetteCenterY);\r\n\r\n const vignettePower = -2.0 * this.vignetteWeight;\r\n effect.setFloat4(\"vignetteSettings2\", this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);\r\n }\r\n }\r\n\r\n // Exposure\r\n effect.setFloat(\"exposureLinear\", this.exposure);\r\n\r\n // Contrast\r\n effect.setFloat(\"contrast\", this.contrast);\r\n\r\n // Color transform settings\r\n if (this.colorGradingTexture) {\r\n effect.setTexture(\"txColorTransform\", this.colorGradingTexture);\r\n const textureSize = this.colorGradingTexture.getSize().height;\r\n\r\n effect.setFloat4(\r\n \"colorTransformSettings\",\r\n (textureSize - 1) / textureSize, // textureScale\r\n 0.5 / textureSize, // textureOffset\r\n textureSize, // textureSize\r\n this.colorGradingTexture.level // weight\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Clones the current image processing instance.\r\n * @returns The cloned image processing\r\n */\r\n public clone(): ImageProcessingConfiguration {\r\n return SerializationHelper.Clone(() => new ImageProcessingConfiguration(), this);\r\n }\r\n\r\n /**\r\n * Serializes the current image processing instance to a json representation.\r\n * @returns a JSON representation\r\n */\r\n public serialize(): any {\r\n return SerializationHelper.Serialize(this);\r\n }\r\n\r\n // Static constants associated to the image processing.\r\n private static _VIGNETTEMODE_MULTIPLY = 0;\r\n private static _VIGNETTEMODE_OPAQUE = 1;\r\n\r\n /**\r\n * Used to apply the vignette as a mix with the pixel color.\r\n */\r\n public static get VIGNETTEMODE_MULTIPLY(): number {\r\n return this._VIGNETTEMODE_MULTIPLY;\r\n }\r\n\r\n /**\r\n * Used to apply the vignette as a replacement of the pixel color.\r\n */\r\n public static get VIGNETTEMODE_OPAQUE(): number {\r\n return this._VIGNETTEMODE_OPAQUE;\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n\r\n/**\r\n * Parses the image processing from a json representation.\r\n * @param source the JSON source to parse\r\n * @returns The parsed image processing\r\n */\r\nexport function ImageProcessingConfigurationParse(source: any): ImageProcessingConfiguration {\r\n const parsed = SerializationHelper.Parse(() => new ImageProcessingConfiguration(), source, null, null);\r\n // Backward compatibility\r\n if (source.vignetteCentreX !== undefined) {\r\n parsed.vignetteCenterX = source.vignetteCentreX;\r\n }\r\n if (source.vignetteCentreY !== undefined) {\r\n parsed.vignetteCenterY = source.vignetteCentreY;\r\n }\r\n\r\n return parsed;\r\n}\r\n\r\n/**\r\n * Register side effects for imageProcessingConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterImageProcessingConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n // References the dependencies.\r\n ImageProcessingConfiguration.Parse = ImageProcessingConfigurationParse;\r\n\r\n SerializationHelper._ImageProcessingConfigurationParser = ImageProcessingConfigurationParse;\r\n\r\n // Register Class Name\r\n RegisterClass(\"BABYLON.ImageProcessingConfiguration\", ImageProcessingConfiguration);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"imageProcessingConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/imageProcessingConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAG7E,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAE,iCAAiC,EAAE,iCAAiC,EAAE,MAAM,0CAA0C,CAAC;AAChI,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;GAIG;IACU,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAA5B,4BAA4B;;gBAkBrC;;mBAEG;gBAEI,gBAAW,sDAA0B,IAAI,WAAW,EAAE,EAAC;gBAGtD,wBAAmB,wHAAG,KAAK,GAAC;gBAoB5B,yBAAoB,0IAAwB;gBAoB5C,yBAAoB,kIAAG,KAAK,GAAC;gBAoB7B,gCAA2B,yIAAG,IAAI,GAAC;gBAoBnC,qBAAgB,qIAAG,IAAI,GAAC;gBAmBhC,gBAAgB;gBAET,cAAS,mHAAG,GAAG,GAAC;gBAoBf,wBAAmB,sHAAG,KAAK,GAAC;gBAoB5B,qBAAgB,6HAAG,EAA4B,CAAC,oBAAoB,GAAC;gBAoBnE,cAAS,mHAAG,GAAG,GAAC;gBAmB1B;;mBAEG;gBAEI,oBAAe,kHAAG,CAAC,GAAC;g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JnJ,uDAAuD;QACxC,yBAAsB,GAAG,CAAE;QAC3B,uBAAoB,GAAG,CAAE;;;SAzlB/B,4BAA4B;AA0mBzC,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAAC,MAAW;IACzD,MAAM,MAAM,GAAG,mBAAmB,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,4BAA4B,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACvG,yBAAyB;IACzB,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACpD,CAAC;IACD,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;QACvC,MAAM,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;IACpD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oCAAoC;IAChD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,+BAA+B;IAC/B,4BAA4B,CAAC,KAAK,GAAG,iCAAiC,CAAC;IAEvE,mBAAmB,CAAC,mCAAmC,GAAG,iCAAiC,CAAC;IAE5F,sBAAsB;IACtB,aAAa,CAAC,sCAAsC,EAAE,4BAA4B,CAAC,CAAC;AACxF,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, serializeAsTexture, serializeAsColorCurves, serializeAsColor4 } from \"../Misc/decorators\";\r\nimport { Observable } from \"../Misc/observable.pure\";\r\nimport { type Nullable } from \"../types\";\r\nimport { Color4 } from \"../Maths/math.color.pure\";\r\nimport { ColorCurves, ColorCurvesBind } from \"../Materials/colorCurves.pure\";\r\nimport { type BaseTexture } from \"../Materials/Textures/baseTexture.pure\";\r\nimport { type Effect } from \"../Materials/effect.pure\";\r\nimport { Mix } from \"../Misc/tools.functions\";\r\nimport { SerializationHelper } from \"../Misc/decorators.serialization\";\r\nimport { type IImageProcessingConfigurationDefines } from \"./imageProcessingConfiguration.defines\";\r\nimport { PrepareSamplersForImageProcessing, PrepareUniformsForImageProcessing } from \"./imageProcessingConfiguration.functions\";\r\nimport { RegisterClass } from \"../Misc/typeStore\";\r\n\r\n/**\r\n * This groups together the common properties used for image processing either in direct forward pass\r\n * or through post processing effect depending on the use of the image processing pipeline in your scene\r\n * or not.\r\n */\r\nexport class ImageProcessingConfiguration {\r\n /**\r\n * Default tone mapping applied in BabylonJS.\r\n */\r\n public static readonly TONEMAPPING_STANDARD = 0;\r\n\r\n /**\r\n * ACES Tone mapping (used by default in unreal and unity). This can help getting closer\r\n * to other engines rendering to increase portability.\r\n */\r\n public static readonly TONEMAPPING_ACES = 1;\r\n\r\n /**\r\n * Neutral Tone mapping developped by the Khronos group in order to constrain\r\n * values between 0 and 1 without shifting Hue.\r\n */\r\n public static readonly TONEMAPPING_KHR_PBR_NEUTRAL = 2;\r\n\r\n /**\r\n * Color curves setup used in the effect if colorCurvesEnabled is set to true\r\n */\r\n @serializeAsColorCurves()\r\n public colorCurves: Nullable<ColorCurves> = new ColorCurves();\r\n\r\n @serialize()\r\n private _colorCurvesEnabled = false;\r\n /**\r\n * Gets whether the color curves effect is enabled.\r\n */\r\n public get colorCurvesEnabled(): boolean {\r\n return this._colorCurvesEnabled;\r\n }\r\n /**\r\n * Sets whether the color curves effect is enabled.\r\n */\r\n public set colorCurvesEnabled(value: boolean) {\r\n if (this._colorCurvesEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorCurvesEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serializeAsTexture(\"colorGradingTexture\")\r\n private _colorGradingTexture: Nullable<BaseTexture>;\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public get colorGradingTexture(): Nullable<BaseTexture> {\r\n return this._colorGradingTexture;\r\n }\r\n /**\r\n * Color grading LUT texture used in the effect if colorGradingEnabled is set to true\r\n */\r\n public set colorGradingTexture(value: Nullable<BaseTexture>) {\r\n if (this._colorGradingTexture === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingTexture = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingEnabled = false;\r\n /**\r\n * Gets whether the color grading effect is enabled.\r\n */\r\n public get colorGradingEnabled(): boolean {\r\n return this._colorGradingEnabled;\r\n }\r\n /**\r\n * Sets whether the color grading effect is enabled.\r\n */\r\n public set colorGradingEnabled(value: boolean) {\r\n if (this._colorGradingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingWithGreenDepth = true;\r\n /**\r\n * Gets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public get colorGradingWithGreenDepth(): boolean {\r\n return this._colorGradingWithGreenDepth;\r\n }\r\n /**\r\n * Sets whether the color grading effect is using a green depth for the 3d Texture.\r\n */\r\n public set colorGradingWithGreenDepth(value: boolean) {\r\n if (this._colorGradingWithGreenDepth === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingWithGreenDepth = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _colorGradingBGR = true;\r\n /**\r\n * Gets whether the color grading texture contains BGR values.\r\n */\r\n public get colorGradingBGR(): boolean {\r\n return this._colorGradingBGR;\r\n }\r\n /**\r\n * Sets whether the color grading texture contains BGR values.\r\n */\r\n public set colorGradingBGR(value: boolean) {\r\n if (this._colorGradingBGR === value) {\r\n return;\r\n }\r\n\r\n this._colorGradingBGR = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _exposure = 1.0;\r\n /**\r\n * Gets the Exposure used in the effect.\r\n */\r\n public get exposure(): number {\r\n return this._exposure;\r\n }\r\n /**\r\n * Sets the Exposure used in the effect.\r\n */\r\n public set exposure(value: number) {\r\n if (this._exposure === value) {\r\n return;\r\n }\r\n\r\n this._exposure = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingEnabled = false;\r\n /**\r\n * Gets whether the tone mapping effect is enabled.\r\n */\r\n public get toneMappingEnabled(): boolean {\r\n return this._toneMappingEnabled;\r\n }\r\n /**\r\n * Sets whether the tone mapping effect is enabled.\r\n */\r\n public set toneMappingEnabled(value: boolean) {\r\n if (this._toneMappingEnabled === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _toneMappingType = ImageProcessingConfiguration.TONEMAPPING_STANDARD;\r\n /**\r\n * Gets the type of tone mapping effect.\r\n */\r\n public get toneMappingType(): number {\r\n return this._toneMappingType;\r\n }\r\n /**\r\n * Sets the type of tone mapping effect used in BabylonJS.\r\n */\r\n public set toneMappingType(value: number) {\r\n if (this._toneMappingType === value) {\r\n return;\r\n }\r\n\r\n this._toneMappingType = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n protected _contrast = 1.0;\r\n /**\r\n * Gets the contrast used in the effect.\r\n */\r\n public get contrast(): number {\r\n return this._contrast;\r\n }\r\n /**\r\n * Sets the contrast used in the effect.\r\n */\r\n public set contrast(value: number) {\r\n if (this._contrast === value) {\r\n return;\r\n }\r\n\r\n this._contrast = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Vignette stretch size.\r\n */\r\n @serialize()\r\n public vignetteStretch = 0;\r\n\r\n /**\r\n * Vignette center X Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterX = 0;\r\n\r\n /**\r\n * Vignette center Y Offset.\r\n */\r\n @serialize()\r\n public vignetteCenterY = 0;\r\n\r\n /**\r\n * Back Compat: Vignette center Y Offset.\r\n * @deprecated use vignetteCenterY instead\r\n */\r\n public get vignetteCentreY(): number {\r\n return this.vignetteCenterY;\r\n }\r\n public set vignetteCentreY(value: number) {\r\n this.vignetteCenterY = value;\r\n }\r\n\r\n /**\r\n * Back Compat: Vignette center X Offset.\r\n * @deprecated use vignetteCenterX instead\r\n */\r\n public get vignetteCentreX(): number {\r\n return this.vignetteCenterX;\r\n }\r\n public set vignetteCentreX(value: number) {\r\n this.vignetteCenterX = value;\r\n }\r\n\r\n /**\r\n * Vignette weight or intensity of the vignette effect.\r\n */\r\n @serialize()\r\n public vignetteWeight = 1.5;\r\n\r\n /**\r\n * Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode)\r\n * if vignetteEnabled is set to true.\r\n */\r\n @serializeAsColor4()\r\n public vignetteColor: Color4 = new Color4(0, 0, 0, 0);\r\n\r\n /**\r\n * Camera field of view used by the Vignette effect.\r\n */\r\n @serialize()\r\n public vignetteCameraFov = 0.5;\r\n\r\n @serialize()\r\n private _vignetteBlendMode = ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY;\r\n /**\r\n * Gets the vignette blend mode allowing different kind of effect.\r\n */\r\n public get vignetteBlendMode(): number {\r\n return this._vignetteBlendMode;\r\n }\r\n /**\r\n * Sets the vignette blend mode allowing different kind of effect.\r\n */\r\n public set vignetteBlendMode(value: number) {\r\n if (this._vignetteBlendMode === value) {\r\n return;\r\n }\r\n\r\n this._vignetteBlendMode = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _vignetteEnabled = false;\r\n /**\r\n * Gets whether the vignette effect is enabled.\r\n */\r\n public get vignetteEnabled(): boolean {\r\n return this._vignetteEnabled;\r\n }\r\n /**\r\n * Sets whether the vignette effect is enabled.\r\n */\r\n public set vignetteEnabled(value: boolean) {\r\n if (this._vignetteEnabled === value) {\r\n return;\r\n }\r\n\r\n this._vignetteEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringEnabled = false;\r\n /**\r\n * Gets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public get ditheringEnabled(): boolean {\r\n return this._ditheringEnabled;\r\n }\r\n /**\r\n * Sets whether the dithering effect is enabled.\r\n * The dithering effect can be used to reduce banding.\r\n */\r\n public set ditheringEnabled(value: boolean) {\r\n if (this._ditheringEnabled === value) {\r\n return;\r\n }\r\n\r\n this._ditheringEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _ditheringIntensity = 1.0 / 255.0;\r\n /**\r\n * Gets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public get ditheringIntensity(): number {\r\n return this._ditheringIntensity;\r\n }\r\n /**\r\n * Sets the dithering intensity. 0 is no dithering. Default is 1.0 / 255.0.\r\n */\r\n public set ditheringIntensity(value: number) {\r\n if (this._ditheringIntensity === value) {\r\n return;\r\n }\r\n\r\n this._ditheringIntensity = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _skipFinalColorClamp = false;\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public get skipFinalColorClamp(): boolean {\r\n return this._skipFinalColorClamp;\r\n }\r\n /**\r\n * If apply by post process is set to true, setting this to true will skip the final color clamp step in the fragment shader\r\n * Applies to PBR materials.\r\n */\r\n public set skipFinalColorClamp(value: boolean) {\r\n if (this._skipFinalColorClamp === value) {\r\n return;\r\n }\r\n\r\n this._skipFinalColorClamp = value;\r\n this._updateParameters();\r\n }\r\n\r\n /** @internal */\r\n @serialize()\r\n public _applyByPostProcess = false;\r\n /**\r\n * Gets whether the image processing is applied through a post process or not.\r\n */\r\n public get applyByPostProcess(): boolean {\r\n return this._applyByPostProcess;\r\n }\r\n /**\r\n * Sets whether the image processing is applied through a post process or not.\r\n */\r\n public set applyByPostProcess(value: boolean) {\r\n if (this._applyByPostProcess === value) {\r\n return;\r\n }\r\n\r\n this._applyByPostProcess = value;\r\n this._updateParameters();\r\n }\r\n\r\n @serialize()\r\n private _isEnabled = true;\r\n /**\r\n * Gets whether the image processing is enabled or not.\r\n */\r\n public get isEnabled(): boolean {\r\n return this._isEnabled;\r\n }\r\n /**\r\n * Sets whether the image processing is enabled or not.\r\n */\r\n public set isEnabled(value: boolean) {\r\n if (this._isEnabled === value) {\r\n return;\r\n }\r\n\r\n this._isEnabled = value;\r\n this._updateParameters();\r\n }\r\n\r\n /**\r\n * Width of the output texture used in the post process. If not provided, uses the width of the screen.\r\n */\r\n @serialize()\r\n public outputTextureWidth = 0;\r\n\r\n /**\r\n * Height of the output texture used in the post process. If not provided, uses the height of the screen.\r\n */\r\n @serialize()\r\n public outputTextureHeight = 0;\r\n\r\n /**\r\n * An event triggered when the configuration changes and requires Shader to Update some parameters.\r\n */\r\n public onUpdateParameters = new Observable<ImageProcessingConfiguration>();\r\n\r\n /**\r\n * Method called each time the image processing information changes requires to recompile the effect.\r\n */\r\n protected _updateParameters(): void {\r\n this.onUpdateParameters.notifyObservers(this);\r\n }\r\n\r\n /**\r\n * Gets the current class name.\r\n * @returns \"ImageProcessingConfiguration\"\r\n */\r\n public getClassName(): string {\r\n return \"ImageProcessingConfiguration\";\r\n }\r\n\r\n /**\r\n * Prepare the list of uniforms associated with the Image Processing effects.\r\n * @param uniforms The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareUniforms: (uniforms: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareUniformsForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of samplers associated with the Image Processing effects.\r\n * @param samplersList The list of uniforms used in the effect\r\n * @param defines the list of defines currently in use\r\n */\r\n public static PrepareSamplers: (samplersList: string[], defines: IImageProcessingConfigurationDefines) => void = PrepareSamplersForImageProcessing;\r\n\r\n /**\r\n * Prepare the list of defines associated to the shader.\r\n * @param defines the list of defines to complete\r\n * @param forPostProcess Define if we are currently in post process mode or not\r\n */\r\n public prepareDefines(defines: IImageProcessingConfigurationDefines, forPostProcess = false): void {\r\n if (forPostProcess !== this.applyByPostProcess || !this._isEnabled) {\r\n defines.VIGNETTE = false;\r\n defines.TONEMAPPING = 0;\r\n defines.CONTRAST = false;\r\n defines.EXPOSURE = false;\r\n defines.COLORCURVES = false;\r\n defines.COLORGRADING = false;\r\n defines.COLORGRADING3D = false;\r\n defines.DITHER = false;\r\n defines.IMAGEPROCESSING = false;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess && this._isEnabled;\r\n return;\r\n }\r\n\r\n defines.VIGNETTE = this.vignetteEnabled;\r\n defines.VIGNETTEBLENDMODEMULTIPLY = this.vignetteBlendMode === ImageProcessingConfiguration._VIGNETTEMODE_MULTIPLY;\r\n defines.VIGNETTEBLENDMODEOPAQUE = !defines.VIGNETTEBLENDMODEMULTIPLY;\r\n\r\n if (!this._toneMappingEnabled) {\r\n defines.TONEMAPPING = 0;\r\n } else {\r\n switch (this._toneMappingType) {\r\n case ImageProcessingConfiguration.TONEMAPPING_KHR_PBR_NEUTRAL:\r\n defines.TONEMAPPING = 3;\r\n break;\r\n case ImageProcessingConfiguration.TONEMAPPING_ACES:\r\n defines.TONEMAPPING = 2;\r\n break;\r\n default:\r\n defines.TONEMAPPING = 1;\r\n break;\r\n }\r\n }\r\n\r\n defines.CONTRAST = this.contrast !== 1.0;\r\n defines.EXPOSURE = this.exposure !== 1.0;\r\n defines.COLORCURVES = this.colorCurvesEnabled && !!this.colorCurves;\r\n defines.COLORGRADING = this.colorGradingEnabled && !!this.colorGradingTexture;\r\n if (defines.COLORGRADING) {\r\n defines.COLORGRADING3D = this.colorGradingTexture!.is3D;\r\n } else {\r\n defines.COLORGRADING3D = false;\r\n }\r\n defines.SAMPLER3DGREENDEPTH = this.colorGradingWithGreenDepth;\r\n defines.SAMPLER3DBGRMAP = this.colorGradingBGR;\r\n defines.DITHER = this._ditheringEnabled;\r\n defines.IMAGEPROCESSINGPOSTPROCESS = this.applyByPostProcess;\r\n defines.SKIPFINALCOLORCLAMP = this.skipFinalColorClamp;\r\n defines.IMAGEPROCESSING =\r\n defines.VIGNETTE || !!defines.TONEMAPPING || defines.CONTRAST || defines.EXPOSURE || defines.COLORCURVES || defines.COLORGRADING || defines.DITHER;\r\n }\r\n\r\n /**\r\n * Returns true if all the image processing information are ready.\r\n * @returns True if ready, otherwise, false\r\n */\r\n public isReady() {\r\n // Color Grading texture can not be none blocking.\r\n return !this.colorGradingEnabled || !this.colorGradingTexture || this.colorGradingTexture.isReady();\r\n }\r\n\r\n /**\r\n * Binds the image processing to the shader.\r\n * @param effect The effect to bind to\r\n * @param overrideAspectRatio Override the aspect ratio of the effect\r\n */\r\n public bind(effect: Effect, overrideAspectRatio?: number): void {\r\n // Color Curves\r\n if (this._colorCurvesEnabled && this.colorCurves) {\r\n ColorCurvesBind(this.colorCurves, effect);\r\n }\r\n\r\n // Vignette and dither handled together due to common uniform.\r\n if (this._vignetteEnabled || this._ditheringEnabled) {\r\n const inverseWidth = 1 / (this.outputTextureWidth || effect.getEngine().getRenderWidth());\r\n const inverseHeight = 1 / (this.outputTextureHeight || effect.getEngine().getRenderHeight());\r\n effect.setFloat2(\"vInverseScreenSize\", inverseWidth, inverseHeight);\r\n\r\n if (this._ditheringEnabled) {\r\n effect.setFloat(\"ditherIntensity\", 0.5 * this._ditheringIntensity);\r\n }\r\n\r\n if (this._vignetteEnabled) {\r\n const aspectRatio = overrideAspectRatio != null ? overrideAspectRatio : inverseHeight / inverseWidth;\r\n\r\n let vignetteScaleY = Math.tan(this.vignetteCameraFov * 0.5);\r\n let vignetteScaleX = vignetteScaleY * aspectRatio;\r\n\r\n const vignetteScaleGeometricMean = Math.sqrt(vignetteScaleX * vignetteScaleY);\r\n vignetteScaleX = Mix(vignetteScaleX, vignetteScaleGeometricMean, this.vignetteStretch);\r\n vignetteScaleY = Mix(vignetteScaleY, vignetteScaleGeometricMean, this.vignetteStretch);\r\n\r\n effect.setFloat4(\"vignetteSettings1\", vignetteScaleX, vignetteScaleY, -vignetteScaleX * this.vignetteCenterX, -vignetteScaleY * this.vignetteCenterY);\r\n\r\n const vignettePower = -2.0 * this.vignetteWeight;\r\n effect.setFloat4(\"vignetteSettings2\", this.vignetteColor.r, this.vignetteColor.g, this.vignetteColor.b, vignettePower);\r\n }\r\n }\r\n\r\n // Exposure\r\n effect.setFloat(\"exposureLinear\", this.exposure);\r\n\r\n // Contrast\r\n effect.setFloat(\"contrast\", this.contrast);\r\n\r\n // Color transform settings\r\n if (this.colorGradingTexture) {\r\n effect.setTexture(\"txColorTransform\", this.colorGradingTexture);\r\n const textureSize = this.colorGradingTexture.getSize().height;\r\n\r\n effect.setFloat4(\r\n \"colorTransformSettings\",\r\n (textureSize - 1) / textureSize, // textureScale\r\n 0.5 / textureSize, // textureOffset\r\n textureSize, // textureSize\r\n this.colorGradingTexture.level // weight\r\n );\r\n }\r\n }\r\n\r\n /**\r\n * Clones the current image processing instance.\r\n * @returns The cloned image processing\r\n */\r\n public clone(): ImageProcessingConfiguration {\r\n return SerializationHelper.Clone(() => new ImageProcessingConfiguration(), this);\r\n }\r\n\r\n /**\r\n * Serializes the current image processing instance to a json representation.\r\n * @returns a JSON representation\r\n */\r\n public serialize(): any {\r\n return SerializationHelper.Serialize(this);\r\n }\r\n\r\n // Static constants associated to the image processing.\r\n private static _VIGNETTEMODE_MULTIPLY = 0;\r\n private static _VIGNETTEMODE_OPAQUE = 1;\r\n\r\n /**\r\n * Used to apply the vignette as a mix with the pixel color.\r\n */\r\n public static get VIGNETTEMODE_MULTIPLY(): number {\r\n return this._VIGNETTEMODE_MULTIPLY;\r\n }\r\n\r\n /**\r\n * Used to apply the vignette as a replacement of the pixel color.\r\n */\r\n public static get VIGNETTEMODE_OPAQUE(): number {\r\n return this._VIGNETTEMODE_OPAQUE;\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n\r\n/**\r\n * Parses the image processing from a json representation.\r\n * @param source the JSON source to parse\r\n * @returns The parsed image processing\r\n */\r\nexport function ImageProcessingConfigurationParse(source: any): ImageProcessingConfiguration {\r\n const parsed = SerializationHelper.Parse(() => new ImageProcessingConfiguration(), source, null, null);\r\n // Backward compatibility\r\n if (source.vignetteCentreX !== undefined) {\r\n parsed.vignetteCenterX = source.vignetteCentreX;\r\n }\r\n if (source.vignetteCentreY !== undefined) {\r\n parsed.vignetteCenterY = source.vignetteCentreY;\r\n }\r\n\r\n return parsed;\r\n}\r\n\r\n/**\r\n * Register side effects for imageProcessingConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterImageProcessingConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n // References the dependencies.\r\n ImageProcessingConfiguration.Parse = ImageProcessingConfigurationParse;\r\n\r\n SerializationHelper._ImageProcessingConfigurationParser = ImageProcessingConfigurationParse;\r\n\r\n // Register Class Name\r\n RegisterClass(\"BABYLON.ImageProcessingConfiguration\", ImageProcessingConfiguration);\r\n}\r\n"]}
|
|
@@ -26,13 +26,13 @@ export declare class DecalMapConfiguration extends MaterialPluginBase {
|
|
|
26
26
|
/**
|
|
27
27
|
* Enables or disables the decal map on this material
|
|
28
28
|
*/
|
|
29
|
-
isEnabled: boolean;
|
|
29
|
+
accessor isEnabled: boolean;
|
|
30
30
|
private _smoothAlpha;
|
|
31
31
|
/**
|
|
32
32
|
* Enables or disables the smooth alpha mode on this material. Default: false.
|
|
33
33
|
* When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.
|
|
34
34
|
*/
|
|
35
|
-
smoothAlpha: boolean;
|
|
35
|
+
accessor smoothAlpha: boolean;
|
|
36
36
|
private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
37
37
|
/** @internal */
|
|
38
38
|
_markAllSubMeshesAsTexturesDirty(): void;
|
|
@@ -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, expandToProperty } from "../Misc/decorators.js";
|
|
4
4
|
import { MaterialDefines } from "./materialDefines.js";
|
|
5
5
|
import { MaterialPluginBase } from "./materialPluginBase.pure.js";
|
|
@@ -23,137 +23,156 @@ export class DecalMapDefines extends MaterialDefines {
|
|
|
23
23
|
* Plugin that implements the decal map component of a material
|
|
24
24
|
* @since 5.49.1
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
this._smoothAlpha = false;
|
|
52
|
-
/**
|
|
53
|
-
* Enables or disables the smooth alpha mode on this material. Default: false.
|
|
54
|
-
* When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.
|
|
55
|
-
*/
|
|
56
|
-
this.smoothAlpha = false;
|
|
57
|
-
this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method
|
|
58
|
-
this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Checks if the sub mesh is ready to be used
|
|
62
|
-
* @param defines the list of defines
|
|
63
|
-
* @param scene the current scene
|
|
64
|
-
* @param engine the current engine
|
|
65
|
-
* @param subMesh the sub mesh to check
|
|
66
|
-
* @returns true if the sub mesh is ready
|
|
67
|
-
*/
|
|
68
|
-
isReadyForSubMesh(defines, scene, engine, subMesh) {
|
|
69
|
-
const decalMap = subMesh.getMesh().decalMap;
|
|
70
|
-
if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
return decalMap.isReady();
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Prepares the defines before attributes are set
|
|
77
|
-
* @param defines the list of defines
|
|
78
|
-
* @param scene the current scene
|
|
79
|
-
* @param mesh the current mesh
|
|
80
|
-
*/
|
|
81
|
-
prepareDefinesBeforeAttributes(defines, scene, mesh) {
|
|
82
|
-
const decalMap = mesh.decalMap;
|
|
83
|
-
if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
|
|
84
|
-
const isDirty = defines.DECAL;
|
|
85
|
-
if (isDirty) {
|
|
86
|
-
defines.markAsTexturesDirty();
|
|
26
|
+
let DecalMapConfiguration = (() => {
|
|
27
|
+
var _a, _DecalMapConfiguration_isEnabled_accessor_storage, _DecalMapConfiguration_smoothAlpha_accessor_storage;
|
|
28
|
+
let _classSuper = MaterialPluginBase;
|
|
29
|
+
let _isEnabled_decorators;
|
|
30
|
+
let _isEnabled_initializers = [];
|
|
31
|
+
let _isEnabled_extraInitializers = [];
|
|
32
|
+
let _smoothAlpha_decorators;
|
|
33
|
+
let _smoothAlpha_initializers = [];
|
|
34
|
+
let _smoothAlpha_extraInitializers = [];
|
|
35
|
+
return _a = class DecalMapConfiguration extends _classSuper {
|
|
36
|
+
/**
|
|
37
|
+
* Enables or disables the decal map on this material
|
|
38
|
+
*/
|
|
39
|
+
get isEnabled() { return __classPrivateFieldGet(this, _DecalMapConfiguration_isEnabled_accessor_storage, "f"); }
|
|
40
|
+
set isEnabled(value) { __classPrivateFieldSet(this, _DecalMapConfiguration_isEnabled_accessor_storage, value, "f"); }
|
|
41
|
+
/**
|
|
42
|
+
* Enables or disables the smooth alpha mode on this material. Default: false.
|
|
43
|
+
* When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.
|
|
44
|
+
*/
|
|
45
|
+
get smoothAlpha() { return __classPrivateFieldGet(this, _DecalMapConfiguration_smoothAlpha_accessor_storage, "f"); }
|
|
46
|
+
set smoothAlpha(value) { __classPrivateFieldSet(this, _DecalMapConfiguration_smoothAlpha_accessor_storage, value, "f"); }
|
|
47
|
+
/** @internal */
|
|
48
|
+
_markAllSubMeshesAsTexturesDirty() {
|
|
49
|
+
this._enable(this._isEnabled);
|
|
50
|
+
this._internalMarkAllSubMeshesAsTexturesDirty();
|
|
87
51
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Gets a boolean indicating that the plugin is compatible with a given shader language.
|
|
54
|
+
* @returns true if the plugin is compatible with the shader language
|
|
55
|
+
*/
|
|
56
|
+
isCompatible() {
|
|
57
|
+
return true;
|
|
94
58
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
59
|
+
/**
|
|
60
|
+
* Creates a new DecalMapConfiguration
|
|
61
|
+
* @param material The material to attach the decal map plugin to
|
|
62
|
+
* @param addToPluginList If the plugin should be added to the material plugin list
|
|
63
|
+
*/
|
|
64
|
+
constructor(material, addToPluginList = true) {
|
|
65
|
+
super(material, "DecalMap", 150, new DecalMapDefines(), addToPluginList);
|
|
66
|
+
this._isEnabled = false;
|
|
67
|
+
_DecalMapConfiguration_isEnabled_accessor_storage.set(this, __runInitializers(this, _isEnabled_initializers, false));
|
|
68
|
+
this._smoothAlpha = (__runInitializers(this, _isEnabled_extraInitializers), false);
|
|
69
|
+
_DecalMapConfiguration_smoothAlpha_accessor_storage.set(this, __runInitializers(this, _smoothAlpha_initializers, false));
|
|
70
|
+
this._internalMarkAllSubMeshesAsTexturesDirty = __runInitializers(this, _smoothAlpha_extraInitializers);
|
|
71
|
+
this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method
|
|
72
|
+
this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[1];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Checks if the sub mesh is ready to be used
|
|
76
|
+
* @param defines the list of defines
|
|
77
|
+
* @param scene the current scene
|
|
78
|
+
* @param engine the current engine
|
|
79
|
+
* @param subMesh the sub mesh to check
|
|
80
|
+
* @returns true if the sub mesh is ready
|
|
81
|
+
*/
|
|
82
|
+
isReadyForSubMesh(defines, scene, engine, subMesh) {
|
|
83
|
+
const decalMap = subMesh.getMesh().decalMap;
|
|
84
|
+
if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
return decalMap.isReady();
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Prepares the defines before attributes are set
|
|
91
|
+
* @param defines the list of defines
|
|
92
|
+
* @param scene the current scene
|
|
93
|
+
* @param mesh the current mesh
|
|
94
|
+
*/
|
|
95
|
+
prepareDefinesBeforeAttributes(defines, scene, mesh) {
|
|
96
|
+
const decalMap = mesh.decalMap;
|
|
97
|
+
if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
|
|
98
|
+
const isDirty = defines.DECAL;
|
|
99
|
+
if (isDirty) {
|
|
100
|
+
defines.markAsTexturesDirty();
|
|
101
|
+
}
|
|
102
|
+
defines.DECAL = false;
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
const isDirty = !defines.DECAL || defines.GAMMADECAL !== decalMap.texture.gammaSpace;
|
|
106
|
+
if (isDirty) {
|
|
107
|
+
defines.markAsTexturesDirty();
|
|
108
|
+
}
|
|
109
|
+
defines.DECAL = true;
|
|
110
|
+
defines.GAMMADECAL = decalMap.texture.gammaSpace;
|
|
111
|
+
defines.DECAL_SMOOTHALPHA = this._smoothAlpha;
|
|
112
|
+
PrepareDefinesForMergedUV(decalMap.texture, defines, "DECAL");
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Binds the material data for a sub mesh
|
|
117
|
+
* @param uniformBuffer the uniform buffer to update
|
|
118
|
+
* @param scene the current scene
|
|
119
|
+
* @param _engine the current engine
|
|
120
|
+
* @param subMesh the sub mesh to bind
|
|
121
|
+
*/
|
|
122
|
+
hardBindForSubMesh(uniformBuffer, scene, _engine, subMesh) {
|
|
123
|
+
/**
|
|
124
|
+
* Note that we override hardBindForSubMesh and not bindForSubMesh because the material can be shared by multiple meshes,
|
|
125
|
+
* in which case mustRebind could return false even though the decal map is different for each mesh: that's because the decal map
|
|
126
|
+
* is not part of the material but hosted by the decalMap of the mesh instead.
|
|
127
|
+
*/
|
|
128
|
+
const decalMap = subMesh.getMesh().decalMap;
|
|
129
|
+
if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const isFrozen = this._material.isFrozen;
|
|
133
|
+
const texture = decalMap.texture;
|
|
134
|
+
if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {
|
|
135
|
+
uniformBuffer.updateFloat4("vDecalInfos", texture.coordinatesIndex, 0, 0, 0);
|
|
136
|
+
BindTextureMatrix(texture, uniformBuffer, "decal");
|
|
137
|
+
}
|
|
138
|
+
uniformBuffer.setTexture("decalSampler", texture);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Gets the class name of this plugin
|
|
142
|
+
* @returns the class name
|
|
143
|
+
*/
|
|
144
|
+
getClassName() {
|
|
145
|
+
return "DecalMapConfiguration";
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Gets the samplers used by the plugin
|
|
149
|
+
* @param samplers the list of samplers to update
|
|
150
|
+
*/
|
|
151
|
+
getSamplers(samplers) {
|
|
152
|
+
samplers.push("decalSampler");
|
|
153
|
+
}
|
|
154
|
+
getUniforms() {
|
|
155
|
+
return {
|
|
156
|
+
ubo: [
|
|
157
|
+
{ name: "vDecalInfos", size: 4, type: "vec4" },
|
|
158
|
+
{ name: "decalMatrix", size: 16, type: "mat4" },
|
|
159
|
+
],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
_DecalMapConfiguration_isEnabled_accessor_storage = new WeakMap(),
|
|
164
|
+
_DecalMapConfiguration_smoothAlpha_accessor_storage = new WeakMap(),
|
|
165
|
+
(() => {
|
|
166
|
+
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
167
|
+
_isEnabled_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
168
|
+
_smoothAlpha_decorators = [serialize(), expandToProperty("_markAllSubMeshesAsTexturesDirty")];
|
|
169
|
+
__esDecorate(_a, null, _isEnabled_decorators, { kind: "accessor", name: "isEnabled", static: false, private: false, access: { has: obj => "isEnabled" in obj, get: obj => obj.isEnabled, set: (obj, value) => { obj.isEnabled = value; } }, metadata: _metadata }, _isEnabled_initializers, _isEnabled_extraInitializers);
|
|
170
|
+
__esDecorate(_a, null, _smoothAlpha_decorators, { kind: "accessor", name: "smoothAlpha", static: false, private: false, access: { has: obj => "smoothAlpha" in obj, get: obj => obj.smoothAlpha, set: (obj, value) => { obj.smoothAlpha = value; } }, metadata: _metadata }, _smoothAlpha_initializers, _smoothAlpha_extraInitializers);
|
|
171
|
+
if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
172
|
+
})(),
|
|
173
|
+
_a;
|
|
174
|
+
})();
|
|
175
|
+
export { DecalMapConfiguration };
|
|
157
176
|
let _Registered = false;
|
|
158
177
|
/**
|
|
159
178
|
* Register side effects for materialDecalMapConfiguration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material.decalMapConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/material.decalMapConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAApD;;QACI,UAAK,GAAG,KAAK,CAAC;QACd,kBAAa,GAAG,CAAC,CAAC;QAClB,sBAAiB,GAAG,KAAK,CAAC;QAC1B,eAAU,GAAG,KAAK,CAAC;IACvB,CAAC;CAAA;AAED;;;GAGG;AACH,MAAM,OAA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a,CAAC,MAAM,IAAI,CAAC,QAAQ,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;YAC9D,aAAa,CAAC,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7E,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QACvD,CAAC;QAED,aAAa,CAAC,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;;OAGG;IACa,YAAY;QACxB,OAAO,uBAAuB,CAAC;IACnC,CAAC;IAED;;;OAGG;IACa,WAAW,CAAC,QAAkB;QAC1C,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAClC,CAAC;IAEe,WAAW;QACvB,OAAO;YACH,GAAG,EAAE;gBACD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;gBAC9C,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;aAClD;SACJ,CAAC;IACN,CAAC;CACJ;AA3IU;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;wDAC5B;AAUlB;IAFN,SAAS,EAAE;IACX,gBAAgB,CAAC,kCAAkC,CAAC;0DAC1B;AAmI/B,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,qCAAqC;IACjD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, expandToProperty } from \"../Misc/decorators\";\r\nimport { MaterialDefines } from \"./materialDefines\";\r\nimport { MaterialPluginBase } from \"./materialPluginBase.pure\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { MaterialFlags } from \"./materialFlags\";\r\nimport { type Scene } from \"core/scene.pure\";\r\nimport { type Engine } from \"core/Engines/engine.pure\";\r\nimport { type SubMesh } from \"core/Meshes/subMesh.pure\";\r\nimport { type AbstractMesh } from \"core/Meshes/abstractMesh.pure\";\r\nimport { type UniformBuffer } from \"./uniformBuffer\";\r\nimport { type PBRBaseMaterial } from \"./PBR/pbrBaseMaterial.pure\";\r\nimport { type StandardMaterial } from \"./standardMaterial.pure\";\r\nimport { BindTextureMatrix, PrepareDefinesForMergedUV } from \"./materialHelper.functions\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class DecalMapDefines extends MaterialDefines {\r\n DECAL = false;\r\n DECALDIRECTUV = 0;\r\n DECAL_SMOOTHALPHA = false;\r\n GAMMADECAL = false;\r\n}\r\n\r\n/**\r\n * Plugin that implements the decal map component of a material\r\n * @since 5.49.1\r\n */\r\nexport class DecalMapConfiguration extends MaterialPluginBase {\r\n private _isEnabled = false;\r\n /**\r\n * Enables or disables the decal map on this material\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public isEnabled = false;\r\n\r\n private _smoothAlpha = false;\r\n\r\n /**\r\n * Enables or disables the smooth alpha mode on this material. Default: false.\r\n * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public smoothAlpha = false;\r\n\r\n private _internalMarkAllSubMeshesAsTexturesDirty: () => void;\r\n\r\n /** @internal */\r\n public _markAllSubMeshesAsTexturesDirty(): void {\r\n this._enable(this._isEnabled);\r\n this._internalMarkAllSubMeshesAsTexturesDirty();\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the plugin is compatible with a given shader language.\r\n * @returns true if the plugin is compatible with the shader language\r\n */\r\n public override isCompatible(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Creates a new DecalMapConfiguration\r\n * @param material The material to attach the decal map plugin to\r\n * @param addToPluginList If the plugin should be added to the material plugin list\r\n */\r\n constructor(material: PBRBaseMaterial | StandardMaterial, addToPluginList = true) {\r\n super(material, \"DecalMap\", 150, new DecalMapDefines(), addToPluginList);\r\n\r\n this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method\r\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[Constants.MATERIAL_TextureDirtyFlag];\r\n }\r\n\r\n /**\r\n * Checks if the sub mesh is ready to be used\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param engine the current engine\r\n * @param subMesh the sub mesh to check\r\n * @returns true if the sub mesh is ready\r\n */\r\n public override isReadyForSubMesh(defines: DecalMapDefines, scene: Scene, engine: Engine, subMesh: SubMesh): boolean {\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return true;\r\n }\r\n\r\n return decalMap.isReady();\r\n }\r\n\r\n /**\r\n * Prepares the defines before attributes are set\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param mesh the current mesh\r\n */\r\n public override prepareDefinesBeforeAttributes(defines: DecalMapDefines, scene: Scene, mesh: AbstractMesh): void {\r\n const decalMap = mesh.decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n const isDirty = defines.DECAL;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = false;\r\n } else {\r\n const isDirty = !defines.DECAL || defines.GAMMADECAL !== decalMap.texture.gammaSpace;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = true;\r\n defines.GAMMADECAL = decalMap.texture.gammaSpace;\r\n defines.DECAL_SMOOTHALPHA = this._smoothAlpha;\r\n PrepareDefinesForMergedUV(decalMap.texture, defines, \"DECAL\");\r\n }\r\n }\r\n\r\n /**\r\n * Binds the material data for a sub mesh\r\n * @param uniformBuffer the uniform buffer to update\r\n * @param scene the current scene\r\n * @param _engine the current engine\r\n * @param subMesh the sub mesh to bind\r\n */\r\n public override hardBindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, _engine: Engine, subMesh: SubMesh): void {\r\n /**\r\n * Note that we override hardBindForSubMesh and not bindForSubMesh because the material can be shared by multiple meshes,\r\n * in which case mustRebind could return false even though the decal map is different for each mesh: that's because the decal map\r\n * is not part of the material but hosted by the decalMap of the mesh instead.\r\n */\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return;\r\n }\r\n\r\n const isFrozen = this._material.isFrozen;\r\n const texture = decalMap.texture;\r\n\r\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\r\n uniformBuffer.updateFloat4(\"vDecalInfos\", texture.coordinatesIndex, 0, 0, 0);\r\n BindTextureMatrix(texture, uniformBuffer, \"decal\");\r\n }\r\n\r\n uniformBuffer.setTexture(\"decalSampler\", texture);\r\n }\r\n\r\n /**\r\n * Gets the class name of this plugin\r\n * @returns the class name\r\n */\r\n public override getClassName(): string {\r\n return \"DecalMapConfiguration\";\r\n }\r\n\r\n /**\r\n * Gets the samplers used by the plugin\r\n * @param samplers the list of samplers to update\r\n */\r\n public override getSamplers(samplers: string[]): void {\r\n samplers.push(\"decalSampler\");\r\n }\r\n\r\n public override getUniforms(): { ubo?: Array<{ name: string; size: number; type: string }>; vertex?: string; fragment?: string } {\r\n return {\r\n ubo: [\r\n { name: \"vDecalInfos\", size: 4, type: \"vec4\" },\r\n { name: \"decalMatrix\", size: 16, type: \"mat4\" },\r\n ],\r\n };\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for materialDecalMapConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterMaterialDecalMapConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n RegisterClass(\"BABYLON.DecalMapConfiguration\", DecalMapConfiguration);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"material.decalMapConfiguration.pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/material.decalMapConfiguration.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;;AAE7D,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,OAAO,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAC1F,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAApD;;QACI,UAAK,GAAG,KAAK,CAAC;QACd,kBAAa,GAAG,CAAC,CAAC;QAClB,sBAAiB,GAAG,KAAK,CAAC;QAC1B,eAAU,GAAG,KAAK,CAAC;IACvB,CAAC;CAAA;AAED;;;GAGG;IACU,qBAAqB;;sBAAS,kBAAkB;;;;;;;sBAAhD,qBAAsB,SAAQ,WAAkB;YAEzD;;eAEG;YAGH,IAAgB,SAAS,mGAAS;YAAlC,IAAgB,SAAS,wGAAS;YAIlC;;;eAGG;YAGH,IAAgB,WAAW,qGAAS;YAApC,IAAgB,WAAW,0GAAS;YAIpC,gBAAgB;YACT,gCAAgC;gBACnC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC9B,IAAI,C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,CAAC,aAAa,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;oBAC7E,iBAAiB,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;gBACvD,CAAC;gBAED,aAAa,CAAC,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YACtD,CAAC;YAED;;;eAGG;YACa,YAAY;gBACxB,OAAO,uBAAuB,CAAC;YACnC,CAAC;YAED;;;eAGG;YACa,WAAW,CAAC,QAAkB;gBAC1C,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAClC,CAAC;YAEe,WAAW;gBACvB,OAAO;oBACH,GAAG,EAAE;wBACD,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE;wBAC9C,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;qBAClD;iBACJ,CAAC;YACN,CAAC;;;;;;qCA5IA,SAAS,EAAE,EACX,gBAAgB,CAAC,kCAAkC,CAAC;uCASpD,SAAS,EAAE,EACX,gBAAgB,CAAC,kCAAkC,CAAC;YATrD,8KAAgB,SAAS,6BAAT,SAAS,6FAAS;YAUlC,oLAAgB,WAAW,6BAAX,WAAW,iGAAS;;;;;SAjB3B,qBAAqB;AAoJlC,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,qCAAqC;IACjD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,CAAC,+BAA+B,EAAE,qBAAqB,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\r\n\r\nimport { serialize, expandToProperty } from \"../Misc/decorators\";\r\nimport { MaterialDefines } from \"./materialDefines\";\r\nimport { MaterialPluginBase } from \"./materialPluginBase.pure\";\r\nimport { Constants } from \"../Engines/constants\";\r\nimport { MaterialFlags } from \"./materialFlags\";\r\nimport { type Scene } from \"core/scene.pure\";\r\nimport { type Engine } from \"core/Engines/engine.pure\";\r\nimport { type SubMesh } from \"core/Meshes/subMesh.pure\";\r\nimport { type AbstractMesh } from \"core/Meshes/abstractMesh.pure\";\r\nimport { type UniformBuffer } from \"./uniformBuffer\";\r\nimport { type PBRBaseMaterial } from \"./PBR/pbrBaseMaterial.pure\";\r\nimport { type StandardMaterial } from \"./standardMaterial.pure\";\r\nimport { BindTextureMatrix, PrepareDefinesForMergedUV } from \"./materialHelper.functions\";\r\nimport { RegisterClass } from \"core/Misc/typeStore\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class DecalMapDefines extends MaterialDefines {\r\n DECAL = false;\r\n DECALDIRECTUV = 0;\r\n DECAL_SMOOTHALPHA = false;\r\n GAMMADECAL = false;\r\n}\r\n\r\n/**\r\n * Plugin that implements the decal map component of a material\r\n * @since 5.49.1\r\n */\r\nexport class DecalMapConfiguration extends MaterialPluginBase {\r\n private _isEnabled = false;\r\n /**\r\n * Enables or disables the decal map on this material\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor isEnabled = false;\r\n\r\n private _smoothAlpha = false;\r\n\r\n /**\r\n * Enables or disables the smooth alpha mode on this material. Default: false.\r\n * When enabled, the alpha value used to blend the decal map will be the squared value and will produce a smoother result.\r\n */\r\n @serialize()\r\n @expandToProperty(\"_markAllSubMeshesAsTexturesDirty\")\r\n public accessor smoothAlpha = false;\r\n\r\n private _internalMarkAllSubMeshesAsTexturesDirty: () => void;\r\n\r\n /** @internal */\r\n public _markAllSubMeshesAsTexturesDirty(): void {\r\n this._enable(this._isEnabled);\r\n this._internalMarkAllSubMeshesAsTexturesDirty();\r\n }\r\n\r\n /**\r\n * Gets a boolean indicating that the plugin is compatible with a given shader language.\r\n * @returns true if the plugin is compatible with the shader language\r\n */\r\n public override isCompatible(): boolean {\r\n return true;\r\n }\r\n\r\n /**\r\n * Creates a new DecalMapConfiguration\r\n * @param material The material to attach the decal map plugin to\r\n * @param addToPluginList If the plugin should be added to the material plugin list\r\n */\r\n constructor(material: PBRBaseMaterial | StandardMaterial, addToPluginList = true) {\r\n super(material, \"DecalMap\", 150, new DecalMapDefines(), addToPluginList);\r\n\r\n this.registerForExtraEvents = true; // because we override the hardBindForSubMesh method\r\n this._internalMarkAllSubMeshesAsTexturesDirty = material._dirtyCallbacks[Constants.MATERIAL_TextureDirtyFlag];\r\n }\r\n\r\n /**\r\n * Checks if the sub mesh is ready to be used\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param engine the current engine\r\n * @param subMesh the sub mesh to check\r\n * @returns true if the sub mesh is ready\r\n */\r\n public override isReadyForSubMesh(defines: DecalMapDefines, scene: Scene, engine: Engine, subMesh: SubMesh): boolean {\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return true;\r\n }\r\n\r\n return decalMap.isReady();\r\n }\r\n\r\n /**\r\n * Prepares the defines before attributes are set\r\n * @param defines the list of defines\r\n * @param scene the current scene\r\n * @param mesh the current mesh\r\n */\r\n public override prepareDefinesBeforeAttributes(defines: DecalMapDefines, scene: Scene, mesh: AbstractMesh): void {\r\n const decalMap = mesh.decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n const isDirty = defines.DECAL;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = false;\r\n } else {\r\n const isDirty = !defines.DECAL || defines.GAMMADECAL !== decalMap.texture.gammaSpace;\r\n if (isDirty) {\r\n defines.markAsTexturesDirty();\r\n }\r\n defines.DECAL = true;\r\n defines.GAMMADECAL = decalMap.texture.gammaSpace;\r\n defines.DECAL_SMOOTHALPHA = this._smoothAlpha;\r\n PrepareDefinesForMergedUV(decalMap.texture, defines, \"DECAL\");\r\n }\r\n }\r\n\r\n /**\r\n * Binds the material data for a sub mesh\r\n * @param uniformBuffer the uniform buffer to update\r\n * @param scene the current scene\r\n * @param _engine the current engine\r\n * @param subMesh the sub mesh to bind\r\n */\r\n public override hardBindForSubMesh(uniformBuffer: UniformBuffer, scene: Scene, _engine: Engine, subMesh: SubMesh): void {\r\n /**\r\n * Note that we override hardBindForSubMesh and not bindForSubMesh because the material can be shared by multiple meshes,\r\n * in which case mustRebind could return false even though the decal map is different for each mesh: that's because the decal map\r\n * is not part of the material but hosted by the decalMap of the mesh instead.\r\n */\r\n const decalMap = subMesh.getMesh().decalMap;\r\n\r\n if (!this._isEnabled || !decalMap?.texture || !MaterialFlags.DecalMapEnabled || !scene.texturesEnabled) {\r\n return;\r\n }\r\n\r\n const isFrozen = this._material.isFrozen;\r\n const texture = decalMap.texture;\r\n\r\n if (!uniformBuffer.useUbo || !isFrozen || !uniformBuffer.isSync) {\r\n uniformBuffer.updateFloat4(\"vDecalInfos\", texture.coordinatesIndex, 0, 0, 0);\r\n BindTextureMatrix(texture, uniformBuffer, \"decal\");\r\n }\r\n\r\n uniformBuffer.setTexture(\"decalSampler\", texture);\r\n }\r\n\r\n /**\r\n * Gets the class name of this plugin\r\n * @returns the class name\r\n */\r\n public override getClassName(): string {\r\n return \"DecalMapConfiguration\";\r\n }\r\n\r\n /**\r\n * Gets the samplers used by the plugin\r\n * @param samplers the list of samplers to update\r\n */\r\n public override getSamplers(samplers: string[]): void {\r\n samplers.push(\"decalSampler\");\r\n }\r\n\r\n public override getUniforms(): { ubo?: Array<{ name: string; size: number; type: string }>; vertex?: string; fragment?: string } {\r\n return {\r\n ubo: [\r\n { name: \"vDecalInfos\", size: 4, type: \"vec4\" },\r\n { name: \"decalMatrix\", size: 16, type: \"mat4\" },\r\n ],\r\n };\r\n }\r\n}\r\n\r\nlet _Registered = false;\r\n/**\r\n * Register side effects for materialDecalMapConfiguration.\r\n * Safe to call multiple times; only the first call has an effect.\r\n */\r\nexport function RegisterMaterialDecalMapConfiguration(): void {\r\n if (_Registered) {\r\n return;\r\n }\r\n _Registered = true;\r\n\r\n RegisterClass(\"BABYLON.DecalMapConfiguration\", DecalMapConfiguration);\r\n}\r\n"]}
|
|
@@ -29,7 +29,7 @@ export declare class DetailMapConfiguration extends MaterialPluginBase {
|
|
|
29
29
|
/**
|
|
30
30
|
* The detail texture of the material.
|
|
31
31
|
*/
|
|
32
|
-
texture: Nullable<BaseTexture>;
|
|
32
|
+
accessor texture: Nullable<BaseTexture>;
|
|
33
33
|
/**
|
|
34
34
|
* Defines how strongly the detail diffuse/albedo channel is blended with the regular diffuse/albedo texture
|
|
35
35
|
* Bigger values mean stronger blending
|
|
@@ -49,12 +49,12 @@ export declare class DetailMapConfiguration extends MaterialPluginBase {
|
|
|
49
49
|
/**
|
|
50
50
|
* The method used to blend the bump and detail normals together
|
|
51
51
|
*/
|
|
52
|
-
normalBlendMethod: number;
|
|
52
|
+
accessor normalBlendMethod: number;
|
|
53
53
|
private _isEnabled;
|
|
54
54
|
/**
|
|
55
55
|
* Enable or disable the detail map on this material
|
|
56
56
|
*/
|
|
57
|
-
isEnabled: boolean;
|
|
57
|
+
accessor isEnabled: boolean;
|
|
58
58
|
/** @internal */
|
|
59
59
|
private _internalMarkAllSubMeshesAsTexturesDirty;
|
|
60
60
|
/** @internal */
|