@onerjs/core 8.51.6 → 8.51.8
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/Cameras/inputMapper.js +13 -9
- package/Cameras/inputMapper.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.views.pure.js.map +1 -1
- package/Engines/AbstractEngine/abstractEngine.views.types.d.ts +2 -1
- package/Engines/AbstractEngine/abstractEngine.views.types.js.map +1 -1
- package/Engines/abstractEngine.pure.js +11 -4
- package/Engines/abstractEngine.pure.js.map +1 -1
- package/Engines/engine.pure.d.ts +23 -0
- package/Engines/engine.pure.js +96 -1
- package/Engines/engine.pure.js.map +1 -1
- package/Engines/nativeEngine.pure.d.ts +4 -0
- package/Engines/nativeEngine.pure.js +6 -0
- package/Engines/nativeEngine.pure.js.map +1 -1
- package/Engines/thinNativeEngine.pure.d.ts +21 -0
- package/Engines/thinNativeEngine.pure.js +119 -4
- package/Engines/thinNativeEngine.pure.js.map +1 -1
- package/Engines/webgpuEngine.pure.d.ts +21 -0
- package/Engines/webgpuEngine.pure.js +46 -1
- package/Engines/webgpuEngine.pure.js.map +1 -1
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.d.ts +5 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js +8 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js.map +1 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.d.ts +278 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js +718 -0
- package/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js.map +1 -0
- package/Materials/GaussianSplatting/pure.d.ts +1 -0
- package/Materials/GaussianSplatting/pure.js +1 -0
- package/Materials/GaussianSplatting/pure.js.map +1 -1
- package/Materials/Textures/internalTexture.d.ts +11 -1
- package/Materials/Textures/internalTexture.js +23 -0
- package/Materials/Textures/internalTexture.js.map +1 -1
- package/Materials/index.d.ts +1 -0
- package/Materials/index.js +1 -0
- package/Materials/index.js.map +1 -1
- package/Materials/pure.d.ts +1 -0
- package/Materials/pure.js +1 -0
- package/Materials/pure.js.map +1 -1
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.d.ts +7 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.js +8 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.pure.d.ts +147 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.pure.js +257 -0
- package/Meshes/GaussianSplatting/gaussianSplattingDebugger.pure.js.map +1 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.d.ts +11 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js +31 -0
- package/Meshes/GaussianSplatting/gaussianSplattingMeshBase.pure.js.map +1 -1
- package/Meshes/GaussianSplatting/pure.d.ts +1 -0
- package/Meshes/GaussianSplatting/pure.js +1 -0
- package/Meshes/GaussianSplatting/pure.js.map +1 -1
- package/Meshes/abstractMesh.pure.js +3 -0
- package/Meshes/abstractMesh.pure.js.map +1 -1
- package/Meshes/index.d.ts +1 -0
- package/Meshes/index.js +1 -0
- package/Meshes/index.js.map +1 -1
- package/Meshes/pure.d.ts +1 -0
- package/Meshes/pure.js +1 -0
- package/Meshes/pure.js.map +1 -1
- package/Misc/tools.pure.js +1 -1
- package/Misc/tools.pure.js.map +1 -1
- package/Shaders/ShadersInclude/gaussianSplatting.js +33 -10
- package/Shaders/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/Shaders/gaussianSplatting.vertex.js +20 -1
- package/Shaders/gaussianSplatting.vertex.js.map +1 -1
- package/Shaders/picking.fragment.js +4 -1
- package/Shaders/picking.fragment.js.map +1 -1
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js +33 -10
- package/ShadersWGSL/ShadersInclude/gaussianSplatting.js.map +1 -1
- package/ShadersWGSL/gaussianSplatting.vertex.js +21 -2
- package/ShadersWGSL/gaussianSplatting.vertex.js.map +1 -1
- package/SmartAssets/index.d.ts +2 -2
- package/SmartAssets/index.js +2 -1
- package/SmartAssets/index.js.map +1 -1
- package/SmartAssets/pure.d.ts +1 -1
- package/SmartAssets/pure.js +2 -1
- package/SmartAssets/pure.js.map +1 -1
- package/SmartAssets/smartAssetManager.js +9 -0
- package/SmartAssets/smartAssetManager.js.map +1 -1
- package/package.json +1 -1
- package/scene.pure.js.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gaussianSplattingDebugMaterialPlugin.pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAO7D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAkC,gCAAgC,EAAE,MAAM,kCAAkC,CAAC;AACpH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEpD,gBAAgB;AAChB,MAAM,6BAA8B,SAAQ,eAAe;IAA3D;;QACI,kDAAkD;QAClD,mBAAc,GAAY,KAAK,CAAC;QAChC,0EAA0E;QAC1E,gBAAW,GAAW,CAAC,CAAC;QACxB,iEAAiE;QACjE,wBAAmB,GAAW,CAAC,CAAC;QAChC,8DAA8D;QAC9D,qBAAgB,GAAW,CAAC,CAAC;QAC7B,2EAA2E;QAC3E,yBAAoB,GAAW,CAAC,CAAC;QACjC,gFAAgF;QAChF,4BAAuB,GAAW,CAAC,CAAC;QACpC,yEAAy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YAAY,CAAC,GAAG,CAAC,CAAC;YAC3D,CAAC;YACD,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;gBACvB,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;gBAC3D,MAAM,CAAC,QAAQ,CAAC,eAAe,EAAE,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;YAC/D,CAAC;YACD,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;gBACpB,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;gBACrD,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YACzD,CAAC;YACD,IAAI,IAAI,CAAC,aAAa,KAAK,GAAG,EAAE,CAAC;gBAC7B,MAAM,CAAC,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;YAC3D,CAAC;QACL,CAAC;IACL,CAAC;IAED;;;OAGG;IACa,OAAO,CAAC,qBAA+B;QACnD,IAAI,CAAC,mBAAmB,EAAE,OAAO,EAAE,CAAC;QACpC,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC;IACpC,CAAC;CACJ;AAED,IAAI,WAAW,GAAG,KAAK,CAAC;AACxB;;;GAGG;AACH,MAAM,UAAU,4CAA4C;IACxD,IAAI,WAAW,EAAE,CAAC;QACd,OAAO;IACX,CAAC;IACD,WAAW,GAAG,IAAI,CAAC;IAEnB,aAAa,CAAC,8CAA8C,EAAE,oCAAoC,CAAC,CAAC;AACxG,CAAC","sourcesContent":["/** This file must only contain pure code and pure imports */\n\nimport { type Nullable } from \"../../types\";\nimport { type Scene } from \"../../scene\";\nimport { type AbstractEngine } from \"../../Engines/abstractEngine\";\nimport { type SubMesh } from \"../../Meshes/subMesh\";\nimport { type UniformBuffer } from \"../uniformBuffer\";\nimport { MaterialDefines } from \"../materialDefines\";\nimport { MaterialPluginBase } from \"../materialPluginBase.pure\";\nimport { ShaderLanguage } from \"../shaderLanguage\";\nimport { RegisterClass } from \"../../Misc/typeStore\";\nimport { type Vector3 } from \"../../Maths/math.vector\";\nimport { Logger } from \"../../Misc/logger\";\nimport { type GaussianSplattingMaterial, GetGaussianSplattingMaxPartCount } from \"./gaussianSplattingMaterial.pure\";\nimport { RawTexture } from \"../Textures/rawTexture\";\nimport { Constants } from \"../../Engines/constants\";\n\n/** @internal */\nclass GaussianSplattingDebugDefines extends MaterialDefines {\n /** Defines whether any debug feature is active */\n GS_DBG_ENABLED: boolean = false;\n /** Defines whether world-space clipping box is enabled (0: off, 1: on) */\n GS_DBG_CLIP: number = 0;\n /** Defines whether opacity culling is enabled (0: off, 1: on) */\n GS_DBG_CULL_OPACITY: number = 0;\n /** Defines whether size culling is enabled (0: off, 1: on) */\n GS_DBG_CULL_SIZE: number = 0;\n /** Defines whether per-splat opacity scaling is enabled (0: off, 1: on) */\n GS_DBG_OPACITY_SCALE: number = 0;\n /** Defines whether opacity saturation (flat disk) is enabled (0: off, 1: on) */\n GS_DBG_OPACITY_SATURATE: number = 0;\n /** Defines whether the DC (base) SH color is included (0: off, 1: on) */\n GS_DBG_SH_DC: number = 1;\n /** Defines whether SH band 1 contribution is included (0: off, 1: on) */\n GS_DBG_SH_ORDER1: number = 1;\n /** Defines whether SH band 2 contribution is included (0: off, 1: on) */\n GS_DBG_SH_ORDER2: number = 1;\n /** Defines whether SH band 3 contribution is included (0: off, 1: on) */\n GS_DBG_SH_ORDER3: number = 1;\n /** Defines whether SH band 4 contribution is included (0: off, 1: on) */\n GS_DBG_SH_ORDER4: number = 1;\n}\n\n/**\n * Per-part debug options for compound Gaussian splat meshes.\n * Each field is optional; unset fields fall back to the global setting on the plugin,\n * and if that is also unset, a neutral value is used (no culling, full SH, etc.).\n */\nexport interface IGaussianSplattingDebugOptions {\n /** World-space axis-aligned clipping box, or null to disable. */\n clippingBox: Nullable<{ min: Vector3; max: Vector3 }>;\n /** Opacity culling range [0..1], or null to disable. */\n opacityCulling: Nullable<{ min: number; max: number }>;\n /** Size culling range, or null to disable. */\n sizeCulling: Nullable<{ min: number; max: number }>;\n /** Scalar opacity multiplier. 1.0 = no change. */\n opacityScale: number;\n /** When true, replaces Gaussian falloff with flat disk opacity. */\n opacitySaturate: boolean;\n /** Include the DC (base) SH color. */\n shDc: boolean;\n /** Include SH band 1 contribution. */\n shOrder1: boolean;\n /** Include SH band 2 contribution. */\n shOrder2: boolean;\n /** Include SH band 3 contribution. */\n shOrder3: boolean;\n /** Include SH band 4 contribution. */\n shOrder4: boolean;\n}\n\n/**\n * Debug plugin for GaussianSplattingMaterial.\n * Provides runtime controls for clipping, opacity/size culling, opacity scaling,\n * opacity saturation, and per-SH-order toggling. All features are gated behind\n * the GS_DBG_ENABLED shader define — when every option is at its default value\n * the define is absent and the shader compiles to identical code as without the plugin.\n *\n * In compound mode (partCount \\> 0), per-part overrides can be set via setPartOptions().\n * Global settings act as defaults; per-part settings override them for that part index.\n */\nexport class GaussianSplattingDebugMaterialPlugin extends MaterialPluginBase {\n private _clippingBox: Nullable<{ min: Vector3; max: Vector3 }> = null;\n private _opacityCulling: Nullable<{ min: number; max: number }> = null;\n private _sizeCulling: Nullable<{ min: number; max: number }> = null;\n private _opacityScale: number = 1.0;\n private _opacitySaturate: boolean = false;\n private _shDc: boolean = true;\n private _shOrder1: boolean = true;\n private _shOrder2: boolean = true;\n private _shOrder3: boolean = true;\n private _shOrder4: boolean = true;\n\n // Per-part state (only populated when partCount > 0)\n private _partCount: number = 0;\n private _partClippingBoxes: Array<Nullable<{ min: Vector3; max: Vector3 }>> = [];\n private _partOpacityCullings: Array<Nullable<{ min: number; max: number }>> = [];\n private _partSizeCullings: Array<Nullable<{ min: number; max: number }>> = [];\n private _partOpacityScales: Array<Nullable<number>> = [];\n private _partOpacitySaturates: Array<Nullable<boolean>> = [];\n private _partShDcs: Array<Nullable<boolean>> = [];\n private _partShOrder1s: Array<Nullable<boolean>> = [];\n private _partShOrder2s: Array<Nullable<boolean>> = [];\n private _partShOrder3s: Array<Nullable<boolean>> = [];\n private _partShOrder4s: Array<Nullable<boolean>> = [];\n\n // Per-part debug LUT: MAX_PART_COUNT × 5 RGBA float texture (dbgPartData)\n private _dbgPartDataTexture: Nullable<RawTexture> = null;\n private _textureDirty: boolean = false;\n private _maxPartCount: number = 0;\n\n /**\n * Creates a new GaussianSplattingDebugMaterialPlugin.\n * @param material The GaussianSplattingMaterial to attach the plugin to.\n */\n constructor(material: GaussianSplattingMaterial) {\n super(material, \"GaussianSplattingDebug\", 200, new GaussianSplattingDebugDefines(), true, true);\n }\n\n private _isAnyFeatureActive(): boolean {\n return (\n this._clippingBox !== null ||\n this._opacityCulling !== null ||\n this._sizeCulling !== null ||\n this._opacityScale !== 1.0 ||\n this._opacitySaturate ||\n !this._shDc ||\n !this._shOrder1 ||\n !this._shOrder2 ||\n !this._shOrder3 ||\n !this._shOrder4 ||\n this._partClippingBoxes.some((b) => b !== null) ||\n this._partOpacityCullings.some((b) => b !== null) ||\n this._partSizeCullings.some((b) => b !== null) ||\n this._partOpacityScales.some((s) => s !== null) ||\n this._partOpacitySaturates.some((s) => s !== null) ||\n this._partShDcs.some((s) => s !== null) ||\n this._partShOrder1s.some((s) => s !== null) ||\n this._partShOrder2s.some((s) => s !== null) ||\n this._partShOrder3s.some((s) => s !== null) ||\n this._partShOrder4s.some((s) => s !== null)\n );\n }\n\n private _markDirty(): void {\n this.markAllDefinesAsDirty();\n this._textureDirty = true;\n }\n\n // ----- Public API -----\n\n /**\n * Number of parts in compound mode. Set automatically by GaussianSplattingDebugger.addMesh().\n * When 0 (non-compound), setPartOptions() logs an error.\n * @returns the part count\n */\n public get partCount(): number {\n return this._partCount;\n }\n public set partCount(count: number) {\n if (this._partCount !== count) {\n this._partCount = count;\n this._markDirty();\n }\n }\n\n /**\n * Sets per-part debug overrides for the given part index.\n * Only valid on compound meshes (partCount \\> 0); logs an error otherwise.\n * @param partIndex The zero-based part index.\n * @param options Partial set of debug options to override for this part.\n */\n public setPartOptions(partIndex: number, options: Partial<IGaussianSplattingDebugOptions>): void {\n if (this._partCount === 0) {\n Logger.Error(\"GaussianSplattingDebugMaterialPlugin.setPartOptions: called on a non-compound mesh. partCount is 0.\");\n return;\n }\n if (options.clippingBox !== undefined) {\n this._partClippingBoxes[partIndex] = options.clippingBox;\n }\n if (options.opacityCulling !== undefined) {\n this._partOpacityCullings[partIndex] = options.opacityCulling;\n }\n if (options.sizeCulling !== undefined) {\n this._partSizeCullings[partIndex] = options.sizeCulling;\n }\n if (options.opacityScale !== undefined) {\n this._partOpacityScales[partIndex] = options.opacityScale;\n }\n if (options.opacitySaturate !== undefined) {\n this._partOpacitySaturates[partIndex] = options.opacitySaturate;\n }\n if (options.shDc !== undefined) {\n this._partShDcs[partIndex] = options.shDc;\n }\n if (options.shOrder1 !== undefined) {\n this._partShOrder1s[partIndex] = options.shOrder1;\n }\n if (options.shOrder2 !== undefined) {\n this._partShOrder2s[partIndex] = options.shOrder2;\n }\n if (options.shOrder3 !== undefined) {\n this._partShOrder3s[partIndex] = options.shOrder3;\n }\n if (options.shOrder4 !== undefined) {\n this._partShOrder4s[partIndex] = options.shOrder4;\n }\n this._markDirty();\n }\n\n /**\n * Clears all per-part debug overrides for the given part index,\n * falling back to global settings.\n * @param partIndex The zero-based part index.\n */\n public clearPartOptions(partIndex: number): void {\n this._partClippingBoxes[partIndex] = null;\n this._partOpacityCullings[partIndex] = null;\n this._partSizeCullings[partIndex] = null;\n this._partOpacityScales[partIndex] = null;\n this._partOpacitySaturates[partIndex] = null;\n this._partShDcs[partIndex] = null;\n this._partShOrder1s[partIndex] = null;\n this._partShOrder2s[partIndex] = null;\n this._partShOrder3s[partIndex] = null;\n this._partShOrder4s[partIndex] = null;\n this._markDirty();\n }\n\n /**\n * World-space axis-aligned clipping box. Splats outside are not rendered.\n * Set to null to disable clipping.\n * Example: `{ min: new Vector3(-2,-2,-2), max: new Vector3(2,2,2) }`\n */\n public get clippingBox(): Nullable<{ min: Vector3; max: Vector3 }> {\n return this._clippingBox;\n }\n public set clippingBox(value: Nullable<{ min: Vector3; max: Vector3 }>) {\n this._clippingBox = value;\n this._markDirty();\n }\n\n /**\n * Opacity culling range [0..1]. Splats whose stored opacity falls outside this\n * range are not rendered. Set to null to disable.\n */\n public get opacityCulling(): Nullable<{ min: number; max: number }> {\n return this._opacityCulling;\n }\n public set opacityCulling(value: Nullable<{ min: number; max: number }>) {\n this._opacityCulling = value;\n this._markDirty();\n }\n\n /**\n * Size culling range. Size is pow(|det(Σ)|, 1/6) of the 3D covariance matrix,\n * equal to the geometric mean of the principal radii. Use GaussianSplattingMeshBase.splatSizeRange\n * to find the asset's range. Set to null to disable.\n */\n public get sizeCulling(): Nullable<{ min: number; max: number }> {\n return this._sizeCulling;\n }\n public set sizeCulling(value: Nullable<{ min: number; max: number }>) {\n this._sizeCulling = value;\n this._markDirty();\n }\n\n /**\n * Scalar multiplier applied to every splat's opacity after all other modifiers.\n * 1.0 (default) = no change.\n */\n public get opacityScale(): number {\n return this._opacityScale;\n }\n public set opacityScale(value: number) {\n this._opacityScale = value;\n this._markDirty();\n }\n\n /**\n * When true, replaces the Gaussian spatial falloff with a flat uniform opacity,\n * making each splat appear as a solid disk with its raw alpha value.\n */\n public get opacitySaturate(): boolean {\n return this._opacitySaturate;\n }\n public set opacitySaturate(value: boolean) {\n this._opacitySaturate = value;\n this._markDirty();\n }\n\n /** Include the DC (base) color from colorsTexture. Default: true. */\n public get shDc(): boolean {\n return this._shDc;\n }\n public set shDc(value: boolean) {\n this._shDc = value;\n this._markDirty();\n }\n\n /** Include SH band 1 contribution. Default: true. */\n public get shOrder1(): boolean {\n return this._shOrder1;\n }\n public set shOrder1(value: boolean) {\n this._shOrder1 = value;\n this._markDirty();\n }\n\n /** Include SH band 2 contribution. Default: true. */\n public get shOrder2(): boolean {\n return this._shOrder2;\n }\n public set shOrder2(value: boolean) {\n this._shOrder2 = value;\n this._markDirty();\n }\n\n /** Include SH band 3 contribution. Default: true. */\n public get shOrder3(): boolean {\n return this._shOrder3;\n }\n public set shOrder3(value: boolean) {\n this._shOrder3 = value;\n this._markDirty();\n }\n\n /** Include SH band 4 contribution. Default: true. */\n public get shOrder4(): boolean {\n return this._shOrder4;\n }\n public set shOrder4(value: boolean) {\n this._shOrder4 = value;\n this._markDirty();\n }\n\n // ----- Plugin overrides -----\n\n /**\n * Adds the per-part debug data texture name to the sampler list so the effect can bind it.\n * @param samplers the sampler list to populate\n */\n public override getSamplers(samplers: string[]): void {\n samplers.push(\"dbgPartData\");\n }\n\n /** @returns the class name of this plugin */\n public override getClassName(): string {\n return \"GaussianSplattingDebugMaterialPlugin\";\n }\n\n /**\n * @param shaderLanguage the shader language to check\n * @returns true for GLSL and WGSL\n */\n public override isCompatible(shaderLanguage: ShaderLanguage): boolean {\n switch (shaderLanguage) {\n case ShaderLanguage.GLSL:\n case ShaderLanguage.WGSL:\n return true;\n default:\n return false;\n }\n }\n\n /**\n * Always ready — no async resources.\n * @param _defines unused\n * @param _scene unused\n * @param _engine unused\n * @param _subMesh unused\n * @returns true\n */\n public override isReadyForSubMesh(_defines: MaterialDefines, _scene: Scene, _engine: AbstractEngine, _subMesh: SubMesh): boolean {\n return true;\n }\n\n /**\n * Sets shader defines from current property state. GS_DBG_ENABLED is set to true\n * only when at least one feature is non-default, ensuring zero overhead otherwise.\n * Sub-flags also check per-part arrays so compound-only overrides activate the correct\n * code paths even when the global setting is at its default.\n * @param defines the defines object\n */\n public override prepareDefines(defines: GaussianSplattingDebugDefines): void {\n defines.GS_DBG_ENABLED = this._isAnyFeatureActive();\n defines.GS_DBG_CLIP = this._clippingBox !== null || this._partClippingBoxes.some((b) => b !== null) ? 1 : 0;\n defines.GS_DBG_CULL_OPACITY = this._opacityCulling !== null || this._partOpacityCullings.some((b) => b !== null) ? 1 : 0;\n defines.GS_DBG_CULL_SIZE = this._sizeCulling !== null || this._partSizeCullings.some((b) => b !== null) ? 1 : 0;\n defines.GS_DBG_OPACITY_SCALE = this._opacityScale !== 1.0 || this._partOpacityScales.some((s) => s !== null) ? 1 : 0;\n defines.GS_DBG_OPACITY_SATURATE = this._opacitySaturate || this._partOpacitySaturates.some((s) => s !== null) ? 1 : 0;\n defines.GS_DBG_SH_DC = !this._shDc || this._partShDcs.some((s) => s !== null) ? 0 : 1;\n defines.GS_DBG_SH_ORDER1 = !this._shOrder1 || this._partShOrder1s.some((s) => s !== null) ? 0 : 1;\n defines.GS_DBG_SH_ORDER2 = !this._shOrder2 || this._partShOrder2s.some((s) => s !== null) ? 0 : 1;\n defines.GS_DBG_SH_ORDER3 = !this._shOrder3 || this._partShOrder3s.some((s) => s !== null) ? 0 : 1;\n defines.GS_DBG_SH_ORDER4 = !this._shOrder4 || this._partShOrder4s.some((s) => s !== null) ? 0 : 1;\n }\n\n /**\n * Returns shader code injections for the debug features.\n * @param shaderType \"vertex\" or \"fragment\"\n * @param shaderLanguage GLSL or WGSL\n * @returns map of injection-point name to injected code, or null\n */\n public override getCustomCode(shaderType: string, shaderLanguage = ShaderLanguage.GLSL): Nullable<{ [pointName: string]: string }> {\n if (shaderLanguage === ShaderLanguage.WGSL) {\n return this._getCustomCodeWGSL(shaderType);\n }\n return this._getCustomCodeGLSL(shaderType);\n }\n\n private _getCustomCodeGLSL(shaderType: string): Nullable<{ [pointName: string]: string }> {\n if (shaderType === \"vertex\") {\n return {\n CUSTOM_VERTEX_DEFINITIONS: `\n#if defined(GS_DBG_ENABLED) && GS_DBG_CLIP == 1 && !defined(IS_COMPOUND)\nuniform vec3 dbgClipMin;\nuniform vec3 dbgClipMax;\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_OPACITY == 1 && !defined(IS_COMPOUND)\nuniform float dbgMinOpacity;\nuniform float dbgMaxOpacity;\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_SIZE == 1 && !defined(IS_COMPOUND)\nuniform float dbgMinSize;\nuniform float dbgMaxSize;\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_OPACITY_SCALE == 1 && !defined(IS_COMPOUND)\nuniform float dbgOpacityScale;\n#endif\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\nuniform sampler2D dbgPartData;\nvarying float vPartIndex;\n#endif\n`,\n CUSTOM_VERTEX_UPDATE: `\n#if defined(GS_DBG_ENABLED) && GS_DBG_CLIP == 1 && !defined(IS_COMPOUND)\n if (worldPos.x < dbgClipMin.x || worldPos.x > dbgClipMax.x ||\n worldPos.y < dbgClipMin.y || worldPos.y > dbgClipMax.y ||\n worldPos.z < dbgClipMin.z || worldPos.z > dbgClipMax.z) {\n scale = vec2(0.0);\n }\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_OPACITY == 1 && !defined(IS_COMPOUND)\n if (splat.color.w < dbgMinOpacity || splat.color.w > dbgMaxOpacity) {\n scale = vec2(0.0);\n }\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_SIZE == 1 && !defined(IS_COMPOUND)\n {\n float _d0 = splat.covA.x; float _d1 = splat.covA.y; float _d2 = splat.covA.z;\n float _d3 = splat.covA.w; float _d4 = splat.covB.x; float _d5 = splat.covB.y;\n float _det = _d0*(_d3*_d5 - _d4*_d4) - _d1*(_d1*_d5 - _d4*_d2) + _d2*(_d1*_d4 - _d3*_d2);\n float _sz = pow(abs(_det), 1.0/6.0);\n if (_sz < dbgMinSize || _sz > dbgMaxSize) {\n scale = vec2(0.0);\n }\n }\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_OPACITY_SCALE == 1 && !defined(IS_COMPOUND)\n vColor.w *= dbgOpacityScale;\n#endif\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\n {\n int _pIdx = int(splat.partIndex);\n vPartIndex = float(splat.partIndex);\n vec4 _row0 = texelFetch(dbgPartData, ivec2(_pIdx, 0), 0);\n vec4 _row1 = texelFetch(dbgPartData, ivec2(_pIdx, 1), 0);\n vec4 _row2 = texelFetch(dbgPartData, ivec2(_pIdx, 2), 0);\n vec3 _clipMin = _row0.xyz;\n vec3 _clipMax = vec3(_row0.w, _row1.xy);\n float _minOp = _row1.z;\n float _maxOp = _row1.w;\n float _minSz = _row2.x;\n float _maxSz = _row2.y;\n float _opSc = _row2.z;\n #if GS_DBG_CLIP == 1\n if (worldPos.x < _clipMin.x || worldPos.x > _clipMax.x ||\n worldPos.y < _clipMin.y || worldPos.y > _clipMax.y ||\n worldPos.z < _clipMin.z || worldPos.z > _clipMax.z) {\n scale = vec2(0.0);\n }\n #endif\n #if GS_DBG_CULL_OPACITY == 1\n if (splat.color.w < _minOp || splat.color.w > _maxOp) {\n scale = vec2(0.0);\n }\n #endif\n #if GS_DBG_CULL_SIZE == 1\n {\n float _d0 = splat.covA.x; float _d1 = splat.covA.y; float _d2 = splat.covA.z;\n float _d3 = splat.covA.w; float _d4 = splat.covB.x; float _d5 = splat.covB.y;\n float _det = _d0*(_d3*_d5 - _d4*_d4) - _d1*(_d1*_d5 - _d4*_d2) + _d2*(_d1*_d4 - _d3*_d2);\n float _sz = pow(abs(_det), 1.0/6.0);\n if (_sz < _minSz || _sz > _maxSz) {\n scale = vec2(0.0);\n }\n }\n #endif\n #if GS_DBG_OPACITY_SCALE == 1\n vColor.w *= _opSc;\n #endif\n }\n#endif\n`,\n };\n } else if (shaderType === \"fragment\") {\n return {\n CUSTOM_FRAGMENT_DEFINITIONS: `\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\nuniform sampler2D dbgPartData;\nvarying float vPartIndex;\n#endif\n`,\n CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR: `\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\n if (texelFetch(dbgPartData, ivec2(int(vPartIndex + 0.5), 2), 0).w > 0.5) { finalColor.a = vColor.a; }\n#elif defined(GS_DBG_ENABLED) && GS_DBG_OPACITY_SATURATE == 1\n finalColor.a = vColor.a;\n#endif\n`,\n };\n }\n return null;\n }\n\n private _getCustomCodeWGSL(shaderType: string): Nullable<{ [pointName: string]: string }> {\n if (shaderType === \"vertex\") {\n return {\n CUSTOM_VERTEX_DEFINITIONS: `\n#if defined(GS_DBG_ENABLED) && GS_DBG_CLIP == 1 && !defined(IS_COMPOUND)\nuniform dbgClipMin: vec3f;\nuniform dbgClipMax: vec3f;\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_OPACITY == 1 && !defined(IS_COMPOUND)\nuniform dbgMinOpacity: f32;\nuniform dbgMaxOpacity: f32;\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_SIZE == 1 && !defined(IS_COMPOUND)\nuniform dbgMinSize: f32;\nuniform dbgMaxSize: f32;\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_OPACITY_SCALE == 1 && !defined(IS_COMPOUND)\nuniform dbgOpacityScale: f32;\n#endif\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\nvar dbgPartData: texture_2d<f32>;\nvarying vPartIndex: f32;\n#endif\n`,\n CUSTOM_VERTEX_UPDATE: `\n#if defined(GS_DBG_ENABLED) && GS_DBG_CLIP == 1 && !defined(IS_COMPOUND)\n if (worldPos.x < uniforms.dbgClipMin.x || worldPos.x > uniforms.dbgClipMax.x ||\n worldPos.y < uniforms.dbgClipMin.y || worldPos.y > uniforms.dbgClipMax.y ||\n worldPos.z < uniforms.dbgClipMin.z || worldPos.z > uniforms.dbgClipMax.z) {\n scale = vec2f(0.0);\n }\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_OPACITY == 1 && !defined(IS_COMPOUND)\n if (splat.color.w < uniforms.dbgMinOpacity || splat.color.w > uniforms.dbgMaxOpacity) {\n scale = vec2f(0.0);\n }\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_CULL_SIZE == 1 && !defined(IS_COMPOUND)\n {\n let _d0 = splat.covA.x; let _d1 = splat.covA.y; let _d2 = splat.covA.z;\n let _d3 = splat.covA.w; let _d4 = splat.covB.x; let _d5 = splat.covB.y;\n let _det = _d0*(_d3*_d5 - _d4*_d4) - _d1*(_d1*_d5 - _d4*_d2) + _d2*(_d1*_d4 - _d3*_d2);\n let _sz = pow(abs(_det), 1.0/6.0);\n if (_sz < uniforms.dbgMinSize || _sz > uniforms.dbgMaxSize) {\n scale = vec2f(0.0);\n }\n }\n#endif\n#if defined(GS_DBG_ENABLED) && GS_DBG_OPACITY_SCALE == 1 && !defined(IS_COMPOUND)\n vertexOutputs.vColor.w *= uniforms.dbgOpacityScale;\n#endif\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\n {\n let _pIdx = i32(splat.partIndex);\n vertexOutputs.vPartIndex = f32(splat.partIndex);\n let _row0 = textureLoad(dbgPartData, vec2i(_pIdx, 0), 0);\n let _row1 = textureLoad(dbgPartData, vec2i(_pIdx, 1), 0);\n let _row2 = textureLoad(dbgPartData, vec2i(_pIdx, 2), 0);\n let _clipMin = _row0.xyz;\n let _clipMax = vec3f(_row0.w, _row1.xy);\n let _minOp = _row1.z;\n let _maxOp = _row1.w;\n let _minSz = _row2.x;\n let _maxSz = _row2.y;\n let _opSc = _row2.z;\n #if GS_DBG_CLIP == 1\n if (worldPos.x < _clipMin.x || worldPos.x > _clipMax.x ||\n worldPos.y < _clipMin.y || worldPos.y > _clipMax.y ||\n worldPos.z < _clipMin.z || worldPos.z > _clipMax.z) {\n scale = vec2f(0.0);\n }\n #endif\n #if GS_DBG_CULL_OPACITY == 1\n if (splat.color.w < _minOp || splat.color.w > _maxOp) {\n scale = vec2f(0.0);\n }\n #endif\n #if GS_DBG_CULL_SIZE == 1\n {\n let _d0 = splat.covA.x; let _d1 = splat.covA.y; let _d2 = splat.covA.z;\n let _d3 = splat.covA.w; let _d4 = splat.covB.x; let _d5 = splat.covB.y;\n let _det = _d0*(_d3*_d5 - _d4*_d4) - _d1*(_d1*_d5 - _d4*_d2) + _d2*(_d1*_d4 - _d3*_d2);\n let _sz = pow(abs(_det), 1.0/6.0);\n if (_sz < _minSz || _sz > _maxSz) {\n scale = vec2f(0.0);\n }\n }\n #endif\n #if GS_DBG_OPACITY_SCALE == 1\n vertexOutputs.vColor.w *= _opSc;\n #endif\n }\n#endif\n`,\n };\n } else if (shaderType === \"fragment\") {\n return {\n CUSTOM_FRAGMENT_DEFINITIONS: `\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\nvar dbgPartData: texture_2d<f32>;\nvarying vPartIndex: f32;\n#endif\n`,\n CUSTOM_FRAGMENT_BEFORE_FRAGCOLOR: `\n#if defined(GS_DBG_ENABLED) && IS_COMPOUND\n if (textureLoad(dbgPartData, vec2i(i32(fragmentInputs.vPartIndex + 0.5), 2), 0).w > 0.5) {\n let _gsdbgA: f32 = -dot(fragmentInputs.vPosition, fragmentInputs.vPosition);\n if (_gsdbgA > -4.0) { finalColor.a = fragmentInputs.vColor.a; }\n }\n#elif defined(GS_DBG_ENABLED) && GS_DBG_OPACITY_SATURATE == 1\n {\n let _gsdbgA: f32 = -dot(fragmentInputs.vPosition, fragmentInputs.vPosition);\n if (_gsdbgA > -4.0) {\n finalColor.a = fragmentInputs.vColor.a;\n }\n }\n#endif\n`,\n };\n }\n return null;\n }\n\n /**\n * Declares the non-compound scalar debug uniform names as external so the Effect can\n * resolve their locations. WGSL uniforms are declared inline in getCustomCode() injections.\n * @returns uniform descriptor with externalUniforms list\n */\n public override getUniforms(): {\n ubo?: Array<{ name: string; size?: number; type?: string; arraySize?: number }>;\n vertex?: string;\n fragment?: string;\n externalUniforms?: string[];\n } {\n return {\n externalUniforms: [\"dbgClipMin\", \"dbgClipMax\", \"dbgMinOpacity\", \"dbgMaxOpacity\", \"dbgMinSize\", \"dbgMaxSize\", \"dbgOpacityScale\"],\n };\n }\n\n private _buildTextureData(partCount: number): Float32Array {\n const maxPartCount = this._maxPartCount;\n const data = new Float32Array(maxPartCount * 5 * 4);\n for (let i = 0; i < maxPartCount; i++) {\n const r0 = i * 4;\n const r1 = (maxPartCount + i) * 4;\n const r2 = (maxPartCount * 2 + i) * 4;\n const r3 = (maxPartCount * 3 + i) * 4;\n const r4 = (maxPartCount * 4 + i) * 4;\n\n // Row 0: clipMin.xyz, clipMax.x — Row 1: clipMax.yz, minOpacity, maxOpacity\n const box = i < partCount ? (this._partClippingBoxes[i] ?? this._clippingBox) : this._clippingBox;\n if (box) {\n data[r0] = box.min.x;\n data[r0 + 1] = box.min.y;\n data[r0 + 2] = box.min.z;\n data[r0 + 3] = box.max.x;\n data[r1] = box.max.y;\n data[r1 + 1] = box.max.z;\n } else {\n data[r0] = -1e9;\n data[r0 + 1] = -1e9;\n data[r0 + 2] = -1e9;\n data[r0 + 3] = 1e9;\n data[r1] = 1e9;\n data[r1 + 1] = 1e9;\n }\n const opCull = i < partCount ? (this._partOpacityCullings[i] ?? this._opacityCulling) : this._opacityCulling;\n data[r1 + 2] = opCull ? opCull.min : 0.0;\n data[r1 + 3] = opCull ? opCull.max : 1.0;\n\n // Row 2: minSize, maxSize, opacityScale, opacitySaturate\n const szCull = i < partCount ? (this._partSizeCullings[i] ?? this._sizeCulling) : this._sizeCulling;\n data[r2] = szCull ? szCull.min : 0.0;\n data[r2 + 1] = szCull ? szCull.max : 1e9;\n data[r2 + 2] = i < partCount ? (this._partOpacityScales[i] ?? this._opacityScale) : this._opacityScale;\n const sat = i < partCount ? (this._partOpacitySaturates[i] ?? this._opacitySaturate) : this._opacitySaturate;\n data[r2 + 3] = sat ? 1.0 : 0.0;\n\n // Row 3: shDc, shOrder1, shOrder2, shOrder3\n data[r3] = (i < partCount ? (this._partShDcs[i] ?? this._shDc) : this._shDc) ? 1.0 : 0.0;\n data[r3 + 1] = (i < partCount ? (this._partShOrder1s[i] ?? this._shOrder1) : this._shOrder1) ? 1.0 : 0.0;\n data[r3 + 2] = (i < partCount ? (this._partShOrder2s[i] ?? this._shOrder2) : this._shOrder2) ? 1.0 : 0.0;\n data[r3 + 3] = (i < partCount ? (this._partShOrder3s[i] ?? this._shOrder3) : this._shOrder3) ? 1.0 : 0.0;\n\n // Row 4: shOrder4, padding\n data[r4] = (i < partCount ? (this._partShOrder4s[i] ?? this._shOrder4) : this._shOrder4) ? 1.0 : 0.0;\n }\n return data;\n }\n\n private _updateOrCreateTexture(scene: Scene): void {\n if (!this._maxPartCount) {\n this._maxPartCount = GetGaussianSplattingMaxPartCount(scene.getEngine());\n }\n const data = this._buildTextureData(this._partCount);\n if (!this._dbgPartDataTexture) {\n this._dbgPartDataTexture = RawTexture.CreateRGBATexture(\n data,\n this._maxPartCount,\n 5,\n scene,\n false,\n false,\n Constants.TEXTURE_NEAREST_SAMPLINGMODE,\n Constants.TEXTURETYPE_FLOAT\n );\n } else {\n this._dbgPartDataTexture.update(data);\n }\n this._textureDirty = false;\n }\n\n /**\n * Binds uniform values each frame. Scalar uniforms are uploaded for non-compound mode;\n * the per-part data texture is updated and bound for compound mode.\n * @param _uniformBuffer unused\n * @param _scene the current scene\n * @param _engine unused\n * @param subMesh the submesh being rendered\n */\n public override bindForSubMesh(_uniformBuffer: UniformBuffer, _scene: Scene, _engine: AbstractEngine, subMesh: SubMesh): void {\n const effect = subMesh.effect;\n if (!effect) {\n return;\n }\n\n if (this._partCount > 0 && this._isAnyFeatureActive()) {\n // Compound mode: pack per-part data into a texture (only when the debug path is active)\n if (this._textureDirty || !this._dbgPartDataTexture) {\n this._updateOrCreateTexture(_scene);\n }\n if (this._dbgPartDataTexture) {\n effect.setTexture(\"dbgPartData\", this._dbgPartDataTexture);\n }\n } else if (this._partCount === 0) {\n // Non-compound: upload scalar uniforms\n if (this._clippingBox) {\n effect.setVector3(\"dbgClipMin\", this._clippingBox.min);\n effect.setVector3(\"dbgClipMax\", this._clippingBox.max);\n }\n if (this._opacityCulling) {\n effect.setFloat(\"dbgMinOpacity\", this._opacityCulling.min);\n effect.setFloat(\"dbgMaxOpacity\", this._opacityCulling.max);\n }\n if (this._sizeCulling) {\n effect.setFloat(\"dbgMinSize\", this._sizeCulling.min);\n effect.setFloat(\"dbgMaxSize\", this._sizeCulling.max);\n }\n if (this._opacityScale !== 1.0) {\n effect.setFloat(\"dbgOpacityScale\", this._opacityScale);\n }\n }\n }\n\n /**\n * Disposes the per-part data texture.\n * @param _forceDisposeTextures unused; the LUT texture is always disposed as it is owned by this plugin\n */\n public override dispose(_forceDisposeTextures?: boolean): void {\n this._dbgPartDataTexture?.dispose();\n this._dbgPartDataTexture = null;\n }\n}\n\nlet _Registered = false;\n/**\n * Register side effects for GaussianSplattingDebugMaterialPlugin.\n * Safe to call multiple times; only the first call has an effect.\n */\nexport function RegisterGaussianSplattingDebugMaterialPlugin(): void {\n if (_Registered) {\n return;\n }\n _Registered = true;\n\n RegisterClass(\"BABYLON.GaussianSplattingDebugMaterialPlugin\", GaussianSplattingDebugMaterialPlugin);\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Pure barrel — re-exports only side-effect-free modules */
|
|
2
|
+
export * from "./gaussianSplattingDebugMaterialPlugin.pure.js";
|
|
2
3
|
export * from "./gaussianSplattingGpuPickingMaterialPlugin.pure.js";
|
|
3
4
|
export * from "./gaussianSplattingMaterial.pure.js";
|
|
4
5
|
export * from "./gaussianSplattingSolidColorMaterialPlugin.pure.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** Pure barrel — re-exports only side-effect-free modules */
|
|
2
|
+
export * from "./gaussianSplattingDebugMaterialPlugin.pure.js";
|
|
2
3
|
export * from "./gaussianSplattingGpuPickingMaterialPlugin.pure.js";
|
|
3
4
|
export * from "./gaussianSplattingMaterial.pure.js";
|
|
4
5
|
export * from "./gaussianSplattingSolidColorMaterialPlugin.pure.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/GaussianSplatting/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\nexport * from \"./gaussianSplattingGpuPickingMaterialPlugin.pure\";\nexport * from \"./gaussianSplattingMaterial.pure\";\nexport * from \"./gaussianSplattingSolidColorMaterialPlugin.pure\";\n"]}
|
|
1
|
+
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/GaussianSplatting/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kDAAkD,CAAC;AACjE,cAAc,kCAAkC,CAAC;AACjD,cAAc,kDAAkD,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\nexport * from \"./gaussianSplattingDebugMaterialPlugin.pure\";\nexport * from \"./gaussianSplattingGpuPickingMaterialPlugin.pure\";\nexport * from \"./gaussianSplattingMaterial.pure\";\nexport * from \"./gaussianSplattingSolidColorMaterialPlugin.pure\";\n"]}
|
|
@@ -69,7 +69,17 @@ export declare enum InternalTextureSource {
|
|
|
69
69
|
/**
|
|
70
70
|
* Texture content is a depth texture
|
|
71
71
|
*/
|
|
72
|
-
Depth = 14
|
|
72
|
+
Depth = 14,
|
|
73
|
+
/**
|
|
74
|
+
* Texture wraps an externally created graphics resource (WebGL handle, GPUTexture,
|
|
75
|
+
* native handle, etc.) supplied via wrap{WebGL,Native,WebGPU}Texture. On dispose,
|
|
76
|
+
* the wrapped resource is released along with the InternalTexture just like any
|
|
77
|
+
* other source. Consumers can repoint the wrapper at a fresh external handle
|
|
78
|
+
* (e.g., after context-loss / device-loss restore) via
|
|
79
|
+
* updateWrapped{WebGL,Native,WebGPU}Texture without losing references held by
|
|
80
|
+
* materials, render-target wrappers, particle systems, etc.
|
|
81
|
+
*/
|
|
82
|
+
External = 15
|
|
73
83
|
}
|
|
74
84
|
/**
|
|
75
85
|
* Class used to store data associated with WebGL texture data for the engine
|
|
@@ -65,6 +65,16 @@ export var InternalTextureSource;
|
|
|
65
65
|
* Texture content is a depth texture
|
|
66
66
|
*/
|
|
67
67
|
InternalTextureSource[InternalTextureSource["Depth"] = 14] = "Depth";
|
|
68
|
+
/**
|
|
69
|
+
* Texture wraps an externally created graphics resource (WebGL handle, GPUTexture,
|
|
70
|
+
* native handle, etc.) supplied via wrap{WebGL,Native,WebGPU}Texture. On dispose,
|
|
71
|
+
* the wrapped resource is released along with the InternalTexture just like any
|
|
72
|
+
* other source. Consumers can repoint the wrapper at a fresh external handle
|
|
73
|
+
* (e.g., after context-loss / device-loss restore) via
|
|
74
|
+
* updateWrapped{WebGL,Native,WebGPU}Texture without losing references held by
|
|
75
|
+
* materials, render-target wrappers, particle systems, etc.
|
|
76
|
+
*/
|
|
77
|
+
InternalTextureSource[InternalTextureSource["External"] = 15] = "External";
|
|
68
78
|
})(InternalTextureSource || (InternalTextureSource = {}));
|
|
69
79
|
/**
|
|
70
80
|
* Class used to store data associated with WebGL texture data for the engine
|
|
@@ -405,6 +415,12 @@ export class InternalTexture extends TextureSampler {
|
|
|
405
415
|
// Will be handled at the RenderTargetWrapper level
|
|
406
416
|
break;
|
|
407
417
|
}
|
|
418
|
+
case 15 /* InternalTextureSource.External */: {
|
|
419
|
+
// The underlying resource is owned by the host application; Babylon cannot rebuild it.
|
|
420
|
+
// The host re-supplies a fresh handle via updateWrappedWebGLTexture / updateWrappedNativeTexture /
|
|
421
|
+
// updateWrappedWebGPUTexture from its onContextRestoredObservable handler.
|
|
422
|
+
break;
|
|
423
|
+
}
|
|
408
424
|
}
|
|
409
425
|
}
|
|
410
426
|
/**
|
|
@@ -414,6 +430,13 @@ export class InternalTexture extends TextureSampler {
|
|
|
414
430
|
// TODO what about refcount on target?
|
|
415
431
|
this._hardwareTexture?.setUsage(target._source, this.generateMipMaps, this.is2DArray, this.isCube, this.is3D, this.width, this.height, this.depth);
|
|
416
432
|
target._hardwareTexture = this._hardwareTexture;
|
|
433
|
+
// Refresh the target's uniqueId so that caches keyed by uniqueId (e.g. the
|
|
434
|
+
// WebGPU global bind-group cache) see the hardware texture as a new resource
|
|
435
|
+
// and rebuild GPU bind groups referencing it. Without this, callers that swap
|
|
436
|
+
// a raw GPU texture for a prefiltered one (e.g. HDR/PMREM prefiltering) would
|
|
437
|
+
// continue to receive stale GPUBindGroups that hold views over the now-destroyed
|
|
438
|
+
// source GPU texture, causing "Destroyed texture used in a submit" errors.
|
|
439
|
+
target._setUniqueId(InternalTexture._Counter++);
|
|
417
440
|
if (swapAll) {
|
|
418
441
|
target._isRGBD = this._isRGBD;
|
|
419
442
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalTexture.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Textures/internalTexture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD;;GAEG;AACH,MAAM,CAAN,IAAkB,qBA6DjB;AA7DD,WAAkB,qBAAqB;IACnC;;OAEG;IACH,uEAAO,CAAA;IACP;;OAEG;IACH,+DAAG,CAAA;IACH;;OAEG;IACH,iEAAI,CAAA;IACJ;;OAEG;IACH,+DAAG,CAAA;IACH;;OAEG;IACH,uEAAO,CAAA;IACP;;OAEG;IACH,iFAAY,CAAA;IACZ;;OAEG;IACH,2FAAiB,CAAA;IACjB;;OAEG;IACH,iEAAI,CAAA;IACJ;;OAEG;IACH,uEAAO,CAAA;IACP;;OAEG;IACH,uFAAe,CAAA;IACf;;OAEG;IACH,oEAAK,CAAA;IACL;;OAEG;IACH,8EAAU,CAAA;IACV;;OAEG;IACH,kFAAY,CAAA;IACZ;;OAEG;IACH,gFAAW,CAAA;IACX;;OAEG;IACH,oEAAK,CAAA;AACT,CAAC,EA7DiB,qBAAqB,KAArB,qBAAqB,QA6DtC;AAED;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAiC/C;;;;OAIG;IACH,IAAoB,UAAU;QAC1B,OAAO,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC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,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC1B,IAAI,MAAM,CAAC,kBAAkB,EAAE,CAAC;gBAC5B,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAC;YACxC,CAAC;YACD,MAAM,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;QACxD,CAAC;QAED,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC;QACpD,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACL,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,IAAI,CAAC,WAAW,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,kBAAkB,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,CAAC;YAC/B,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YACnC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,IAAI,CAAC,qBAAqB,GAAG,IAAI,CAAC;QACtC,CAAC;IACL,CAAC;;AA3VD,gBAAgB;AACF,wBAAQ,GAAG,CAAC,AAAJ,CAAK","sourcesContent":["import { Observable } from \"../../Misc/observable\";\r\nimport { type ImageSource, type Nullable, type int } from \"../../types\";\r\nimport { type ICanvas, type ICanvasRenderingContext } from \"../../Engines/ICanvas\";\r\nimport { type IHardwareTextureWrapper } from \"./hardwareTextureWrapper\";\r\nimport { TextureSampler } from \"./textureSampler\";\r\n\r\nimport { type AbstractEngine } from \"../../Engines/abstractEngine\";\r\nimport { type BaseTexture } from \"../../Materials/Textures/baseTexture\";\r\nimport { type SphericalPolynomial } from \"../../Maths/sphericalPolynomial\";\r\n\r\n/**\r\n * Defines the source of the internal texture\r\n */\r\nexport const enum InternalTextureSource {\r\n /**\r\n * The source of the texture data is unknown\r\n */\r\n Unknown,\r\n /**\r\n * Texture data comes from an URL\r\n */\r\n Url,\r\n /**\r\n * Texture data is only used for temporary storage\r\n */\r\n Temp,\r\n /**\r\n * Texture data comes from raw data (ArrayBuffer)\r\n */\r\n Raw,\r\n /**\r\n * Texture content is dynamic (video or dynamic texture)\r\n */\r\n Dynamic,\r\n /**\r\n * Texture content is generated by rendering to it\r\n */\r\n RenderTarget,\r\n /**\r\n * Texture content is part of a multi render target process\r\n */\r\n MultiRenderTarget,\r\n /**\r\n * Texture data comes from a cube data file\r\n */\r\n Cube,\r\n /**\r\n * Texture data comes from a raw cube data\r\n */\r\n CubeRaw,\r\n /**\r\n * Texture data come from a prefiltered cube data file\r\n */\r\n CubePrefiltered,\r\n /**\r\n * Texture content is raw 3D data\r\n */\r\n Raw3D,\r\n /**\r\n * Texture content is raw 2D array data\r\n */\r\n Raw2DArray,\r\n /**\r\n * Texture content is a depth/stencil texture\r\n */\r\n DepthStencil,\r\n /**\r\n * Texture data comes from a raw cube data encoded with RGBD\r\n */\r\n CubeRawRGBD,\r\n /**\r\n * Texture content is a depth texture\r\n */\r\n Depth,\r\n}\r\n\r\n/**\r\n * Class used to store data associated with WebGL texture data for the engine\r\n * This class should not be used directly\r\n */\r\nexport class InternalTexture extends TextureSampler {\r\n /**\r\n * Defines if the texture is ready\r\n */\r\n public isReady: boolean = false;\r\n /**\r\n * Defines if the texture is a cube texture\r\n */\r\n public isCube: boolean = false;\r\n /**\r\n * Defines if the texture contains 3D data\r\n */\r\n public is3D: boolean = false;\r\n /**\r\n * Defines if the texture contains 2D array data\r\n */\r\n public is2DArray: boolean = false;\r\n /**\r\n * Defines if the texture contains multiview data\r\n */\r\n public isMultiview: boolean = false;\r\n /**\r\n * Gets the URL used to load this texture\r\n */\r\n public url: string = \"\";\r\n /** @internal */\r\n public _originalUrl: string; // not empty only if different from url\r\n /**\r\n * Gets a boolean indicating if the texture needs mipmaps generation\r\n */\r\n public generateMipMaps: boolean = false;\r\n\r\n protected override _useMipMaps: Nullable<boolean> = null;\r\n /**\r\n * Indicates to use the mip maps (if available on the texture).\r\n * Thanks to this flag, you can instruct the sampler to not sample the mipmaps even if they exist (and if the sampling mode is set to a value that normally samples the mipmaps!)\r\n * If useMipMaps is null, the value of generateMipMaps is returned by the getter (for backward compatibility)\r\n */\r\n public override get useMipMaps() {\r\n return this._useMipMaps === null ? this.generateMipMaps : this._useMipMaps;\r\n }\r\n public override set useMipMaps(value: Nullable<boolean>) {\r\n this._useMipMaps = value;\r\n }\r\n /**\r\n * Gets the number of mip levels for this texture.\r\n * Note: This property has the correct value only if the texture was created through\r\n * `createRawTexture` or `createRawTexture2DArray`.\r\n */\r\n public mipLevelCount: number = 1;\r\n /**\r\n * Gets the number of samples used by the texture (WebGL2+ only)\r\n */\r\n public samples: number = 0;\r\n /**\r\n * Gets the type of the texture (int, float...)\r\n */\r\n public type: number = -1;\r\n /**\r\n * Gets the format of the texture (RGB, RGBA...)\r\n */\r\n public format: number = -1;\r\n /**\r\n * Observable called when the texture is loaded\r\n */\r\n public onLoadedObservable = new Observable<InternalTexture>();\r\n /**\r\n * Observable called when the texture load is raising an error\r\n */\r\n public onErrorObservable = new Observable<Partial<{ message: string; exception: any }>>();\r\n /**\r\n * If this callback is defined it will be called instead of the default _rebuild function\r\n */\r\n public onRebuildCallback: Nullable<\r\n (internalTexture: InternalTexture) => {\r\n proxy: Nullable<InternalTexture | Promise<InternalTexture>>;\r\n isReady: boolean;\r\n isAsync: boolean;\r\n }\r\n > = null;\r\n /**\r\n * Gets the width of the texture\r\n */\r\n public width: number = 0;\r\n /**\r\n * Gets the height of the texture\r\n */\r\n public height: number = 0;\r\n /**\r\n * Gets the depth of the texture\r\n */\r\n public depth: number = 0;\r\n /**\r\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n public baseWidth: number = 0;\r\n /**\r\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n public baseHeight: number = 0;\r\n /**\r\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n public baseDepth: number = 0;\r\n /**\r\n * Gets a boolean indicating if the texture is inverted on Y axis\r\n */\r\n public invertY: boolean = false;\r\n\r\n // Private\r\n /** @internal */\r\n public _invertVScale = false;\r\n /** @internal */\r\n public _associatedChannel = -1;\r\n /** @internal */\r\n public _source = InternalTextureSource.Unknown;\r\n /** @internal */\r\n public _buffer: Nullable<string | ArrayBuffer | ArrayBufferView | HTMLImageElement | Blob | ImageBitmap> = null;\r\n /** @internal */\r\n public _bufferView: Nullable<ArrayBufferView> = null;\r\n /** @internal */\r\n public _bufferViewArray: Nullable<ArrayBufferView[]> = null;\r\n /** @internal */\r\n public _bufferViewArrayArray: Nullable<ArrayBufferView[][]> = null;\r\n /** @internal */\r\n public _size: number = 0;\r\n /** @internal */\r\n public _extension: string = \"\";\r\n /** @internal */\r\n public _files: Nullable<string[]> = null;\r\n /** @internal */\r\n public _workingCanvas: Nullable<ICanvas> = null;\r\n /** @internal */\r\n public _workingContext: Nullable<ICanvasRenderingContext> = null;\r\n /** @internal */\r\n public _cachedCoordinatesMode: Nullable<number> = null;\r\n /** @internal */\r\n public _isDisabled: boolean = false;\r\n /** @internal */\r\n public _compression: Nullable<string> = null;\r\n /** @internal */\r\n public _sphericalPolynomial: Nullable<SphericalPolynomial> = null;\r\n /** @internal */\r\n public _sphericalPolynomialPromise: Nullable<Promise<SphericalPolynomial>> = null;\r\n /** @internal */\r\n public _sphericalPolynomialComputed = false;\r\n /** @internal */\r\n public _lodGenerationScale: number = 0;\r\n /** @internal */\r\n public _lodGenerationOffset: number = 0;\r\n /** @internal */\r\n public _useSRGBBuffer: boolean = false;\r\n /** @internal */\r\n public _creationFlags: number = 0;\r\n /** @internal */\r\n public _originalFormat?: number;\r\n\r\n // The following three fields helps sharing generated fixed LODs for texture filtering\r\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\r\n // They are at the level of the gl texture to benefit from the cache.\r\n /** @internal */\r\n public _lodTextureHigh: Nullable<BaseTexture> = null;\r\n /** @internal */\r\n public _lodTextureMid: Nullable<BaseTexture> = null;\r\n /** @internal */\r\n public _lodTextureLow: Nullable<BaseTexture> = null;\r\n /** @internal */\r\n public _isRGBD: boolean = false;\r\n\r\n /** @internal */\r\n public _linearSpecularLOD: boolean = false;\r\n /** @internal */\r\n public _irradianceTexture: Nullable<BaseTexture> = null;\r\n\r\n /** @internal */\r\n public _hardwareTexture: Nullable<IHardwareTextureWrapper> = null;\r\n\r\n /** @internal */\r\n public _maxLodLevel: Nullable<number> = null;\r\n\r\n /** @internal */\r\n public _references: number = 1;\r\n\r\n /** @internal */\r\n public _gammaSpace: Nullable<boolean> = null;\r\n\r\n /** @internal */\r\n public _premulAlpha = false;\r\n\r\n /** @internal */\r\n public _dynamicTextureSource: Nullable<ImageSource> = null;\r\n\r\n /** @internal */\r\n public _autoMSAAManagement = false;\r\n\r\n private _engine: AbstractEngine;\r\n private _uniqueId: number;\r\n\r\n /** @internal */\r\n public static _Counter = 0;\r\n\r\n /** Gets the unique id of the internal texture */\r\n public get uniqueId() {\r\n return this._uniqueId;\r\n }\r\n\r\n /** @internal */\r\n public _setUniqueId(id: number) {\r\n this._uniqueId = id;\r\n }\r\n\r\n /**\r\n * Gets the Engine the texture belongs to.\r\n * @returns The babylon engine\r\n */\r\n public getEngine(): AbstractEngine {\r\n return this._engine;\r\n }\r\n\r\n /**\r\n * Gets the data source type of the texture\r\n */\r\n public get source(): InternalTextureSource {\r\n return this._source;\r\n }\r\n\r\n /**\r\n * Creates a new InternalTexture\r\n * @param engine defines the engine to use\r\n * @param source defines the type of data that will be used\r\n * @param delayAllocation if the texture allocation should be delayed (default: false)\r\n */\r\n constructor(engine: AbstractEngine, source: InternalTextureSource, delayAllocation = false) {\r\n super();\r\n\r\n this._engine = engine;\r\n this._source = source;\r\n this._uniqueId = InternalTexture._Counter++;\r\n\r\n if (!delayAllocation) {\r\n this._hardwareTexture = engine._createHardwareTexture();\r\n }\r\n }\r\n\r\n /**\r\n * Increments the number of references (ie. the number of Texture that point to it)\r\n */\r\n public incrementReferences(): void {\r\n this._references++;\r\n }\r\n\r\n /**\r\n * Change the size of the texture (not the size of the content)\r\n * @param width defines the new width\r\n * @param height defines the new height\r\n * @param depth defines the new depth (1 by default)\r\n */\r\n public updateSize(width: int, height: int, depth: int = 1): void {\r\n this._engine.updateTextureDimensions(this, width, height, depth);\r\n\r\n this.width = width;\r\n this.height = height;\r\n this.depth = depth;\r\n\r\n this.baseWidth = width;\r\n this.baseHeight = height;\r\n this.baseDepth = depth;\r\n\r\n this._size = width * height * depth;\r\n }\r\n\r\n /** @internal */\r\n public _rebuild(): void {\r\n this.isReady = false;\r\n this._cachedCoordinatesMode = null;\r\n this._cachedWrapU = null;\r\n this._cachedWrapV = null;\r\n this._cachedWrapR = null;\r\n this._cachedAnisotropicFilteringLevel = null;\r\n if (this.onRebuildCallback) {\r\n const data = this.onRebuildCallback(this);\r\n const swapAndSetIsReady = (proxyInternalTexture: InternalTexture) => {\r\n proxyInternalTexture._swapAndDie(this, false);\r\n this.isReady = data.isReady;\r\n };\r\n if (data.isAsync) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then\r\n (data.proxy as Promise<InternalTexture>).then(swapAndSetIsReady);\r\n } else {\r\n swapAndSetIsReady(data.proxy as InternalTexture);\r\n }\r\n return;\r\n }\r\n\r\n let proxy: InternalTexture;\r\n switch (this.source) {\r\n case InternalTextureSource.Temp:\r\n break;\r\n\r\n case InternalTextureSource.Url:\r\n proxy = this._engine.createTexture(\r\n this._originalUrl ?? this.url,\r\n !this.generateMipMaps,\r\n this.invertY,\r\n null,\r\n this.samplingMode,\r\n // Do not use Proxy here as it could be fully synchronous\r\n // and proxy would be undefined.\r\n (temp) => {\r\n temp._swapAndDie(this, false);\r\n this.isReady = true;\r\n },\r\n null,\r\n this._buffer,\r\n undefined,\r\n this.format,\r\n this._extension,\r\n undefined,\r\n undefined,\r\n undefined,\r\n this._useSRGBBuffer\r\n );\r\n return;\r\n\r\n case InternalTextureSource.Raw:\r\n proxy = this._engine.createRawTexture(\r\n this._bufferView,\r\n this.baseWidth,\r\n this.baseHeight,\r\n this.format,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression,\r\n this.type,\r\n this._creationFlags,\r\n this._useSRGBBuffer,\r\n this.mipLevelCount\r\n );\r\n proxy._swapAndDie(this, false);\r\n\r\n if (this._bufferViewArray) {\r\n for (let mipLevel = 0; mipLevel < this._bufferViewArray.length; mipLevel++) {\r\n const mipData = this._bufferViewArray[mipLevel];\r\n if (mipData) {\r\n this._engine.updateRawTexture(this, mipData, this.format, this.invertY, this._compression, this.type, this._useSRGBBuffer, mipLevel);\r\n }\r\n }\r\n }\r\n\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.Raw3D:\r\n proxy = this._engine.createRawTexture3D(\r\n this._bufferView,\r\n this.baseWidth,\r\n this.baseHeight,\r\n this.baseDepth,\r\n this.format,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression,\r\n this.type\r\n );\r\n proxy._swapAndDie(this, false);\r\n\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.Raw2DArray:\r\n proxy = this._engine.createRawTexture2DArray(\r\n this._bufferView,\r\n this.baseWidth,\r\n this.baseHeight,\r\n this.baseDepth,\r\n this.format,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression,\r\n this.type,\r\n this._creationFlags,\r\n this.mipLevelCount\r\n );\r\n proxy._swapAndDie(this, false);\r\n\r\n if (this._bufferViewArray) {\r\n for (let mipLevel = 0; mipLevel < this._bufferViewArray.length; mipLevel++) {\r\n const mipData = this._bufferViewArray[mipLevel];\r\n if (mipData) {\r\n this._engine.updateRawTexture2DArray(this, mipData, this.format, this.invertY, this._compression, this.type, mipLevel);\r\n }\r\n }\r\n }\r\n\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.Dynamic:\r\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\r\n proxy._swapAndDie(this, false);\r\n if (this._dynamicTextureSource) {\r\n this._engine.updateDynamicTexture(this, this._dynamicTextureSource, this.invertY, this._premulAlpha, this.format, true);\r\n }\r\n\r\n // The engine will make sure to update content so no need to flag it as isReady = true\r\n break;\r\n\r\n case InternalTextureSource.Cube:\r\n proxy = this._engine.createCubeTexture(\r\n this.url,\r\n null,\r\n this._files,\r\n !this.generateMipMaps,\r\n () => {\r\n proxy._swapAndDie(this, false);\r\n this.isReady = true;\r\n },\r\n null,\r\n this.format,\r\n this._extension,\r\n false,\r\n 0,\r\n 0,\r\n null,\r\n undefined,\r\n this._useSRGBBuffer,\r\n ArrayBuffer.isView(this._buffer) ? this._buffer : null\r\n );\r\n return;\r\n\r\n case InternalTextureSource.CubeRaw:\r\n proxy = this._engine.createRawCubeTexture(\r\n this._bufferViewArray,\r\n this.width,\r\n this._originalFormat ?? this.format,\r\n this.type,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression\r\n );\r\n proxy._swapAndDie(this, false);\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.CubeRawRGBD:\r\n // This case is being handeled by the environment texture tools and is not a part of the rebuild process.\r\n // To use CubeRawRGBD use updateRGBDAsync on the cube texture.\r\n return;\r\n\r\n case InternalTextureSource.CubePrefiltered:\r\n proxy = this._engine.createPrefilteredCubeTexture(\r\n this.url,\r\n null,\r\n this._lodGenerationScale,\r\n this._lodGenerationOffset,\r\n (proxy) => {\r\n if (proxy) {\r\n proxy._swapAndDie(this, false);\r\n }\r\n this.isReady = true;\r\n },\r\n null,\r\n this.format,\r\n this._extension\r\n );\r\n proxy._sphericalPolynomial = this._sphericalPolynomial;\r\n return;\r\n\r\n case InternalTextureSource.DepthStencil:\r\n case InternalTextureSource.Depth: {\r\n // Will be handled at the RenderTargetWrapper level\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _swapAndDie(target: InternalTexture, swapAll = true): void {\r\n // TODO what about refcount on target?\r\n\r\n this._hardwareTexture?.setUsage(target._source, this.generateMipMaps, this.is2DArray, this.isCube, this.is3D, this.width, this.height, this.depth);\r\n\r\n target._hardwareTexture = this._hardwareTexture;\r\n if (swapAll) {\r\n target._isRGBD = this._isRGBD;\r\n }\r\n\r\n if (this._lodTextureHigh) {\r\n if (target._lodTextureHigh) {\r\n target._lodTextureHigh.dispose();\r\n }\r\n target._lodTextureHigh = this._lodTextureHigh;\r\n }\r\n\r\n if (this._lodTextureMid) {\r\n if (target._lodTextureMid) {\r\n target._lodTextureMid.dispose();\r\n }\r\n target._lodTextureMid = this._lodTextureMid;\r\n }\r\n\r\n if (this._lodTextureLow) {\r\n if (target._lodTextureLow) {\r\n target._lodTextureLow.dispose();\r\n }\r\n target._lodTextureLow = this._lodTextureLow;\r\n }\r\n\r\n if (this._irradianceTexture) {\r\n if (target._irradianceTexture) {\r\n target._irradianceTexture.dispose();\r\n }\r\n target._irradianceTexture = this._irradianceTexture;\r\n }\r\n\r\n const cache = this._engine.getLoadedTexturesCache();\r\n let index = cache.indexOf(this);\r\n if (index !== -1) {\r\n cache.splice(index, 1);\r\n }\r\n\r\n index = cache.indexOf(target);\r\n if (index === -1) {\r\n cache.push(target);\r\n }\r\n }\r\n\r\n /**\r\n * Dispose the current allocated resources\r\n */\r\n public dispose(): void {\r\n this._references--;\r\n if (this._references === 0) {\r\n this.onLoadedObservable.clear();\r\n this.onErrorObservable.clear();\r\n this._engine._releaseTexture(this);\r\n this._hardwareTexture = null;\r\n this._dynamicTextureSource = null;\r\n }\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"internalTexture.js","sourceRoot":"","sources":["../../../../../dev/core/src/Materials/Textures/internalTexture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAInD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD;;GAEG;AACH,MAAM,CAAN,IAAkB,qBAuEjB;AAvED,WAAkB,qBAAqB;IACnC;;OAEG;IACH,uEAAO,CAAA;IACP;;OAEG;IACH,+DAAG,CAAA;IACH;;OAEG;IACH,iEAAI,CAAA;IACJ;;OAEG;IACH,+DAAG,CAAA;IACH;;OAEG;IACH,uEAAO,CAAA;IACP;;OAEG;IACH,iFAAY,CAAA;IACZ;;OAEG;IACH,2FAAiB,CAAA;IACjB;;OAEG;IACH,iEAAI,CAAA;IACJ;;OAEG;IACH,uEAAO,CAAA;IACP;;OAEG;IACH,uFAAe,CAAA;IACf;;OAEG;IACH,oEAAK,CAAA;IACL;;OAEG;IACH,8EAAU,CAAA;IACV;;OAEG;IACH,kFAAY,CAAA;IACZ;;OAEG;IACH,gFAAW,CAAA;IACX;;OAEG;IACH,oEAAK,CAAA;IACL;;;;;;;;OAQG;IACH,0EAAQ,CAAA;AACZ,CAAC,EAvEiB,qBAAqB,KAArB,qBAAqB,QAuEtC;AAED;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,cAAc;IAiC/C;;;;OAIG;IACH,IAAoB,UAAU;QAC1B,OAAO,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC/E,CAAC;IACD,IAAoB,UAAU,CAAC,KAAwB;QACnD,IAAI,CAAC,WAAW,GAAG,KA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Observable } from \"../../Misc/observable\";\r\nimport { type ImageSource, type Nullable, type int } from \"../../types\";\r\nimport { type ICanvas, type ICanvasRenderingContext } from \"../../Engines/ICanvas\";\r\nimport { type IHardwareTextureWrapper } from \"./hardwareTextureWrapper\";\r\nimport { TextureSampler } from \"./textureSampler\";\r\n\r\nimport { type AbstractEngine } from \"../../Engines/abstractEngine\";\r\nimport { type BaseTexture } from \"../../Materials/Textures/baseTexture\";\r\nimport { type SphericalPolynomial } from \"../../Maths/sphericalPolynomial\";\r\n\r\n/**\r\n * Defines the source of the internal texture\r\n */\r\nexport const enum InternalTextureSource {\r\n /**\r\n * The source of the texture data is unknown\r\n */\r\n Unknown,\r\n /**\r\n * Texture data comes from an URL\r\n */\r\n Url,\r\n /**\r\n * Texture data is only used for temporary storage\r\n */\r\n Temp,\r\n /**\r\n * Texture data comes from raw data (ArrayBuffer)\r\n */\r\n Raw,\r\n /**\r\n * Texture content is dynamic (video or dynamic texture)\r\n */\r\n Dynamic,\r\n /**\r\n * Texture content is generated by rendering to it\r\n */\r\n RenderTarget,\r\n /**\r\n * Texture content is part of a multi render target process\r\n */\r\n MultiRenderTarget,\r\n /**\r\n * Texture data comes from a cube data file\r\n */\r\n Cube,\r\n /**\r\n * Texture data comes from a raw cube data\r\n */\r\n CubeRaw,\r\n /**\r\n * Texture data come from a prefiltered cube data file\r\n */\r\n CubePrefiltered,\r\n /**\r\n * Texture content is raw 3D data\r\n */\r\n Raw3D,\r\n /**\r\n * Texture content is raw 2D array data\r\n */\r\n Raw2DArray,\r\n /**\r\n * Texture content is a depth/stencil texture\r\n */\r\n DepthStencil,\r\n /**\r\n * Texture data comes from a raw cube data encoded with RGBD\r\n */\r\n CubeRawRGBD,\r\n /**\r\n * Texture content is a depth texture\r\n */\r\n Depth,\r\n /**\r\n * Texture wraps an externally created graphics resource (WebGL handle, GPUTexture,\r\n * native handle, etc.) supplied via wrap{WebGL,Native,WebGPU}Texture. On dispose,\r\n * the wrapped resource is released along with the InternalTexture just like any\r\n * other source. Consumers can repoint the wrapper at a fresh external handle\r\n * (e.g., after context-loss / device-loss restore) via\r\n * updateWrapped{WebGL,Native,WebGPU}Texture without losing references held by\r\n * materials, render-target wrappers, particle systems, etc.\r\n */\r\n External,\r\n}\r\n\r\n/**\r\n * Class used to store data associated with WebGL texture data for the engine\r\n * This class should not be used directly\r\n */\r\nexport class InternalTexture extends TextureSampler {\r\n /**\r\n * Defines if the texture is ready\r\n */\r\n public isReady: boolean = false;\r\n /**\r\n * Defines if the texture is a cube texture\r\n */\r\n public isCube: boolean = false;\r\n /**\r\n * Defines if the texture contains 3D data\r\n */\r\n public is3D: boolean = false;\r\n /**\r\n * Defines if the texture contains 2D array data\r\n */\r\n public is2DArray: boolean = false;\r\n /**\r\n * Defines if the texture contains multiview data\r\n */\r\n public isMultiview: boolean = false;\r\n /**\r\n * Gets the URL used to load this texture\r\n */\r\n public url: string = \"\";\r\n /** @internal */\r\n public _originalUrl: string; // not empty only if different from url\r\n /**\r\n * Gets a boolean indicating if the texture needs mipmaps generation\r\n */\r\n public generateMipMaps: boolean = false;\r\n\r\n protected override _useMipMaps: Nullable<boolean> = null;\r\n /**\r\n * Indicates to use the mip maps (if available on the texture).\r\n * Thanks to this flag, you can instruct the sampler to not sample the mipmaps even if they exist (and if the sampling mode is set to a value that normally samples the mipmaps!)\r\n * If useMipMaps is null, the value of generateMipMaps is returned by the getter (for backward compatibility)\r\n */\r\n public override get useMipMaps() {\r\n return this._useMipMaps === null ? this.generateMipMaps : this._useMipMaps;\r\n }\r\n public override set useMipMaps(value: Nullable<boolean>) {\r\n this._useMipMaps = value;\r\n }\r\n /**\r\n * Gets the number of mip levels for this texture.\r\n * Note: This property has the correct value only if the texture was created through\r\n * `createRawTexture` or `createRawTexture2DArray`.\r\n */\r\n public mipLevelCount: number = 1;\r\n /**\r\n * Gets the number of samples used by the texture (WebGL2+ only)\r\n */\r\n public samples: number = 0;\r\n /**\r\n * Gets the type of the texture (int, float...)\r\n */\r\n public type: number = -1;\r\n /**\r\n * Gets the format of the texture (RGB, RGBA...)\r\n */\r\n public format: number = -1;\r\n /**\r\n * Observable called when the texture is loaded\r\n */\r\n public onLoadedObservable = new Observable<InternalTexture>();\r\n /**\r\n * Observable called when the texture load is raising an error\r\n */\r\n public onErrorObservable = new Observable<Partial<{ message: string; exception: any }>>();\r\n /**\r\n * If this callback is defined it will be called instead of the default _rebuild function\r\n */\r\n public onRebuildCallback: Nullable<\r\n (internalTexture: InternalTexture) => {\r\n proxy: Nullable<InternalTexture | Promise<InternalTexture>>;\r\n isReady: boolean;\r\n isAsync: boolean;\r\n }\r\n > = null;\r\n /**\r\n * Gets the width of the texture\r\n */\r\n public width: number = 0;\r\n /**\r\n * Gets the height of the texture\r\n */\r\n public height: number = 0;\r\n /**\r\n * Gets the depth of the texture\r\n */\r\n public depth: number = 0;\r\n /**\r\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n public baseWidth: number = 0;\r\n /**\r\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n public baseHeight: number = 0;\r\n /**\r\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\r\n */\r\n public baseDepth: number = 0;\r\n /**\r\n * Gets a boolean indicating if the texture is inverted on Y axis\r\n */\r\n public invertY: boolean = false;\r\n\r\n // Private\r\n /** @internal */\r\n public _invertVScale = false;\r\n /** @internal */\r\n public _associatedChannel = -1;\r\n /** @internal */\r\n public _source = InternalTextureSource.Unknown;\r\n /** @internal */\r\n public _buffer: Nullable<string | ArrayBuffer | ArrayBufferView | HTMLImageElement | Blob | ImageBitmap> = null;\r\n /** @internal */\r\n public _bufferView: Nullable<ArrayBufferView> = null;\r\n /** @internal */\r\n public _bufferViewArray: Nullable<ArrayBufferView[]> = null;\r\n /** @internal */\r\n public _bufferViewArrayArray: Nullable<ArrayBufferView[][]> = null;\r\n /** @internal */\r\n public _size: number = 0;\r\n /** @internal */\r\n public _extension: string = \"\";\r\n /** @internal */\r\n public _files: Nullable<string[]> = null;\r\n /** @internal */\r\n public _workingCanvas: Nullable<ICanvas> = null;\r\n /** @internal */\r\n public _workingContext: Nullable<ICanvasRenderingContext> = null;\r\n /** @internal */\r\n public _cachedCoordinatesMode: Nullable<number> = null;\r\n /** @internal */\r\n public _isDisabled: boolean = false;\r\n /** @internal */\r\n public _compression: Nullable<string> = null;\r\n /** @internal */\r\n public _sphericalPolynomial: Nullable<SphericalPolynomial> = null;\r\n /** @internal */\r\n public _sphericalPolynomialPromise: Nullable<Promise<SphericalPolynomial>> = null;\r\n /** @internal */\r\n public _sphericalPolynomialComputed = false;\r\n /** @internal */\r\n public _lodGenerationScale: number = 0;\r\n /** @internal */\r\n public _lodGenerationOffset: number = 0;\r\n /** @internal */\r\n public _useSRGBBuffer: boolean = false;\r\n /** @internal */\r\n public _creationFlags: number = 0;\r\n /** @internal */\r\n public _originalFormat?: number;\r\n\r\n // The following three fields helps sharing generated fixed LODs for texture filtering\r\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\r\n // They are at the level of the gl texture to benefit from the cache.\r\n /** @internal */\r\n public _lodTextureHigh: Nullable<BaseTexture> = null;\r\n /** @internal */\r\n public _lodTextureMid: Nullable<BaseTexture> = null;\r\n /** @internal */\r\n public _lodTextureLow: Nullable<BaseTexture> = null;\r\n /** @internal */\r\n public _isRGBD: boolean = false;\r\n\r\n /** @internal */\r\n public _linearSpecularLOD: boolean = false;\r\n /** @internal */\r\n public _irradianceTexture: Nullable<BaseTexture> = null;\r\n\r\n /** @internal */\r\n public _hardwareTexture: Nullable<IHardwareTextureWrapper> = null;\r\n\r\n /** @internal */\r\n public _maxLodLevel: Nullable<number> = null;\r\n\r\n /** @internal */\r\n public _references: number = 1;\r\n\r\n /** @internal */\r\n public _gammaSpace: Nullable<boolean> = null;\r\n\r\n /** @internal */\r\n public _premulAlpha = false;\r\n\r\n /** @internal */\r\n public _dynamicTextureSource: Nullable<ImageSource> = null;\r\n\r\n /** @internal */\r\n public _autoMSAAManagement = false;\r\n\r\n private _engine: AbstractEngine;\r\n private _uniqueId: number;\r\n\r\n /** @internal */\r\n public static _Counter = 0;\r\n\r\n /** Gets the unique id of the internal texture */\r\n public get uniqueId() {\r\n return this._uniqueId;\r\n }\r\n\r\n /** @internal */\r\n public _setUniqueId(id: number) {\r\n this._uniqueId = id;\r\n }\r\n\r\n /**\r\n * Gets the Engine the texture belongs to.\r\n * @returns The babylon engine\r\n */\r\n public getEngine(): AbstractEngine {\r\n return this._engine;\r\n }\r\n\r\n /**\r\n * Gets the data source type of the texture\r\n */\r\n public get source(): InternalTextureSource {\r\n return this._source;\r\n }\r\n\r\n /**\r\n * Creates a new InternalTexture\r\n * @param engine defines the engine to use\r\n * @param source defines the type of data that will be used\r\n * @param delayAllocation if the texture allocation should be delayed (default: false)\r\n */\r\n constructor(engine: AbstractEngine, source: InternalTextureSource, delayAllocation = false) {\r\n super();\r\n\r\n this._engine = engine;\r\n this._source = source;\r\n this._uniqueId = InternalTexture._Counter++;\r\n\r\n if (!delayAllocation) {\r\n this._hardwareTexture = engine._createHardwareTexture();\r\n }\r\n }\r\n\r\n /**\r\n * Increments the number of references (ie. the number of Texture that point to it)\r\n */\r\n public incrementReferences(): void {\r\n this._references++;\r\n }\r\n\r\n /**\r\n * Change the size of the texture (not the size of the content)\r\n * @param width defines the new width\r\n * @param height defines the new height\r\n * @param depth defines the new depth (1 by default)\r\n */\r\n public updateSize(width: int, height: int, depth: int = 1): void {\r\n this._engine.updateTextureDimensions(this, width, height, depth);\r\n\r\n this.width = width;\r\n this.height = height;\r\n this.depth = depth;\r\n\r\n this.baseWidth = width;\r\n this.baseHeight = height;\r\n this.baseDepth = depth;\r\n\r\n this._size = width * height * depth;\r\n }\r\n\r\n /** @internal */\r\n public _rebuild(): void {\r\n this.isReady = false;\r\n this._cachedCoordinatesMode = null;\r\n this._cachedWrapU = null;\r\n this._cachedWrapV = null;\r\n this._cachedWrapR = null;\r\n this._cachedAnisotropicFilteringLevel = null;\r\n if (this.onRebuildCallback) {\r\n const data = this.onRebuildCallback(this);\r\n const swapAndSetIsReady = (proxyInternalTexture: InternalTexture) => {\r\n proxyInternalTexture._swapAndDie(this, false);\r\n this.isReady = data.isReady;\r\n };\r\n if (data.isAsync) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises, github/no-then\r\n (data.proxy as Promise<InternalTexture>).then(swapAndSetIsReady);\r\n } else {\r\n swapAndSetIsReady(data.proxy as InternalTexture);\r\n }\r\n return;\r\n }\r\n\r\n let proxy: InternalTexture;\r\n switch (this.source) {\r\n case InternalTextureSource.Temp:\r\n break;\r\n\r\n case InternalTextureSource.Url:\r\n proxy = this._engine.createTexture(\r\n this._originalUrl ?? this.url,\r\n !this.generateMipMaps,\r\n this.invertY,\r\n null,\r\n this.samplingMode,\r\n // Do not use Proxy here as it could be fully synchronous\r\n // and proxy would be undefined.\r\n (temp) => {\r\n temp._swapAndDie(this, false);\r\n this.isReady = true;\r\n },\r\n null,\r\n this._buffer,\r\n undefined,\r\n this.format,\r\n this._extension,\r\n undefined,\r\n undefined,\r\n undefined,\r\n this._useSRGBBuffer\r\n );\r\n return;\r\n\r\n case InternalTextureSource.Raw:\r\n proxy = this._engine.createRawTexture(\r\n this._bufferView,\r\n this.baseWidth,\r\n this.baseHeight,\r\n this.format,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression,\r\n this.type,\r\n this._creationFlags,\r\n this._useSRGBBuffer,\r\n this.mipLevelCount\r\n );\r\n proxy._swapAndDie(this, false);\r\n\r\n if (this._bufferViewArray) {\r\n for (let mipLevel = 0; mipLevel < this._bufferViewArray.length; mipLevel++) {\r\n const mipData = this._bufferViewArray[mipLevel];\r\n if (mipData) {\r\n this._engine.updateRawTexture(this, mipData, this.format, this.invertY, this._compression, this.type, this._useSRGBBuffer, mipLevel);\r\n }\r\n }\r\n }\r\n\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.Raw3D:\r\n proxy = this._engine.createRawTexture3D(\r\n this._bufferView,\r\n this.baseWidth,\r\n this.baseHeight,\r\n this.baseDepth,\r\n this.format,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression,\r\n this.type\r\n );\r\n proxy._swapAndDie(this, false);\r\n\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.Raw2DArray:\r\n proxy = this._engine.createRawTexture2DArray(\r\n this._bufferView,\r\n this.baseWidth,\r\n this.baseHeight,\r\n this.baseDepth,\r\n this.format,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression,\r\n this.type,\r\n this._creationFlags,\r\n this.mipLevelCount\r\n );\r\n proxy._swapAndDie(this, false);\r\n\r\n if (this._bufferViewArray) {\r\n for (let mipLevel = 0; mipLevel < this._bufferViewArray.length; mipLevel++) {\r\n const mipData = this._bufferViewArray[mipLevel];\r\n if (mipData) {\r\n this._engine.updateRawTexture2DArray(this, mipData, this.format, this.invertY, this._compression, this.type, mipLevel);\r\n }\r\n }\r\n }\r\n\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.Dynamic:\r\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\r\n proxy._swapAndDie(this, false);\r\n if (this._dynamicTextureSource) {\r\n this._engine.updateDynamicTexture(this, this._dynamicTextureSource, this.invertY, this._premulAlpha, this.format, true);\r\n }\r\n\r\n // The engine will make sure to update content so no need to flag it as isReady = true\r\n break;\r\n\r\n case InternalTextureSource.Cube:\r\n proxy = this._engine.createCubeTexture(\r\n this.url,\r\n null,\r\n this._files,\r\n !this.generateMipMaps,\r\n () => {\r\n proxy._swapAndDie(this, false);\r\n this.isReady = true;\r\n },\r\n null,\r\n this.format,\r\n this._extension,\r\n false,\r\n 0,\r\n 0,\r\n null,\r\n undefined,\r\n this._useSRGBBuffer,\r\n ArrayBuffer.isView(this._buffer) ? this._buffer : null\r\n );\r\n return;\r\n\r\n case InternalTextureSource.CubeRaw:\r\n proxy = this._engine.createRawCubeTexture(\r\n this._bufferViewArray,\r\n this.width,\r\n this._originalFormat ?? this.format,\r\n this.type,\r\n this.generateMipMaps,\r\n this.invertY,\r\n this.samplingMode,\r\n this._compression\r\n );\r\n proxy._swapAndDie(this, false);\r\n this.isReady = true;\r\n break;\r\n\r\n case InternalTextureSource.CubeRawRGBD:\r\n // This case is being handeled by the environment texture tools and is not a part of the rebuild process.\r\n // To use CubeRawRGBD use updateRGBDAsync on the cube texture.\r\n return;\r\n\r\n case InternalTextureSource.CubePrefiltered:\r\n proxy = this._engine.createPrefilteredCubeTexture(\r\n this.url,\r\n null,\r\n this._lodGenerationScale,\r\n this._lodGenerationOffset,\r\n (proxy) => {\r\n if (proxy) {\r\n proxy._swapAndDie(this, false);\r\n }\r\n this.isReady = true;\r\n },\r\n null,\r\n this.format,\r\n this._extension\r\n );\r\n proxy._sphericalPolynomial = this._sphericalPolynomial;\r\n return;\r\n\r\n case InternalTextureSource.DepthStencil:\r\n case InternalTextureSource.Depth: {\r\n // Will be handled at the RenderTargetWrapper level\r\n break;\r\n }\r\n\r\n case InternalTextureSource.External: {\r\n // The underlying resource is owned by the host application; Babylon cannot rebuild it.\r\n // The host re-supplies a fresh handle via updateWrappedWebGLTexture / updateWrappedNativeTexture /\r\n // updateWrappedWebGPUTexture from its onContextRestoredObservable handler.\r\n break;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public _swapAndDie(target: InternalTexture, swapAll = true): void {\r\n // TODO what about refcount on target?\r\n\r\n this._hardwareTexture?.setUsage(target._source, this.generateMipMaps, this.is2DArray, this.isCube, this.is3D, this.width, this.height, this.depth);\r\n\r\n target._hardwareTexture = this._hardwareTexture;\r\n // Refresh the target's uniqueId so that caches keyed by uniqueId (e.g. the\r\n // WebGPU global bind-group cache) see the hardware texture as a new resource\r\n // and rebuild GPU bind groups referencing it. Without this, callers that swap\r\n // a raw GPU texture for a prefiltered one (e.g. HDR/PMREM prefiltering) would\r\n // continue to receive stale GPUBindGroups that hold views over the now-destroyed\r\n // source GPU texture, causing \"Destroyed texture used in a submit\" errors.\r\n target._setUniqueId(InternalTexture._Counter++);\r\n if (swapAll) {\r\n target._isRGBD = this._isRGBD;\r\n }\r\n\r\n if (this._lodTextureHigh) {\r\n if (target._lodTextureHigh) {\r\n target._lodTextureHigh.dispose();\r\n }\r\n target._lodTextureHigh = this._lodTextureHigh;\r\n }\r\n\r\n if (this._lodTextureMid) {\r\n if (target._lodTextureMid) {\r\n target._lodTextureMid.dispose();\r\n }\r\n target._lodTextureMid = this._lodTextureMid;\r\n }\r\n\r\n if (this._lodTextureLow) {\r\n if (target._lodTextureLow) {\r\n target._lodTextureLow.dispose();\r\n }\r\n target._lodTextureLow = this._lodTextureLow;\r\n }\r\n\r\n if (this._irradianceTexture) {\r\n if (target._irradianceTexture) {\r\n target._irradianceTexture.dispose();\r\n }\r\n target._irradianceTexture = this._irradianceTexture;\r\n }\r\n\r\n const cache = this._engine.getLoadedTexturesCache();\r\n let index = cache.indexOf(this);\r\n if (index !== -1) {\r\n cache.splice(index, 1);\r\n }\r\n\r\n index = cache.indexOf(target);\r\n if (index === -1) {\r\n cache.push(target);\r\n }\r\n }\r\n\r\n /**\r\n * Dispose the current allocated resources\r\n */\r\n public dispose(): void {\r\n this._references--;\r\n if (this._references === 0) {\r\n this.onLoadedObservable.clear();\r\n this.onErrorObservable.clear();\r\n this._engine._releaseTexture(this);\r\n this._hardwareTexture = null;\r\n this._dynamicTextureSource = null;\r\n }\r\n }\r\n}\r\n"]}
|
package/Materials/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export * from "./meshDebugPluginMaterial.js";
|
|
|
39
39
|
export * from "./GaussianSplatting/gaussianSplattingMaterial.js";
|
|
40
40
|
export * from "./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js";
|
|
41
41
|
export * from "./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js";
|
|
42
|
+
export * from "./GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js";
|
|
42
43
|
export * from "./materialHelper.functions.js";
|
|
43
44
|
export * from "./materialHelper.geometryrendering.js";
|
|
44
45
|
export * from "./materialStencilState.js";
|
package/Materials/index.js
CHANGED
|
@@ -40,6 +40,7 @@ export * from "./meshDebugPluginMaterial.js";
|
|
|
40
40
|
export * from "./GaussianSplatting/gaussianSplattingMaterial.js";
|
|
41
41
|
export * from "./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.js";
|
|
42
42
|
export * from "./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.js";
|
|
43
|
+
export * from "./GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js";
|
|
43
44
|
export * from "./materialHelper.functions.js";
|
|
44
45
|
export * from "./materialHelper.geometryrendering.js";
|
|
45
46
|
export * from "./materialStencilState.js";
|
package/Materials/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,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Ac,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,oDAAoD,CAAC;AACnE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAEhE,OAAO,qBAAqB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./Background/index\";\r\nexport * from \"./colorCurves\";\r\nexport * from \"./iEffectFallbacks\";\r\nexport * from \"./effectFallbacks\";\r\nexport * from \"./effect\";\r\nexport * from \"./fresnelParameters\";\r\nexport * from \"./imageProcessing\";\r\nexport * from \"./imageProcessingConfiguration\";\r\nexport * from \"./material\";\r\nexport * from \"./materialDefines\";\r\nexport * from \"./clipPlaneMaterialHelper\";\r\nexport * from \"./materialHelper\";\r\nexport * from \"./multiMaterial\";\r\nexport * from \"./Occlusion/index\";\r\nexport * from \"./PBR/index\";\r\nexport * from \"./pushMaterial\";\r\nexport * from \"./shaderLanguage\";\r\nexport * from \"./shaderMaterial\";\r\nexport * from \"./standardMaterial\";\r\nexport * from \"./Textures/index\";\r\nexport * from \"./uniformBuffer\";\r\nexport * from \"./materialFlags\";\r\nexport * from \"./Node/index\";\r\nexport * from \"./effectRenderer\";\r\nexport * from \"./shadowDepthWrapper\";\r\nexport * from \"./drawWrapper.functions\";\r\nexport * from \"./drawWrapper\";\r\nexport * from \"./materialPluginBase\";\r\nexport * from \"./materialPluginManager\";\r\nexport * from \"./materialPluginEvent\";\r\nexport * from \"./material.detailMapConfiguration\";\r\nexport * from \"./material.decalMapConfiguration\";\r\nexport * from \"./materialPluginFactoryExport\";\r\nexport * from \"./GreasedLine/greasedLinePluginMaterial\";\r\nexport * from \"./GreasedLine/greasedLineSimpleMaterial\";\r\nexport * from \"./GreasedLine/greasedLineMaterialInterfaces\";\r\nexport * from \"./GreasedLine/greasedLineMaterialDefaults\";\r\nexport * from \"./meshDebugPluginMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin\";\r\nexport * from \"./materialHelper.functions\";\r\nexport * from \"./materialHelper.geometryrendering\";\r\nexport * from \"./materialStencilState\";\r\nexport * from \"./uv.defines\";\r\nexport * from \"./floatingOriginMatrixOverrides\";\r\nexport * from \"./vertexPullingHelper.functions\";\r\n\r\n// async-loaded shaders\r\n\r\n// StandardMaterial\r\nexport * from \"../Shaders/default.fragment\";\r\nexport * from \"../Shaders/default.vertex\";\r\nexport * from \"../ShadersWGSL/default.fragment\";\r\nexport * from \"../ShadersWGSL/default.vertex\";\r\n\r\n// GreasedLineSimplMaterial\r\nexport * from \"../Shaders/greasedLine.fragment\";\r\nexport * from \"../Shaders/greasedLine.vertex\";\r\nexport * from \"../ShadersWGSL/greasedLine.fragment\";\r\nexport * from \"../ShadersWGSL/greasedLine.vertex\";\r\n\r\n// Shared shader includes used by external material packages in UMD builds\r\nexport * from \"../Shaders/ShadersInclude/bakedVertexAnimation\";\r\nexport * from \"../Shaders/ShadersInclude/bakedVertexAnimationDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/depthPrePass\";\r\nexport * from \"../Shaders/ShadersInclude/fogFragment\";\r\nexport * from \"../Shaders/ShadersInclude/fogVertex\";\r\nexport * from \"../Shaders/ShadersInclude/fogVertexDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/imageProcessingCompatibility\";\r\nexport * from \"../Shaders/ShadersInclude/instancesDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/instancesVertex\";\r\nexport * from \"../Shaders/ShadersInclude/logDepthFragment\";\r\nexport * from \"../Shaders/ShadersInclude/logDepthVertex\";\r\nexport * from \"../Shaders/ShadersInclude/sceneFragmentDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/sceneUboDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/sceneVertexDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/vertexColorMixing\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/bakedVertexAnimation\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/depthPrePass\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/fogFragment\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/fogVertex\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/fogVertexDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/imageProcessingCompatibility\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/instancesDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/instancesVertex\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/logDepthFragment\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/logDepthVertex\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/sceneUboDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/vertexColorMixing\";\r\n\r\nimport \"./material.decalMap\";\r\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,cAAc,oBAAoB,CAAC;AACnC,cAAc,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AC;AAEhD,uBAAuB;AAEvB,mBAAmB;AACnB,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAE9C,2BAA2B;AAC3B,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAElD,0EAA0E;AAC1E,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2DAA2D,CAAC;AAC1E,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wDAAwD,CAAC;AACvE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AACnE,cAAc,+DAA+D,CAAC;AAC9E,cAAc,4CAA4C,CAAC;AAC3D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,yCAAyC,CAAC;AACxD,cAAc,oDAAoD,CAAC;AACnE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,oDAAoD,CAAC;AACnE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0DAA0D,CAAC;AACzE,cAAc,gDAAgD,CAAC;AAC/D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,iDAAiD,CAAC;AAEhE,OAAO,qBAAqB,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\nexport * from \"./Background/index\";\r\nexport * from \"./colorCurves\";\r\nexport * from \"./iEffectFallbacks\";\r\nexport * from \"./effectFallbacks\";\r\nexport * from \"./effect\";\r\nexport * from \"./fresnelParameters\";\r\nexport * from \"./imageProcessing\";\r\nexport * from \"./imageProcessingConfiguration\";\r\nexport * from \"./material\";\r\nexport * from \"./materialDefines\";\r\nexport * from \"./clipPlaneMaterialHelper\";\r\nexport * from \"./materialHelper\";\r\nexport * from \"./multiMaterial\";\r\nexport * from \"./Occlusion/index\";\r\nexport * from \"./PBR/index\";\r\nexport * from \"./pushMaterial\";\r\nexport * from \"./shaderLanguage\";\r\nexport * from \"./shaderMaterial\";\r\nexport * from \"./standardMaterial\";\r\nexport * from \"./Textures/index\";\r\nexport * from \"./uniformBuffer\";\r\nexport * from \"./materialFlags\";\r\nexport * from \"./Node/index\";\r\nexport * from \"./effectRenderer\";\r\nexport * from \"./shadowDepthWrapper\";\r\nexport * from \"./drawWrapper.functions\";\r\nexport * from \"./drawWrapper\";\r\nexport * from \"./materialPluginBase\";\r\nexport * from \"./materialPluginManager\";\r\nexport * from \"./materialPluginEvent\";\r\nexport * from \"./material.detailMapConfiguration\";\r\nexport * from \"./material.decalMapConfiguration\";\r\nexport * from \"./materialPluginFactoryExport\";\r\nexport * from \"./GreasedLine/greasedLinePluginMaterial\";\r\nexport * from \"./GreasedLine/greasedLineSimpleMaterial\";\r\nexport * from \"./GreasedLine/greasedLineMaterialInterfaces\";\r\nexport * from \"./GreasedLine/greasedLineMaterialDefaults\";\r\nexport * from \"./meshDebugPluginMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingMaterial\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin\";\r\nexport * from \"./GaussianSplatting/gaussianSplattingDebugMaterialPlugin\";\r\nexport * from \"./materialHelper.functions\";\r\nexport * from \"./materialHelper.geometryrendering\";\r\nexport * from \"./materialStencilState\";\r\nexport * from \"./uv.defines\";\r\nexport * from \"./floatingOriginMatrixOverrides\";\r\nexport * from \"./vertexPullingHelper.functions\";\r\n\r\n// async-loaded shaders\r\n\r\n// StandardMaterial\r\nexport * from \"../Shaders/default.fragment\";\r\nexport * from \"../Shaders/default.vertex\";\r\nexport * from \"../ShadersWGSL/default.fragment\";\r\nexport * from \"../ShadersWGSL/default.vertex\";\r\n\r\n// GreasedLineSimplMaterial\r\nexport * from \"../Shaders/greasedLine.fragment\";\r\nexport * from \"../Shaders/greasedLine.vertex\";\r\nexport * from \"../ShadersWGSL/greasedLine.fragment\";\r\nexport * from \"../ShadersWGSL/greasedLine.vertex\";\r\n\r\n// Shared shader includes used by external material packages in UMD builds\r\nexport * from \"../Shaders/ShadersInclude/bakedVertexAnimation\";\r\nexport * from \"../Shaders/ShadersInclude/bakedVertexAnimationDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/depthPrePass\";\r\nexport * from \"../Shaders/ShadersInclude/fogFragment\";\r\nexport * from \"../Shaders/ShadersInclude/fogVertex\";\r\nexport * from \"../Shaders/ShadersInclude/fogVertexDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/imageProcessingCompatibility\";\r\nexport * from \"../Shaders/ShadersInclude/instancesDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/instancesVertex\";\r\nexport * from \"../Shaders/ShadersInclude/logDepthFragment\";\r\nexport * from \"../Shaders/ShadersInclude/logDepthVertex\";\r\nexport * from \"../Shaders/ShadersInclude/sceneFragmentDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/sceneUboDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/sceneVertexDeclaration\";\r\nexport * from \"../Shaders/ShadersInclude/vertexColorMixing\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/bakedVertexAnimation\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/depthPrePass\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/fogFragment\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/fogVertex\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/fogVertexDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/imageProcessingCompatibility\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/instancesDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/instancesVertex\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/logDepthFragment\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/logDepthVertex\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/sceneUboDeclaration\";\r\nexport * from \"../ShadersWGSL/ShadersInclude/vertexColorMixing\";\r\n\r\nimport \"./material.decalMap\";\r\n"]}
|
package/Materials/pure.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from "./meshDebugPluginMaterial.pure.js";
|
|
|
40
40
|
export * from "./GaussianSplatting/gaussianSplattingMaterial.pure.js";
|
|
41
41
|
export * from "./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js";
|
|
42
42
|
export * from "./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js";
|
|
43
|
+
export * from "./GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js";
|
|
43
44
|
export * from "./materialHelper.functions.js";
|
|
44
45
|
export * from "./materialHelper.geometryrendering.js";
|
|
45
46
|
export * from "./materialStencilState.js";
|
package/Materials/pure.js
CHANGED
|
@@ -41,6 +41,7 @@ export * from "./meshDebugPluginMaterial.pure.js";
|
|
|
41
41
|
export * from "./GaussianSplatting/gaussianSplattingMaterial.pure.js";
|
|
42
42
|
export * from "./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure.js";
|
|
43
43
|
export * from "./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure.js";
|
|
44
|
+
export * from "./GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure.js";
|
|
44
45
|
export * from "./materialHelper.functions.js";
|
|
45
46
|
export * from "./materialHelper.geometryrendering.js";
|
|
46
47
|
export * from "./materialStencilState.js";
|
package/Materials/pure.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,6DAA6D;AAC7D,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oDAAoD,CAAC;AACnE,cAAc,oEAAoE,CAAC;AACnF,cAAc,oEAAoE,CAAC;AACnF,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\n/* eslint-disable @typescript-eslint/no-restricted-imports */\nexport * from \"./Background/pure\";\nexport * from \"./colorCurves.pure\";\nexport * from \"./iEffectFallbacks\";\nexport * from \"./effectFallbacks\";\nexport * from \"./effect.pure\";\nexport * from \"./fresnelParameters.pure\";\nexport * from \"./imageProcessing\";\nexport * from \"./imageProcessingConfiguration.pure\";\nexport * from \"./material.pure\";\nexport * from \"./materialDefines\";\nexport * from \"./clipPlaneMaterialHelper\";\nexport * from \"./materialHelper\";\nexport * from \"./multiMaterial.pure\";\nexport * from \"./Occlusion/pure\";\nexport * from \"./PBR/pure\";\nexport * from \"./pushMaterial\";\nexport * from \"./shaderLanguage\";\nexport * from \"./shaderMaterial.pure\";\nexport * from \"./standardMaterial.pure\";\nexport * from \"./Textures/pure\";\nexport * from \"./uniformBuffer\";\nexport * from \"./materialFlags\";\nexport * from \"./Node/pure\";\nexport * from \"./effectRenderer.pure\";\nexport * from \"./shadowDepthWrapper\";\nexport * from \"./drawWrapper.functions\";\nexport * from \"./drawWrapper\";\nexport * from \"./materialPluginBase.pure\";\nexport * from \"./materialPluginManager.pure\";\nexport * from \"./materialPluginEvent\";\nexport * from \"./material.detailMapConfiguration\";\nexport * from \"./material.decalMapConfiguration.pure\";\nexport * from \"./materialPluginFactoryExport\";\nexport * from \"./GreasedLine/greasedLinePluginMaterial.pure\";\nexport * from \"./GreasedLine/greasedLineSimpleMaterial\";\nexport * from \"./GreasedLine/greasedLineMaterialInterfaces\";\nexport * from \"./GreasedLine/greasedLineMaterialDefaults\";\nexport * from \"./meshDebugPluginMaterial.pure\";\nexport * from \"./GaussianSplatting/gaussianSplattingMaterial.pure\";\nexport * from \"./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure\";\nexport * from \"./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure\";\nexport * from \"./materialHelper.functions\";\nexport * from \"./materialHelper.geometryrendering\";\nexport * from \"./materialStencilState\";\nexport * from \"./uv.defines\";\nexport * from \"./floatingOriginMatrixOverrides\";\nexport * from \"./vertexPullingHelper.functions\";\nexport * from \"./effect.webgl.functions.pure\";\nexport * from \"./standardMaterial.decalMap.pure\";\nexport * from \"./GaussianSplatting/pure\";\nexport * from \"./GreasedLine/pure\";\n"]}
|
|
1
|
+
{"version":3,"file":"pure.js","sourceRoot":"","sources":["../../../../dev/core/src/Materials/pure.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,6DAA6D;AAC7D,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC;AACpD,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oDAAoD,CAAC;AACnE,cAAc,oEAAoE,CAAC;AACnF,cAAc,oEAAoE,CAAC;AACnF,cAAc,+DAA+D,CAAC;AAC9E,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,wBAAwB,CAAC;AACvC,cAAc,cAAc,CAAC;AAC7B,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC","sourcesContent":["/** Pure barrel — re-exports only side-effect-free modules */\n/* eslint-disable @typescript-eslint/no-restricted-imports */\nexport * from \"./Background/pure\";\nexport * from \"./colorCurves.pure\";\nexport * from \"./iEffectFallbacks\";\nexport * from \"./effectFallbacks\";\nexport * from \"./effect.pure\";\nexport * from \"./fresnelParameters.pure\";\nexport * from \"./imageProcessing\";\nexport * from \"./imageProcessingConfiguration.pure\";\nexport * from \"./material.pure\";\nexport * from \"./materialDefines\";\nexport * from \"./clipPlaneMaterialHelper\";\nexport * from \"./materialHelper\";\nexport * from \"./multiMaterial.pure\";\nexport * from \"./Occlusion/pure\";\nexport * from \"./PBR/pure\";\nexport * from \"./pushMaterial\";\nexport * from \"./shaderLanguage\";\nexport * from \"./shaderMaterial.pure\";\nexport * from \"./standardMaterial.pure\";\nexport * from \"./Textures/pure\";\nexport * from \"./uniformBuffer\";\nexport * from \"./materialFlags\";\nexport * from \"./Node/pure\";\nexport * from \"./effectRenderer.pure\";\nexport * from \"./shadowDepthWrapper\";\nexport * from \"./drawWrapper.functions\";\nexport * from \"./drawWrapper\";\nexport * from \"./materialPluginBase.pure\";\nexport * from \"./materialPluginManager.pure\";\nexport * from \"./materialPluginEvent\";\nexport * from \"./material.detailMapConfiguration\";\nexport * from \"./material.decalMapConfiguration.pure\";\nexport * from \"./materialPluginFactoryExport\";\nexport * from \"./GreasedLine/greasedLinePluginMaterial.pure\";\nexport * from \"./GreasedLine/greasedLineSimpleMaterial\";\nexport * from \"./GreasedLine/greasedLineMaterialInterfaces\";\nexport * from \"./GreasedLine/greasedLineMaterialDefaults\";\nexport * from \"./meshDebugPluginMaterial.pure\";\nexport * from \"./GaussianSplatting/gaussianSplattingMaterial.pure\";\nexport * from \"./GaussianSplatting/gaussianSplattingSolidColorMaterialPlugin.pure\";\nexport * from \"./GaussianSplatting/gaussianSplattingGpuPickingMaterialPlugin.pure\";\nexport * from \"./GaussianSplatting/gaussianSplattingDebugMaterialPlugin.pure\";\nexport * from \"./materialHelper.functions\";\nexport * from \"./materialHelper.geometryrendering\";\nexport * from \"./materialStencilState\";\nexport * from \"./uv.defines\";\nexport * from \"./floatingOriginMatrixOverrides\";\nexport * from \"./vertexPullingHelper.functions\";\nexport * from \"./effect.webgl.functions.pure\";\nexport * from \"./standardMaterial.decalMap.pure\";\nexport * from \"./GaussianSplatting/pure\";\nexport * from \"./GreasedLine/pure\";\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports pure implementation and applies runtime side effects.
|
|
3
|
+
* Import gaussianSplattingDebugger.pure for tree-shakeable, side-effect-free usage.
|
|
4
|
+
*/
|
|
5
|
+
export * from "./gaussianSplattingDebugger.pure.js";
|
|
6
|
+
import "../../Materials/GaussianSplatting/gaussianSplattingMaterial.js";
|
|
7
|
+
import "../../Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports pure implementation and applies runtime side effects.
|
|
3
|
+
* Import gaussianSplattingDebugger.pure for tree-shakeable, side-effect-free usage.
|
|
4
|
+
*/
|
|
5
|
+
export * from "./gaussianSplattingDebugger.pure.js";
|
|
6
|
+
import "../../Materials/GaussianSplatting/gaussianSplattingMaterial.js";
|
|
7
|
+
import "../../Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin.js";
|
|
8
|
+
//# sourceMappingURL=gaussianSplattingDebugger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gaussianSplattingDebugger.js","sourceRoot":"","sources":["../../../../../dev/core/src/Meshes/GaussianSplatting/gaussianSplattingDebugger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,kCAAkC,CAAC;AAEjD,OAAO,6DAA6D,CAAC;AACrE,OAAO,wEAAwE,CAAC","sourcesContent":["/**\n * Re-exports pure implementation and applies runtime side effects.\n * Import gaussianSplattingDebugger.pure for tree-shakeable, side-effect-free usage.\n */\nexport * from \"./gaussianSplattingDebugger.pure\";\n\nimport \"../../Materials/GaussianSplatting/gaussianSplattingMaterial\";\nimport \"../../Materials/GaussianSplatting/gaussianSplattingDebugMaterialPlugin\";\n"]}
|