@aura3d/rendering 1.0.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/README.md +18 -0
- package/dist/ArchitecturalLightingFixtures.d.ts +40 -0
- package/dist/ArchitecturalLightingFixtures.d.ts.map +1 -0
- package/dist/ArchitecturalLightingFixtures.js +171 -0
- package/dist/ArchitecturalLightingFixtures.js.map +1 -0
- package/dist/ArchitecturalMaterialCatalog.d.ts +30 -0
- package/dist/ArchitecturalMaterialCatalog.d.ts.map +1 -0
- package/dist/ArchitecturalMaterialCatalog.js +90 -0
- package/dist/ArchitecturalMaterialCatalog.js.map +1 -0
- package/dist/ArchitecturalMeasurementFixtures.d.ts +30 -0
- package/dist/ArchitecturalMeasurementFixtures.d.ts.map +1 -0
- package/dist/ArchitecturalMeasurementFixtures.js +115 -0
- package/dist/ArchitecturalMeasurementFixtures.js.map +1 -0
- package/dist/BRDFLut.d.ts +13 -0
- package/dist/BRDFLut.d.ts.map +1 -0
- package/dist/BRDFLut.js +34 -0
- package/dist/BRDFLut.js.map +1 -0
- package/dist/CameraFraming.d.ts +31 -0
- package/dist/CameraFraming.d.ts.map +1 -0
- package/dist/CameraFraming.js +143 -0
- package/dist/CameraFraming.js.map +1 -0
- package/dist/CanonicalSceneFixtures.d.ts +13 -0
- package/dist/CanonicalSceneFixtures.d.ts.map +1 -0
- package/dist/CanonicalSceneFixtures.js +78 -0
- package/dist/CanonicalSceneFixtures.js.map +1 -0
- package/dist/CascadedShadowMaps.d.ts +121 -0
- package/dist/CascadedShadowMaps.d.ts.map +1 -0
- package/dist/CascadedShadowMaps.js +315 -0
- package/dist/CascadedShadowMaps.js.map +1 -0
- package/dist/ColorManagement.d.ts +33 -0
- package/dist/ColorManagement.d.ts.map +1 -0
- package/dist/ColorManagement.js +71 -0
- package/dist/ColorManagement.js.map +1 -0
- package/dist/CullingFixtures.d.ts +70 -0
- package/dist/CullingFixtures.d.ts.map +1 -0
- package/dist/CullingFixtures.js +191 -0
- package/dist/CullingFixtures.js.map +1 -0
- package/dist/DecalGeometry.d.ts +3 -0
- package/dist/DecalGeometry.d.ts.map +1 -0
- package/dist/DecalGeometry.js +2 -0
- package/dist/DecalGeometry.js.map +1 -0
- package/dist/DepthPass.d.ts +23 -0
- package/dist/DepthPass.d.ts.map +1 -0
- package/dist/DepthPass.js +99 -0
- package/dist/DepthPass.js.map +1 -0
- package/dist/EnvironmentBackgroundPass.d.ts +27 -0
- package/dist/EnvironmentBackgroundPass.d.ts.map +1 -0
- package/dist/EnvironmentBackgroundPass.js +167 -0
- package/dist/EnvironmentBackgroundPass.js.map +1 -0
- package/dist/EnvironmentBackgroundResources.d.ts +31 -0
- package/dist/EnvironmentBackgroundResources.d.ts.map +1 -0
- package/dist/EnvironmentBackgroundResources.js +237 -0
- package/dist/EnvironmentBackgroundResources.js.map +1 -0
- package/dist/EnvironmentLighting.d.ts +10 -0
- package/dist/EnvironmentLighting.d.ts.map +1 -0
- package/dist/EnvironmentLighting.js +64 -0
- package/dist/EnvironmentLighting.js.map +1 -0
- package/dist/EnvironmentMapResources.d.ts +98 -0
- package/dist/EnvironmentMapResources.d.ts.map +1 -0
- package/dist/EnvironmentMapResources.js +794 -0
- package/dist/EnvironmentMapResources.js.map +1 -0
- package/dist/EnvironmentPipeline.d.ts +21 -0
- package/dist/EnvironmentPipeline.d.ts.map +1 -0
- package/dist/EnvironmentPipeline.js +43 -0
- package/dist/EnvironmentPipeline.js.map +1 -0
- package/dist/EnvironmentPlatform.d.ts +185 -0
- package/dist/EnvironmentPlatform.d.ts.map +1 -0
- package/dist/EnvironmentPlatform.js +922 -0
- package/dist/EnvironmentPlatform.js.map +1 -0
- package/dist/EnvironmentPreset.d.ts +35 -0
- package/dist/EnvironmentPreset.d.ts.map +1 -0
- package/dist/EnvironmentPreset.js +96 -0
- package/dist/EnvironmentPreset.js.map +1 -0
- package/dist/Exposure.d.ts +19 -0
- package/dist/Exposure.d.ts.map +1 -0
- package/dist/Exposure.js +34 -0
- package/dist/Exposure.js.map +1 -0
- package/dist/ExternalParityRenderPreset.d.ts +149 -0
- package/dist/ExternalParityRenderPreset.d.ts.map +1 -0
- package/dist/ExternalParityRenderPreset.js +519 -0
- package/dist/ExternalParityRenderPreset.js.map +1 -0
- package/dist/ForwardPass.d.ts +122 -0
- package/dist/ForwardPass.d.ts.map +1 -0
- package/dist/ForwardPass.js +1352 -0
- package/dist/ForwardPass.js.map +1 -0
- package/dist/FrameVisualMetrics.d.ts +60 -0
- package/dist/FrameVisualMetrics.d.ts.map +1 -0
- package/dist/FrameVisualMetrics.js +146 -0
- package/dist/FrameVisualMetrics.js.map +1 -0
- package/dist/Geometry.d.ts +50 -0
- package/dist/Geometry.d.ts.map +1 -0
- package/dist/Geometry.js +385 -0
- package/dist/Geometry.js.map +1 -0
- package/dist/GeometryPrimitives.d.ts +3 -0
- package/dist/GeometryPrimitives.d.ts.map +1 -0
- package/dist/GeometryPrimitives.js +2 -0
- package/dist/GeometryPrimitives.js.map +1 -0
- package/dist/HDRRenderPipeline.d.ts +27 -0
- package/dist/HDRRenderPipeline.d.ts.map +1 -0
- package/dist/HDRRenderPipeline.js +67 -0
- package/dist/HDRRenderPipeline.js.map +1 -0
- package/dist/IBL.d.ts +37 -0
- package/dist/IBL.d.ts.map +1 -0
- package/dist/IBL.js +48 -0
- package/dist/IBL.js.map +1 -0
- package/dist/IndexBuffer.d.ts +15 -0
- package/dist/IndexBuffer.d.ts.map +1 -0
- package/dist/IndexBuffer.js +51 -0
- package/dist/IndexBuffer.js.map +1 -0
- package/dist/InstancedPBRMaterial.d.ts +33 -0
- package/dist/InstancedPBRMaterial.d.ts.map +1 -0
- package/dist/InstancedPBRMaterial.js +147 -0
- package/dist/InstancedPBRMaterial.js.map +1 -0
- package/dist/InstancedUnlitMaterial.d.ts +11 -0
- package/dist/InstancedUnlitMaterial.d.ts.map +1 -0
- package/dist/InstancedUnlitMaterial.js +50 -0
- package/dist/InstancedUnlitMaterial.js.map +1 -0
- package/dist/Instancing.d.ts +7 -0
- package/dist/Instancing.d.ts.map +1 -0
- package/dist/Instancing.js +14 -0
- package/dist/Instancing.js.map +1 -0
- package/dist/LightCollector.d.ts +24 -0
- package/dist/LightCollector.d.ts.map +1 -0
- package/dist/LightCollector.js +56 -0
- package/dist/LightCollector.js.map +1 -0
- package/dist/LightUniforms.d.ts +14 -0
- package/dist/LightUniforms.d.ts.map +1 -0
- package/dist/LightUniforms.js +37 -0
- package/dist/LightUniforms.js.map +1 -0
- package/dist/LightingDebug.d.ts +13 -0
- package/dist/LightingDebug.d.ts.map +1 -0
- package/dist/LightingDebug.js +69 -0
- package/dist/LightingDebug.js.map +1 -0
- package/dist/LightingDefaults.d.ts +13 -0
- package/dist/LightingDefaults.d.ts.map +1 -0
- package/dist/LightingDefaults.js +64 -0
- package/dist/LightingDefaults.js.map +1 -0
- package/dist/LightingRig.d.ts +53 -0
- package/dist/LightingRig.d.ts.map +1 -0
- package/dist/LightingRig.js +197 -0
- package/dist/LightingRig.js.map +1 -0
- package/dist/LineGeometry.d.ts +3 -0
- package/dist/LineGeometry.d.ts.map +1 -0
- package/dist/LineGeometry.js +2 -0
- package/dist/LineGeometry.js.map +1 -0
- package/dist/Material.d.ts +77 -0
- package/dist/Material.d.ts.map +1 -0
- package/dist/Material.js +137 -0
- package/dist/Material.js.map +1 -0
- package/dist/MaterialBinding.d.ts +17 -0
- package/dist/MaterialBinding.d.ts.map +1 -0
- package/dist/MaterialBinding.js +119 -0
- package/dist/MaterialBinding.js.map +1 -0
- package/dist/MaterialInstance.d.ts +16 -0
- package/dist/MaterialInstance.d.ts.map +1 -0
- package/dist/MaterialInstance.js +53 -0
- package/dist/MaterialInstance.js.map +1 -0
- package/dist/MaterialPresets.d.ts +31 -0
- package/dist/MaterialPresets.d.ts.map +1 -0
- package/dist/MaterialPresets.js +219 -0
- package/dist/MaterialPresets.js.map +1 -0
- package/dist/MorphTarget.d.ts +10 -0
- package/dist/MorphTarget.d.ts.map +1 -0
- package/dist/MorphTarget.js +101 -0
- package/dist/MorphTarget.js.map +1 -0
- package/dist/MorphUnlitMaterial.d.ts +11 -0
- package/dist/MorphUnlitMaterial.d.ts.map +1 -0
- package/dist/MorphUnlitMaterial.js +45 -0
- package/dist/MorphUnlitMaterial.js.map +1 -0
- package/dist/NormalMappedPBRMaterial.d.ts +37 -0
- package/dist/NormalMappedPBRMaterial.d.ts.map +1 -0
- package/dist/NormalMappedPBRMaterial.js +148 -0
- package/dist/NormalMappedPBRMaterial.js.map +1 -0
- package/dist/OceanFixtures.d.ts +62 -0
- package/dist/OceanFixtures.d.ts.map +1 -0
- package/dist/OceanFixtures.js +240 -0
- package/dist/OceanFixtures.js.map +1 -0
- package/dist/PBRLightingDefaults.d.ts +4 -0
- package/dist/PBRLightingDefaults.d.ts.map +1 -0
- package/dist/PBRLightingDefaults.js +10 -0
- package/dist/PBRLightingDefaults.js.map +1 -0
- package/dist/PBRMaterial.d.ts +84 -0
- package/dist/PBRMaterial.d.ts.map +1 -0
- package/dist/PBRMaterial.js +349 -0
- package/dist/PBRMaterial.js.map +1 -0
- package/dist/PMREM.d.ts +26 -0
- package/dist/PMREM.d.ts.map +1 -0
- package/dist/PMREM.js +26 -0
- package/dist/PMREM.js.map +1 -0
- package/dist/PbrReference.d.ts +153 -0
- package/dist/PbrReference.d.ts.map +1 -0
- package/dist/PbrReference.js +500 -0
- package/dist/PbrReference.js.map +1 -0
- package/dist/PostProcessPass.d.ts +439 -0
- package/dist/PostProcessPass.d.ts.map +1 -0
- package/dist/PostProcessPass.js +1834 -0
- package/dist/PostProcessPass.js.map +1 -0
- package/dist/ProceduralTextureFixtures.d.ts +27 -0
- package/dist/ProceduralTextureFixtures.d.ts.map +1 -0
- package/dist/ProceduralTextureFixtures.js +336 -0
- package/dist/ProceduralTextureFixtures.js.map +1 -0
- package/dist/ProductTurntableFixtures.d.ts +96 -0
- package/dist/ProductTurntableFixtures.d.ts.map +1 -0
- package/dist/ProductTurntableFixtures.js +559 -0
- package/dist/ProductTurntableFixtures.js.map +1 -0
- package/dist/Raycaster.d.ts +14 -0
- package/dist/Raycaster.d.ts.map +1 -0
- package/dist/Raycaster.js +10 -0
- package/dist/Raycaster.js.map +1 -0
- package/dist/ReflectionProbe.d.ts +8 -0
- package/dist/ReflectionProbe.d.ts.map +1 -0
- package/dist/ReflectionProbe.js +10 -0
- package/dist/ReflectionProbe.js.map +1 -0
- package/dist/ReflectionSurfaces.d.ts +35 -0
- package/dist/ReflectionSurfaces.d.ts.map +1 -0
- package/dist/ReflectionSurfaces.js +155 -0
- package/dist/ReflectionSurfaces.js.map +1 -0
- package/dist/RenderBackend.d.ts +14 -0
- package/dist/RenderBackend.d.ts.map +1 -0
- package/dist/RenderBackend.js +33 -0
- package/dist/RenderBackend.js.map +1 -0
- package/dist/RenderDebugViews.d.ts +26 -0
- package/dist/RenderDebugViews.d.ts.map +1 -0
- package/dist/RenderDebugViews.js +97 -0
- package/dist/RenderDebugViews.js.map +1 -0
- package/dist/RenderDevice.d.ts +280 -0
- package/dist/RenderDevice.d.ts.map +1 -0
- package/dist/RenderDevice.js +561 -0
- package/dist/RenderDevice.js.map +1 -0
- package/dist/RenderGraph.d.ts +22 -0
- package/dist/RenderGraph.d.ts.map +1 -0
- package/dist/RenderGraph.js +159 -0
- package/dist/RenderGraph.js.map +1 -0
- package/dist/RenderPass.d.ts +23 -0
- package/dist/RenderPass.d.ts.map +1 -0
- package/dist/RenderPass.js +14 -0
- package/dist/RenderPass.js.map +1 -0
- package/dist/RenderPipeline.d.ts +39 -0
- package/dist/RenderPipeline.d.ts.map +1 -0
- package/dist/RenderPipeline.js +67 -0
- package/dist/RenderPipeline.js.map +1 -0
- package/dist/RenderQueue.d.ts +3 -0
- package/dist/RenderQueue.d.ts.map +1 -0
- package/dist/RenderQueue.js +2 -0
- package/dist/RenderQueue.js.map +1 -0
- package/dist/RenderState.d.ts +3 -0
- package/dist/RenderState.d.ts.map +1 -0
- package/dist/RenderState.js +2 -0
- package/dist/RenderState.js.map +1 -0
- package/dist/Renderer.d.ts +265 -0
- package/dist/Renderer.d.ts.map +1 -0
- package/dist/Renderer.js +2094 -0
- package/dist/Renderer.js.map +1 -0
- package/dist/RendererDebugOverlay.d.ts +20 -0
- package/dist/RendererDebugOverlay.d.ts.map +1 -0
- package/dist/RendererDebugOverlay.js +54 -0
- package/dist/RendererDebugOverlay.js.map +1 -0
- package/dist/RendererFeatureGates.d.ts +17 -0
- package/dist/RendererFeatureGates.d.ts.map +1 -0
- package/dist/RendererFeatureGates.js +92 -0
- package/dist/RendererFeatureGates.js.map +1 -0
- package/dist/RendererPostprocessPlan.d.ts +59 -0
- package/dist/RendererPostprocessPlan.d.ts.map +1 -0
- package/dist/RendererPostprocessPlan.js +155 -0
- package/dist/RendererPostprocessPlan.js.map +1 -0
- package/dist/RendererTiming.d.ts +53 -0
- package/dist/RendererTiming.d.ts.map +1 -0
- package/dist/RendererTiming.js +186 -0
- package/dist/RendererTiming.js.map +1 -0
- package/dist/RendererVisualPipelineReport.d.ts +224 -0
- package/dist/RendererVisualPipelineReport.d.ts.map +1 -0
- package/dist/RendererVisualPipelineReport.js +499 -0
- package/dist/RendererVisualPipelineReport.js.map +1 -0
- package/dist/ResourceLifecycle.d.ts +8 -0
- package/dist/ResourceLifecycle.d.ts.map +1 -0
- package/dist/ResourceLifecycle.js +18 -0
- package/dist/ResourceLifecycle.js.map +1 -0
- package/dist/Sampler.d.ts +20 -0
- package/dist/Sampler.d.ts.map +1 -0
- package/dist/Sampler.js +19 -0
- package/dist/Sampler.js.map +1 -0
- package/dist/SceneOptimization.d.ts +127 -0
- package/dist/SceneOptimization.d.ts.map +1 -0
- package/dist/SceneOptimization.js +342 -0
- package/dist/SceneOptimization.js.map +1 -0
- package/dist/ShaderChunks.d.ts +8 -0
- package/dist/ShaderChunks.d.ts.map +1 -0
- package/dist/ShaderChunks.js +386 -0
- package/dist/ShaderChunks.js.map +1 -0
- package/dist/ShaderLibrary.d.ts +63 -0
- package/dist/ShaderLibrary.d.ts.map +1 -0
- package/dist/ShaderLibrary.js +2707 -0
- package/dist/ShaderLibrary.js.map +1 -0
- package/dist/ShaderModule.d.ts +14 -0
- package/dist/ShaderModule.d.ts.map +1 -0
- package/dist/ShaderModule.js +33 -0
- package/dist/ShaderModule.js.map +1 -0
- package/dist/ShaderPreprocessor.d.ts +19 -0
- package/dist/ShaderPreprocessor.d.ts.map +1 -0
- package/dist/ShaderPreprocessor.js +212 -0
- package/dist/ShaderPreprocessor.js.map +1 -0
- package/dist/ShaderReflection.d.ts +23 -0
- package/dist/ShaderReflection.d.ts.map +1 -0
- package/dist/ShaderReflection.js +134 -0
- package/dist/ShaderReflection.js.map +1 -0
- package/dist/ShadowMap.d.ts +58 -0
- package/dist/ShadowMap.d.ts.map +1 -0
- package/dist/ShadowMap.js +183 -0
- package/dist/ShadowMap.js.map +1 -0
- package/dist/ShadowPass.d.ts +44 -0
- package/dist/ShadowPass.d.ts.map +1 -0
- package/dist/ShadowPass.js +162 -0
- package/dist/ShadowPass.js.map +1 -0
- package/dist/ShadowProjection.d.ts +15 -0
- package/dist/ShadowProjection.d.ts.map +1 -0
- package/dist/ShadowProjection.js +90 -0
- package/dist/ShadowProjection.js.map +1 -0
- package/dist/SkinnedLitMaterial.d.ts +63 -0
- package/dist/SkinnedLitMaterial.d.ts.map +1 -0
- package/dist/SkinnedLitMaterial.js +296 -0
- package/dist/SkinnedLitMaterial.js.map +1 -0
- package/dist/SkinnedUnlitMaterial.d.ts +13 -0
- package/dist/SkinnedUnlitMaterial.d.ts.map +1 -0
- package/dist/SkinnedUnlitMaterial.js +52 -0
- package/dist/SkinnedUnlitMaterial.js.map +1 -0
- package/dist/SkinningBounds.d.ts +10 -0
- package/dist/SkinningBounds.d.ts.map +1 -0
- package/dist/SkinningBounds.js +107 -0
- package/dist/SkinningBounds.js.map +1 -0
- package/dist/SpaceEnvironmentFixtures.d.ts +59 -0
- package/dist/SpaceEnvironmentFixtures.d.ts.map +1 -0
- package/dist/SpaceEnvironmentFixtures.js +132 -0
- package/dist/SpaceEnvironmentFixtures.js.map +1 -0
- package/dist/SpriteGeometry.d.ts +3 -0
- package/dist/SpriteGeometry.d.ts.map +1 -0
- package/dist/SpriteGeometry.js +21 -0
- package/dist/SpriteGeometry.js.map +1 -0
- package/dist/StereoCameraRig.d.ts +34 -0
- package/dist/StereoCameraRig.d.ts.map +1 -0
- package/dist/StereoCameraRig.js +79 -0
- package/dist/StereoCameraRig.js.map +1 -0
- package/dist/StereoEffects.d.ts +90 -0
- package/dist/StereoEffects.d.ts.map +1 -0
- package/dist/StereoEffects.js +171 -0
- package/dist/StereoEffects.js.map +1 -0
- package/dist/TerrainFixtures.d.ts +36 -0
- package/dist/TerrainFixtures.d.ts.map +1 -0
- package/dist/TerrainFixtures.js +143 -0
- package/dist/TerrainFixtures.js.map +1 -0
- package/dist/Texture.d.ts +64 -0
- package/dist/Texture.d.ts.map +1 -0
- package/dist/Texture.js +257 -0
- package/dist/Texture.js.map +1 -0
- package/dist/TextureBinding.d.ts +38 -0
- package/dist/TextureBinding.d.ts.map +1 -0
- package/dist/TextureBinding.js +66 -0
- package/dist/TextureBinding.js.map +1 -0
- package/dist/TexturedPBRMaterial.d.ts +206 -0
- package/dist/TexturedPBRMaterial.d.ts.map +1 -0
- package/dist/TexturedPBRMaterial.js +842 -0
- package/dist/TexturedPBRMaterial.js.map +1 -0
- package/dist/TexturedUnlitMaterial.d.ts +19 -0
- package/dist/TexturedUnlitMaterial.d.ts.map +1 -0
- package/dist/TexturedUnlitMaterial.js +52 -0
- package/dist/TexturedUnlitMaterial.js.map +1 -0
- package/dist/ToneMapping.d.ts +19 -0
- package/dist/ToneMapping.d.ts.map +1 -0
- package/dist/ToneMapping.js +53 -0
- package/dist/ToneMapping.js.map +1 -0
- package/dist/UniformBinder.d.ts +7 -0
- package/dist/UniformBinder.d.ts.map +1 -0
- package/dist/UniformBinder.js +14 -0
- package/dist/UniformBinder.js.map +1 -0
- package/dist/UniformLayout.d.ts +19 -0
- package/dist/UniformLayout.d.ts.map +1 -0
- package/dist/UniformLayout.js +107 -0
- package/dist/UniformLayout.js.map +1 -0
- package/dist/UnlitMaterial.d.ts +16 -0
- package/dist/UnlitMaterial.d.ts.map +1 -0
- package/dist/UnlitMaterial.js +60 -0
- package/dist/UnlitMaterial.js.map +1 -0
- package/dist/VegetationFixtures.d.ts +68 -0
- package/dist/VegetationFixtures.d.ts.map +1 -0
- package/dist/VegetationFixtures.js +241 -0
- package/dist/VegetationFixtures.js.map +1 -0
- package/dist/VertexBuffer.d.ts +29 -0
- package/dist/VertexBuffer.d.ts.map +1 -0
- package/dist/VertexBuffer.js +106 -0
- package/dist/VertexBuffer.js.map +1 -0
- package/dist/VertexFormat.d.ts +36 -0
- package/dist/VertexFormat.d.ts.map +1 -0
- package/dist/VertexFormat.js +127 -0
- package/dist/VertexFormat.js.map +1 -0
- package/dist/VoxelWorldFixtures.d.ts +54 -0
- package/dist/VoxelWorldFixtures.d.ts.map +1 -0
- package/dist/VoxelWorldFixtures.js +186 -0
- package/dist/VoxelWorldFixtures.js.map +1 -0
- package/dist/WeatherFixtures.d.ts +46 -0
- package/dist/WeatherFixtures.d.ts.map +1 -0
- package/dist/WeatherFixtures.js +142 -0
- package/dist/WeatherFixtures.js.map +1 -0
- package/dist/WebGL2Device.d.ts +137 -0
- package/dist/WebGL2Device.d.ts.map +1 -0
- package/dist/WebGL2Device.js +2107 -0
- package/dist/WebGL2Device.js.map +1 -0
- package/dist/WebGL2StateCache.d.ts +89 -0
- package/dist/WebGL2StateCache.d.ts.map +1 -0
- package/dist/WebGL2StateCache.js +265 -0
- package/dist/WebGL2StateCache.js.map +1 -0
- package/dist/WebGPUDevice.d.ts +287 -0
- package/dist/WebGPUDevice.d.ts.map +1 -0
- package/dist/WebGPUDevice.js +2403 -0
- package/dist/WebGPUDevice.js.map +1 -0
- package/dist/WebGPURenderToTextureProof.d.ts +29 -0
- package/dist/WebGPURenderToTextureProof.d.ts.map +1 -0
- package/dist/WebGPURenderToTextureProof.js +96 -0
- package/dist/WebGPURenderToTextureProof.js.map +1 -0
- package/dist/advanced-runtime/AdvancedRenderer.d.ts +23 -0
- package/dist/advanced-runtime/AdvancedRenderer.d.ts.map +1 -0
- package/dist/advanced-runtime/AdvancedRenderer.js +45 -0
- package/dist/advanced-runtime/AdvancedRenderer.js.map +1 -0
- package/dist/advanced-runtime/index.d.ts +10 -0
- package/dist/advanced-runtime/index.d.ts.map +1 -0
- package/dist/advanced-runtime/index.js +9 -0
- package/dist/advanced-runtime/index.js.map +1 -0
- package/dist/cinematic/BloomPass.d.ts +10 -0
- package/dist/cinematic/BloomPass.d.ts.map +1 -0
- package/dist/cinematic/BloomPass.js +18 -0
- package/dist/cinematic/BloomPass.js.map +1 -0
- package/dist/cinematic/CinematicDepthComposition.d.ts +12 -0
- package/dist/cinematic/CinematicDepthComposition.d.ts.map +1 -0
- package/dist/cinematic/CinematicDepthComposition.js +22 -0
- package/dist/cinematic/CinematicDepthComposition.js.map +1 -0
- package/dist/cinematic/CinematicEvidence.d.ts +43 -0
- package/dist/cinematic/CinematicEvidence.d.ts.map +1 -0
- package/dist/cinematic/CinematicEvidence.js +55 -0
- package/dist/cinematic/CinematicEvidence.js.map +1 -0
- package/dist/cinematic/CinematicLightingRig.d.ts +32 -0
- package/dist/cinematic/CinematicLightingRig.d.ts.map +1 -0
- package/dist/cinematic/CinematicLightingRig.js +90 -0
- package/dist/cinematic/CinematicLightingRig.js.map +1 -0
- package/dist/cinematic/CinematicMaterialPresets.d.ts +16 -0
- package/dist/cinematic/CinematicMaterialPresets.d.ts.map +1 -0
- package/dist/cinematic/CinematicMaterialPresets.js +114 -0
- package/dist/cinematic/CinematicMaterialPresets.js.map +1 -0
- package/dist/cinematic/CinematicPostProcess.d.ts +25 -0
- package/dist/cinematic/CinematicPostProcess.d.ts.map +1 -0
- package/dist/cinematic/CinematicPostProcess.js +64 -0
- package/dist/cinematic/CinematicPostProcess.js.map +1 -0
- package/dist/cinematic/DepthHazePass.d.ts +12 -0
- package/dist/cinematic/DepthHazePass.d.ts.map +1 -0
- package/dist/cinematic/DepthHazePass.js +20 -0
- package/dist/cinematic/DepthHazePass.js.map +1 -0
- package/dist/cinematic/EmissivePracticalLightSystem.d.ts +18 -0
- package/dist/cinematic/EmissivePracticalLightSystem.d.ts.map +1 -0
- package/dist/cinematic/EmissivePracticalLightSystem.js +25 -0
- package/dist/cinematic/EmissivePracticalLightSystem.js.map +1 -0
- package/dist/cinematic/FilmGrainPass.d.ts +9 -0
- package/dist/cinematic/FilmGrainPass.d.ts.map +1 -0
- package/dist/cinematic/FilmGrainPass.js +17 -0
- package/dist/cinematic/FilmGrainPass.js.map +1 -0
- package/dist/cinematic/FogVolumeSystem.d.ts +12 -0
- package/dist/cinematic/FogVolumeSystem.d.ts.map +1 -0
- package/dist/cinematic/FogVolumeSystem.js +20 -0
- package/dist/cinematic/FogVolumeSystem.js.map +1 -0
- package/dist/cinematic/GlowCardSystem.d.ts +17 -0
- package/dist/cinematic/GlowCardSystem.d.ts.map +1 -0
- package/dist/cinematic/GlowCardSystem.js +28 -0
- package/dist/cinematic/GlowCardSystem.js.map +1 -0
- package/dist/cinematic/RainParticleSystem.d.ts +22 -0
- package/dist/cinematic/RainParticleSystem.d.ts.map +1 -0
- package/dist/cinematic/RainParticleSystem.js +114 -0
- package/dist/cinematic/RainParticleSystem.js.map +1 -0
- package/dist/cinematic/VignettePass.d.ts +10 -0
- package/dist/cinematic/VignettePass.d.ts.map +1 -0
- package/dist/cinematic/VignettePass.js +17 -0
- package/dist/cinematic/VignettePass.js.map +1 -0
- package/dist/cinematic/WetReflectionApproximation.d.ts +13 -0
- package/dist/cinematic/WetReflectionApproximation.d.ts.map +1 -0
- package/dist/cinematic/WetReflectionApproximation.js +18 -0
- package/dist/cinematic/WetReflectionApproximation.js.map +1 -0
- package/dist/cinematic/index.d.ts +15 -0
- package/dist/cinematic/index.d.ts.map +1 -0
- package/dist/cinematic/index.js +15 -0
- package/dist/cinematic/index.js.map +1 -0
- package/dist/effects/CollisionModule.d.ts +15 -0
- package/dist/effects/CollisionModule.d.ts.map +1 -0
- package/dist/effects/CollisionModule.js +46 -0
- package/dist/effects/CollisionModule.js.map +1 -0
- package/dist/effects/ColorModule.d.ts +15 -0
- package/dist/effects/ColorModule.d.ts.map +1 -0
- package/dist/effects/ColorModule.js +45 -0
- package/dist/effects/ColorModule.js.map +1 -0
- package/dist/effects/ForceModule.d.ts +11 -0
- package/dist/effects/ForceModule.d.ts.map +1 -0
- package/dist/effects/ForceModule.js +17 -0
- package/dist/effects/ForceModule.js.map +1 -0
- package/dist/effects/GPUParticleBackend.d.ts +153 -0
- package/dist/effects/GPUParticleBackend.d.ts.map +1 -0
- package/dist/effects/GPUParticleBackend.js +397 -0
- package/dist/effects/GPUParticleBackend.js.map +1 -0
- package/dist/effects/Particle.d.ts +49 -0
- package/dist/effects/Particle.d.ts.map +1 -0
- package/dist/effects/Particle.js +56 -0
- package/dist/effects/Particle.js.map +1 -0
- package/dist/effects/ParticleDiagnostics.d.ts +58 -0
- package/dist/effects/ParticleDiagnostics.d.ts.map +1 -0
- package/dist/effects/ParticleDiagnostics.js +145 -0
- package/dist/effects/ParticleDiagnostics.js.map +1 -0
- package/dist/effects/ParticleEffectPresets.d.ts +8 -0
- package/dist/effects/ParticleEffectPresets.d.ts.map +1 -0
- package/dist/effects/ParticleEffectPresets.js +137 -0
- package/dist/effects/ParticleEffectPresets.js.map +1 -0
- package/dist/effects/ParticleEmitter.d.ts +87 -0
- package/dist/effects/ParticleEmitter.d.ts.map +1 -0
- package/dist/effects/ParticleEmitter.js +254 -0
- package/dist/effects/ParticleEmitter.js.map +1 -0
- package/dist/effects/ParticleModule.d.ts +15 -0
- package/dist/effects/ParticleModule.d.ts.map +1 -0
- package/dist/effects/ParticleModule.js +6 -0
- package/dist/effects/ParticleModule.js.map +1 -0
- package/dist/effects/ParticleRenderPass.d.ts +35 -0
- package/dist/effects/ParticleRenderPass.d.ts.map +1 -0
- package/dist/effects/ParticleRenderPass.js +91 -0
- package/dist/effects/ParticleRenderPass.js.map +1 -0
- package/dist/effects/ParticleRenderer.d.ts +34 -0
- package/dist/effects/ParticleRenderer.d.ts.map +1 -0
- package/dist/effects/ParticleRenderer.js +93 -0
- package/dist/effects/ParticleRenderer.js.map +1 -0
- package/dist/effects/ParticleSystem.d.ts +51 -0
- package/dist/effects/ParticleSystem.d.ts.map +1 -0
- package/dist/effects/ParticleSystem.js +261 -0
- package/dist/effects/ParticleSystem.js.map +1 -0
- package/dist/effects/SizeModule.d.ts +14 -0
- package/dist/effects/SizeModule.d.ts.map +1 -0
- package/dist/effects/SizeModule.js +42 -0
- package/dist/effects/SizeModule.js.map +1 -0
- package/dist/effects/TrailModule.d.ts +22 -0
- package/dist/effects/TrailModule.d.ts.map +1 -0
- package/dist/effects/TrailModule.js +50 -0
- package/dist/effects/TrailModule.js.map +1 -0
- package/dist/effects/VelocityModule.d.ts +15 -0
- package/dist/effects/VelocityModule.d.ts.map +1 -0
- package/dist/effects/VelocityModule.js +57 -0
- package/dist/effects/VelocityModule.js.map +1 -0
- package/dist/effects/index.d.ts +16 -0
- package/dist/effects/index.d.ts.map +1 -0
- package/dist/effects/index.js +16 -0
- package/dist/effects/index.js.map +1 -0
- package/dist/index.d.ts +260 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +155 -0
- package/dist/index.js.map +1 -0
- package/dist/materials/AlphaSorting.d.ts +8 -0
- package/dist/materials/AlphaSorting.d.ts.map +1 -0
- package/dist/materials/AlphaSorting.js +26 -0
- package/dist/materials/AlphaSorting.js.map +1 -0
- package/dist/materials/MaterialExtensions.d.ts +10 -0
- package/dist/materials/MaterialExtensions.d.ts.map +1 -0
- package/dist/materials/MaterialExtensions.js +20 -0
- package/dist/materials/MaterialExtensions.js.map +1 -0
- package/dist/materials/PhysicalMaterial.d.ts +36 -0
- package/dist/materials/PhysicalMaterial.d.ts.map +1 -0
- package/dist/materials/PhysicalMaterial.js +79 -0
- package/dist/materials/PhysicalMaterial.js.map +1 -0
- package/dist/materials/TransmissionPass.d.ts +16 -0
- package/dist/materials/TransmissionPass.d.ts.map +1 -0
- package/dist/materials/TransmissionPass.js +30 -0
- package/dist/materials/TransmissionPass.js.map +1 -0
- package/dist/performance/BVH.d.ts +3 -0
- package/dist/performance/BVH.d.ts.map +1 -0
- package/dist/performance/BVH.js +2 -0
- package/dist/performance/BVH.js.map +1 -0
- package/dist/performance/Batcher.d.ts +3 -0
- package/dist/performance/Batcher.d.ts.map +1 -0
- package/dist/performance/Batcher.js +2 -0
- package/dist/performance/Batcher.js.map +1 -0
- package/dist/performance/FrustumCuller.d.ts +3 -0
- package/dist/performance/FrustumCuller.d.ts.map +1 -0
- package/dist/performance/FrustumCuller.js +5 -0
- package/dist/performance/FrustumCuller.js.map +1 -0
- package/dist/performance/LOD.d.ts +8 -0
- package/dist/performance/LOD.d.ts.map +1 -0
- package/dist/performance/LOD.js +15 -0
- package/dist/performance/LOD.js.map +1 -0
- package/dist/performance/Octree.d.ts +7 -0
- package/dist/performance/Octree.d.ts.map +1 -0
- package/dist/performance/Octree.js +4 -0
- package/dist/performance/Octree.js.map +1 -0
- package/dist/performance/RenderItemSorting.d.ts +43 -0
- package/dist/performance/RenderItemSorting.d.ts.map +1 -0
- package/dist/performance/RenderItemSorting.js +111 -0
- package/dist/performance/RenderItemSorting.js.map +1 -0
- package/dist/performance/RendererStats.d.ts +23 -0
- package/dist/performance/RendererStats.d.ts.map +1 -0
- package/dist/performance/RendererStats.js +23 -0
- package/dist/performance/RendererStats.js.map +1 -0
- package/dist/performance/ResourceBudget.d.ts +19 -0
- package/dist/performance/ResourceBudget.d.ts.map +1 -0
- package/dist/performance/ResourceBudget.js +21 -0
- package/dist/performance/ResourceBudget.js.map +1 -0
- package/dist/postprocess/BloomPass.d.ts +11 -0
- package/dist/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/postprocess/BloomPass.js +14 -0
- package/dist/postprocess/BloomPass.js.map +1 -0
- package/dist/postprocess/CinematicDiagnostics.d.ts +112 -0
- package/dist/postprocess/CinematicDiagnostics.d.ts.map +1 -0
- package/dist/postprocess/CinematicDiagnostics.js +492 -0
- package/dist/postprocess/CinematicDiagnostics.js.map +1 -0
- package/dist/postprocess/ColorGradingPass.d.ts +4 -0
- package/dist/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/postprocess/ColorGradingPass.js +15 -0
- package/dist/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/postprocess/DepthOfFieldPass.d.ts +3 -0
- package/dist/postprocess/DepthOfFieldPass.d.ts.map +1 -0
- package/dist/postprocess/DepthOfFieldPass.js +7 -0
- package/dist/postprocess/DepthOfFieldPass.js.map +1 -0
- package/dist/postprocess/EffectComposer.d.ts +110 -0
- package/dist/postprocess/EffectComposer.d.ts.map +1 -0
- package/dist/postprocess/EffectComposer.js +249 -0
- package/dist/postprocess/EffectComposer.js.map +1 -0
- package/dist/postprocess/SSAOPass.d.ts +6 -0
- package/dist/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/postprocess/SSAOPass.js +18 -0
- package/dist/postprocess/SSAOPass.js.map +1 -0
- package/dist/postprocess/index.d.ts +11 -0
- package/dist/postprocess/index.d.ts.map +1 -0
- package/dist/postprocess/index.js +7 -0
- package/dist/postprocess/index.js.map +1 -0
- package/dist/production-runtime/AnimationControlsPipeline.d.ts +37 -0
- package/dist/production-runtime/AnimationControlsPipeline.d.ts.map +1 -0
- package/dist/production-runtime/AnimationControlsPipeline.js +41 -0
- package/dist/production-runtime/AnimationControlsPipeline.js.map +1 -0
- package/dist/production-runtime/PBRHDRPipeline.d.ts +81 -0
- package/dist/production-runtime/PBRHDRPipeline.d.ts.map +1 -0
- package/dist/production-runtime/PBRHDRPipeline.js +279 -0
- package/dist/production-runtime/PBRHDRPipeline.js.map +1 -0
- package/dist/production-runtime/ProductionEffectsPipeline.d.ts +20 -0
- package/dist/production-runtime/ProductionEffectsPipeline.d.ts.map +1 -0
- package/dist/production-runtime/ProductionEffectsPipeline.js +65 -0
- package/dist/production-runtime/ProductionEffectsPipeline.js.map +1 -0
- package/dist/production-runtime/ProductionRendererTypes.d.ts +97 -0
- package/dist/production-runtime/ProductionRendererTypes.d.ts.map +1 -0
- package/dist/production-runtime/ProductionRendererTypes.js +29 -0
- package/dist/production-runtime/ProductionRendererTypes.js.map +1 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.d.ts +36 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.d.ts.map +1 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.js +124 -0
- package/dist/production-runtime/ProductionRuntimeRenderer.js.map +1 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.d.ts +51 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.d.ts.map +1 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.js +269 -0
- package/dist/production-runtime/ProductionWebGL2Renderer.js.map +1 -0
- package/dist/production-runtime/ProductionWebGPURenderer.d.ts +69 -0
- package/dist/production-runtime/ProductionWebGPURenderer.d.ts.map +1 -0
- package/dist/production-runtime/ProductionWebGPURenderer.js +313 -0
- package/dist/production-runtime/ProductionWebGPURenderer.js.map +1 -0
- package/dist/production-runtime/TransmissionBackdropCapture.d.ts +11 -0
- package/dist/production-runtime/TransmissionBackdropCapture.d.ts.map +1 -0
- package/dist/production-runtime/TransmissionBackdropCapture.js +119 -0
- package/dist/production-runtime/TransmissionBackdropCapture.js.map +1 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.d.ts +7 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.d.ts.map +1 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.js +2 -0
- package/dist/production-runtime/animation/MorphTargetRenderer.js.map +1 -0
- package/dist/production-runtime/animation/SkinningRenderer.d.ts +7 -0
- package/dist/production-runtime/animation/SkinningRenderer.d.ts.map +1 -0
- package/dist/production-runtime/animation/SkinningRenderer.js +2 -0
- package/dist/production-runtime/animation/SkinningRenderer.js.map +1 -0
- package/dist/production-runtime/backends/RendererBackend.d.ts +16 -0
- package/dist/production-runtime/backends/RendererBackend.d.ts.map +1 -0
- package/dist/production-runtime/backends/RendererBackend.js +2 -0
- package/dist/production-runtime/backends/RendererBackend.js.map +1 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.d.ts +15 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.d.ts.map +1 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.js +25 -0
- package/dist/production-runtime/backends/WebGL2RendererBackend.js.map +1 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.d.ts +20 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.d.ts.map +1 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.js +19 -0
- package/dist/production-runtime/backends/WebGPURendererBackend.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Buffer.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Capabilities.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2RenderTarget.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Shader.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.d.ts +2 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.js +2 -0
- package/dist/production-runtime/backends/webgl2/WebGL2StateCache.js.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.d.ts +11 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.js +8 -0
- package/dist/production-runtime/backends/webgl2/WebGL2Texture.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUBuffer.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUCapabilities.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPURenderTarget.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUShader.js.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.d.ts +11 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.d.ts.map +1 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.js +8 -0
- package/dist/production-runtime/backends/webgpu/WebGPUTexture.js.map +1 -0
- package/dist/production-runtime/color/ColorManagement.d.ts +4 -0
- package/dist/production-runtime/color/ColorManagement.d.ts.map +1 -0
- package/dist/production-runtime/color/ColorManagement.js +3 -0
- package/dist/production-runtime/color/ColorManagement.js.map +1 -0
- package/dist/production-runtime/color/ToneMapping.d.ts +3 -0
- package/dist/production-runtime/color/ToneMapping.d.ts.map +1 -0
- package/dist/production-runtime/color/ToneMapping.js +9 -0
- package/dist/production-runtime/color/ToneMapping.js.map +1 -0
- package/dist/production-runtime/diagnostics/FrameCapture.d.ts +7 -0
- package/dist/production-runtime/diagnostics/FrameCapture.d.ts.map +1 -0
- package/dist/production-runtime/diagnostics/FrameCapture.js +2 -0
- package/dist/production-runtime/diagnostics/FrameCapture.js.map +1 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.d.ts +9 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.d.ts.map +1 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.js +2 -0
- package/dist/production-runtime/diagnostics/GPUCapabilities.js.map +1 -0
- package/dist/production-runtime/diagnostics/RendererStats.d.ts +9 -0
- package/dist/production-runtime/diagnostics/RendererStats.d.ts.map +1 -0
- package/dist/production-runtime/diagnostics/RendererStats.js +2 -0
- package/dist/production-runtime/diagnostics/RendererStats.js.map +1 -0
- package/dist/production-runtime/environment/EnvironmentMap.d.ts +8 -0
- package/dist/production-runtime/environment/EnvironmentMap.d.ts.map +1 -0
- package/dist/production-runtime/environment/EnvironmentMap.js +2 -0
- package/dist/production-runtime/environment/EnvironmentMap.js.map +1 -0
- package/dist/production-runtime/environment/HDRLoader.d.ts +19 -0
- package/dist/production-runtime/environment/HDRLoader.d.ts.map +1 -0
- package/dist/production-runtime/environment/HDRLoader.js +22 -0
- package/dist/production-runtime/environment/HDRLoader.js.map +1 -0
- package/dist/production-runtime/environment/PMREMGenerator.d.ts +99 -0
- package/dist/production-runtime/environment/PMREMGenerator.d.ts.map +1 -0
- package/dist/production-runtime/environment/PMREMGenerator.js +534 -0
- package/dist/production-runtime/environment/PMREMGenerator.js.map +1 -0
- package/dist/production-runtime/framegraph/FrameGraph.d.ts +8 -0
- package/dist/production-runtime/framegraph/FrameGraph.d.ts.map +1 -0
- package/dist/production-runtime/framegraph/FrameGraph.js +14 -0
- package/dist/production-runtime/framegraph/FrameGraph.js.map +1 -0
- package/dist/production-runtime/framegraph/RenderPass.d.ts +14 -0
- package/dist/production-runtime/framegraph/RenderPass.d.ts.map +1 -0
- package/dist/production-runtime/framegraph/RenderPass.js +2 -0
- package/dist/production-runtime/framegraph/RenderPass.js.map +1 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.d.ts +53 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.d.ts.map +1 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.js +340 -0
- package/dist/production-runtime/geometry/ProjectedDecalGeometry.js.map +1 -0
- package/dist/production-runtime/index.d.ts +73 -0
- package/dist/production-runtime/index.d.ts.map +1 -0
- package/dist/production-runtime/index.js +67 -0
- package/dist/production-runtime/index.js.map +1 -0
- package/dist/production-runtime/lights/LightManager.d.ts +8 -0
- package/dist/production-runtime/lights/LightManager.d.ts.map +1 -0
- package/dist/production-runtime/lights/LightManager.js +7 -0
- package/dist/production-runtime/lights/LightManager.js.map +1 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.d.ts +8 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.d.ts.map +1 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.js +4 -0
- package/dist/production-runtime/lights/ShadowMapRenderer.js.map +1 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.d.ts +14 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.d.ts.map +1 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.js +5 -0
- package/dist/production-runtime/materials/GLTFMaterialAdapter.js.map +1 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts +3 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.d.ts.map +1 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.js +2 -0
- package/dist/production-runtime/materials/GLTFPBRMaterialAdapter.js.map +1 -0
- package/dist/production-runtime/materials/MaterialCompiler.d.ts +9 -0
- package/dist/production-runtime/materials/MaterialCompiler.d.ts.map +1 -0
- package/dist/production-runtime/materials/MaterialCompiler.js +5 -0
- package/dist/production-runtime/materials/MaterialCompiler.js.map +1 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.d.ts +8 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.d.ts.map +1 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.js +4 -0
- package/dist/production-runtime/materials/MaterialTextureBindings.js.map +1 -0
- package/dist/production-runtime/materials/PBRMaterial.d.ts +23 -0
- package/dist/production-runtime/materials/PBRMaterial.d.ts.map +1 -0
- package/dist/production-runtime/materials/PBRMaterial.js +2 -0
- package/dist/production-runtime/materials/PBRMaterial.js.map +1 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.d.ts +13 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.d.ts.map +1 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.js +2 -0
- package/dist/production-runtime/materials/PBRShaderFeatures.js.map +1 -0
- package/dist/production-runtime/passes/ContactShadowPass.d.ts +40 -0
- package/dist/production-runtime/passes/ContactShadowPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/ContactShadowPass.js +126 -0
- package/dist/production-runtime/passes/ContactShadowPass.js.map +1 -0
- package/dist/production-runtime/passes/DepthPrepass.d.ts +8 -0
- package/dist/production-runtime/passes/DepthPrepass.d.ts.map +1 -0
- package/dist/production-runtime/passes/DepthPrepass.js +7 -0
- package/dist/production-runtime/passes/DepthPrepass.js.map +1 -0
- package/dist/production-runtime/passes/OpaquePass.d.ts +8 -0
- package/dist/production-runtime/passes/OpaquePass.d.ts.map +1 -0
- package/dist/production-runtime/passes/OpaquePass.js +7 -0
- package/dist/production-runtime/passes/OpaquePass.js.map +1 -0
- package/dist/production-runtime/passes/ShadowPass.d.ts +8 -0
- package/dist/production-runtime/passes/ShadowPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/ShadowPass.js +7 -0
- package/dist/production-runtime/passes/ShadowPass.js.map +1 -0
- package/dist/production-runtime/passes/SkyboxPass.d.ts +8 -0
- package/dist/production-runtime/passes/SkyboxPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/SkyboxPass.js +7 -0
- package/dist/production-runtime/passes/SkyboxPass.js.map +1 -0
- package/dist/production-runtime/passes/ToneMappingPass.d.ts +8 -0
- package/dist/production-runtime/passes/ToneMappingPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/ToneMappingPass.js +7 -0
- package/dist/production-runtime/passes/ToneMappingPass.js.map +1 -0
- package/dist/production-runtime/passes/TransparentPass.d.ts +8 -0
- package/dist/production-runtime/passes/TransparentPass.d.ts.map +1 -0
- package/dist/production-runtime/passes/TransparentPass.js +7 -0
- package/dist/production-runtime/passes/TransparentPass.js.map +1 -0
- package/dist/production-runtime/postprocess/BloomPass.d.ts +15 -0
- package/dist/production-runtime/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/BloomPass.js +37 -0
- package/dist/production-runtime/postprocess/BloomPass.js.map +1 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.d.ts +16 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.js +34 -0
- package/dist/production-runtime/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/production-runtime/postprocess/DOFPass.d.ts +16 -0
- package/dist/production-runtime/postprocess/DOFPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/DOFPass.js +31 -0
- package/dist/production-runtime/postprocess/DOFPass.js.map +1 -0
- package/dist/production-runtime/postprocess/FXAAPass.d.ts +16 -0
- package/dist/production-runtime/postprocess/FXAAPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/FXAAPass.js +39 -0
- package/dist/production-runtime/postprocess/FXAAPass.js.map +1 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.d.ts +21 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.js +53 -0
- package/dist/production-runtime/postprocess/ProductionEffectComposer.js.map +1 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.d.ts +37 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.js +124 -0
- package/dist/production-runtime/postprocess/ProductionPostProcessTypes.js.map +1 -0
- package/dist/production-runtime/postprocess/SSAOPass.d.ts +15 -0
- package/dist/production-runtime/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/production-runtime/postprocess/SSAOPass.js +30 -0
- package/dist/production-runtime/postprocess/SSAOPass.js.map +1 -0
- package/dist/production-runtime/resources/GPUBuffer.d.ts +10 -0
- package/dist/production-runtime/resources/GPUBuffer.d.ts.map +1 -0
- package/dist/production-runtime/resources/GPUBuffer.js +7 -0
- package/dist/production-runtime/resources/GPUBuffer.js.map +1 -0
- package/dist/production-runtime/resources/GPUTexture.d.ts +12 -0
- package/dist/production-runtime/resources/GPUTexture.d.ts.map +1 -0
- package/dist/production-runtime/resources/GPUTexture.js +7 -0
- package/dist/production-runtime/resources/GPUTexture.js.map +1 -0
- package/dist/production-runtime/resources/RenderTarget.d.ts +11 -0
- package/dist/production-runtime/resources/RenderTarget.d.ts.map +1 -0
- package/dist/production-runtime/resources/RenderTarget.js +7 -0
- package/dist/production-runtime/resources/RenderTarget.js.map +1 -0
- package/dist/production-runtime/resources/ResourceCache.d.ts +8 -0
- package/dist/production-runtime/resources/ResourceCache.d.ts.map +1 -0
- package/dist/production-runtime/resources/ResourceCache.js +8 -0
- package/dist/production-runtime/resources/ResourceCache.js.map +1 -0
- package/dist/production-runtime/scene/Camera.d.ts +8 -0
- package/dist/production-runtime/scene/Camera.d.ts.map +1 -0
- package/dist/production-runtime/scene/Camera.js +2 -0
- package/dist/production-runtime/scene/Camera.js.map +1 -0
- package/dist/production-runtime/scene/Lights.d.ts +9 -0
- package/dist/production-runtime/scene/Lights.d.ts.map +1 -0
- package/dist/production-runtime/scene/Lights.js +2 -0
- package/dist/production-runtime/scene/Lights.js.map +1 -0
- package/dist/production-runtime/scene/RenderableMesh.d.ts +8 -0
- package/dist/production-runtime/scene/RenderableMesh.d.ts.map +1 -0
- package/dist/production-runtime/scene/RenderableMesh.js +2 -0
- package/dist/production-runtime/scene/RenderableMesh.js.map +1 -0
- package/dist/production-runtime/scene/RenderablePrimitive.d.ts +8 -0
- package/dist/production-runtime/scene/RenderablePrimitive.d.ts.map +1 -0
- package/dist/production-runtime/scene/RenderablePrimitive.js +2 -0
- package/dist/production-runtime/scene/RenderablePrimitive.js.map +1 -0
- package/dist/production-runtime/scene/RenderableScene.d.ts +11 -0
- package/dist/production-runtime/scene/RenderableScene.d.ts.map +1 -0
- package/dist/production-runtime/scene/RenderableScene.js +2 -0
- package/dist/production-runtime/scene/RenderableScene.js.map +1 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.d.ts +12 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.d.ts.map +1 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.js +7 -0
- package/dist/production-runtime/shaders/ShaderProgramLibrary.js.map +1 -0
- package/dist/shadows/CascadedShadowPipeline.d.ts +25 -0
- package/dist/shadows/CascadedShadowPipeline.d.ts.map +1 -0
- package/dist/shadows/CascadedShadowPipeline.js +31 -0
- package/dist/shadows/CascadedShadowPipeline.js.map +1 -0
- package/dist/shadows/ContactShadows.d.ts +37 -0
- package/dist/shadows/ContactShadows.d.ts.map +1 -0
- package/dist/shadows/ContactShadows.js +68 -0
- package/dist/shadows/ContactShadows.js.map +1 -0
- package/dist/shadows/ShadowDebugViews.d.ts +12 -0
- package/dist/shadows/ShadowDebugViews.d.ts.map +1 -0
- package/dist/shadows/ShadowDebugViews.js +35 -0
- package/dist/shadows/ShadowDebugViews.js.map +1 -0
- package/dist/threejs-compatibility/InstancingSystem.d.ts +10 -0
- package/dist/threejs-compatibility/InstancingSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/InstancingSystem.js +11 -0
- package/dist/threejs-compatibility/InstancingSystem.js.map +1 -0
- package/dist/threejs-compatibility/LightingSystem.d.ts +11 -0
- package/dist/threejs-compatibility/LightingSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/LightingSystem.js +14 -0
- package/dist/threejs-compatibility/LightingSystem.js.map +1 -0
- package/dist/threejs-compatibility/MaterialSystem.d.ts +6 -0
- package/dist/threejs-compatibility/MaterialSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/MaterialSystem.js +7 -0
- package/dist/threejs-compatibility/MaterialSystem.js.map +1 -0
- package/dist/threejs-compatibility/RenderTargetSystem.d.ts +16 -0
- package/dist/threejs-compatibility/RenderTargetSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/RenderTargetSystem.js +23 -0
- package/dist/threejs-compatibility/RenderTargetSystem.js.map +1 -0
- package/dist/threejs-compatibility/RendererDiagnostics.d.ts +27 -0
- package/dist/threejs-compatibility/RendererDiagnostics.d.ts.map +1 -0
- package/dist/threejs-compatibility/RendererDiagnostics.js +41 -0
- package/dist/threejs-compatibility/RendererDiagnostics.js.map +1 -0
- package/dist/threejs-compatibility/SceneRenderer.d.ts +19 -0
- package/dist/threejs-compatibility/SceneRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/SceneRenderer.js +18 -0
- package/dist/threejs-compatibility/SceneRenderer.js.map +1 -0
- package/dist/threejs-compatibility/ShadowSystem.d.ts +11 -0
- package/dist/threejs-compatibility/ShadowSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/ShadowSystem.js +12 -0
- package/dist/threejs-compatibility/ShadowSystem.js.map +1 -0
- package/dist/threejs-compatibility/TextureSystem.d.ts +9 -0
- package/dist/threejs-compatibility/TextureSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/TextureSystem.js +14 -0
- package/dist/threejs-compatibility/TextureSystem.js.map +1 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.d.ts +37 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.js +77 -0
- package/dist/threejs-compatibility/ThreeCompatRenderer.js.map +1 -0
- package/dist/threejs-compatibility/TransparencySystem.d.ts +11 -0
- package/dist/threejs-compatibility/TransparencySystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/TransparencySystem.js +12 -0
- package/dist/threejs-compatibility/TransparencySystem.js.map +1 -0
- package/dist/threejs-compatibility/index.d.ts +25 -0
- package/dist/threejs-compatibility/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/index.js +15 -0
- package/dist/threejs-compatibility/index.js.map +1 -0
- package/dist/threejs-compatibility/performance/BVH.d.ts +11 -0
- package/dist/threejs-compatibility/performance/BVH.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/BVH.js +10 -0
- package/dist/threejs-compatibility/performance/BVH.js.map +1 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.d.ts +7 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.js +5 -0
- package/dist/threejs-compatibility/performance/FrustumCulling.js.map +1 -0
- package/dist/threejs-compatibility/performance/Instancing.d.ts +7 -0
- package/dist/threejs-compatibility/performance/Instancing.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/Instancing.js +10 -0
- package/dist/threejs-compatibility/performance/Instancing.js.map +1 -0
- package/dist/threejs-compatibility/performance/LODSystem.d.ts +9 -0
- package/dist/threejs-compatibility/performance/LODSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/LODSystem.js +11 -0
- package/dist/threejs-compatibility/performance/LODSystem.js.map +1 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.d.ts +3 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.js +5 -0
- package/dist/threejs-compatibility/performance/OcclusionCulling.js.map +1 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.d.ts +8 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.js +11 -0
- package/dist/threejs-compatibility/performance/RaycastAcceleration.js.map +1 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.d.ts +11 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.js +10 -0
- package/dist/threejs-compatibility/performance/RendererProfiler.js.map +1 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.d.ts +7 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.js +10 -0
- package/dist/threejs-compatibility/performance/TextureStreaming.js.map +1 -0
- package/dist/threejs-compatibility/performance/index.d.ts +13 -0
- package/dist/threejs-compatibility/performance/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/performance/index.js +9 -0
- package/dist/threejs-compatibility/performance/index.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.js +14 -0
- package/dist/threejs-compatibility/postprocess/BloomPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.d.ts +10 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.js +16 -0
- package/dist/threejs-compatibility/postprocess/ColorGradingPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.js +19 -0
- package/dist/threejs-compatibility/postprocess/DepthOfFieldPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.js +11 -0
- package/dist/threejs-compatibility/postprocess/EffectComposer.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.js +10 -0
- package/dist/threejs-compatibility/postprocess/FXAAPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.js +18 -0
- package/dist/threejs-compatibility/postprocess/MotionBlurPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.js +19 -0
- package/dist/threejs-compatibility/postprocess/OutlinePass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.d.ts +42 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.js +123 -0
- package/dist/threejs-compatibility/postprocess/PostProcessTypes.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.js +8 -0
- package/dist/threejs-compatibility/postprocess/RenderPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.js +10 -0
- package/dist/threejs-compatibility/postprocess/SMAAPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.js +19 -0
- package/dist/threejs-compatibility/postprocess/SSAOPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.js +11 -0
- package/dist/threejs-compatibility/postprocess/ShaderPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.d.ts +7 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.js +10 -0
- package/dist/threejs-compatibility/postprocess/TAAPass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.d.ts +9 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.js +14 -0
- package/dist/threejs-compatibility/postprocess/VignettePass.js.map +1 -0
- package/dist/threejs-compatibility/postprocess/index.d.ts +16 -0
- package/dist/threejs-compatibility/postprocess/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/postprocess/index.js +15 -0
- package/dist/threejs-compatibility/postprocess/index.js.map +1 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.d.ts +14 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.js +15 -0
- package/dist/threejs-compatibility/shaders/NodeMaterial.js.map +1 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.d.ts +6 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.js +6 -0
- package/dist/threejs-compatibility/shaders/RawShaderMaterial.js.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.d.ts +7 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.js +12 -0
- package/dist/threejs-compatibility/shaders/ShaderDiagnostics.js.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.d.ts +12 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.js +20 -0
- package/dist/threejs-compatibility/shaders/ShaderMaterial.js.map +1 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts +7 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.js +7 -0
- package/dist/threejs-compatibility/shaders/ThreeCompatShaderChunks.js.map +1 -0
- package/dist/threejs-compatibility/shaders/Uniforms.d.ts +8 -0
- package/dist/threejs-compatibility/shaders/Uniforms.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/Uniforms.js +14 -0
- package/dist/threejs-compatibility/shaders/Uniforms.js.map +1 -0
- package/dist/threejs-compatibility/shaders/index.d.ts +10 -0
- package/dist/threejs-compatibility/shaders/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/shaders/index.js +7 -0
- package/dist/threejs-compatibility/shaders/index.js.map +1 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.d.ts +7 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.js +12 -0
- package/dist/threejs-compatibility/vfx/GPUPointCloud.js.map +1 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.d.ts +10 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.js +7 -0
- package/dist/threejs-compatibility/vfx/LineRenderer.js.map +1 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.d.ts +12 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.js +15 -0
- package/dist/threejs-compatibility/vfx/ParticleSystem.js.map +1 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.d.ts +11 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.js +7 -0
- package/dist/threejs-compatibility/vfx/SpriteSystem.js.map +1 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.d.ts +5 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.js +9 -0
- package/dist/threejs-compatibility/vfx/TrailRenderer.js.map +1 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.d.ts +21 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.js +12 -0
- package/dist/threejs-compatibility/vfx/VFXDiagnostics.js.map +1 -0
- package/dist/threejs-compatibility/vfx/index.d.ts +10 -0
- package/dist/threejs-compatibility/vfx/index.d.ts.map +1 -0
- package/dist/threejs-compatibility/vfx/index.js +7 -0
- package/dist/threejs-compatibility/vfx/index.js.map +1 -0
- package/dist/threejs-example-parity/index.d.ts +57 -0
- package/dist/threejs-example-parity/index.d.ts.map +1 -0
- package/dist/threejs-example-parity/index.js +139 -0
- package/dist/threejs-example-parity/index.js.map +1 -0
- package/dist/webgpu/WebGPUBuffer.d.ts +2 -0
- package/dist/webgpu/WebGPUBuffer.d.ts.map +1 -0
- package/dist/webgpu/WebGPUBuffer.js +2 -0
- package/dist/webgpu/WebGPUBuffer.js.map +1 -0
- package/dist/webgpu/WebGPUCompute.d.ts +3 -0
- package/dist/webgpu/WebGPUCompute.d.ts.map +1 -0
- package/dist/webgpu/WebGPUCompute.js +2 -0
- package/dist/webgpu/WebGPUCompute.js.map +1 -0
- package/dist/webgpu/WebGPUPipelineCache.d.ts +6 -0
- package/dist/webgpu/WebGPUPipelineCache.d.ts.map +1 -0
- package/dist/webgpu/WebGPUPipelineCache.js +15 -0
- package/dist/webgpu/WebGPUPipelineCache.js.map +1 -0
- package/dist/webgpu/WebGPUPostProcess.d.ts +3 -0
- package/dist/webgpu/WebGPUPostProcess.d.ts.map +1 -0
- package/dist/webgpu/WebGPUPostProcess.js +2 -0
- package/dist/webgpu/WebGPUPostProcess.js.map +1 -0
- package/dist/webgpu/WebGPUTexture.d.ts +3 -0
- package/dist/webgpu/WebGPUTexture.d.ts.map +1 -0
- package/dist/webgpu/WebGPUTexture.js +2 -0
- package/dist/webgpu/WebGPUTexture.js.map +1 -0
- package/package.json +18 -0
- package/src/ArchitecturalLightingFixtures.ts +241 -0
- package/src/ArchitecturalMaterialCatalog.ts +130 -0
- package/src/ArchitecturalMeasurementFixtures.ts +155 -0
- package/src/BRDFLut.ts +47 -0
- package/src/CameraFraming.ts +200 -0
- package/src/CanonicalSceneFixtures.ts +95 -0
- package/src/CascadedShadowMaps.ts +449 -0
- package/src/ColorManagement.ts +127 -0
- package/src/CullingFixtures.ts +280 -0
- package/src/DecalGeometry.ts +26 -0
- package/src/DepthPass.ts +110 -0
- package/src/EnvironmentBackgroundPass.ts +194 -0
- package/src/EnvironmentBackgroundResources.ts +309 -0
- package/src/EnvironmentLighting.ts +96 -0
- package/src/EnvironmentMapResources.ts +1026 -0
- package/src/EnvironmentPipeline.ts +69 -0
- package/src/EnvironmentPlatform.ts +1306 -0
- package/src/EnvironmentPreset.ts +155 -0
- package/src/Exposure.ts +66 -0
- package/src/ExternalParityRenderPreset.ts +725 -0
- package/src/ForwardPass.ts +1639 -0
- package/src/FrameVisualMetrics.ts +218 -0
- package/src/Geometry.ts +461 -0
- package/src/GeometryPrimitives.ts +2 -0
- package/src/HDRRenderPipeline.ts +94 -0
- package/src/IBL.ts +86 -0
- package/src/IndexBuffer.ts +57 -0
- package/src/InstancedPBRMaterial.ts +186 -0
- package/src/InstancedUnlitMaterial.ts +60 -0
- package/src/Instancing.ts +19 -0
- package/src/LightCollector.ts +82 -0
- package/src/LightUniforms.ts +47 -0
- package/src/LightingDebug.ts +80 -0
- package/src/LightingDefaults.ts +79 -0
- package/src/LightingRig.ts +301 -0
- package/src/LineGeometry.ts +2 -0
- package/src/Material.ts +209 -0
- package/src/MaterialBinding.ts +131 -0
- package/src/MaterialInstance.ts +59 -0
- package/src/MaterialPresets.ts +272 -0
- package/src/MorphTarget.ts +123 -0
- package/src/MorphUnlitMaterial.ts +54 -0
- package/src/NormalMappedPBRMaterial.ts +188 -0
- package/src/OceanFixtures.ts +318 -0
- package/src/PBRLightingDefaults.ts +12 -0
- package/src/PBRMaterial.ts +442 -0
- package/src/PMREM.ts +53 -0
- package/src/PbrReference.ts +681 -0
- package/src/PostProcessPass.ts +2507 -0
- package/src/ProceduralTextureFixtures.ts +393 -0
- package/src/ProductTurntableFixtures.ts +815 -0
- package/src/Raycaster.ts +21 -0
- package/src/ReflectionProbe.ts +13 -0
- package/src/ReflectionSurfaces.ts +219 -0
- package/src/RenderBackend.ts +43 -0
- package/src/RenderDebugViews.ts +138 -0
- package/src/RenderDevice.ts +836 -0
- package/src/RenderGraph.ts +194 -0
- package/src/RenderPass.ts +27 -0
- package/src/RenderPipeline.ts +101 -0
- package/src/RenderQueue.ts +12 -0
- package/src/RenderState.ts +12 -0
- package/src/Renderer.ts +2626 -0
- package/src/RendererDebugOverlay.ts +80 -0
- package/src/RendererFeatureGates.ts +150 -0
- package/src/RendererPostprocessPlan.ts +279 -0
- package/src/RendererTiming.ts +251 -0
- package/src/RendererVisualPipelineReport.ts +836 -0
- package/src/ResourceLifecycle.ts +21 -0
- package/src/Sampler.ts +37 -0
- package/src/SceneOptimization.ts +518 -0
- package/src/ShaderChunks.ts +393 -0
- package/src/ShaderLibrary.ts +2738 -0
- package/src/ShaderModule.ts +36 -0
- package/src/ShaderPreprocessor.ts +260 -0
- package/src/ShaderReflection.ts +201 -0
- package/src/ShadowMap.ts +237 -0
- package/src/ShadowPass.ts +198 -0
- package/src/ShadowProjection.ts +115 -0
- package/src/SkinnedLitMaterial.ts +366 -0
- package/src/SkinnedUnlitMaterial.ts +63 -0
- package/src/SkinningBounds.ts +131 -0
- package/src/SpaceEnvironmentFixtures.ts +200 -0
- package/src/SpriteGeometry.ts +21 -0
- package/src/StereoCameraRig.ts +127 -0
- package/src/StereoEffects.ts +274 -0
- package/src/TerrainFixtures.ts +180 -0
- package/src/Texture.ts +307 -0
- package/src/TextureBinding.ts +91 -0
- package/src/TexturedPBRMaterial.ts +1112 -0
- package/src/TexturedUnlitMaterial.ts +67 -0
- package/src/ToneMapping.ts +105 -0
- package/src/UniformBinder.ts +16 -0
- package/src/UniformLayout.ts +129 -0
- package/src/UnlitMaterial.ts +75 -0
- package/src/VegetationFixtures.ts +314 -0
- package/src/VertexBuffer.ts +120 -0
- package/src/VertexFormat.ts +171 -0
- package/src/VoxelWorldFixtures.ts +280 -0
- package/src/WeatherFixtures.ts +223 -0
- package/src/WebGL2Device.ts +2280 -0
- package/src/WebGL2StateCache.ts +330 -0
- package/src/WebGPUDevice.ts +2806 -0
- package/src/WebGPURenderToTextureProof.ts +139 -0
- package/src/advanced-runtime/AdvancedRenderer.ts +73 -0
- package/src/advanced-runtime/index.ts +9 -0
- package/src/cinematic/BloomPass.ts +26 -0
- package/src/cinematic/CinematicDepthComposition.ts +30 -0
- package/src/cinematic/CinematicEvidence.ts +123 -0
- package/src/cinematic/CinematicLightingRig.ts +144 -0
- package/src/cinematic/CinematicMaterialPresets.ts +130 -0
- package/src/cinematic/CinematicPostProcess.ts +83 -0
- package/src/cinematic/DepthHazePass.ts +30 -0
- package/src/cinematic/EmissivePracticalLightSystem.ts +45 -0
- package/src/cinematic/FilmGrainPass.ts +24 -0
- package/src/cinematic/FogVolumeSystem.ts +30 -0
- package/src/cinematic/GlowCardSystem.ts +44 -0
- package/src/cinematic/RainParticleSystem.ts +151 -0
- package/src/cinematic/VignettePass.ts +25 -0
- package/src/cinematic/WetReflectionApproximation.ts +27 -0
- package/src/cinematic/index.ts +14 -0
- package/src/effects/CollisionModule.ts +64 -0
- package/src/effects/ColorModule.ts +60 -0
- package/src/effects/ForceModule.ts +25 -0
- package/src/effects/GPUParticleBackend.ts +569 -0
- package/src/effects/Particle.ts +108 -0
- package/src/effects/ParticleDiagnostics.ts +224 -0
- package/src/effects/ParticleEffectPresets.ts +147 -0
- package/src/effects/ParticleEmitter.ts +326 -0
- package/src/effects/ParticleModule.ts +26 -0
- package/src/effects/ParticleRenderPass.ts +117 -0
- package/src/effects/ParticleRenderer.ts +132 -0
- package/src/effects/ParticleSystem.ts +333 -0
- package/src/effects/SizeModule.ts +56 -0
- package/src/effects/TrailModule.ts +72 -0
- package/src/effects/VelocityModule.ts +75 -0
- package/src/effects/index.ts +15 -0
- package/src/index.ts +914 -0
- package/src/materials/AlphaSorting.ts +30 -0
- package/src/materials/MaterialExtensions.ts +42 -0
- package/src/materials/PhysicalMaterial.ts +133 -0
- package/src/materials/TransmissionPass.ts +51 -0
- package/src/performance/BVH.ts +18 -0
- package/src/performance/Batcher.ts +2 -0
- package/src/performance/FrustumCuller.ts +9 -0
- package/src/performance/LOD.ts +20 -0
- package/src/performance/Octree.ts +10 -0
- package/src/performance/RenderItemSorting.ts +167 -0
- package/src/performance/RendererStats.ts +43 -0
- package/src/performance/ResourceBudget.ts +44 -0
- package/src/postprocess/BloomPass.ts +28 -0
- package/src/postprocess/CinematicDiagnostics.ts +642 -0
- package/src/postprocess/ColorGradingPass.ts +24 -0
- package/src/postprocess/DepthOfFieldPass.ts +12 -0
- package/src/postprocess/EffectComposer.ts +349 -0
- package/src/postprocess/SSAOPass.ts +20 -0
- package/src/postprocess/index.ts +34 -0
- package/src/production-runtime/AnimationControlsPipeline.ts +77 -0
- package/src/production-runtime/PBRHDRPipeline.ts +381 -0
- package/src/production-runtime/ProductionEffectsPipeline.ts +85 -0
- package/src/production-runtime/ProductionRendererTypes.ts +136 -0
- package/src/production-runtime/ProductionRuntimeRenderer.ts +172 -0
- package/src/production-runtime/ProductionWebGL2Renderer.ts +313 -0
- package/src/production-runtime/ProductionWebGPURenderer.ts +396 -0
- package/src/production-runtime/TransmissionBackdropCapture.ts +130 -0
- package/src/production-runtime/animation/MorphTargetRenderer.ts +2 -0
- package/src/production-runtime/animation/SkinningRenderer.ts +2 -0
- package/src/production-runtime/backends/RendererBackend.ts +17 -0
- package/src/production-runtime/backends/WebGL2RendererBackend.ts +30 -0
- package/src/production-runtime/backends/WebGPURendererBackend.ts +24 -0
- package/src/production-runtime/backends/webgl2/WebGL2Buffer.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2Capabilities.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2RenderTarget.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2Shader.ts +2 -0
- package/src/production-runtime/backends/webgl2/WebGL2StateCache.ts +1 -0
- package/src/production-runtime/backends/webgl2/WebGL2Texture.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUBuffer.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUCapabilities.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPURenderTarget.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUShader.ts +2 -0
- package/src/production-runtime/backends/webgpu/WebGPUTexture.ts +2 -0
- package/src/production-runtime/color/ColorManagement.ts +3 -0
- package/src/production-runtime/color/ToneMapping.ts +7 -0
- package/src/production-runtime/diagnostics/FrameCapture.ts +2 -0
- package/src/production-runtime/diagnostics/GPUCapabilities.ts +2 -0
- package/src/production-runtime/diagnostics/RendererStats.ts +2 -0
- package/src/production-runtime/environment/EnvironmentMap.ts +1 -0
- package/src/production-runtime/environment/HDRLoader.ts +57 -0
- package/src/production-runtime/environment/PMREMGenerator.ts +713 -0
- package/src/production-runtime/framegraph/FrameGraph.ts +18 -0
- package/src/production-runtime/framegraph/RenderPass.ts +15 -0
- package/src/production-runtime/geometry/ProjectedDecalGeometry.ts +439 -0
- package/src/production-runtime/index.ts +127 -0
- package/src/production-runtime/lights/LightManager.ts +7 -0
- package/src/production-runtime/lights/ShadowMapRenderer.ts +5 -0
- package/src/production-runtime/materials/GLTFMaterialAdapter.ts +6 -0
- package/src/production-runtime/materials/GLTFPBRMaterialAdapter.ts +2 -0
- package/src/production-runtime/materials/MaterialCompiler.ts +7 -0
- package/src/production-runtime/materials/MaterialTextureBindings.ts +5 -0
- package/src/production-runtime/materials/PBRMaterial.ts +2 -0
- package/src/production-runtime/materials/PBRShaderFeatures.ts +2 -0
- package/src/production-runtime/passes/ContactShadowPass.ts +184 -0
- package/src/production-runtime/passes/DepthPrepass.ts +7 -0
- package/src/production-runtime/passes/OpaquePass.ts +7 -0
- package/src/production-runtime/passes/ShadowPass.ts +7 -0
- package/src/production-runtime/passes/SkyboxPass.ts +7 -0
- package/src/production-runtime/passes/ToneMappingPass.ts +7 -0
- package/src/production-runtime/passes/TransparentPass.ts +7 -0
- package/src/production-runtime/postprocess/BloomPass.ts +51 -0
- package/src/production-runtime/postprocess/ColorGradingPass.ts +49 -0
- package/src/production-runtime/postprocess/DOFPass.ts +47 -0
- package/src/production-runtime/postprocess/FXAAPass.ts +53 -0
- package/src/production-runtime/postprocess/ProductionEffectComposer.ts +78 -0
- package/src/production-runtime/postprocess/ProductionPostProcessTypes.ts +174 -0
- package/src/production-runtime/postprocess/SSAOPass.ts +45 -0
- package/src/production-runtime/resources/GPUBuffer.ts +2 -0
- package/src/production-runtime/resources/GPUTexture.ts +2 -0
- package/src/production-runtime/resources/RenderTarget.ts +3 -0
- package/src/production-runtime/resources/ResourceCache.ts +7 -0
- package/src/production-runtime/scene/Camera.ts +1 -0
- package/src/production-runtime/scene/Lights.ts +2 -0
- package/src/production-runtime/scene/RenderableMesh.ts +2 -0
- package/src/production-runtime/scene/RenderablePrimitive.ts +1 -0
- package/src/production-runtime/scene/RenderableScene.ts +4 -0
- package/src/production-runtime/shaders/ShaderProgramLibrary.ts +7 -0
- package/src/production-runtime/shaders/chunks/brdf.glsl +2 -0
- package/src/production-runtime/shaders/chunks/ibl.glsl +3 -0
- package/src/production-runtime/shaders/chunks/pbr.frag.glsl +47 -0
- package/src/production-runtime/shaders/chunks/pbr.vert.glsl +8 -0
- package/src/production-runtime/shaders/chunks/shadows.glsl +2 -0
- package/src/production-runtime/shaders/wgsl/pbr.wgsl +3 -0
- package/src/production-runtime/shaders/wgsl/postprocess.wgsl +2 -0
- package/src/production-runtime/shaders/wgsl/skybox.wgsl +2 -0
- package/src/shaders/depth.frag.glsl +5 -0
- package/src/shaders/depth.vert.glsl +8 -0
- package/src/shaders/pbr-direct.frag.glsl +687 -0
- package/src/shaders/pbr-direct.vert.glsl +18 -0
- package/src/shaders/unlit.frag.glsl +18 -0
- package/src/shaders/unlit.vert.glsl +13 -0
- package/src/shadows/CascadedShadowPipeline.ts +53 -0
- package/src/shadows/ContactShadows.ts +106 -0
- package/src/shadows/ShadowDebugViews.ts +46 -0
- package/src/threejs-compatibility/InstancingSystem.ts +17 -0
- package/src/threejs-compatibility/LightingSystem.ts +22 -0
- package/src/threejs-compatibility/MaterialSystem.ts +9 -0
- package/src/threejs-compatibility/RenderTargetSystem.ts +35 -0
- package/src/threejs-compatibility/RendererDiagnostics.ts +61 -0
- package/src/threejs-compatibility/SceneRenderer.ts +34 -0
- package/src/threejs-compatibility/ShadowSystem.ts +19 -0
- package/src/threejs-compatibility/TextureSystem.ts +19 -0
- package/src/threejs-compatibility/ThreeCompatRenderer.ts +90 -0
- package/src/threejs-compatibility/TransparencySystem.ts +19 -0
- package/src/threejs-compatibility/index.ts +29 -0
- package/src/threejs-compatibility/performance/BVH.ts +14 -0
- package/src/threejs-compatibility/performance/FrustumCulling.ts +10 -0
- package/src/threejs-compatibility/performance/Instancing.ts +4 -0
- package/src/threejs-compatibility/performance/LODSystem.ts +16 -0
- package/src/threejs-compatibility/performance/OcclusionCulling.ts +6 -0
- package/src/threejs-compatibility/performance/RaycastAcceleration.ts +12 -0
- package/src/threejs-compatibility/performance/RendererProfiler.ts +19 -0
- package/src/threejs-compatibility/performance/TextureStreaming.ts +4 -0
- package/src/threejs-compatibility/performance/index.ts +12 -0
- package/src/threejs-compatibility/postprocess/BloomPass.ts +16 -0
- package/src/threejs-compatibility/postprocess/ColorGradingPass.ts +16 -0
- package/src/threejs-compatibility/postprocess/DepthOfFieldPass.ts +21 -0
- package/src/threejs-compatibility/postprocess/EffectComposer.ts +14 -0
- package/src/threejs-compatibility/postprocess/FXAAPass.ts +15 -0
- package/src/threejs-compatibility/postprocess/MotionBlurPass.ts +20 -0
- package/src/threejs-compatibility/postprocess/OutlinePass.ts +21 -0
- package/src/threejs-compatibility/postprocess/PostProcessTypes.ts +169 -0
- package/src/threejs-compatibility/postprocess/RenderPass.ts +9 -0
- package/src/threejs-compatibility/postprocess/SMAAPass.ts +15 -0
- package/src/threejs-compatibility/postprocess/SSAOPass.ts +21 -0
- package/src/threejs-compatibility/postprocess/ShaderPass.ts +7 -0
- package/src/threejs-compatibility/postprocess/TAAPass.ts +15 -0
- package/src/threejs-compatibility/postprocess/VignettePass.ts +16 -0
- package/src/threejs-compatibility/postprocess/index.ts +15 -0
- package/src/threejs-compatibility/shaders/NodeMaterial.ts +21 -0
- package/src/threejs-compatibility/shaders/RawShaderMaterial.ts +6 -0
- package/src/threejs-compatibility/shaders/ShaderDiagnostics.ts +17 -0
- package/src/threejs-compatibility/shaders/ShaderMaterial.ts +18 -0
- package/src/threejs-compatibility/shaders/ThreeCompatShaderChunks.ts +6 -0
- package/src/threejs-compatibility/shaders/Uniforms.ts +18 -0
- package/src/threejs-compatibility/shaders/index.ts +9 -0
- package/src/threejs-compatibility/vfx/GPUPointCloud.ts +7 -0
- package/src/threejs-compatibility/vfx/LineRenderer.ts +13 -0
- package/src/threejs-compatibility/vfx/ParticleSystem.ts +23 -0
- package/src/threejs-compatibility/vfx/SpriteSystem.ts +14 -0
- package/src/threejs-compatibility/vfx/TrailRenderer.ts +8 -0
- package/src/threejs-compatibility/vfx/VFXDiagnostics.ts +23 -0
- package/src/threejs-compatibility/vfx/index.ts +9 -0
- package/src/threejs-example-parity/index.ts +205 -0
- package/src/webgpu/WebGPUBuffer.ts +1 -0
- package/src/webgpu/WebGPUCompute.ts +2 -0
- package/src/webgpu/WebGPUPipelineCache.ts +15 -0
- package/src/webgpu/WebGPUPostProcess.ts +2 -0
- package/src/webgpu/WebGPUTexture.ts +2 -0
- package/tsconfig.json +26 -0
- package/vitest.config.ts +20 -0
|
@@ -0,0 +1,794 @@
|
|
|
1
|
+
import {} from "./Texture.js";
|
|
2
|
+
const A3D_EPSILON_NUMBER = 0.00001;
|
|
3
|
+
export function srgbChannelToLinear(value) {
|
|
4
|
+
const channel = validateNormalizedChannel(value, "sRGB channel");
|
|
5
|
+
return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);
|
|
6
|
+
}
|
|
7
|
+
export function linearChannelToSrgb(value) {
|
|
8
|
+
const channel = clampFinite(value, 0, 1, "linear channel");
|
|
9
|
+
return channel <= 0.0031308 ? channel * 12.92 : 1.055 * Math.pow(channel, 1 / 2.4) - 0.055;
|
|
10
|
+
}
|
|
11
|
+
export function decodeRgbeEnvironmentMap(source) {
|
|
12
|
+
validateSource(source);
|
|
13
|
+
const data = new Float32Array(source.width * source.height * 4);
|
|
14
|
+
for (let index = 0; index < source.width * source.height; index += 1) {
|
|
15
|
+
const sourceOffset = index * 4;
|
|
16
|
+
const exponent = source.data[sourceOffset + 3] ?? 0;
|
|
17
|
+
const outputOffset = sourceOffset;
|
|
18
|
+
if (exponent === 0) {
|
|
19
|
+
data[outputOffset] = 0;
|
|
20
|
+
data[outputOffset + 1] = 0;
|
|
21
|
+
data[outputOffset + 2] = 0;
|
|
22
|
+
data[outputOffset + 3] = 1;
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
const scale = Math.pow(2, exponent - 128) / 256;
|
|
26
|
+
data[outputOffset] = (source.data[sourceOffset] ?? 0) * scale;
|
|
27
|
+
data[outputOffset + 1] = (source.data[sourceOffset + 1] ?? 0) * scale;
|
|
28
|
+
data[outputOffset + 2] = (source.data[sourceOffset + 2] ?? 0) * scale;
|
|
29
|
+
data[outputOffset + 3] = 1;
|
|
30
|
+
}
|
|
31
|
+
return { width: source.width, height: source.height, data };
|
|
32
|
+
}
|
|
33
|
+
export function decodeRgba8EnvironmentToLinear(source, inputColorSpace = "srgb") {
|
|
34
|
+
validateSource(source);
|
|
35
|
+
const data = new Float32Array(source.width * source.height * 4);
|
|
36
|
+
for (let index = 0; index < source.width * source.height; index += 1) {
|
|
37
|
+
const offset = index * 4;
|
|
38
|
+
data[offset] = decodeColorByte(source.data[offset] ?? 0, inputColorSpace);
|
|
39
|
+
data[offset + 1] = decodeColorByte(source.data[offset + 1] ?? 0, inputColorSpace);
|
|
40
|
+
data[offset + 2] = decodeColorByte(source.data[offset + 2] ?? 0, inputColorSpace);
|
|
41
|
+
data[offset + 3] = (source.data[offset + 3] ?? 255) / 255;
|
|
42
|
+
}
|
|
43
|
+
return { width: source.width, height: source.height, data };
|
|
44
|
+
}
|
|
45
|
+
export function encodeLinearHdrEnvironmentToRgba8(source, options = {}) {
|
|
46
|
+
validateHdrSource(source);
|
|
47
|
+
const exposure = options.exposure ?? 1;
|
|
48
|
+
if (!Number.isFinite(exposure) || exposure < 0) {
|
|
49
|
+
throw new RangeError("Environment HDR exposure must be finite and non-negative");
|
|
50
|
+
}
|
|
51
|
+
const toneMapping = options.toneMapping ?? "reinhard";
|
|
52
|
+
const outputColorSpace = options.outputColorSpace ?? "srgb";
|
|
53
|
+
const data = new Uint8Array(source.width * source.height * 4);
|
|
54
|
+
for (let index = 0; index < source.width * source.height; index += 1) {
|
|
55
|
+
const offset = index * 4;
|
|
56
|
+
data[offset] = encodeColorByte(toneMap((source.data[offset] ?? 0) * exposure, toneMapping), outputColorSpace);
|
|
57
|
+
data[offset + 1] = encodeColorByte(toneMap((source.data[offset + 1] ?? 0) * exposure, toneMapping), outputColorSpace);
|
|
58
|
+
data[offset + 2] = encodeColorByte(toneMap((source.data[offset + 2] ?? 0) * exposure, toneMapping), outputColorSpace);
|
|
59
|
+
data[offset + 3] = Math.round(clampFinite(source.data[offset + 3] ?? 1, 0, 1, "HDR alpha") * 255);
|
|
60
|
+
}
|
|
61
|
+
return { width: source.width, height: source.height, data };
|
|
62
|
+
}
|
|
63
|
+
export function encodeLinearHdrEnvironmentToRgbe(source) {
|
|
64
|
+
validateHdrSource(source);
|
|
65
|
+
const data = new Uint8Array(source.width * source.height * 4);
|
|
66
|
+
for (let index = 0; index < source.width * source.height; index += 1) {
|
|
67
|
+
const offset = index * 4;
|
|
68
|
+
encodeLinearRgbePixel(source.data[offset] ?? 0, source.data[offset + 1] ?? 0, source.data[offset + 2] ?? 0, source.data[offset + 3] ?? 1, data, offset);
|
|
69
|
+
}
|
|
70
|
+
return { width: source.width, height: source.height, data };
|
|
71
|
+
}
|
|
72
|
+
export function encodeLinearHdrEnvironmentToRgba16f(source) {
|
|
73
|
+
validateHdrSource(source);
|
|
74
|
+
const data = new Uint16Array(source.width * source.height * 4);
|
|
75
|
+
for (let index = 0; index < source.width * source.height; index += 1) {
|
|
76
|
+
const offset = index * 4;
|
|
77
|
+
data[offset] = numberToHalfFloat(Math.max(0, source.data[offset] ?? 0));
|
|
78
|
+
data[offset + 1] = numberToHalfFloat(Math.max(0, source.data[offset + 1] ?? 0));
|
|
79
|
+
data[offset + 2] = numberToHalfFloat(Math.max(0, source.data[offset + 2] ?? 0));
|
|
80
|
+
data[offset + 3] = numberToHalfFloat(clampFinite(source.data[offset + 3] ?? 1, 0, 1, "HDR alpha"));
|
|
81
|
+
}
|
|
82
|
+
return { width: source.width, height: source.height, data };
|
|
83
|
+
}
|
|
84
|
+
export function generateRgba8EnvironmentMipLevels(source, options = {}) {
|
|
85
|
+
validateSource(source);
|
|
86
|
+
const maxLevels = maxMipLevels(source.width, source.height);
|
|
87
|
+
const requestedLevels = options.levels ?? maxLevels;
|
|
88
|
+
if (!Number.isInteger(requestedLevels) || requestedLevels < 1) {
|
|
89
|
+
throw new RangeError("Environment mip levels must be a positive integer");
|
|
90
|
+
}
|
|
91
|
+
const blurRadius = options.blurRadius ?? 1;
|
|
92
|
+
if (!Number.isInteger(blurRadius) || blurRadius < 0) {
|
|
93
|
+
throw new RangeError("Environment mip blurRadius must be a non-negative integer");
|
|
94
|
+
}
|
|
95
|
+
const levels = [{
|
|
96
|
+
width: source.width,
|
|
97
|
+
height: source.height,
|
|
98
|
+
data: new Uint8Array(source.data)
|
|
99
|
+
}];
|
|
100
|
+
while (levels.length < Math.min(requestedLevels, maxLevels)) {
|
|
101
|
+
const previous = levels[levels.length - 1];
|
|
102
|
+
levels.push(downsampleEnvironmentLevel(previous, blurRadius + levels.length - 1));
|
|
103
|
+
}
|
|
104
|
+
return levels;
|
|
105
|
+
}
|
|
106
|
+
export function generateSpecularPrefilterMipLevels(source, options = {}) {
|
|
107
|
+
return generateRgba8EnvironmentMipLevels(source, {
|
|
108
|
+
levels: options.levels,
|
|
109
|
+
blurRadius: options.blurRadius ?? 2
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
export function generateRgbeEnvironmentMipLevels(source, options = {}) {
|
|
113
|
+
validateHdrSource(source);
|
|
114
|
+
const maxLevels = maxMipLevels(source.width, source.height);
|
|
115
|
+
const requestedLevels = options.levels ?? maxLevels;
|
|
116
|
+
if (!Number.isInteger(requestedLevels) || requestedLevels < 1) {
|
|
117
|
+
throw new RangeError("Environment RGBe mip levels must be a positive integer");
|
|
118
|
+
}
|
|
119
|
+
const blurRadius = options.blurRadius ?? 2;
|
|
120
|
+
if (!Number.isInteger(blurRadius) || blurRadius < 0) {
|
|
121
|
+
throw new RangeError("Environment RGBe mip blurRadius must be a non-negative integer");
|
|
122
|
+
}
|
|
123
|
+
const levels = [];
|
|
124
|
+
let linearLevel = {
|
|
125
|
+
width: source.width,
|
|
126
|
+
height: source.height,
|
|
127
|
+
data: new Float32Array(source.data)
|
|
128
|
+
};
|
|
129
|
+
levels.push(encodeLinearHdrEnvironmentToRgbe(linearLevel));
|
|
130
|
+
while (levels.length < Math.min(requestedLevels, maxLevels)) {
|
|
131
|
+
linearLevel = downsampleLinearHdrEnvironmentLevel(linearLevel, blurRadius + levels.length - 1);
|
|
132
|
+
levels.push(encodeLinearHdrEnvironmentToRgbe(linearLevel));
|
|
133
|
+
}
|
|
134
|
+
return levels;
|
|
135
|
+
}
|
|
136
|
+
export function generateRgba16fEnvironmentMipLevels(source, options = {}) {
|
|
137
|
+
validateHdrSource(source);
|
|
138
|
+
const maxLevels = maxMipLevels(source.width, source.height);
|
|
139
|
+
const requestedLevels = options.levels ?? maxLevels;
|
|
140
|
+
if (!Number.isInteger(requestedLevels) || requestedLevels < 1) {
|
|
141
|
+
throw new RangeError("Environment RGBA16F mip levels must be a positive integer");
|
|
142
|
+
}
|
|
143
|
+
const blurRadius = options.blurRadius ?? 2;
|
|
144
|
+
if (!Number.isInteger(blurRadius) || blurRadius < 0) {
|
|
145
|
+
throw new RangeError("Environment RGBA16F mip blurRadius must be a non-negative integer");
|
|
146
|
+
}
|
|
147
|
+
const levels = [];
|
|
148
|
+
let linearLevel = {
|
|
149
|
+
width: source.width,
|
|
150
|
+
height: source.height,
|
|
151
|
+
data: new Float32Array(source.data)
|
|
152
|
+
};
|
|
153
|
+
levels.push(encodeLinearHdrEnvironmentToRgba16f(linearLevel));
|
|
154
|
+
while (levels.length < Math.min(requestedLevels, maxLevels)) {
|
|
155
|
+
linearLevel = downsampleLinearHdrEnvironmentLevel(linearLevel, blurRadius + levels.length - 1);
|
|
156
|
+
levels.push(encodeLinearHdrEnvironmentToRgba16f(linearLevel));
|
|
157
|
+
}
|
|
158
|
+
return levels;
|
|
159
|
+
}
|
|
160
|
+
export function generateRgba16fSpecularPrefilterMipLevels(source, options = {}) {
|
|
161
|
+
validateHdrSource(source);
|
|
162
|
+
const maxLevels = maxMipLevels(source.width, source.height);
|
|
163
|
+
const requestedLevels = options.levels ?? maxLevels;
|
|
164
|
+
if (!Number.isInteger(requestedLevels) || requestedLevels < 1) {
|
|
165
|
+
throw new RangeError("Environment RGBA16F specular prefilter mip levels must be a positive integer");
|
|
166
|
+
}
|
|
167
|
+
const sampleCount = options.sampleCount ?? 16;
|
|
168
|
+
if (!Number.isInteger(sampleCount) || sampleCount <= 0) {
|
|
169
|
+
throw new RangeError("Environment RGBA16F specular prefilter sampleCount must be a positive integer");
|
|
170
|
+
}
|
|
171
|
+
const mipCount = Math.min(requestedLevels, maxLevels);
|
|
172
|
+
const levels = [
|
|
173
|
+
encodeLinearHdrEnvironmentToRgba16f({
|
|
174
|
+
width: source.width,
|
|
175
|
+
height: source.height,
|
|
176
|
+
data: new Float32Array(source.data)
|
|
177
|
+
})
|
|
178
|
+
];
|
|
179
|
+
for (let mipIndex = 1; mipIndex < mipCount; mipIndex += 1) {
|
|
180
|
+
const roughness = clamp(mipIndex / Math.max(1, mipCount - 1), 0, 1);
|
|
181
|
+
const effectiveSamples = Math.max(8, Math.round(sampleCount * lerp(0.5, 1, roughness)));
|
|
182
|
+
const level = prefilterLinearHdrEnvironmentLevel(source, mipIndex, roughness, effectiveSamples);
|
|
183
|
+
levels.push(encodeLinearHdrEnvironmentToRgba16f(level));
|
|
184
|
+
}
|
|
185
|
+
if (levels.length > 1) {
|
|
186
|
+
const diffuseLevel = levels[levels.length - 1];
|
|
187
|
+
levels[levels.length - 1] = generateRgba16fDiffuseIrradianceMipLevel(source, {
|
|
188
|
+
width: diffuseLevel.width,
|
|
189
|
+
height: diffuseLevel.height,
|
|
190
|
+
sampleCount: Math.max(32, sampleCount * 2)
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
return levels;
|
|
194
|
+
}
|
|
195
|
+
export function generateRgba16fDiffuseIrradianceMipLevel(source, options = {}) {
|
|
196
|
+
validateHdrSource(source);
|
|
197
|
+
const width = options.width ?? Math.min(32, source.width);
|
|
198
|
+
const height = options.height ?? Math.min(16, source.height);
|
|
199
|
+
if (!Number.isInteger(width) || width <= 0 || !Number.isInteger(height) || height <= 0) {
|
|
200
|
+
throw new RangeError("Environment RGBA16F diffuse irradiance dimensions must be positive integers");
|
|
201
|
+
}
|
|
202
|
+
const sampleCount = options.sampleCount ?? 64;
|
|
203
|
+
if (!Number.isInteger(sampleCount) || sampleCount <= 0) {
|
|
204
|
+
throw new RangeError("Environment RGBA16F diffuse irradiance sampleCount must be a positive integer");
|
|
205
|
+
}
|
|
206
|
+
const data = new Float32Array(width * height * 4);
|
|
207
|
+
for (let y = 0; y < height; y += 1) {
|
|
208
|
+
for (let x = 0; x < width; x += 1) {
|
|
209
|
+
const normal = equirectPixelDirection(x, y, width, height);
|
|
210
|
+
const color = integrateDiffuseIrradianceOverHemisphere(source, normal, sampleCount);
|
|
211
|
+
const index = (y * width + x) * 4;
|
|
212
|
+
data[index] = color[0];
|
|
213
|
+
data[index + 1] = color[1];
|
|
214
|
+
data[index + 2] = color[2];
|
|
215
|
+
data[index + 3] = color[3];
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return encodeLinearHdrEnvironmentToRgba16f({ width, height, data });
|
|
219
|
+
}
|
|
220
|
+
export function generateDiffuseIrradianceRgba8(source, options = {}) {
|
|
221
|
+
validateSource(source);
|
|
222
|
+
const width = options.width ?? Math.min(16, source.width);
|
|
223
|
+
const height = options.height ?? Math.min(8, source.height);
|
|
224
|
+
if (!Number.isInteger(width) || width <= 0 || !Number.isInteger(height) || height <= 0) {
|
|
225
|
+
throw new RangeError("Environment diffuse irradiance dimensions must be positive integers");
|
|
226
|
+
}
|
|
227
|
+
const blurRadius = options.blurRadius ?? Math.max(2, Math.ceil(Math.max(source.width / width, source.height / height)));
|
|
228
|
+
if (!Number.isInteger(blurRadius) || blurRadius < 0) {
|
|
229
|
+
throw new RangeError("Environment diffuse irradiance blurRadius must be a non-negative integer");
|
|
230
|
+
}
|
|
231
|
+
const data = new Uint8Array(width * height * 4);
|
|
232
|
+
for (let y = 0; y < height; y += 1) {
|
|
233
|
+
for (let x = 0; x < width; x += 1) {
|
|
234
|
+
const sourceX = Math.round((x / Math.max(1, width - 1)) * (source.width - 1));
|
|
235
|
+
const sourceY = Math.round((y / Math.max(1, height - 1)) * (source.height - 1));
|
|
236
|
+
const color = sampleBox(source, sourceX, sourceY, blurRadius);
|
|
237
|
+
const index = (y * width + x) * 4;
|
|
238
|
+
data[index] = color[0];
|
|
239
|
+
data[index + 1] = color[1];
|
|
240
|
+
data[index + 2] = color[2];
|
|
241
|
+
data[index + 3] = color[3];
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return { width, height, data };
|
|
245
|
+
}
|
|
246
|
+
export function generateDiffuseIrradianceRgbe(source, options = {}) {
|
|
247
|
+
validateHdrSource(source);
|
|
248
|
+
const width = options.width ?? Math.min(16, source.width);
|
|
249
|
+
const height = options.height ?? Math.min(8, source.height);
|
|
250
|
+
if (!Number.isInteger(width) || width <= 0 || !Number.isInteger(height) || height <= 0) {
|
|
251
|
+
throw new RangeError("Environment diffuse irradiance dimensions must be positive integers");
|
|
252
|
+
}
|
|
253
|
+
const blurRadius = options.blurRadius ?? Math.max(2, Math.ceil(Math.max(source.width / width, source.height / height)));
|
|
254
|
+
if (!Number.isInteger(blurRadius) || blurRadius < 0) {
|
|
255
|
+
throw new RangeError("Environment diffuse irradiance blurRadius must be a non-negative integer");
|
|
256
|
+
}
|
|
257
|
+
const data = new Uint8Array(width * height * 4);
|
|
258
|
+
for (let y = 0; y < height; y += 1) {
|
|
259
|
+
for (let x = 0; x < width; x += 1) {
|
|
260
|
+
const sourceX = Math.round((x / Math.max(1, width - 1)) * (source.width - 1));
|
|
261
|
+
const sourceY = Math.round((y / Math.max(1, height - 1)) * (source.height - 1));
|
|
262
|
+
const color = sampleLinearHdrBox(source, sourceX, sourceY, blurRadius);
|
|
263
|
+
encodeLinearRgbePixel(color[0], color[1], color[2], color[3], data, (y * width + x) * 4);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return { width, height, data };
|
|
267
|
+
}
|
|
268
|
+
export function createEnvironmentMapResourceSet(input, options = {}) {
|
|
269
|
+
const inputEncoding = options.inputEncoding ?? input.encoding ?? "rgba8-srgb";
|
|
270
|
+
const outputColorSpace = options.outputColorSpace ?? "srgb";
|
|
271
|
+
const textureEncoding = options.textureEncoding ?? (outputColorSpace === "linear" ? "rgba8-linear" : "rgba8-srgb");
|
|
272
|
+
const linear = toLinearHdrEnvironment(input, inputEncoding);
|
|
273
|
+
const linearForTexture = textureEncoding === "rgbe"
|
|
274
|
+
? scaleLinearHdrEnvironment(linear, 1)
|
|
275
|
+
: scaleLinearHdrEnvironment(linear, options.exposure ?? 1);
|
|
276
|
+
const base = textureEncoding === "rgbe"
|
|
277
|
+
? encodeLinearHdrEnvironmentToRgbe(linearForTexture)
|
|
278
|
+
: encodeLinearHdrEnvironmentToRgba8(linear, {
|
|
279
|
+
exposure: options.exposure ?? 1,
|
|
280
|
+
toneMapping: options.toneMapping ?? (inputEncoding === "rgba8-linear" || inputEncoding === "rgba8-srgb" ? "linear" : "reinhard"),
|
|
281
|
+
outputColorSpace: textureEncoding === "rgba8-linear" ? "linear" : "srgb"
|
|
282
|
+
});
|
|
283
|
+
const specularMipLevels = textureEncoding === "rgbe"
|
|
284
|
+
? generateRgbeEnvironmentMipLevels(linearForTexture, {
|
|
285
|
+
levels: options.specularLevels,
|
|
286
|
+
blurRadius: options.specularBlurRadius ?? 2
|
|
287
|
+
})
|
|
288
|
+
: generateSpecularPrefilterMipLevels(base, {
|
|
289
|
+
levels: options.specularLevels,
|
|
290
|
+
blurRadius: options.specularBlurRadius ?? 2
|
|
291
|
+
});
|
|
292
|
+
const diffuseIrradiance = textureEncoding === "rgbe"
|
|
293
|
+
? generateDiffuseIrradianceRgbe(linearForTexture, {
|
|
294
|
+
width: options.irradianceWidth,
|
|
295
|
+
height: options.irradianceHeight,
|
|
296
|
+
blurRadius: options.irradianceBlurRadius
|
|
297
|
+
})
|
|
298
|
+
: generateDiffuseIrradianceRgba8(base, {
|
|
299
|
+
width: options.irradianceWidth,
|
|
300
|
+
height: options.irradianceHeight,
|
|
301
|
+
blurRadius: options.irradianceBlurRadius
|
|
302
|
+
});
|
|
303
|
+
const brdfLut = generateApproximateBrdfLutPixels({
|
|
304
|
+
width: options.brdfLutSize ?? 32,
|
|
305
|
+
height: options.brdfLutSize ?? 32,
|
|
306
|
+
sampleCount: options.brdfLutSampleCount
|
|
307
|
+
});
|
|
308
|
+
return {
|
|
309
|
+
base,
|
|
310
|
+
diffuseIrradiance,
|
|
311
|
+
specularMipLevels,
|
|
312
|
+
brdfLut,
|
|
313
|
+
diagnostics: {
|
|
314
|
+
inputEncoding,
|
|
315
|
+
textureEncoding,
|
|
316
|
+
outputColorSpace,
|
|
317
|
+
hdrSource: inputEncoding === "rgbe" || inputEncoding === "linear-hdr",
|
|
318
|
+
maxLinearValue: Number(maxLinearValue(linear).toFixed(6)),
|
|
319
|
+
specularMipCount: specularMipLevels.length,
|
|
320
|
+
diffuseIrradianceSize: [diffuseIrradiance.width, diffuseIrradiance.height],
|
|
321
|
+
brdfLutSize: [brdfLut.width, brdfLut.height]
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
export function generateApproximateBrdfLutPixels(descriptor = {}) {
|
|
326
|
+
const width = descriptor.width ?? 32;
|
|
327
|
+
const height = descriptor.height ?? 32;
|
|
328
|
+
if (!Number.isInteger(width) || width <= 0 || !Number.isInteger(height) || height <= 0) {
|
|
329
|
+
throw new RangeError("Environment BRDF LUT dimensions must be positive integers");
|
|
330
|
+
}
|
|
331
|
+
const sampleCount = descriptor.sampleCount ?? 128;
|
|
332
|
+
if (!Number.isInteger(sampleCount) || sampleCount <= 0) {
|
|
333
|
+
throw new RangeError("Environment BRDF LUT sampleCount must be a positive integer");
|
|
334
|
+
}
|
|
335
|
+
const data = new Uint8Array(width * height * 4);
|
|
336
|
+
for (let y = 0; y < height; y += 1) {
|
|
337
|
+
const roughness = clamp(y / Math.max(1, height - 1), 0, 1);
|
|
338
|
+
for (let x = 0; x < width; x += 1) {
|
|
339
|
+
const nDotV = clamp(x / Math.max(1, width - 1), 0.001, 1);
|
|
340
|
+
const brdf = integrateGgxEnvironmentBrdf(nDotV, roughness, sampleCount);
|
|
341
|
+
const index = (y * width + x) * 4;
|
|
342
|
+
data[index] = encodeColorByte(brdf[0], "linear");
|
|
343
|
+
data[index + 1] = encodeColorByte(brdf[1], "linear");
|
|
344
|
+
data[index + 2] = 0;
|
|
345
|
+
data[index + 3] = 255;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return { width, height, data };
|
|
349
|
+
}
|
|
350
|
+
function integrateGgxEnvironmentBrdf(nDotV, roughness, sampleCount) {
|
|
351
|
+
const view = [
|
|
352
|
+
Math.sqrt(Math.max(0, 1 - nDotV * nDotV)),
|
|
353
|
+
0,
|
|
354
|
+
nDotV
|
|
355
|
+
];
|
|
356
|
+
let scale = 0;
|
|
357
|
+
let bias = 0;
|
|
358
|
+
for (let index = 0; index < sampleCount; index += 1) {
|
|
359
|
+
const xi = hammersley2d(index, sampleCount);
|
|
360
|
+
const halfVector = importanceSampleGgx(xi, roughness);
|
|
361
|
+
const vDotH = Math.max(dot3(view, halfVector), 0);
|
|
362
|
+
const light = normalize3([
|
|
363
|
+
2 * vDotH * halfVector[0] - view[0],
|
|
364
|
+
2 * vDotH * halfVector[1] - view[1],
|
|
365
|
+
2 * vDotH * halfVector[2] - view[2]
|
|
366
|
+
]);
|
|
367
|
+
const nDotL = Math.max(light[2], 0);
|
|
368
|
+
const nDotH = Math.max(halfVector[2], 0);
|
|
369
|
+
if (nDotL <= 0 || nDotH <= 0 || vDotH <= 0) {
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
const visibility = ggxGeometrySmithCorrelated(nDotV, nDotL, roughness) * vDotH / Math.max(nDotH * nDotV, A3D_EPSILON_NUMBER);
|
|
373
|
+
const fresnel = Math.pow(1 - vDotH, 5);
|
|
374
|
+
scale += (1 - fresnel) * visibility;
|
|
375
|
+
bias += fresnel * visibility;
|
|
376
|
+
}
|
|
377
|
+
return [
|
|
378
|
+
clamp(scale / sampleCount, 0, 1),
|
|
379
|
+
clamp(bias / sampleCount, 0, 1)
|
|
380
|
+
];
|
|
381
|
+
}
|
|
382
|
+
function hammersley2d(index, count) {
|
|
383
|
+
return [index / count, radicalInverseVdc(index)];
|
|
384
|
+
}
|
|
385
|
+
function radicalInverseVdc(bits) {
|
|
386
|
+
let value = bits >>> 0;
|
|
387
|
+
value = ((value << 16) | (value >>> 16)) >>> 0;
|
|
388
|
+
value = (((value & 0x55555555) << 1) | ((value & 0xaaaaaaaa) >>> 1)) >>> 0;
|
|
389
|
+
value = (((value & 0x33333333) << 2) | ((value & 0xcccccccc) >>> 2)) >>> 0;
|
|
390
|
+
value = (((value & 0x0f0f0f0f) << 4) | ((value & 0xf0f0f0f0) >>> 4)) >>> 0;
|
|
391
|
+
value = (((value & 0x00ff00ff) << 8) | ((value & 0xff00ff00) >>> 8)) >>> 0;
|
|
392
|
+
return value * 2.3283064365386963e-10;
|
|
393
|
+
}
|
|
394
|
+
function importanceSampleGgx(xi, roughness) {
|
|
395
|
+
const alpha = Math.max(roughness, 0.001) * Math.max(roughness, 0.001);
|
|
396
|
+
const alpha2 = alpha * alpha;
|
|
397
|
+
const phi = 2 * Math.PI * xi[0];
|
|
398
|
+
const cosTheta = Math.sqrt((1 - xi[1]) / Math.max(1 + (alpha2 - 1) * xi[1], A3D_EPSILON_NUMBER));
|
|
399
|
+
const sinTheta = Math.sqrt(Math.max(0, 1 - cosTheta * cosTheta));
|
|
400
|
+
return [
|
|
401
|
+
Math.cos(phi) * sinTheta,
|
|
402
|
+
Math.sin(phi) * sinTheta,
|
|
403
|
+
cosTheta
|
|
404
|
+
];
|
|
405
|
+
}
|
|
406
|
+
function ggxGeometrySmithCorrelated(nDotV, nDotL, roughness) {
|
|
407
|
+
const alpha = Math.max(roughness, 0.045);
|
|
408
|
+
const alpha2 = alpha * alpha * alpha * alpha;
|
|
409
|
+
const lambdaV = nDotL * Math.sqrt(Math.max((nDotV - alpha2 * nDotV) * nDotV + alpha2, A3D_EPSILON_NUMBER));
|
|
410
|
+
const lambdaL = nDotV * Math.sqrt(Math.max((nDotL - alpha2 * nDotL) * nDotL + alpha2, A3D_EPSILON_NUMBER));
|
|
411
|
+
return 0.5 / Math.max(lambdaV + lambdaL, A3D_EPSILON_NUMBER);
|
|
412
|
+
}
|
|
413
|
+
function normalize3(value) {
|
|
414
|
+
const length = Math.hypot(value[0], value[1], value[2]);
|
|
415
|
+
if (length <= A3D_EPSILON_NUMBER)
|
|
416
|
+
return [0, 0, 1];
|
|
417
|
+
return [value[0] / length, value[1] / length, value[2] / length];
|
|
418
|
+
}
|
|
419
|
+
function dot3(left, right) {
|
|
420
|
+
return left[0] * right[0] + left[1] * right[1] + left[2] * right[2];
|
|
421
|
+
}
|
|
422
|
+
function downsampleEnvironmentLevel(level, blurRadius) {
|
|
423
|
+
const width = Math.max(1, Math.floor(level.width / 2));
|
|
424
|
+
const height = Math.max(1, Math.floor(level.height / 2));
|
|
425
|
+
const data = new Uint8Array(width * height * 4);
|
|
426
|
+
for (let y = 0; y < height; y += 1) {
|
|
427
|
+
for (let x = 0; x < width; x += 1) {
|
|
428
|
+
const color = sampleBox(level, x * 2, y * 2, Math.max(1, blurRadius));
|
|
429
|
+
const index = (y * width + x) * 4;
|
|
430
|
+
data[index] = color[0];
|
|
431
|
+
data[index + 1] = color[1];
|
|
432
|
+
data[index + 2] = color[2];
|
|
433
|
+
data[index + 3] = color[3];
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
return { width, height, data };
|
|
437
|
+
}
|
|
438
|
+
function downsampleLinearHdrEnvironmentLevel(source, blurRadius) {
|
|
439
|
+
const width = Math.max(1, Math.floor(source.width / 2));
|
|
440
|
+
const height = Math.max(1, Math.floor(source.height / 2));
|
|
441
|
+
const data = new Float32Array(width * height * 4);
|
|
442
|
+
for (let y = 0; y < height; y += 1) {
|
|
443
|
+
for (let x = 0; x < width; x += 1) {
|
|
444
|
+
const color = sampleLinearHdrBox(source, x * 2, y * 2, Math.max(1, blurRadius));
|
|
445
|
+
const index = (y * width + x) * 4;
|
|
446
|
+
data[index] = color[0];
|
|
447
|
+
data[index + 1] = color[1];
|
|
448
|
+
data[index + 2] = color[2];
|
|
449
|
+
data[index + 3] = color[3];
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
return { width, height, data };
|
|
453
|
+
}
|
|
454
|
+
function prefilterLinearHdrEnvironmentLevel(source, mipIndex, roughness, sampleCount) {
|
|
455
|
+
const width = Math.max(1, Math.floor(source.width / 2 ** mipIndex));
|
|
456
|
+
const height = Math.max(1, Math.floor(source.height / 2 ** mipIndex));
|
|
457
|
+
const data = new Float32Array(width * height * 4);
|
|
458
|
+
for (let y = 0; y < height; y += 1) {
|
|
459
|
+
for (let x = 0; x < width; x += 1) {
|
|
460
|
+
const direction = equirectPixelDirection(x, y, width, height);
|
|
461
|
+
const color = prefilterLinearHdrEnvironmentDirection(source, direction, roughness, sampleCount);
|
|
462
|
+
const index = (y * width + x) * 4;
|
|
463
|
+
data[index] = color[0];
|
|
464
|
+
data[index + 1] = color[1];
|
|
465
|
+
data[index + 2] = color[2];
|
|
466
|
+
data[index + 3] = color[3];
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
return { width, height, data };
|
|
470
|
+
}
|
|
471
|
+
function prefilterLinearHdrEnvironmentDirection(source, reflectionDirection, roughness, sampleCount) {
|
|
472
|
+
if (roughness <= A3D_EPSILON_NUMBER) {
|
|
473
|
+
return sampleLinearHdrEquirect(source, reflectionDirection);
|
|
474
|
+
}
|
|
475
|
+
const normal = reflectionDirection;
|
|
476
|
+
const view = reflectionDirection;
|
|
477
|
+
let red = 0;
|
|
478
|
+
let green = 0;
|
|
479
|
+
let blue = 0;
|
|
480
|
+
let alpha = 0;
|
|
481
|
+
let totalWeight = 0;
|
|
482
|
+
for (let sampleIndex = 0; sampleIndex < sampleCount; sampleIndex += 1) {
|
|
483
|
+
const xi = hammersley2d(sampleIndex, sampleCount);
|
|
484
|
+
const halfVector = tangentToWorld(importanceSampleGgx(xi, roughness), normal);
|
|
485
|
+
const vDotH = Math.max(dot3(view, halfVector), 0);
|
|
486
|
+
const light = normalize3([
|
|
487
|
+
2 * vDotH * halfVector[0] - view[0],
|
|
488
|
+
2 * vDotH * halfVector[1] - view[1],
|
|
489
|
+
2 * vDotH * halfVector[2] - view[2]
|
|
490
|
+
]);
|
|
491
|
+
const nDotL = Math.max(dot3(normal, light), 0);
|
|
492
|
+
if (nDotL <= A3D_EPSILON_NUMBER) {
|
|
493
|
+
continue;
|
|
494
|
+
}
|
|
495
|
+
const sample = sampleLinearHdrEquirect(source, light);
|
|
496
|
+
red += sample[0] * nDotL;
|
|
497
|
+
green += sample[1] * nDotL;
|
|
498
|
+
blue += sample[2] * nDotL;
|
|
499
|
+
alpha += sample[3] * nDotL;
|
|
500
|
+
totalWeight += nDotL;
|
|
501
|
+
}
|
|
502
|
+
if (totalWeight <= A3D_EPSILON_NUMBER) {
|
|
503
|
+
return sampleLinearHdrEquirect(source, reflectionDirection);
|
|
504
|
+
}
|
|
505
|
+
return [
|
|
506
|
+
red / totalWeight,
|
|
507
|
+
green / totalWeight,
|
|
508
|
+
blue / totalWeight,
|
|
509
|
+
alpha / totalWeight
|
|
510
|
+
];
|
|
511
|
+
}
|
|
512
|
+
function integrateDiffuseIrradianceOverHemisphere(source, normal, sampleCount) {
|
|
513
|
+
let red = 0;
|
|
514
|
+
let green = 0;
|
|
515
|
+
let blue = 0;
|
|
516
|
+
let alpha = 0;
|
|
517
|
+
for (let sampleIndex = 0; sampleIndex < sampleCount; sampleIndex += 1) {
|
|
518
|
+
const direction = tangentToWorld(cosineSampleHemisphere(hammersley2d(sampleIndex, sampleCount)), normal);
|
|
519
|
+
const sample = sampleLinearHdrEquirect(source, direction);
|
|
520
|
+
red += sample[0];
|
|
521
|
+
green += sample[1];
|
|
522
|
+
blue += sample[2];
|
|
523
|
+
alpha += sample[3];
|
|
524
|
+
}
|
|
525
|
+
return [
|
|
526
|
+
red / sampleCount,
|
|
527
|
+
green / sampleCount,
|
|
528
|
+
blue / sampleCount,
|
|
529
|
+
alpha / sampleCount
|
|
530
|
+
];
|
|
531
|
+
}
|
|
532
|
+
function cosineSampleHemisphere(xi) {
|
|
533
|
+
const radius = Math.sqrt(clamp(xi[0], 0, 1));
|
|
534
|
+
const phi = 2 * Math.PI * xi[1];
|
|
535
|
+
return [
|
|
536
|
+
radius * Math.cos(phi),
|
|
537
|
+
radius * Math.sin(phi),
|
|
538
|
+
Math.sqrt(Math.max(0, 1 - xi[0]))
|
|
539
|
+
];
|
|
540
|
+
}
|
|
541
|
+
function equirectPixelDirection(x, y, width, height) {
|
|
542
|
+
const u = (x + 0.5) / width;
|
|
543
|
+
const v = (y + 0.5) / height;
|
|
544
|
+
const phi = (u - 0.5) * Math.PI * 2;
|
|
545
|
+
const theta = v * Math.PI;
|
|
546
|
+
const sinTheta = Math.sin(theta);
|
|
547
|
+
return normalize3([
|
|
548
|
+
Math.cos(phi) * sinTheta,
|
|
549
|
+
Math.cos(theta),
|
|
550
|
+
Math.sin(phi) * sinTheta
|
|
551
|
+
]);
|
|
552
|
+
}
|
|
553
|
+
function directionToEquirectUv(direction) {
|
|
554
|
+
const d = normalize3(direction);
|
|
555
|
+
return [
|
|
556
|
+
modulo(Math.atan2(d[2], d[0]) / (Math.PI * 2) + 0.5, 1),
|
|
557
|
+
clamp(Math.acos(clamp(d[1], -1, 1)) / Math.PI, 0, 1)
|
|
558
|
+
];
|
|
559
|
+
}
|
|
560
|
+
function sampleLinearHdrEquirect(source, direction) {
|
|
561
|
+
const uv = directionToEquirectUv(direction);
|
|
562
|
+
const fx = uv[0] * source.width - 0.5;
|
|
563
|
+
const fy = uv[1] * source.height - 0.5;
|
|
564
|
+
const x0 = Math.floor(fx);
|
|
565
|
+
const y0 = Math.floor(fy);
|
|
566
|
+
const tx = fx - x0;
|
|
567
|
+
const ty = fy - y0;
|
|
568
|
+
const c00 = sampleLinearHdrPixel(source, x0, y0);
|
|
569
|
+
const c10 = sampleLinearHdrPixel(source, x0 + 1, y0);
|
|
570
|
+
const c01 = sampleLinearHdrPixel(source, x0, y0 + 1);
|
|
571
|
+
const c11 = sampleLinearHdrPixel(source, x0 + 1, y0 + 1);
|
|
572
|
+
const top = mixColor4(c00, c10, tx);
|
|
573
|
+
const bottom = mixColor4(c01, c11, tx);
|
|
574
|
+
return mixColor4(top, bottom, ty);
|
|
575
|
+
}
|
|
576
|
+
function sampleLinearHdrPixel(source, x, y) {
|
|
577
|
+
const wrappedX = modulo(x, source.width);
|
|
578
|
+
const wrappedY = clamp(y, 0, source.height - 1);
|
|
579
|
+
const index = (wrappedY * source.width + wrappedX) * 4;
|
|
580
|
+
return [
|
|
581
|
+
Math.max(0, source.data[index] ?? 0),
|
|
582
|
+
Math.max(0, source.data[index + 1] ?? 0),
|
|
583
|
+
Math.max(0, source.data[index + 2] ?? 0),
|
|
584
|
+
clampFinite(source.data[index + 3] ?? 1, 0, 1, "HDR alpha")
|
|
585
|
+
];
|
|
586
|
+
}
|
|
587
|
+
function mixColor4(left, right, amount) {
|
|
588
|
+
return [
|
|
589
|
+
lerp(left[0], right[0], amount),
|
|
590
|
+
lerp(left[1], right[1], amount),
|
|
591
|
+
lerp(left[2], right[2], amount),
|
|
592
|
+
lerp(left[3], right[3], amount)
|
|
593
|
+
];
|
|
594
|
+
}
|
|
595
|
+
function tangentToWorld(local, normal) {
|
|
596
|
+
const up = Math.abs(normal[1]) < 0.999 ? [0, 1, 0] : [1, 0, 0];
|
|
597
|
+
const tangent = normalize3(cross3(up, normal));
|
|
598
|
+
const bitangent = cross3(normal, tangent);
|
|
599
|
+
return normalize3([
|
|
600
|
+
tangent[0] * local[0] + bitangent[0] * local[1] + normal[0] * local[2],
|
|
601
|
+
tangent[1] * local[0] + bitangent[1] * local[1] + normal[1] * local[2],
|
|
602
|
+
tangent[2] * local[0] + bitangent[2] * local[1] + normal[2] * local[2]
|
|
603
|
+
]);
|
|
604
|
+
}
|
|
605
|
+
function cross3(left, right) {
|
|
606
|
+
return [
|
|
607
|
+
left[1] * right[2] - left[2] * right[1],
|
|
608
|
+
left[2] * right[0] - left[0] * right[2],
|
|
609
|
+
left[0] * right[1] - left[1] * right[0]
|
|
610
|
+
];
|
|
611
|
+
}
|
|
612
|
+
function sampleBox(level, centerX, centerY, radius) {
|
|
613
|
+
let r = 0;
|
|
614
|
+
let g = 0;
|
|
615
|
+
let b = 0;
|
|
616
|
+
let a = 0;
|
|
617
|
+
let count = 0;
|
|
618
|
+
for (let y = centerY - radius; y <= centerY + radius; y += 1) {
|
|
619
|
+
const wrappedY = clamp(y, 0, level.height - 1);
|
|
620
|
+
for (let x = centerX - radius; x <= centerX + radius; x += 1) {
|
|
621
|
+
const wrappedX = modulo(x, level.width);
|
|
622
|
+
const index = (wrappedY * level.width + wrappedX) * 4;
|
|
623
|
+
r += level.data[index] ?? 0;
|
|
624
|
+
g += level.data[index + 1] ?? 0;
|
|
625
|
+
b += level.data[index + 2] ?? 0;
|
|
626
|
+
a += level.data[index + 3] ?? 255;
|
|
627
|
+
count += 1;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
return [
|
|
631
|
+
Math.round(r / count),
|
|
632
|
+
Math.round(g / count),
|
|
633
|
+
Math.round(b / count),
|
|
634
|
+
Math.round(a / count)
|
|
635
|
+
];
|
|
636
|
+
}
|
|
637
|
+
function sampleLinearHdrBox(level, centerX, centerY, radius) {
|
|
638
|
+
let r = 0;
|
|
639
|
+
let g = 0;
|
|
640
|
+
let b = 0;
|
|
641
|
+
let a = 0;
|
|
642
|
+
let count = 0;
|
|
643
|
+
for (let y = centerY - radius; y <= centerY + radius; y += 1) {
|
|
644
|
+
const wrappedY = clamp(y, 0, level.height - 1);
|
|
645
|
+
for (let x = centerX - radius; x <= centerX + radius; x += 1) {
|
|
646
|
+
const wrappedX = modulo(x, level.width);
|
|
647
|
+
const index = (wrappedY * level.width + wrappedX) * 4;
|
|
648
|
+
r += level.data[index] ?? 0;
|
|
649
|
+
g += level.data[index + 1] ?? 0;
|
|
650
|
+
b += level.data[index + 2] ?? 0;
|
|
651
|
+
a += level.data[index + 3] ?? 1;
|
|
652
|
+
count += 1;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
return [r / count, g / count, b / count, a / count];
|
|
656
|
+
}
|
|
657
|
+
function scaleLinearHdrEnvironment(source, exposure) {
|
|
658
|
+
if (!Number.isFinite(exposure) || exposure < 0) {
|
|
659
|
+
throw new RangeError("Environment HDR exposure must be finite and non-negative");
|
|
660
|
+
}
|
|
661
|
+
if (exposure === 1) {
|
|
662
|
+
return { width: source.width, height: source.height, data: new Float32Array(source.data) };
|
|
663
|
+
}
|
|
664
|
+
const data = new Float32Array(source.width * source.height * 4);
|
|
665
|
+
for (let index = 0; index < source.width * source.height; index += 1) {
|
|
666
|
+
const offset = index * 4;
|
|
667
|
+
data[offset] = Math.max(0, source.data[offset] ?? 0) * exposure;
|
|
668
|
+
data[offset + 1] = Math.max(0, source.data[offset + 1] ?? 0) * exposure;
|
|
669
|
+
data[offset + 2] = Math.max(0, source.data[offset + 2] ?? 0) * exposure;
|
|
670
|
+
data[offset + 3] = clampFinite(source.data[offset + 3] ?? 1, 0, 1, "HDR alpha");
|
|
671
|
+
}
|
|
672
|
+
return { width: source.width, height: source.height, data };
|
|
673
|
+
}
|
|
674
|
+
function encodeLinearRgbePixel(red, green, blue, alpha, output, offset) {
|
|
675
|
+
const r = Math.max(0, red);
|
|
676
|
+
const g = Math.max(0, green);
|
|
677
|
+
const b = Math.max(0, blue);
|
|
678
|
+
const maxChannel = Math.max(r, g, b);
|
|
679
|
+
if (maxChannel < 1e-32) {
|
|
680
|
+
output[offset] = 0;
|
|
681
|
+
output[offset + 1] = 0;
|
|
682
|
+
output[offset + 2] = 0;
|
|
683
|
+
output[offset + 3] = 0;
|
|
684
|
+
return;
|
|
685
|
+
}
|
|
686
|
+
const exponent = Math.ceil(Math.log2(maxChannel));
|
|
687
|
+
const scale = 256 / Math.pow(2, exponent);
|
|
688
|
+
output[offset] = clampByte(Math.round(r * scale));
|
|
689
|
+
output[offset + 1] = clampByte(Math.round(g * scale));
|
|
690
|
+
output[offset + 2] = clampByte(Math.round(b * scale));
|
|
691
|
+
output[offset + 3] = clampByte(exponent + 128);
|
|
692
|
+
if (alpha <= 0) {
|
|
693
|
+
output[offset + 3] = 0;
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
function numberToHalfFloat(value) {
|
|
697
|
+
if (Number.isNaN(value))
|
|
698
|
+
return 0x7e00;
|
|
699
|
+
if (value === Infinity)
|
|
700
|
+
return 0x7c00;
|
|
701
|
+
if (value === -Infinity)
|
|
702
|
+
return 0xfc00;
|
|
703
|
+
const sign = value < 0 ? 0x8000 : 0;
|
|
704
|
+
const absolute = Math.abs(value);
|
|
705
|
+
if (absolute === 0)
|
|
706
|
+
return sign;
|
|
707
|
+
if (absolute >= 65504)
|
|
708
|
+
return sign | 0x7bff;
|
|
709
|
+
if (absolute < 2 ** -14) {
|
|
710
|
+
return sign | Math.round(absolute / 2 ** -24);
|
|
711
|
+
}
|
|
712
|
+
const exponent = Math.floor(Math.log2(absolute));
|
|
713
|
+
const mantissa = Math.round((absolute / 2 ** exponent - 1) * 1024);
|
|
714
|
+
return sign | ((exponent + 15) << 10) | (mantissa & 0x03ff);
|
|
715
|
+
}
|
|
716
|
+
function toLinearHdrEnvironment(input, inputEncoding) {
|
|
717
|
+
switch (inputEncoding) {
|
|
718
|
+
case "rgba8-linear":
|
|
719
|
+
return decodeRgba8EnvironmentToLinear(input, "linear");
|
|
720
|
+
case "rgba8-srgb":
|
|
721
|
+
return decodeRgba8EnvironmentToLinear(input, "srgb");
|
|
722
|
+
case "rgbe":
|
|
723
|
+
return decodeRgbeEnvironmentMap(input);
|
|
724
|
+
case "linear-hdr":
|
|
725
|
+
validateHdrSource(input);
|
|
726
|
+
return { width: input.width, height: input.height, data: new Float32Array(input.data) };
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
function validateSource(source) {
|
|
730
|
+
if (!Number.isInteger(source.width) || source.width <= 0 || !Number.isInteger(source.height) || source.height <= 0) {
|
|
731
|
+
throw new RangeError("Environment map dimensions must be positive integers");
|
|
732
|
+
}
|
|
733
|
+
if (source.data.byteLength !== source.width * source.height * 4) {
|
|
734
|
+
throw new RangeError("Environment map data must contain exactly width * height * 4 RGBA8 bytes");
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
function validateHdrSource(source) {
|
|
738
|
+
if (!Number.isInteger(source.width) || source.width <= 0 || !Number.isInteger(source.height) || source.height <= 0) {
|
|
739
|
+
throw new RangeError("Environment HDR dimensions must be positive integers");
|
|
740
|
+
}
|
|
741
|
+
if (source.data.length !== source.width * source.height * 4) {
|
|
742
|
+
throw new RangeError("Environment HDR data must contain exactly width * height * 4 linear RGBA values");
|
|
743
|
+
}
|
|
744
|
+
for (const value of source.data) {
|
|
745
|
+
if (!Number.isFinite(value)) {
|
|
746
|
+
throw new RangeError("Environment HDR data must contain only finite values");
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
function maxMipLevels(width, height) {
|
|
751
|
+
return Math.floor(Math.log2(Math.max(width, height))) + 1;
|
|
752
|
+
}
|
|
753
|
+
function clamp(value, min, max) {
|
|
754
|
+
return Math.max(min, Math.min(max, value));
|
|
755
|
+
}
|
|
756
|
+
function clampByte(value) {
|
|
757
|
+
return Math.max(0, Math.min(255, value));
|
|
758
|
+
}
|
|
759
|
+
function modulo(value, divisor) {
|
|
760
|
+
return ((value % divisor) + divisor) % divisor;
|
|
761
|
+
}
|
|
762
|
+
function lerp(a, b, t) {
|
|
763
|
+
return a + (b - a) * t;
|
|
764
|
+
}
|
|
765
|
+
function validateNormalizedChannel(value, label) {
|
|
766
|
+
return clampFinite(value, 0, 1, label);
|
|
767
|
+
}
|
|
768
|
+
function clampFinite(value, min, max, label) {
|
|
769
|
+
if (!Number.isFinite(value)) {
|
|
770
|
+
throw new RangeError(`${label} must be finite`);
|
|
771
|
+
}
|
|
772
|
+
return Math.max(min, Math.min(max, value));
|
|
773
|
+
}
|
|
774
|
+
function decodeColorByte(byte, colorSpace) {
|
|
775
|
+
const normalized = byte / 255;
|
|
776
|
+
return colorSpace === "srgb" ? srgbChannelToLinear(normalized) : normalized;
|
|
777
|
+
}
|
|
778
|
+
function encodeColorByte(linear, colorSpace) {
|
|
779
|
+
const normalized = colorSpace === "srgb" ? linearChannelToSrgb(linear) : clampFinite(linear, 0, 1, "linear color");
|
|
780
|
+
return Math.round(normalized * 255);
|
|
781
|
+
}
|
|
782
|
+
function toneMap(value, operator) {
|
|
783
|
+
const linear = Math.max(0, value);
|
|
784
|
+
return operator === "linear" ? clamp(linear, 0, 1) : linear / (1 + linear);
|
|
785
|
+
}
|
|
786
|
+
function maxLinearValue(source) {
|
|
787
|
+
let max = 0;
|
|
788
|
+
for (let index = 0; index < source.width * source.height; index += 1) {
|
|
789
|
+
const offset = index * 4;
|
|
790
|
+
max = Math.max(max, source.data[offset] ?? 0, source.data[offset + 1] ?? 0, source.data[offset + 2] ?? 0);
|
|
791
|
+
}
|
|
792
|
+
return max;
|
|
793
|
+
}
|
|
794
|
+
//# sourceMappingURL=EnvironmentMapResources.js.map
|