@onerjs/core 9.0.2 → 9.0.3
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/Buffers/buffer.pure.js +4 -0
- package/Buffers/buffer.pure.js.map +1 -1
- package/Cameras/camera.pure.d.ts +14 -0
- package/Cameras/camera.pure.js +15 -0
- package/Cameras/camera.pure.js.map +1 -1
- package/Compute/computeShader.pure.d.ts +2 -1
- package/Compute/computeShader.pure.js +29 -10
- package/Compute/computeShader.pure.js.map +1 -1
- package/Culling/ray.core.js +22 -9
- package/Culling/ray.core.js.map +1 -1
- package/Engines/IDrawContext.d.ts +2 -0
- package/Engines/IDrawContext.js.map +1 -1
- package/Engines/Native/nativeInterfaces.d.ts +55 -4
- package/Engines/Native/nativeInterfaces.js.map +1 -1
- package/Engines/Native/nativeRenderTargetWrapper.d.ts +1 -0
- package/Engines/Native/nativeRenderTargetWrapper.js +5 -1
- package/Engines/Native/nativeRenderTargetWrapper.js.map +1 -1
- package/Engines/Processors/shaderCodeInliner.d.ts +2 -0
- package/Engines/Processors/shaderCodeInliner.js +251 -6
- package/Engines/Processors/shaderCodeInliner.js.map +1 -1
- package/Engines/Processors/shaderProcessor.js +10 -1
- package/Engines/Processors/shaderProcessor.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.debugging.pure.js +12 -0
- package/Engines/WebGPU/Extensions/engine.debugging.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js +0 -1
- package/Engines/WebGPU/Extensions/engine.multiRender.pure.js.map +1 -1
- package/Engines/WebGPU/Extensions/engine.query.pure.js +5 -0
- package/Engines/WebGPU/Extensions/engine.query.pure.js.map +1 -1
- package/Engines/WebGPU/webgpuBufferManager.js +7 -0
- package/Engines/WebGPU/webgpuBufferManager.js.map +1 -1
- package/Engines/WebGPU/webgpuCacheTextureView.d.ts +1 -1
- package/Engines/WebGPU/webgpuCacheTextureView.js +20 -8
- package/Engines/WebGPU/webgpuCacheTextureView.js.map +1 -1
- package/Engines/WebGPU/webgpuDrawContext.d.ts +2 -0
- package/Engines/WebGPU/webgpuDrawContext.js +6 -0
- package/Engines/WebGPU/webgpuDrawContext.js.map +1 -1
- package/Engines/WebGPU/webgpuQuerySet.d.ts +3 -3
- package/Engines/WebGPU/webgpuQuerySet.js +23 -9
- package/Engines/WebGPU/webgpuQuerySet.js.map +1 -1
- package/Engines/WebGPU/webgpuRenderPassCommandStream.d.ts +156 -0
- package/Engines/WebGPU/webgpuRenderPassCommandStream.js +323 -0
- package/Engines/WebGPU/webgpuRenderPassCommandStream.js.map +1 -0
- package/Engines/WebGPU/webgpuTextureManager.d.ts +1 -1
- package/Engines/WebGPU/webgpuTextureManager.js +4 -3
- package/Engines/WebGPU/webgpuTextureManager.js.map +1 -1
- package/Engines/WebGPU/webgpuTimestampQuery.d.ts +3 -1
- package/Engines/WebGPU/webgpuTimestampQuery.js +9 -6
- package/Engines/WebGPU/webgpuTimestampQuery.js.map +1 -1
- package/Engines/abstractEngine.pure.d.ts +2 -0
- package/Engines/abstractEngine.pure.js +14 -5
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/constants.d.ts +6 -0
- package/Engines/constants.js +6 -0
- package/Engines/constants.js.map +1 -1
- package/Engines/engine.d.ts +198 -24
- package/Engines/pure.d.ts +1 -0
- package/Engines/pure.js +1 -0
- package/Engines/pure.js.map +1 -1
- package/Engines/renderCommandBatcher.pure.d.ts +16 -0
- package/Engines/renderCommandBatcher.pure.js +24 -0
- package/Engines/renderCommandBatcher.pure.js.map +1 -0
- package/Engines/thinEngine.functions.js +3 -2
- package/Engines/thinEngine.functions.js.map +1 -1
- package/Engines/thinEngine.pure.js +18 -2
- package/Engines/thinEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +10 -7
- package/Engines/thinNativeEngine.pure.js +117 -46
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/thinWebGPUEngine.d.ts +8 -0
- package/Engines/thinWebGPUEngine.js +11 -0
- package/Engines/thinWebGPUEngine.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +60 -1
- package/Engines/webgpuEngine.pure.js +238 -42
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphGetSoundVolumeBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Data/Audio/flowGraphIsSoundPlayingBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.d.ts +5 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js +8 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.d.ts +77 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js +141 -0
- package/FlowGraph/Blocks/Event/flowGraphMeshIntersectionEventBlock.pure.js.map +1 -0
- package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.d.ts +5 -3
- package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js +38 -7
- package/FlowGraph/Blocks/Event/flowGraphSoundEndedEventBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Event/index.d.ts +1 -0
- package/FlowGraph/Blocks/Event/index.js +1 -0
- package/FlowGraph/Blocks/Event/index.js.map +1 -1
- package/FlowGraph/Blocks/Event/pure.d.ts +1 -0
- package/FlowGraph/Blocks/Event/pure.js +1 -0
- package/FlowGraph/Blocks/Event/pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPauseSoundBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphPlaySoundBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphSetSoundVolumeBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.d.ts +3 -3
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js +2 -1
- package/FlowGraph/Blocks/Execution/Audio/flowGraphStopSoundBlock.pure.js.map +1 -1
- package/FlowGraph/Blocks/allBlocks.pure.js +2 -0
- package/FlowGraph/Blocks/allBlocks.pure.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockFactory.js +2 -0
- package/FlowGraph/Blocks/flowGraphBlockFactory.js.map +1 -1
- package/FlowGraph/Blocks/flowGraphBlockNames.d.ts +1 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js +1 -0
- package/FlowGraph/Blocks/flowGraphBlockNames.js.map +1 -1
- package/FlowGraph/flowGraph.d.ts +12 -1
- package/FlowGraph/flowGraph.js +38 -0
- package/FlowGraph/flowGraph.js.map +1 -1
- package/FlowGraph/flowGraphCoordinator.d.ts +44 -0
- package/FlowGraph/flowGraphCoordinator.js +141 -0
- package/FlowGraph/flowGraphCoordinator.js.map +1 -1
- package/FlowGraph/flowGraphDataConnection.pure.js +41 -14
- package/FlowGraph/flowGraphDataConnection.pure.js.map +1 -1
- package/FlowGraph/flowGraphParser.js +105 -5
- package/FlowGraph/flowGraphParser.js.map +1 -1
- package/FlowGraph/flowGraphSoundAssets.d.ts +40 -0
- package/FlowGraph/flowGraphSoundAssets.js +33 -0
- package/FlowGraph/flowGraphSoundAssets.js.map +1 -0
- package/FlowGraph/index.d.ts +1 -0
- package/FlowGraph/index.js +1 -0
- package/FlowGraph/index.js.map +1 -1
- package/FlowGraph/pure.d.ts +1 -0
- package/FlowGraph/pure.js +1 -0
- package/FlowGraph/pure.js.map +1 -1
- package/FlowGraph/serialization.d.ts +8 -0
- package/FlowGraph/serialization.js +31 -12
- package/FlowGraph/serialization.js.map +1 -1
- package/FlowGraph/typeDefinitions.d.ts +25 -0
- package/FlowGraph/typeDefinitions.js.map +1 -1
- package/FrameGraph/Tasks/PostProcesses/taaTask.js +2 -0
- package/FrameGraph/Tasks/PostProcesses/taaTask.js.map +1 -1
- package/Instrumentation/engineInstrumentation.d.ts +1 -0
- package/Instrumentation/engineInstrumentation.js +25 -6
- package/Instrumentation/engineInstrumentation.js.map +1 -1
- package/Lights/Clustered/clusteredLightContainer.pure.js +2 -0
- package/Lights/Clustered/clusteredLightContainer.pure.js.map +1 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.d.ts +36 -1
- package/Lights/Shadows/cascadedShadowGenerator.pure.js +202 -27
- package/Lights/Shadows/cascadedShadowGenerator.pure.js.map +1 -1
- package/Lights/directionalLight.pure.d.ts +24 -10
- package/Lights/directionalLight.pure.js +29 -11
- package/Lights/directionalLight.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js +4 -4
- package/Materials/GaussianSplatting/gaussianSplattingMaterial.pure.js.map +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js +1 -1
- package/Materials/Node/Blocks/Dual/lightBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/Input/inputBlock.pure.js +4 -0
- package/Materials/Node/Blocks/Input/inputBlock.pure.js.map +1 -1
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.d.ts +9 -0
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js +23 -3
- package/Materials/Node/Blocks/PBR/pbrMetallicRoughnessBlock.pure.js.map +1 -1
- package/Materials/PBR/openpbrMaterial.pure.js +1 -1
- package/Materials/PBR/openpbrMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseMaterial.pure.d.ts +9 -0
- package/Materials/PBR/pbrBaseMaterial.pure.js +60 -1
- package/Materials/PBR/pbrBaseMaterial.pure.js.map +1 -1
- package/Materials/PBR/pbrBaseSimpleMaterial.d.ts +11 -0
- package/Materials/PBR/pbrBaseSimpleMaterial.js +21 -2
- package/Materials/PBR/pbrBaseSimpleMaterial.js.map +1 -1
- package/Materials/PBR/pbrMaterial.pure.d.ts +12 -0
- package/Materials/PBR/pbrMaterial.pure.js +23 -3
- package/Materials/PBR/pbrMaterial.pure.js.map +1 -1
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.d.ts +1 -0
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.js +10 -0
- package/Materials/Textures/Filtering/hdrIrradianceFiltering.js.map +1 -1
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.d.ts +5 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js +7 -0
- package/Materials/Textures/HTML/htmlInCanvasPolyfill.js.map +1 -1
- package/Materials/Textures/HTML/htmlInteractionManager.d.ts +9 -3
- package/Materials/Textures/HTML/htmlInteractionManager.js +64 -5
- package/Materials/Textures/HTML/htmlInteractionManager.js.map +1 -1
- package/Materials/Textures/HTML/htmlTexture.d.ts +11 -11
- package/Materials/Textures/HTML/htmlTexture.js +106 -65
- package/Materials/Textures/HTML/htmlTexture.js.map +1 -1
- package/Materials/Textures/Loaders/internalTextureLoader.d.ts +2 -1
- package/Materials/Textures/Loaders/internalTextureLoader.js.map +1 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.d.ts +2 -1
- package/Materials/Textures/Loaders/ktxTextureLoader.js +4 -50
- package/Materials/Textures/Loaders/ktxTextureLoader.js.map +1 -1
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js +10 -0
- package/Materials/Textures/Procedurals/proceduralTexture.pure.js.map +1 -1
- package/Materials/Textures/dynamicTexture.pure.js +6 -0
- package/Materials/Textures/dynamicTexture.pure.js.map +1 -1
- package/Materials/Textures/ktx2encoderTypes.d.ts +51 -0
- package/Materials/Textures/ktx2encoderTypes.js +2 -0
- package/Materials/Textures/ktx2encoderTypes.js.map +1 -0
- package/Materials/Textures/renderTargetTexture.pure.js +10 -2
- package/Materials/Textures/renderTargetTexture.pure.js.map +1 -1
- package/Materials/Textures/textureMerger.d.ts +11 -0
- package/Materials/Textures/textureMerger.js +34 -19
- package/Materials/Textures/textureMerger.js.map +1 -1
- package/Materials/Textures/textureProcessor.d.ts +145 -0
- package/Materials/Textures/textureProcessor.js +445 -45
- package/Materials/Textures/textureProcessor.js.map +1 -1
- package/Materials/Textures/textureSampling.functions.d.ts +41 -0
- package/Materials/Textures/textureSampling.functions.js +82 -0
- package/Materials/Textures/textureSampling.functions.js.map +1 -0
- package/Materials/drawWrapper.d.ts +8 -0
- package/Materials/drawWrapper.js +19 -0
- package/Materials/drawWrapper.js.map +1 -1
- package/Materials/effect.pure.d.ts +6 -0
- package/Materials/effect.pure.js +28 -6
- package/Materials/effect.pure.js.map +1 -1
- package/Materials/effect.webgl.functions.pure.js +1 -1
- package/Materials/effect.webgl.functions.pure.js.map +1 -1
- package/Materials/material.pure.d.ts +5 -0
- package/Materials/material.pure.js +9 -2
- package/Materials/material.pure.js.map +1 -1
- package/Materials/materialFlags.d.ts +6 -0
- package/Materials/materialFlags.js +14 -0
- package/Materials/materialFlags.js.map +1 -1
- package/Materials/materialHelper.functions.d.ts +2 -1
- package/Materials/materialHelper.functions.js +36 -2
- package/Materials/materialHelper.functions.js.map +1 -1
- package/Materials/materialHelper.geometryrendering.js +19 -16
- package/Materials/materialHelper.geometryrendering.js.map +1 -1
- package/Materials/materialPluginManager.pure.js +12 -8
- package/Materials/materialPluginManager.pure.js.map +1 -1
- package/Materials/prePassConfiguration.js +19 -16
- package/Materials/prePassConfiguration.js.map +1 -1
- package/Materials/shaderMaterial.pure.js +19 -6
- package/Materials/shaderMaterial.pure.js.map +1 -1
- package/Materials/shadowDepthWrapper.d.ts +6 -0
- package/Materials/shadowDepthWrapper.js +17 -0
- package/Materials/shadowDepthWrapper.js.map +1 -1
- package/Meshes/Compression/dracoCodec.d.ts +14 -0
- package/Meshes/Compression/dracoCodec.js +22 -0
- package/Meshes/Compression/dracoCodec.js.map +1 -1
- package/Meshes/Compression/dracoDecoder.d.ts +1 -0
- package/Meshes/Compression/dracoDecoder.js +27 -0
- package/Meshes/Compression/dracoDecoder.js.map +1 -1
- package/Meshes/Compression/dracoEncoder.d.ts +1 -0
- package/Meshes/Compression/dracoEncoder.js +8 -0
- package/Meshes/Compression/dracoEncoder.js.map +1 -1
- package/Meshes/Compression/meshoptCompression.d.ts +1 -0
- package/Meshes/Compression/meshoptCompression.js +9 -0
- package/Meshes/Compression/meshoptCompression.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.d.ts +415 -0
- package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js +912 -0
- package/Meshes/GaussianSplatting/gaussianSplattingGpuSorter.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.d.ts +3 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js +40 -9
- package/Meshes/GaussianSplatting/gaussianSplattingMesh.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +112 -8
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +696 -74
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +12 -4
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/geometry.d.ts +5 -0
- package/Meshes/geometry.js +25 -0
- package/Meshes/geometry.js.map +1 -1
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/mesh.pure.d.ts +7 -0
- package/Meshes/mesh.pure.js +18 -13
- package/Meshes/mesh.pure.js.map +1 -1
- package/Meshes/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Meshes/subMesh.pure.d.ts +3 -0
- package/Meshes/subMesh.pure.js +26 -0
- package/Meshes/subMesh.pure.js.map +1 -1
- package/Meshes/thinInstanceMesh.pure.js +5 -3
- package/Meshes/thinInstanceMesh.pure.js.map +1 -1
- package/Misc/index.d.ts +1 -0
- package/Misc/index.js +1 -0
- package/Misc/index.js.map +1 -1
- package/Misc/khronosTextureContainer2.d.ts +3 -2
- package/Misc/khronosTextureContainer2.js +24 -6
- package/Misc/khronosTextureContainer2.js.map +1 -1
- package/Misc/khronosTextureContainer2Encoder.d.ts +166 -0
- package/Misc/khronosTextureContainer2Encoder.js +556 -0
- package/Misc/khronosTextureContainer2Encoder.js.map +1 -0
- package/Misc/khronosTextureContainer2EncoderWorker.d.ts +61 -0
- package/Misc/khronosTextureContainer2EncoderWorker.js +55 -0
- package/Misc/khronosTextureContainer2EncoderWorker.js.map +1 -0
- package/Misc/pure.d.ts +1 -0
- package/Misc/pure.js +1 -0
- package/Misc/pure.js.map +1 -1
- package/Misc/textureFormat.functions.d.ts +6 -0
- package/Misc/textureFormat.functions.js +54 -0
- package/Misc/textureFormat.functions.js.map +1 -0
- package/Misc/textureTools.d.ts +6 -2
- package/Misc/textureTools.js +100 -42
- package/Misc/textureTools.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.d.ts +1 -1
- package/Particles/Node/Blocks/systemBlock.pure.js +6 -3
- package/Particles/Node/Blocks/systemBlock.pure.js.map +1 -1
- package/Particles/computeShaderParticleSystem.pure.js +5 -0
- package/Particles/computeShaderParticleSystem.pure.js.map +1 -1
- package/Particles/gpuParticleSystem.pure.d.ts +2 -0
- package/Particles/gpuParticleSystem.pure.js +25 -1
- package/Particles/gpuParticleSystem.pure.js.map +1 -1
- package/Particles/solidParticle.d.ts +5 -0
- package/Particles/solidParticle.js +5 -0
- package/Particles/solidParticle.js.map +1 -1
- package/Particles/solidParticleSystem.d.ts +10 -0
- package/Particles/solidParticleSystem.js +72 -13
- package/Particles/solidParticleSystem.js.map +1 -1
- package/Particles/thinParticleSystem.pure.js +4 -0
- package/Particles/thinParticleSystem.pure.js.map +1 -1
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.d.ts +27 -6
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js +60 -5
- package/PostProcesses/RenderPipeline/Pipelines/taaMaterialManager.pure.js.map +1 -1
- package/PostProcesses/thinTAAPostProcess.d.ts +1 -0
- package/PostProcesses/thinTAAPostProcess.js +17 -1
- package/PostProcesses/thinTAAPostProcess.js.map +1 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.d.ts +2 -1
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js +6 -5
- package/PostProcesses/volumetricLightScatteringPostProcess.pure.js.map +1 -1
- package/Rendering/boundingBoxRenderer.pure.js +2 -3
- package/Rendering/boundingBoxRenderer.pure.js.map +1 -1
- package/Rendering/geometryBufferRenderer.pure.js +8 -2
- package/Rendering/geometryBufferRenderer.pure.js.map +1 -1
- package/Rendering/objectRenderer.d.ts +1 -0
- package/Rendering/objectRenderer.js +14 -0
- package/Rendering/objectRenderer.js.map +1 -1
- package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
- package/Shaders/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/bumpVertex.js +1 -1
- package/Shaders/ShadersInclude/bumpVertex.js.map +1 -1
- package/Shaders/ShadersInclude/bumpVertexDeclaration.js +1 -1
- package/Shaders/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js +5 -1
- package/Shaders/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/helperFunctions.js +2 -2
- package/Shaders/ShadersInclude/helperFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
- package/Shaders/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js +6 -0
- package/Shaders/ShadersInclude/openpbrVertexDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
- package/Shaders/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockNormalFinal.js +9 -0
- package/Shaders/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
- package/Shaders/ShadersInclude/pbrBlockReflectance.js +1 -1
- package/Shaders/ShadersInclude/pbrBlockReflectance.js.map +1 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
- package/Shaders/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrFragmentDeclaration.js +7 -1
- package/Shaders/ShadersInclude/pbrFragmentDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
- package/Shaders/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrIBLFunctions.js +12 -0
- package/Shaders/ShadersInclude/pbrIBLFunctions.js.map +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/Shaders/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/Shaders/ShadersInclude/pbrVertexDeclaration.js +3 -0
- package/Shaders/ShadersInclude/pbrVertexDeclaration.js.map +1 -1
- package/Shaders/geometry.vertex.js +6 -6
- package/Shaders/geometry.vertex.js.map +1 -1
- package/Shaders/gpuUpdateParticles.vertex.js +1 -1
- package/Shaders/gpuUpdateParticles.vertex.js.map +1 -1
- package/Shaders/lod.fragment.js +15 -2
- package/Shaders/lod.fragment.js.map +1 -1
- package/Shaders/lod3D.fragment.js +15 -2
- package/Shaders/lod3D.fragment.js.map +1 -1
- package/Shaders/lodCube.fragment.js +15 -2
- package/Shaders/lodCube.fragment.js.map +1 -1
- package/Shaders/openpbr.vertex.js +2 -0
- package/Shaders/openpbr.vertex.js.map +1 -1
- package/Shaders/pbr.fragment.js +12 -1
- package/Shaders/pbr.fragment.js.map +1 -1
- package/Shaders/pbr.vertex.js +2 -0
- package/Shaders/pbr.vertex.js.map +1 -1
- package/Shaders/textureMerger.fragment.js +28 -0
- package/Shaders/textureMerger.fragment.js.map +1 -1
- package/Shaders/textureProcessor.fragment.js +26 -4
- package/Shaders/textureProcessor.fragment.js.map +1 -1
- package/Shaders/volumetricLightScattering.fragment.js +1 -1
- package/Shaders/volumetricLightScattering.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/bumpFragmentMainFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertex.js +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/bumpVertexDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/hdrFilteringFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/helperFunctions.js +2 -2
- package/ShadersWGSL/ShadersInclude/helperFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightFragment.js +44 -2
- package/ShadersWGSL/ShadersInclude/lightFragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js +17 -3
- package/ShadersWGSL/ShadersInclude/lightUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js +12 -1
- package/ShadersWGSL/ShadersInclude/lightVxUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js +1 -1
- package/ShadersWGSL/ShadersInclude/openpbrBackgroundTransmission.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js +11 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockFinalLitComponents.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js +9 -0
- package/ShadersWGSL/ShadersInclude/pbrBlockNormalFinal.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrBlockReflectance.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrClusteredLightingFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrDirectLightingSetupFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js +1 -0
- package/ShadersWGSL/ShadersInclude/pbrFragmentSamplersDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js +8 -0
- package/ShadersWGSL/ShadersInclude/pbrIBLFunctions.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/pbrUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertex.js +2 -2
- package/ShadersWGSL/ShadersInclude/prePassVertex.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js +1 -1
- package/ShadersWGSL/ShadersInclude/prePassVertexDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js +3 -1
- package/ShadersWGSL/ShadersInclude/sceneUboDeclaration.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/shadowsVertex.js +16 -0
- package/ShadersWGSL/ShadersInclude/shadowsVertex.js.map +1 -1
- package/ShadersWGSL/default.fragment.js +4 -4
- package/ShadersWGSL/default.fragment.js.map +1 -1
- package/ShadersWGSL/default.vertex.js +1 -1
- package/ShadersWGSL/default.vertex.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +3 -3
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js +1 -1
- package/ShadersWGSL/gpuUpdateParticles.compute.js.map +1 -1
- package/ShadersWGSL/gsSortCount.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortCount.compute.js +19 -0
- package/ShadersWGSL/gsSortCount.compute.js.map +1 -0
- package/ShadersWGSL/gsSortKeys.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortKeys.compute.js +49 -0
- package/ShadersWGSL/gsSortKeys.compute.js.map +1 -0
- package/ShadersWGSL/gsSortOutput.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortOutput.compute.js +28 -0
- package/ShadersWGSL/gsSortOutput.compute.js.map +1 -0
- package/ShadersWGSL/gsSortScanLocal.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortScanLocal.compute.js +23 -0
- package/ShadersWGSL/gsSortScanLocal.compute.js.map +1 -0
- package/ShadersWGSL/gsSortScanSums.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortScanSums.compute.js +19 -0
- package/ShadersWGSL/gsSortScanSums.compute.js.map +1 -0
- package/ShadersWGSL/gsSortScatter.compute.d.ts +5 -0
- package/ShadersWGSL/gsSortScatter.compute.js +33 -0
- package/ShadersWGSL/gsSortScatter.compute.js.map +1 -0
- package/ShadersWGSL/lod.fragment.js +14 -2
- package/ShadersWGSL/lod.fragment.js.map +1 -1
- package/ShadersWGSL/lod3D.fragment.js +14 -2
- package/ShadersWGSL/lod3D.fragment.js.map +1 -1
- package/ShadersWGSL/lodCube.fragment.js +14 -2
- package/ShadersWGSL/lodCube.fragment.js.map +1 -1
- package/ShadersWGSL/openpbr.vertex.js +3 -1
- package/ShadersWGSL/openpbr.vertex.js.map +1 -1
- package/ShadersWGSL/pbr.fragment.js +11 -0
- package/ShadersWGSL/pbr.fragment.js.map +1 -1
- package/ShadersWGSL/pbr.vertex.js +3 -1
- package/ShadersWGSL/pbr.vertex.js.map +1 -1
- package/ShadersWGSL/textureMerger.fragment.js +40 -4
- package/ShadersWGSL/textureMerger.fragment.js.map +1 -1
- package/ShadersWGSL/textureProcessor.fragment.js +26 -4
- package/ShadersWGSL/textureProcessor.fragment.js.map +1 -1
- package/Sprites/spriteRenderer.js +15 -5
- package/Sprites/spriteRenderer.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.d.ts +23 -1
- package/scene.pure.js +83 -1
- package/scene.pure.js.map +1 -1
|
@@ -120,6 +120,8 @@ export declare class PBRMaterialDefines extends PBRMaterialDefines_base {
|
|
|
120
120
|
AMBIENT: boolean;
|
|
121
121
|
AMBIENTDIRECTUV: number;
|
|
122
122
|
AMBIENTINGRAYSCALE: boolean;
|
|
123
|
+
BENTNORMAL: boolean;
|
|
124
|
+
BENTNORMALDIRECTUV: number;
|
|
123
125
|
OPACITY: boolean;
|
|
124
126
|
VERTEXALPHA: boolean;
|
|
125
127
|
OPACITYDIRECTUV: number;
|
|
@@ -397,6 +399,11 @@ export declare abstract class PBRBaseMaterial extends PBRBaseMaterialBase {
|
|
|
397
399
|
* @internal
|
|
398
400
|
*/
|
|
399
401
|
_ambientTexture: Nullable<BaseTexture>;
|
|
402
|
+
/**
|
|
403
|
+
* Tangent-space bent normals for directional reflection occlusion.
|
|
404
|
+
* @internal
|
|
405
|
+
*/
|
|
406
|
+
_bentNormalTexture: Nullable<BaseTexture>;
|
|
400
407
|
/**
|
|
401
408
|
* AKA Occlusion Texture Intensity in other nomenclature.
|
|
402
409
|
* @internal
|
|
@@ -855,6 +862,8 @@ export declare abstract class PBRBaseMaterial extends PBRBaseMaterialBase {
|
|
|
855
862
|
* @returns the texture used for the alpha test.
|
|
856
863
|
*/
|
|
857
864
|
getAlphaTestTexture(): Nullable<BaseTexture>;
|
|
865
|
+
private _isEffectivelyUnlit;
|
|
866
|
+
private _isBentNormalTextureEnabled;
|
|
858
867
|
/**
|
|
859
868
|
* Specifies that the submesh is ready to be used.
|
|
860
869
|
* @param mesh - BJS mesh.
|
|
@@ -63,6 +63,8 @@ export class PBRMaterialDefines extends ImageProcessingDefinesMixin(PBRMaterialD
|
|
|
63
63
|
this.AMBIENT = false;
|
|
64
64
|
this.AMBIENTDIRECTUV = 0;
|
|
65
65
|
this.AMBIENTINGRAYSCALE = false;
|
|
66
|
+
this.BENTNORMAL = false;
|
|
67
|
+
this.BENTNORMALDIRECTUV = 0;
|
|
66
68
|
this.OPACITY = false;
|
|
67
69
|
this.VERTEXALPHA = false;
|
|
68
70
|
this.OPACITYDIRECTUV = 0;
|
|
@@ -342,6 +344,11 @@ let PBRBaseMaterial = (() => {
|
|
|
342
344
|
* @internal
|
|
343
345
|
*/
|
|
344
346
|
this._ambientTexture = null;
|
|
347
|
+
/**
|
|
348
|
+
* Tangent-space bent normals for directional reflection occlusion.
|
|
349
|
+
* @internal
|
|
350
|
+
*/
|
|
351
|
+
this._bentNormalTexture = null;
|
|
345
352
|
/**
|
|
346
353
|
* AKA Occlusion Texture Intensity in other nomenclature.
|
|
347
354
|
* @internal
|
|
@@ -785,6 +792,21 @@ let PBRBaseMaterial = (() => {
|
|
|
785
792
|
getAlphaTestTexture() {
|
|
786
793
|
return this._albedoTexture;
|
|
787
794
|
}
|
|
795
|
+
_isEffectivelyUnlit(mesh) {
|
|
796
|
+
return this._unlit || ((this.pointsCloud || this.wireframe) && !mesh.isVerticesDataPresent(VertexBuffer.NormalKind));
|
|
797
|
+
}
|
|
798
|
+
_isBentNormalTextureEnabled(mesh) {
|
|
799
|
+
const scene = this.getScene();
|
|
800
|
+
return !!(this._bentNormalTexture &&
|
|
801
|
+
!this._isEffectivelyUnlit(mesh) &&
|
|
802
|
+
scene.texturesEnabled &&
|
|
803
|
+
MaterialFlags.BentNormalTextureEnabled &&
|
|
804
|
+
MaterialFlags.ReflectionTextureEnabled &&
|
|
805
|
+
this._getReflectionTexture() &&
|
|
806
|
+
scene.getEngine().getCaps().standardDerivatives &&
|
|
807
|
+
((this._ambientTexture && MaterialFlags.AmbientTextureEnabled) ||
|
|
808
|
+
(this._metallicTexture && this._useAmbientOcclusionFromMetallicTextureRed && MaterialFlags.SpecularTextureEnabled)));
|
|
809
|
+
}
|
|
788
810
|
/**
|
|
789
811
|
* Specifies that the submesh is ready to be used.
|
|
790
812
|
* @param mesh - BJS mesh.
|
|
@@ -807,6 +829,10 @@ let PBRBaseMaterial = (() => {
|
|
|
807
829
|
subMesh.materialDefines = new PBRMaterialDefines(this._eventInfo.defineNames);
|
|
808
830
|
}
|
|
809
831
|
const defines = subMesh.materialDefines;
|
|
832
|
+
if (this._bentNormalTexture && defines.UNLIT !== this._isEffectivelyUnlit(mesh)) {
|
|
833
|
+
defines.markAsTexturesDirty();
|
|
834
|
+
defines.markAsMiscDirty();
|
|
835
|
+
}
|
|
810
836
|
if (this._isReadyForSubMesh(subMesh)) {
|
|
811
837
|
return true;
|
|
812
838
|
}
|
|
@@ -837,6 +863,9 @@ let PBRBaseMaterial = (() => {
|
|
|
837
863
|
return false;
|
|
838
864
|
}
|
|
839
865
|
}
|
|
866
|
+
if (this._bentNormalTexture && this._isBentNormalTextureEnabled(mesh) && !this._bentNormalTexture.isReadyOrNotBlocking()) {
|
|
867
|
+
return false;
|
|
868
|
+
}
|
|
840
869
|
if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {
|
|
841
870
|
if (!this._opacityTexture.isReadyOrNotBlocking()) {
|
|
842
871
|
return false;
|
|
@@ -1098,6 +1127,7 @@ let PBRBaseMaterial = (() => {
|
|
|
1098
1127
|
"vBaseWeightInfos",
|
|
1099
1128
|
"vBaseDiffuseRoughnessInfos",
|
|
1100
1129
|
"vAmbientInfos",
|
|
1130
|
+
"vBentNormalInfos",
|
|
1101
1131
|
"vOpacityInfos",
|
|
1102
1132
|
"vEmissiveInfos",
|
|
1103
1133
|
"vReflectivityInfos",
|
|
@@ -1111,6 +1141,7 @@ let PBRBaseMaterial = (() => {
|
|
|
1111
1141
|
"baseWeightMatrix",
|
|
1112
1142
|
"baseDiffuseRoughnessMatrix",
|
|
1113
1143
|
"ambientMatrix",
|
|
1144
|
+
"bentNormalMatrix",
|
|
1114
1145
|
"opacityMatrix",
|
|
1115
1146
|
"emissiveMatrix",
|
|
1116
1147
|
"reflectivityMatrix",
|
|
@@ -1136,6 +1167,7 @@ let PBRBaseMaterial = (() => {
|
|
|
1136
1167
|
"baseDiffuseRoughnessSampler",
|
|
1137
1168
|
"reflectivitySampler",
|
|
1138
1169
|
"ambientSampler",
|
|
1170
|
+
"bentNormalSampler",
|
|
1139
1171
|
"emissiveSampler",
|
|
1140
1172
|
"bumpSampler",
|
|
1141
1173
|
"lightmapSampler",
|
|
@@ -1242,11 +1274,14 @@ let PBRBaseMaterial = (() => {
|
|
|
1242
1274
|
for (let i = 1; i <= 6; ++i) {
|
|
1243
1275
|
defines["MAINUV" + i] = false;
|
|
1244
1276
|
}
|
|
1277
|
+
defines.BENTNORMAL = false;
|
|
1278
|
+
defines.BENTNORMALDIRECTUV = 0;
|
|
1245
1279
|
if (scene.texturesEnabled) {
|
|
1246
1280
|
defines.ALBEDODIRECTUV = 0;
|
|
1247
1281
|
defines.BASE_WEIGHTDIRECTUV = 0;
|
|
1248
1282
|
defines.BASE_DIFFUSE_ROUGHNESSDIRECTUV = 0;
|
|
1249
1283
|
defines.AMBIENTDIRECTUV = 0;
|
|
1284
|
+
defines.BENTNORMALDIRECTUV = 0;
|
|
1250
1285
|
defines.OPACITYDIRECTUV = 0;
|
|
1251
1286
|
defines.EMISSIVEDIRECTUV = 0;
|
|
1252
1287
|
defines.REFLECTIVITYDIRECTUV = 0;
|
|
@@ -1298,6 +1333,9 @@ let PBRBaseMaterial = (() => {
|
|
|
1298
1333
|
engine.getCaps().maxVaryingVectors <= 8 ||
|
|
1299
1334
|
this._baseDiffuseRoughnessTexture != null;
|
|
1300
1335
|
PrepareDefinesForIBL(scene, reflectionTexture, defines, this.realTimeFiltering, this.realTimeFilteringQuality, !useSHInFragment);
|
|
1336
|
+
if (this._bentNormalTexture && this._isBentNormalTextureEnabled(mesh) && defines.REFLECTION) {
|
|
1337
|
+
PrepareDefinesForMergedUV(this._bentNormalTexture, defines, "BENTNORMAL");
|
|
1338
|
+
}
|
|
1301
1339
|
if (this._lightmapTexture && MaterialFlags.LightmapTextureEnabled) {
|
|
1302
1340
|
PrepareDefinesForMergedUV(this._lightmapTexture, defines, "LIGHTMAP");
|
|
1303
1341
|
defines.USELIGHTMAPASSHADOWMAP = this._useLightmapAsShadowmap;
|
|
@@ -1442,7 +1480,7 @@ let PBRBaseMaterial = (() => {
|
|
|
1442
1480
|
// Misc.
|
|
1443
1481
|
if (defines._areMiscDirty) {
|
|
1444
1482
|
PrepareDefinesForMisc(mesh, scene, this._useLogarithmicDepth, this.pointsCloud, this.fogEnabled, this.needAlphaTestingForMesh(mesh), defines, this._applyDecalMapAfterDetailMap, this._useVertexPulling, renderingMesh, this._isVertexOutputInvariant);
|
|
1445
|
-
defines.UNLIT = this.
|
|
1483
|
+
defines.UNLIT = this._isEffectivelyUnlit(mesh);
|
|
1446
1484
|
defines.DEBUGMODE = this._debugMode;
|
|
1447
1485
|
}
|
|
1448
1486
|
// Values that need to be evaluated on every frame
|
|
@@ -1508,6 +1546,7 @@ let PBRBaseMaterial = (() => {
|
|
|
1508
1546
|
ubo.addUniform("vBaseWeightInfos", 2);
|
|
1509
1547
|
ubo.addUniform("vBaseDiffuseRoughnessInfos", 2);
|
|
1510
1548
|
ubo.addUniform("vAmbientInfos", 4);
|
|
1549
|
+
ubo.addUniform("vBentNormalInfos", 2);
|
|
1511
1550
|
ubo.addUniform("vOpacityInfos", 2);
|
|
1512
1551
|
ubo.addUniform("vEmissiveInfos", 2);
|
|
1513
1552
|
ubo.addUniform("vLightmapInfos", 2);
|
|
@@ -1518,6 +1557,7 @@ let PBRBaseMaterial = (() => {
|
|
|
1518
1557
|
ubo.addUniform("baseWeightMatrix", 16);
|
|
1519
1558
|
ubo.addUniform("baseDiffuseRoughnessMatrix", 16);
|
|
1520
1559
|
ubo.addUniform("ambientMatrix", 16);
|
|
1560
|
+
ubo.addUniform("bentNormalMatrix", 16);
|
|
1521
1561
|
ubo.addUniform("opacityMatrix", 16);
|
|
1522
1562
|
ubo.addUniform("emissiveMatrix", 16);
|
|
1523
1563
|
ubo.addUniform("lightmapMatrix", 16);
|
|
@@ -1617,6 +1657,10 @@ let PBRBaseMaterial = (() => {
|
|
|
1617
1657
|
ubo.updateFloat4("vAmbientInfos", this._ambientTexture.coordinatesIndex, this._ambientTexture.level, this._ambientTextureStrength, this._ambientTextureImpactOnAnalyticalLights);
|
|
1618
1658
|
BindTextureMatrix(this._ambientTexture, ubo, "ambient");
|
|
1619
1659
|
}
|
|
1660
|
+
if (defines.BENTNORMAL && this._bentNormalTexture) {
|
|
1661
|
+
ubo.updateFloat2("vBentNormalInfos", this._bentNormalTexture.coordinatesIndex, this._bentNormalTexture.level);
|
|
1662
|
+
BindTextureMatrix(this._bentNormalTexture, ubo, "bentNormal");
|
|
1663
|
+
}
|
|
1620
1664
|
if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {
|
|
1621
1665
|
ubo.updateFloat2("vOpacityInfos", this._opacityTexture.coordinatesIndex, this._opacityTexture.level);
|
|
1622
1666
|
BindTextureMatrix(this._opacityTexture, ubo, "opacity");
|
|
@@ -1654,6 +1698,8 @@ let PBRBaseMaterial = (() => {
|
|
|
1654
1698
|
if (this._bumpTexture && engine.getCaps().standardDerivatives && MaterialFlags.BumpTextureEnabled && !this._disableBumpMap) {
|
|
1655
1699
|
ubo.updateFloat3("vBumpInfos", this._bumpTexture.coordinatesIndex, this._bumpTexture.level, this._parallaxScaleBias);
|
|
1656
1700
|
BindTextureMatrix(this._bumpTexture, ubo, "bump");
|
|
1701
|
+
}
|
|
1702
|
+
if (defines.BUMP || defines.BENTNORMAL) {
|
|
1657
1703
|
if (scene._mirroredCameraPosition) {
|
|
1658
1704
|
ubo.updateFloat2("vTangentSpaceParams", this._invertNormalMapX ? 1.0 : -1.0, this._invertNormalMapY ? 1.0 : -1.0);
|
|
1659
1705
|
}
|
|
@@ -1719,6 +1765,9 @@ let PBRBaseMaterial = (() => {
|
|
|
1719
1765
|
if (this._ambientTexture && MaterialFlags.AmbientTextureEnabled) {
|
|
1720
1766
|
ubo.setTexture("ambientSampler", this._ambientTexture);
|
|
1721
1767
|
}
|
|
1768
|
+
if (defines.BENTNORMAL && this._bentNormalTexture) {
|
|
1769
|
+
ubo.setTexture("bentNormalSampler", this._bentNormalTexture);
|
|
1770
|
+
}
|
|
1722
1771
|
if (this._opacityTexture && MaterialFlags.OpacityTextureEnabled) {
|
|
1723
1772
|
ubo.setTexture("opacitySampler", this._opacityTexture);
|
|
1724
1773
|
}
|
|
@@ -1816,6 +1865,9 @@ let PBRBaseMaterial = (() => {
|
|
|
1816
1865
|
if (this._ambientTexture && this._ambientTexture.animations && this._ambientTexture.animations.length > 0) {
|
|
1817
1866
|
results.push(this._ambientTexture);
|
|
1818
1867
|
}
|
|
1868
|
+
if (this._bentNormalTexture && this._bentNormalTexture.animations && this._bentNormalTexture.animations.length > 0) {
|
|
1869
|
+
results.push(this._bentNormalTexture);
|
|
1870
|
+
}
|
|
1819
1871
|
if (this._opacityTexture && this._opacityTexture.animations && this._opacityTexture.animations.length > 0) {
|
|
1820
1872
|
results.push(this._opacityTexture);
|
|
1821
1873
|
}
|
|
@@ -1876,6 +1928,9 @@ let PBRBaseMaterial = (() => {
|
|
|
1876
1928
|
if (this._ambientTexture) {
|
|
1877
1929
|
activeTextures.push(this._ambientTexture);
|
|
1878
1930
|
}
|
|
1931
|
+
if (this._bentNormalTexture) {
|
|
1932
|
+
activeTextures.push(this._bentNormalTexture);
|
|
1933
|
+
}
|
|
1879
1934
|
if (this._opacityTexture) {
|
|
1880
1935
|
activeTextures.push(this._opacityTexture);
|
|
1881
1936
|
}
|
|
@@ -1929,6 +1984,9 @@ let PBRBaseMaterial = (() => {
|
|
|
1929
1984
|
if (this._ambientTexture === texture) {
|
|
1930
1985
|
return true;
|
|
1931
1986
|
}
|
|
1987
|
+
if (this._bentNormalTexture === texture) {
|
|
1988
|
+
return true;
|
|
1989
|
+
}
|
|
1932
1990
|
if (this._opacityTexture === texture) {
|
|
1933
1991
|
return true;
|
|
1934
1992
|
}
|
|
@@ -1992,6 +2050,7 @@ let PBRBaseMaterial = (() => {
|
|
|
1992
2050
|
this._baseWeightTexture?.dispose();
|
|
1993
2051
|
this._baseDiffuseRoughnessTexture?.dispose();
|
|
1994
2052
|
this._ambientTexture?.dispose();
|
|
2053
|
+
this._bentNormalTexture?.dispose();
|
|
1995
2054
|
this._opacityTexture?.dispose();
|
|
1996
2055
|
this._reflectionTexture?.dispose();
|
|
1997
2056
|
this._emissiveTexture?.dispose();
|