@ignifx/core 0.13.0 → 0.15.0
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/dist/agx-tone-mapping-Cgt844j6.js +53 -0
- package/dist/agx-tone-mapping-Cgt844j6.js.map +1 -0
- package/dist/auto-exposure-uzPn0beO.js +246 -0
- package/dist/auto-exposure-uzPn0beO.js.map +1 -0
- package/dist/bloom-hdr-CLtQj-oY.js +315 -0
- package/dist/bloom-hdr-CLtQj-oY.js.map +1 -0
- package/dist/contact-shadows-T523EXaP.js +84 -0
- package/dist/contact-shadows-T523EXaP.js.map +1 -0
- package/dist/{environment-C9AjYJgV.js → environment-DPi0_0SP.js} +19 -5
- package/dist/environment-DPi0_0SP.js.map +1 -0
- package/dist/gtao-_nr0b6-E.js +630 -0
- package/dist/gtao-_nr0b6-E.js.map +1 -0
- package/dist/hdr-output-BrUvpAsE.js +525 -0
- package/dist/hdr-output-BrUvpAsE.js.map +1 -0
- package/dist/{ignifx-error-Dq2qJMkZ.js → ignifx-error-oYdVnT1S.js} +16 -1
- package/dist/ignifx-error-oYdVnT1S.js.map +1 -0
- package/dist/index.d.ts +753 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1679 -183
- package/dist/index.js.map +1 -1
- package/dist/{instanced-mesh-instance-DYwH0vLi.js → instanced-mesh-instance-NnODkvqK.js} +2 -2
- package/dist/{instanced-mesh-instance-DYwH0vLi.js.map → instanced-mesh-instance-NnODkvqK.js.map} +1 -1
- package/dist/mat4-D6exvAuO.js +949 -0
- package/dist/mat4-D6exvAuO.js.map +1 -0
- package/dist/material-CGk5mAah.js +204 -0
- package/dist/material-CGk5mAah.js.map +1 -0
- package/dist/{material-plugin-BOCB7Stt.js → material-plugin-BUlqLsap.js} +3 -204
- package/dist/material-plugin-BUlqLsap.js.map +1 -0
- package/dist/{post-effect-compiler-Dw6zW2cG.js → post-effect-compiler-CRek8VxQ.js} +2 -2
- package/dist/{post-effect-compiler-Dw6zW2cG.js.map → post-effect-compiler-CRek8VxQ.js.map} +1 -1
- package/dist/render-path-Be7WgN7r.js +166 -0
- package/dist/render-path-Be7WgN7r.js.map +1 -0
- package/dist/render-texture-C_TnaSz2.js +200 -0
- package/dist/render-texture-C_TnaSz2.js.map +1 -0
- package/dist/scene-color-passes-DlNr-qyZ.js +65 -0
- package/dist/scene-color-passes-DlNr-qyZ.js.map +1 -0
- package/dist/scene-inputs-BxGOsnIZ.js +318 -0
- package/dist/scene-inputs-BxGOsnIZ.js.map +1 -0
- package/dist/{shader-material-DRZmqA_S.js → shader-material-B6p66wB8.js} +18 -7
- package/dist/shader-material-B6p66wB8.js.map +1 -0
- package/dist/{shader-material-BxQn9FT4.js → shader-material-C0TAUr4t.js} +102 -4
- package/dist/shader-material-C0TAUr4t.js.map +1 -0
- package/dist/{shader-pragma-DrFm5f5m.js → shader-pragma-BKCoZTTA.js} +2 -2
- package/dist/{shader-pragma-DrFm5f5m.js.map → shader-pragma-BKCoZTTA.js.map} +1 -1
- package/dist/ssgi-Dm-maZrc.js +113 -0
- package/dist/ssgi-Dm-maZrc.js.map +1 -0
- package/dist/{surface-shader-BgZchRBe.js → surface-shader-BaK0kvBB.js} +5 -4
- package/dist/{surface-shader-BgZchRBe.js.map → surface-shader-BaK0kvBB.js.map} +1 -1
- package/dist/taa-BwBZLy11.js +480 -0
- package/dist/taa-BwBZLy11.js.map +1 -0
- package/dist/{vec3-T2PasQZv.js → vec3-D-0Y2mzE.js} +4 -948
- package/dist/vec3-D-0Y2mzE.js.map +1 -0
- package/package.json +1 -1
- package/dist/environment-C9AjYJgV.js.map +0 -1
- package/dist/ignifx-error-Dq2qJMkZ.js.map +0 -1
- package/dist/material-plugin-BOCB7Stt.js.map +0 -1
- package/dist/shader-material-BxQn9FT4.js.map +0 -1
- package/dist/shader-material-DRZmqA_S.js.map +0 -1
- package/dist/vec3-T2PasQZv.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bloom-hdr-CLtQj-oY.js","names":[],"sources":["../src/lite/gpu/bloom-hdr.ts"],"sourcesContent":["import {\n createEffectRenderTask,\n createEffectWrapper,\n createSurfaceRenderTargetTexture,\n disposeEffectWrapper,\n disposeRenderTargetTexture,\n onRenderTargetTextureResize,\n setEffectTexture,\n setEffectUniforms,\n} from \"@babylonjs/lite\";\nimport type { HdrOutputHandle } from \"./render-path.js\";\nimport type {\n EffectWrapper,\n EngineContext,\n RenderTarget,\n RenderTargetTextureResult,\n SceneContext,\n Task,\n Texture2D,\n} from \"@babylonjs/lite\";\n\n/**\n * HDR bloom (`docs/plan/2026-11-gi-phase-1-execution-plan.md`, step G12): a downsample/upsample\n * chain on the linear `rgba16float` scene target, recorded before the HDR output pass so the glow\n * is tone mapped with the rest of the frame. Its own chunk: `../../render/hdr-bloom-support.ts`\n * imports it only when a `PostProcessStack` asks for bloom under `rendering.hdr`\n * (`CONSTITUTION.md` §2.5).\n *\n * ```text\n * scene → hdr ─ down₀ → mip₀ ─ down₁ → mip₁ … → mip₅\n * mip₄ += up(mip₅) … mip₀ += up(mip₁)\n * hdr = mix(hdr, up(mip₀), intensity) ──→ output pass\n * ```\n *\n * - **Downsample** is the 13-tap filter of Jimenez, \"Next generation post processing in Call of\n * Duty: Advanced Warfare\" (SIGGRAPH 2014): five overlapping 2×2 boxes, the centre one weighted\n * 0.5. The first level weights each box by `1 / (1 + luma)` (Karis average), so one very bright\n * texel cannot flicker into a frame-sized blob, and applies the optional soft-knee threshold.\n * - **Upsample** is a 9-tap tent, blended into the next larger mip as\n * `mip = mix(mip, tent(smaller), radius)`, so `radius` decides how much of the wide, low mips\n * reaches the image while the weights still sum to one.\n * - **Composite** writes into the HDR target itself through the blend unit, so the output pass's\n * input never changes and nothing is rebound: `hdr = mix(hdr, bloom, intensity)` with no\n * threshold (energy-conserving: the image is redistributed, not brightened), `hdr += bloom ·\n * intensity` with one.\n * - Each mip is a surface-scaled target (`{ surface, scale }`), so a resize reallocates it with\n * the frame graph; the resize callbacks rebind the readers' bind groups.\n * - Lite has no task removal, so {@link HdrBloom.dispose} disables the tasks and makes their\n * `record` a no-op: a later frame-graph rebuild still walks them.\n */\n\n/**\n * How many mips the chain builds: half resolution down to 1/64.\n *\n * @internal\n */\nexport const HDR_BLOOM_MIP_COUNT = 6;\n\n/**\n * The format of every mip; the same as the scene target, so values above 1 survive.\n *\n * @internal\n */\nexport const HDR_BLOOM_FORMAT: GPUTextureFormat = \"rgba16float\";\n\n/** Uniform floats per pass: one `vec4`. */\nconst UNIFORM_FLOATS = 4;\n\n/**\n * The tuning a `PostProcessStack`'s `bloom` record feeds the chain.\n *\n * @internal\n */\nexport interface HdrBloomTuning {\n /** How much glow is mixed in, 0–1. */\n readonly intensity: number;\n /** How far the glow spreads, 0–1: the weight of each lower mip when it is upsampled. */\n readonly radius: number;\n /** The linear luminance below which nothing glows; `0` lets every pixel contribute. */\n readonly threshold: number;\n}\n\n/**\n * A recorded HDR bloom chain.\n *\n * @internal\n */\nexport interface HdrBloom {\n /** The mip chain, largest first. */\n readonly mips: readonly Texture2D[];\n /** How many frame-graph tasks it recorded. */\n readonly taskCount: number;\n /**\n * Switches every task of the chain on or off.\n *\n * @param enabled - `false` to skip the chain; the HDR target then reaches the output pass as is.\n */\n setEnabled(enabled: boolean): void;\n /**\n * Uploads the tuning, when it changed.\n *\n * @param tuning - The values.\n */\n apply(tuning: HdrBloomTuning): void;\n /** Disables the tasks, makes them inert to a rebuild, and frees the mips and effects. */\n dispose(): void;\n}\n\n/** The blend that turns a pass's `vec4(rgb, a)` into `dst·(1 − a) + rgb`. */\nconst MIX_BLEND: GPUBlendState = {\n color: { operation: \"add\", srcFactor: \"one\", dstFactor: \"one-minus-src-alpha\" },\n alpha: { operation: \"add\", srcFactor: \"zero\", dstFactor: \"one\" },\n};\n\n/**\n * The uniform block, texture, sampler and helpers every pass declares.\n *\n * @returns The WGSL.\n */\nfunction passHeaderWgsl(): string {\n return [\n \"struct BloomUniforms{params:vec4<f32>};\",\n \"@group(0)@binding(0)var<uniform>bloom:BloomUniforms;\",\n \"@group(0)@binding(1)var source:texture_2d<f32>;\",\n \"@group(0)@binding(2)var sourceSampler:sampler;\",\n // Lite's fullscreen triangle puts uv (0,0) at the bottom left; textures start at the top left.\n \"fn bloomUv(fragment:EffectVertexOutput)->vec2<f32>{return vec2<f32>(fragment.uv.x,1.0-fragment.uv.y);}\",\n \"fn tap(uv:vec2<f32>,offset:vec2<f32>,texel:vec2<f32>)->vec3<f32>{\",\n \"let c=textureSampleLevel(source,sourceSampler,uv+offset*texel,0.0).rgb;\",\n \"return min(max(c,vec3<f32>(0.0)),vec3<f32>(65000.0));\",\n \"}\",\n ].join(\"\\n\");\n}\n\n/**\n * The downsample pass: 13 taps, a Karis average and the soft-knee threshold on the first level.\n *\n * @remarks\n * `params` is `(threshold, knee, isFirstLevel, unused)`.\n *\n * @returns The WGSL, with Lite's `effectFragment` entry point.\n *\n * @internal\n */\nexport function bloomDownsampleWgsl(): string {\n return [\n passHeaderWgsl(),\n \"fn boxWeight(c:vec3<f32>,first:bool)->f32{\",\n \"if(!first){return 1.0;}\",\n \"return 1.0/(1.0+dot(c,vec3<f32>(0.2126,0.7152,0.0722)));\",\n \"}\",\n \"fn knee(c:vec3<f32>,threshold:f32,soft:f32)->vec3<f32>{\",\n \"if(threshold<=0.0){return c;}\",\n \"let b=max(c.r,max(c.g,c.b));\",\n \"var s=clamp(b-threshold+soft,0.0,2.0*soft);\",\n \"s=s*s/(4.0*soft+1e-5);\",\n \"return c*(max(s,b-threshold)/max(b,1e-5));\",\n \"}\",\n \"@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{\",\n \"let uv=bloomUv(fragment);\",\n \"let texel=1.0/vec2<f32>(textureDimensions(source,0));\",\n \"let first=bloom.params.z>0.5;\",\n \"let a=tap(uv,vec2<f32>(-2.0,-2.0),texel);let b=tap(uv,vec2<f32>(0.0,-2.0),texel);\",\n \"let c=tap(uv,vec2<f32>(2.0,-2.0),texel);let d=tap(uv,vec2<f32>(-2.0,0.0),texel);\",\n \"let e=tap(uv,vec2<f32>(0.0,0.0),texel);let f=tap(uv,vec2<f32>(2.0,0.0),texel);\",\n \"let g=tap(uv,vec2<f32>(-2.0,2.0),texel);let h=tap(uv,vec2<f32>(0.0,2.0),texel);\",\n \"let i=tap(uv,vec2<f32>(2.0,2.0),texel);let j=tap(uv,vec2<f32>(-1.0,-1.0),texel);\",\n \"let k=tap(uv,vec2<f32>(1.0,-1.0),texel);let l=tap(uv,vec2<f32>(-1.0,1.0),texel);\",\n \"let m=tap(uv,vec2<f32>(1.0,1.0),texel);\",\n \"let g0=(j+k+l+m)*0.25;let g1=(a+b+d+e)*0.25;let g2=(b+c+e+f)*0.25;\",\n \"let g3=(d+e+g+h)*0.25;let g4=(e+f+h+i)*0.25;\",\n \"let w0=0.5*boxWeight(g0,first);let w1=0.125*boxWeight(g1,first);let w2=0.125*boxWeight(g2,first);\",\n \"let w3=0.125*boxWeight(g3,first);let w4=0.125*boxWeight(g4,first);\",\n \"var color=(g0*w0+g1*w1+g2*w2+g3*w3+g4*w4)/(w0+w1+w2+w3+w4);\",\n \"if(first){color=knee(color,bloom.params.x,bloom.params.y);}\",\n \"return vec4<f32>(color,1.0);\",\n \"}\",\n ].join(\"\\n\");\n}\n\n/**\n * The upsample and composite pass: a 9-tap tent of the smaller mip, scaled, with the blend weight\n * in alpha.\n *\n * @remarks\n * `params` is `(scale, alpha, unused, unused)`; with {@link MIX_BLEND} the target becomes\n * `target·(1 − alpha) + tent·scale`.\n *\n * @returns The WGSL, with Lite's `effectFragment` entry point.\n *\n * @internal\n */\nexport function bloomUpsampleWgsl(): string {\n return [\n passHeaderWgsl(),\n \"@fragment fn effectFragment(fragment:EffectVertexOutput)->@location(0)vec4<f32>{\",\n \"let uv=bloomUv(fragment);\",\n \"let texel=1.0/vec2<f32>(textureDimensions(source,0));\",\n \"var color=tap(uv,vec2<f32>(0.0,0.0),texel)*4.0;\",\n \"color+=(tap(uv,vec2<f32>(-1.0,0.0),texel)+tap(uv,vec2<f32>(1.0,0.0),texel)\",\n \"+tap(uv,vec2<f32>(0.0,-1.0),texel)+tap(uv,vec2<f32>(0.0,1.0),texel))*2.0;\",\n \"color+=tap(uv,vec2<f32>(-1.0,-1.0),texel)+tap(uv,vec2<f32>(1.0,-1.0),texel)\",\n \"+tap(uv,vec2<f32>(-1.0,1.0),texel)+tap(uv,vec2<f32>(1.0,1.0),texel);\",\n \"return vec4<f32>(color*(bloom.params.x/16.0),bloom.params.y);\",\n \"}\",\n ].join(\"\\n\");\n}\n\n/**\n * Writes every pass's uniforms for a tuning.\n *\n * @remarks\n * Laid out as `HDR_BLOOM_MIP_COUNT` downsample blocks, then `HDR_BLOOM_MIP_COUNT − 1` upsample\n * blocks (smallest first), then the composite: the order the tasks run in. Values are clamped to\n * their documented ranges, so an inspector typo cannot blow the frame up.\n *\n * @param tuning - The values.\n * @param out - `(2 · HDR_BLOOM_MIP_COUNT) · 4` floats, overwritten.\n *\n * @internal\n */\nexport function writeHdrBloomUniforms(tuning: HdrBloomTuning, out: Float32Array): void {\n const threshold = Math.max(0, tuning.threshold);\n const radius = Math.min(1, Math.max(0, tuning.radius));\n const intensity = Math.max(0, tuning.intensity);\n out.fill(0);\n for (let level = 0; level < HDR_BLOOM_MIP_COUNT; level += 1) {\n const base = level * UNIFORM_FLOATS;\n out[base] = threshold;\n out[base + 1] = threshold * 0.5;\n out[base + 2] = level === 0 ? 1 : 0;\n }\n for (let step = 0; step < HDR_BLOOM_MIP_COUNT - 1; step += 1) {\n const base = (HDR_BLOOM_MIP_COUNT + step) * UNIFORM_FLOATS;\n out[base] = radius;\n out[base + 1] = radius;\n }\n const composite = (2 * HDR_BLOOM_MIP_COUNT - 1) * UNIFORM_FLOATS;\n out[composite] = intensity;\n // With a threshold only the highlights are in the chain, so the glow is added; without one the\n // chain holds the whole image and mixing keeps the frame's energy.\n out[composite + 1] = threshold > 0 ? 0 : Math.min(1, intensity);\n}\n\n/** One pass of the chain: its effect, the texture it reads and its task. */\ninterface BloomPass {\n readonly effect: EffectWrapper;\n readonly task: Task;\n readonly source: () => Texture2D;\n}\n\n/**\n * Builds the HDR bloom chain and inserts it before the HDR output pass.\n *\n * @remarks\n * Before the scene is registered the tasks are only inserted, and `registerScene`'s build records\n * them in order; after, each is recorded on the spot (`buildFrameGraphTask`), as\n * `appendPostProcessTask` in `./post-process.ts` does.\n *\n * @param engine - The engine, which is also the primary surface.\n * @param scene - The scene whose frame graph holds the HDR output pass.\n * @param hdr - The HDR half of the scene's presenter.\n * @param isFrameGraphBuilt - Whether the scene has been registered.\n * @returns The chain, enabled, with zero tuning until {@link HdrBloom.apply} runs.\n *\n * @internal\n */\nexport function installHdrBloom(\n engine: EngineContext,\n scene: SceneContext,\n hdr: HdrOutputHandle,\n isFrameGraphBuilt: boolean,\n): HdrBloom {\n const mips: RenderTargetTextureResult[] = [];\n for (let level = 0; level < HDR_BLOOM_MIP_COUNT; level += 1) {\n mips.push(\n createSurfaceRenderTargetTexture(engine, {\n lbl: `ignifx:bloom-mip-${String(level)}`,\n format: HDR_BLOOM_FORMAT,\n samples: 1,\n size: { surface: engine, scale: 0.5 ** (level + 1) },\n }),\n );\n }\n const mipAt = (level: number): RenderTargetTextureResult => {\n const mip = mips[level];\n if (mip === undefined) {\n throw new RangeError(`HDR bloom has no mip ${String(level)}.`);\n }\n return mip;\n };\n const downsample = bloomDownsampleWgsl();\n const upsample = bloomUpsampleWgsl();\n const passes: BloomPass[] = [];\n const addPass = (name: string, fragmentWGSL: string, source: () => Texture2D, target: RenderTarget): void => {\n const blended = fragmentWGSL === upsample;\n const effect = createEffectWrapper(engine, {\n name,\n fragmentWGSL,\n bindings: [\n { name: \"bloom\", binding: 0, kind: \"uniform\", uniformByteLength: UNIFORM_FLOATS * 4 },\n { name: \"source\", binding: 1, kind: \"texture\" },\n { name: \"sourceSampler\", binding: 2, kind: \"sampler\", textureBinding: 1 },\n ],\n ...(blended ? { blend: MIX_BLEND } : {}),\n });\n setEffectTexture(effect, 1, source());\n setEffectUniforms(effect, new Float32Array(UNIFORM_FLOATS));\n const task = createEffectRenderTask({ name, effect, target, clear: !blended }, engine, scene);\n passes.push({ effect, task, source });\n };\n for (let level = 0; level < HDR_BLOOM_MIP_COUNT; level += 1) {\n const source =\n level === 0 ? (): Texture2D => hdr.sceneTargetTexture.texture : (): Texture2D => mipAt(level - 1).texture;\n addPass(`ignifx:bloom-down-${String(level)}`, downsample, source, mipAt(level).rt);\n }\n for (let level = HDR_BLOOM_MIP_COUNT - 2; level >= 0; level -= 1) {\n addPass(`ignifx:bloom-up-${String(level)}`, upsample, () => mipAt(level + 1).texture, mipAt(level).rt);\n }\n addPass(\"ignifx:bloom-composite\", upsample, () => mipAt(0).texture, hdr.sceneTargetTexture.rt);\n\n // After every linear task already in place (TAA among them), right before the output pass.\n for (const pass of passes) {\n hdr.insertLinearTask(pass.task, isFrameGraphBuilt);\n }\n\n // A resize swaps the textures behind the facades; a wrapper's cached bind group keeps the old\n // view until a texture write marks it dirty.\n const rebind = (): void => {\n for (const pass of passes) {\n setEffectTexture(pass.effect, 1, pass.source());\n }\n };\n const unsubscribe = [hdr.sceneTargetTexture, ...mips].map((target) => onRenderTargetTextureResize(target, rebind));\n\n const uniforms = new Float32Array(passes.length * UNIFORM_FLOATS);\n const scratch = new Float32Array(UNIFORM_FLOATS);\n let isDisposed = false;\n let applied: HdrBloomTuning = { intensity: Number.NaN, radius: Number.NaN, threshold: Number.NaN };\n return {\n mips: mips.map((mip) => mip.texture),\n taskCount: passes.length,\n setEnabled(enabled: boolean): void {\n for (const pass of passes) {\n pass.task.executionEnabled = enabled && !isDisposed;\n }\n },\n apply(tuning: HdrBloomTuning): void {\n if (\n isDisposed ||\n (applied.intensity === tuning.intensity &&\n applied.radius === tuning.radius &&\n applied.threshold === tuning.threshold)\n ) {\n return;\n }\n applied = { intensity: tuning.intensity, radius: tuning.radius, threshold: tuning.threshold };\n writeHdrBloomUniforms(tuning, uniforms);\n for (let index = 0; index < passes.length; index += 1) {\n const pass = passes[index];\n if (pass === undefined) {\n continue;\n }\n scratch.set(uniforms.subarray(index * UNIFORM_FLOATS, (index + 1) * UNIFORM_FLOATS));\n setEffectUniforms(pass.effect, scratch);\n }\n },\n dispose(): void {\n if (isDisposed) {\n return;\n }\n isDisposed = true;\n for (const stop of unsubscribe) {\n stop();\n }\n for (const pass of passes) {\n pass.task.executionEnabled = false;\n // Lite cannot remove a task, and a frame-graph rebuild records every task, disabled or not.\n pass.task.record = inertRecord;\n disposeEffectWrapper(pass.effect);\n }\n for (const mip of mips) {\n disposeRenderTargetTexture(mip);\n }\n },\n };\n}\n\n/** What a disposed pass records: nothing. */\nfunction inertRecord(): void {\n // Intentionally empty; see `HdrBloom.dispose`.\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,MAAa,sBAAsB;;;;;;AAOnC,MAAa,mBAAqC;;AAGlD,MAAM,iBAAiB;;AA2CvB,MAAM,YAA2B;CAC/B,OAAO;EAAE,WAAW;EAAO,WAAW;EAAO,WAAW;CAAsB;CAC9E,OAAO;EAAE,WAAW;EAAO,WAAW;EAAQ,WAAW;CAAM;AACjE;;;;;;AAOA,SAAS,iBAAyB;CAChC,OAAO;EACL;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI;AACb;;;;;;;;;;;AAYA,SAAgB,sBAA8B;CAC5C,OAAO;EACL,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,KAAK,IAAI;AACb;;;;;;;;;;;;;AAcA,SAAgB,oBAA4B;CAC1C,OAAO;EACL,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CAAC,CAAC,K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from "@babylonjs/lite";
|
|
2
|
+
//#region src/lite/gpu/contact-shadows.ts
|
|
3
|
+
/** The pass's frame-graph task name. */
|
|
4
|
+
const TASK_NAME = "ignifx:contact-shadows";
|
|
5
|
+
/**
|
|
6
|
+
* Creates a contact-shadows pass.
|
|
7
|
+
*
|
|
8
|
+
* @param engine - The engine.
|
|
9
|
+
* @param scene - The scene, whose lights are read every frame.
|
|
10
|
+
* @param depth - The scene-input depth target.
|
|
11
|
+
* @param camera - The camera the depth was drawn from.
|
|
12
|
+
* @param tuning - The initial tuning.
|
|
13
|
+
* @returns The pass.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
function createContactShadowsPass(engine, scene, depth, camera, tuning) {
|
|
18
|
+
const lightDirection = {
|
|
19
|
+
x: 0,
|
|
20
|
+
y: -1,
|
|
21
|
+
z: 0
|
|
22
|
+
};
|
|
23
|
+
let task = null;
|
|
24
|
+
return {
|
|
25
|
+
create(source, target) {
|
|
26
|
+
task = createScreenSpaceContactShadowsPostProcessTask({
|
|
27
|
+
name: TASK_NAME,
|
|
28
|
+
sourceTexture: source,
|
|
29
|
+
depthTexture: depth,
|
|
30
|
+
targetTexture: target,
|
|
31
|
+
camera,
|
|
32
|
+
lightDirection,
|
|
33
|
+
intensity: tuning.intensity,
|
|
34
|
+
maxDistance: tuning.length,
|
|
35
|
+
thickness: tuning.thickness,
|
|
36
|
+
stepCount: tuning.samples
|
|
37
|
+
}, engine, scene);
|
|
38
|
+
return task;
|
|
39
|
+
},
|
|
40
|
+
update(next) {
|
|
41
|
+
if (task === null) return;
|
|
42
|
+
task.intensity = next.intensity;
|
|
43
|
+
task.maxDistance = next.length;
|
|
44
|
+
task.thickness = next.thickness;
|
|
45
|
+
task.stepCount = next.samples;
|
|
46
|
+
const light = mainDirectionalLight(scene);
|
|
47
|
+
task.enabled = light !== null;
|
|
48
|
+
if (light !== null) {
|
|
49
|
+
lightDirection.x = light.direction.x;
|
|
50
|
+
lightDirection.y = light.direction.y;
|
|
51
|
+
lightDirection.z = light.direction.z;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* The scene's main directional light: the first that casts shadows, else the first.
|
|
58
|
+
*
|
|
59
|
+
* @param scene - The scene.
|
|
60
|
+
* @returns The light, or `null` when the scene has none.
|
|
61
|
+
*/
|
|
62
|
+
function mainDirectionalLight(scene) {
|
|
63
|
+
let first = null;
|
|
64
|
+
for (const light of scene.lights) {
|
|
65
|
+
if (!isDirectional(light)) continue;
|
|
66
|
+
if (light.shadowGenerator !== void 0) return light;
|
|
67
|
+
first ??= light;
|
|
68
|
+
}
|
|
69
|
+
return first;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Whether a scene light is directional.
|
|
73
|
+
*
|
|
74
|
+
* @param light - The light.
|
|
75
|
+
* @param light.lightType - Its type tag.
|
|
76
|
+
* @returns `true` for a directional light.
|
|
77
|
+
*/
|
|
78
|
+
function isDirectional(light) {
|
|
79
|
+
return light.lightType === "directional";
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { createContactShadowsPass };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=contact-shadows-T523EXaP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact-shadows-T523EXaP.js","names":[],"sources":["../src/lite/gpu/contact-shadows.ts"],"sourcesContent":["import { createScreenSpaceContactShadowsPostProcessTask } from \"@babylonjs/lite\";\nimport type { SceneColorPass } from \"./scene-color-passes.js\";\nimport type {\n Camera,\n DirectionalLight,\n EngineContext,\n RenderTarget,\n SceneContext,\n ScreenSpaceContactShadowsPostProcessTask,\n} from \"@babylonjs/lite\";\n\n/**\n * Screen-space contact shadows (GI plan step G10): Lite's\n * `createScreenSpaceContactShadowsPostProcessTask` (`index.d.ts` 3672), fed the shared scene-input\n * depth and run as a scene-colour pass (`./scene-color-passes.ts`). Its own chunk, loaded only while\n * a `PostProcessStack` enables `contactShadows` (`CONSTITUTION.md` §2.5).\n *\n * Lite marches from each pixel towards one light through the depth buffer and multiplies the colour\n * by the occlusion it finds, so the light is the scene's main directional light: the first one that\n * casts shadows, else the first one. With none, the task runs disabled (its composite copies).\n */\n\n/**\n * The tuning a recorded pass follows live.\n *\n * @internal\n */\nexport interface ContactShadowsTuning {\n /** How dark a contact gets, 0 to 4. */\n readonly intensity: number;\n /** How far each ray marches, in world units. */\n readonly length: number;\n /** How thick a surface is assumed to be behind its depth, in world units. */\n readonly thickness: number;\n /** March steps per pixel, 1 to 64. */\n readonly samples: number;\n}\n\n/**\n * A contact-shadows pass: its task once created, and its per-frame update.\n *\n * @internal\n */\nexport interface ContactShadowsPass extends SceneColorPass {\n /**\n * Writes the tuning and the main light's direction onto the task.\n *\n * @param tuning - The stack's `contactShadows` record.\n */\n update(tuning: ContactShadowsTuning): void;\n}\n\n/** The pass's frame-graph task name. */\nconst TASK_NAME = \"ignifx:contact-shadows\";\n\n/**\n * Creates a contact-shadows pass.\n *\n * @param engine - The engine.\n * @param scene - The scene, whose lights are read every frame.\n * @param depth - The scene-input depth target.\n * @param camera - The camera the depth was drawn from.\n * @param tuning - The initial tuning.\n * @returns The pass.\n *\n * @internal\n */\nexport function createContactShadowsPass(\n engine: EngineContext,\n scene: SceneContext,\n depth: RenderTarget,\n camera: Camera,\n tuning: ContactShadowsTuning,\n): ContactShadowsPass {\n // Lite keeps this object and reads it every frame (`lib/post-process/screen-space-contact-shadows.js`).\n const lightDirection = { x: 0, y: -1, z: 0 };\n let task: ScreenSpaceContactShadowsPostProcessTask | null = null;\n return {\n create(source: RenderTarget, target: RenderTarget): ScreenSpaceContactShadowsPostProcessTask {\n task = createScreenSpaceContactShadowsPostProcessTask(\n {\n name: TASK_NAME,\n sourceTexture: source,\n depthTexture: depth,\n targetTexture: target,\n camera,\n lightDirection,\n intensity: tuning.intensity,\n maxDistance: tuning.length,\n thickness: tuning.thickness,\n stepCount: tuning.samples,\n },\n engine,\n scene,\n );\n return task;\n },\n update(next: ContactShadowsTuning): void {\n if (task === null) {\n return;\n }\n task.intensity = next.intensity;\n task.maxDistance = next.length;\n task.thickness = next.thickness;\n task.stepCount = next.samples;\n const light = mainDirectionalLight(scene);\n task.enabled = light !== null;\n if (light !== null) {\n lightDirection.x = light.direction.x;\n lightDirection.y = light.direction.y;\n lightDirection.z = light.direction.z;\n }\n },\n };\n}\n\n/**\n * The scene's main directional light: the first that casts shadows, else the first.\n *\n * @param scene - The scene.\n * @returns The light, or `null` when the scene has none.\n */\nfunction mainDirectionalLight(scene: SceneContext): DirectionalLight | null {\n let first: DirectionalLight | null = null;\n for (const light of scene.lights) {\n if (!isDirectional(light)) {\n continue;\n }\n if (light.shadowGenerator !== undefined) {\n return light;\n }\n first ??= light;\n }\n return first;\n}\n\n/**\n * Whether a scene light is directional.\n *\n * @param light - The light.\n * @param light.lightType - Its type tag.\n * @returns `true` for a directional light.\n */\nfunction isDirectional(light: { readonly lightType: string }): light is DirectionalLight {\n return light.lightType === \"directional\";\n}\n"],"mappings":";;;AAqDA,MAAM,YAAY;;;;;;;;;;;;;AAclB,SAAgB,yBACd,QACA,OACA,OACA,QACA,QACoB;CAEpB,MAAM,iBAAiB;EAAE,GAAG;EAAG,GAAG;EAAI,GAAG;CAAE;CAC3C,IAAI,OAAwD;CAC5D,OAAO;EACL,OAAO,QAAsB,QAAgE;GAC3F,OAAO,+CACL;IACE,MAAM;IACN,eAAe;IACf,cAAc;IACd,eAAe;IACf;IACA;IACA,WAAW,OAAO;IAClB,aAAa,OAAO;IACpB,WAAW,OAAO;IAClB,WAAW,OAAO;GACpB,GACA,QACA,KACF;GACA,OAAO;EACT;EACA,OAAO,MAAkC;GACvC,IAAI,SAAS,MACX;GAEF,KAAK,YAAY,KAAK;GACtB,KAAK,cAAc,KAAK;GACxB,KAAK,YAAY,KAAK;GACtB,KAAK,YAAY,KAAK;GACtB,MAAM,QAAQ,qBAAqB,KAAK;GACxC,KAAK,UAAU,UAAU;GACzB,IAAI,UAAU,MAAM;IAClB,eAAe,IAAI,MAAM,UAAU;IACnC,eAAe,IAAI,MAAM,UAAU;IACnC,eAAe,IAAI,MAAM,UAAU;GACrC;EACF;CACF;AACF;;;;;;;AAQA,SAAS,qBAAqB,OAA8C;CAC1E,IAAI,QAAiC;CACrC,KAAK,MAAM,SAAS,MAAM,QAAQ;EAChC,IAAI,CAAC,cAAc,KAAK,GACtB;EAEF,IAAI,MAAM,oBAAoB,KAAA,GAC5B,OAAO;EAET,UAAU;CACZ;CACA,OAAO;AACT;;;;;;;;AASA,SAAS,cAAc,OAAkE;CACvF,OAAO,MAAM,cAAc;AAC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as assertNever } from "./ignifx-error-
|
|
1
|
+
import { n as assertNever } from "./ignifx-error-oYdVnT1S.js";
|
|
2
2
|
import { s as degToRad } from "./math-utils-BcDnL-gi.js";
|
|
3
3
|
import { t as Color } from "./color-DrR6GFTd.js";
|
|
4
4
|
import { AcesToneMapping, NeutralToneMapping, StandardToneMapping, loadEnvironment, setEnvironmentBlur, setEnvironmentRotation, setFog, setSceneImageProcessing } from "@babylonjs/lite";
|
|
@@ -19,7 +19,8 @@ const FOG_MODES = {
|
|
|
19
19
|
linear: 3
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
22
|
-
* The tone-mapping curves `docs/architecture/07-rendering.md` §2.5 exposes.
|
|
22
|
+
* The tone-mapping curves `docs/architecture/07-rendering.md` §2.5 exposes. `"agx"` is ignifx's
|
|
23
|
+
* own Lite curve (`./agx-tone-mapping.ts`); the others are Lite's built-ins.
|
|
23
24
|
*
|
|
24
25
|
* @public
|
|
25
26
|
*/
|
|
@@ -27,9 +28,15 @@ const TONE_MAPPING_NAMES = [
|
|
|
27
28
|
"none",
|
|
28
29
|
"standard",
|
|
29
30
|
"aces",
|
|
30
|
-
"neutral"
|
|
31
|
+
"neutral",
|
|
32
|
+
"agx"
|
|
31
33
|
];
|
|
32
34
|
/**
|
|
35
|
+
* The `id` of the AgX curve, repeated from `./agx-tone-mapping.ts` so recognising it does not load
|
|
36
|
+
* that chunk.
|
|
37
|
+
*/
|
|
38
|
+
const AGX_TONE_MAPPING_ID = "ignifx-agx";
|
|
39
|
+
/**
|
|
33
40
|
* Loads an `.env` environment and installs it on a scene.
|
|
34
41
|
*
|
|
35
42
|
* @param scene - The scene to light.
|
|
@@ -221,6 +228,12 @@ function setSceneImageProcessingOptions(scene, exposure, contrast, toneMapping)
|
|
|
221
228
|
contrast,
|
|
222
229
|
toneMappingEnabled: false
|
|
223
230
|
});
|
|
231
|
+
if (toneMapping === "agx") return import("./agx-tone-mapping-Cgt844j6.js").then(({ AgxToneMapping }) => setSceneImageProcessing(scene, {
|
|
232
|
+
exposure,
|
|
233
|
+
contrast,
|
|
234
|
+
toneMappingEnabled: true,
|
|
235
|
+
toneMapping: AgxToneMapping
|
|
236
|
+
}));
|
|
224
237
|
return setSceneImageProcessing(scene, {
|
|
225
238
|
exposure,
|
|
226
239
|
contrast,
|
|
@@ -260,13 +273,14 @@ function curveName(curve) {
|
|
|
260
273
|
case StandardToneMapping.id: return "standard";
|
|
261
274
|
case AcesToneMapping.id: return "aces";
|
|
262
275
|
case NeutralToneMapping.id: return "neutral";
|
|
276
|
+
case AGX_TONE_MAPPING_ID: return "agx";
|
|
263
277
|
default: return "none";
|
|
264
278
|
}
|
|
265
279
|
}
|
|
266
280
|
/**
|
|
267
281
|
* Maps an ignifx tone-mapping name onto the Lite curve object.
|
|
268
282
|
*
|
|
269
|
-
* @param name - The curve name; `"none"`
|
|
283
|
+
* @param name - The curve name; `"none"` and the lazily loaded `"agx"` are handled by the caller.
|
|
270
284
|
* @returns The Lite curve.
|
|
271
285
|
*/
|
|
272
286
|
function toneMappingCurve(name) {
|
|
@@ -280,4 +294,4 @@ function toneMappingCurve(name) {
|
|
|
280
294
|
//#endregion
|
|
281
295
|
export { readSceneImageProcessing as a, setSceneEnvironmentRotation as c, readSceneEnvironment as i, setSceneFog as l, installSceneEnvironment as n, setSceneClearColor as o, loadSceneEnvironment as r, setSceneEnvironmentBlur as s, TONE_MAPPING_NAMES as t, setSceneImageProcessingOptions as u };
|
|
282
296
|
|
|
283
|
-
//# sourceMappingURL=environment-
|
|
297
|
+
//# sourceMappingURL=environment-DPi0_0SP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environment-DPi0_0SP.js","names":[],"sources":["../src/lite/gpu/environment.ts"],"sourcesContent":["import {\n AcesToneMapping,\n loadEnvironment,\n loadSkybox,\n NeutralToneMapping,\n setEnvironmentBlur,\n setEnvironmentRotation,\n setFog,\n setSceneImageProcessing,\n StandardToneMapping,\n} from \"@babylonjs/lite\";\nimport { assertNever } from \"../../errors/ignifx-error.js\";\nimport { Color } from \"../../math/color.js\";\nimport { degToRad } from \"../../math/math-utils.js\";\nimport type { EnvironmentTextures, SceneContext, ToneMapping } from \"@babylonjs/lite\";\n\n/**\n * Environment half of the Babylon Lite adapter (`docs/architecture/07-rendering.md` §2.5): image\n * based lighting, the skybox, fog, image processing, and the clear colour.\n *\n * Everything here is `@internal`. Loading uploads cube maps, so the module is GPU-only.\n *\n * ## The BRDF LUT is mandatory (verified against `@babylonjs/lite@1.27.0`)\n *\n * `loadEnvironment(scene, url, options)` (`index.d.ts` 6779) takes a **required** `brdfUrl`: Lite\n * decodes the split-sum BRDF lookup table from a pre-baked RGBD PNG rather than computing it, \"for\n * pixel-perfect parity\" with Babylon.js (`lib/_chunks/env-helpers-*.js`, `loadBrdfImage`, which\n * `fetch`es the URL and decodes it with `createImageBitmap`). ignifx ships that PNG as\n * `tests/fixtures/assets/brdf-lut.png`, decoded from Babylon.js's own\n * `_environmentBRDFBase64Texture` (`packages/dev/core/src/Misc/brdfTextureTools.ts`, Apache-2.0).\n * It is 256×256 RGBA8 and 23 KB.\n *\n * ## Fog\n *\n * `SceneContext.fog` is `FogConfig | null` (`index.d.ts` 5350) with a numeric `mode`; Lite exports\n * no named constants for it, so {@link FOG_MODES} maps ignifx's names onto the numbers.\n *\n * **Fog has to be installed with `setFog`, not by assigning the field.** `scene.fog` is what the PBR\n * group builder reads to decide whether a material's program gets the fog block at all\n * (`lib/material/pbr/pbr-renderable.js` 140-159, `PBR_HAS_FOG`), but the block it compiles reads\n * `scene.vFogInfos.x` out of the scene uniform buffer — and the only writer of those slots is\n * `writeFogUbo`, which nothing registers except `setFog`\n * (`lib/scene/scene-ubo-extras.js`: `setFog` is `scene.fog = config` **plus**\n * `_registerSceneUboContributor(scene, writeFogUbo)`, and `_writePassSceneUBO` runs\n * `scene._sceneUboContributors` and nothing else, `lib/frame-graph/render-task.js` 372-379).\n * Lite says as much in `index.d.ts` 10471: \"importing `setFog` is what pulls the fog UBO writer into\n * the bundle\". Assigning `scene.fog` alone therefore compiles the fog block into every PBR pipeline\n * and leaves `vFogInfos` zeroed, so `vFogInfos.x > 0.0` is never true and the scene renders with no\n * fog at all — the cost with none of the effect.\n *\n * A **fresh** config object goes in on every change, because a render task caches its scene UBO on\n * the identity of `scene.fog` (`s[1] === fog`, `lib/frame-graph/render-task.js` 355-371): mutating\n * the installed object in place leaves the cache key equal and the new density or colour never\n * reaches the GPU. Turning fog off writes mode `0`, which is what the already-compiled fog block\n * reads as \"no fog\"; dropping the field back to `null` would only stop the writer and leave the last\n * fog standing. A scene that never had fog keeps its `null` and pays nothing.\n *\n * ## Image processing\n *\n * `setSceneImageProcessing` is **async** (`index.d.ts` 10917) because tone mapping is baked into\n * the PBR shaders at `registerScene` time; changing it recompiles the affected pipelines\n * (`rebuildScenePbrPipelines`). Setting exposure or contrast alone still goes through the same\n * call. Note that `loadEnvironment` **overwrites** all three (`toneMappingEnabled = true`,\n * `exposure = 0.8`, `contrast = 1.2`) as a side effect of installing an environment, which is why\n * the `Environment` component re-applies its own image processing after every install.\n *\n * ## Swapping the installed environment: `scene._envTextures`\n *\n * Lite 1.27.0 declares **no** public way to replace, clear, or read back a registered scene's\n * environment. `index.d.ts` has no `scene.environmentTexture`, no `unloadEnvironment`, and no\n * setter of any kind; `loadEnvironment` is the only installer and it fetches, decodes, and uploads\n * a fresh cube map every call. What it actually installs is one field —\n * `scene._envTextures = textures` (`lib/_chunks/env-helpers-CRI1i-A3.js` 24, and the same line in\n * `lib/loader-hdr/load-hdr.js` 23, `lib/loader-env/load-dds-env.js` 177 and\n * `lib/loader-gltf/gltf-ext-lights-image-based.js` 65) — and every consumer reads that field:\n *\n * - the PBR group builder, which bakes the cube view and sampler into each material's bind group\n * (`lib/material/pbr/pbr-material.js` 12 → `lib/material/pbr/pbr-renderable.js`);\n * - the scene-uniform packer, for `lodGenerationScale` (`lib/frame-graph/scene-uniforms-pack.js` 21);\n * - the env UBO contributor, for the diffuse spherical harmonics (`lib/scene/scene-ubo-extras.js` 24);\n * - the blur contributor, for `lodGenerationOffset` (`lib/scene/set-environment-blur.js` 8);\n * - the render task's scene-UBO cache key, which is keyed on the **object identity** of the field\n * (`lib/frame-graph/render-task.js` 358), so a new object re-uploads the harmonics by itself.\n *\n * Lite's own device-lost recovery replaces the field exactly this way\n * (`lib/loader-env/environment-recovery.js` 16 and 38), so {@link installSceneEnvironment} writes it\n * too. Bind groups are the one consumer that does *not* re-read it: they hold the `GPUTextureView`,\n * so a swap only reaches the specular reflection once the material groups have been rebuilt, which\n * `rebuildSceneRenderables` does (`lib/scene/scene-rebuild.js`, `rebuildEachGroup`). The\n * `Environment` component therefore reports an install as a topology change and lets the render-sync\n * system fire its one coalesced rebuild. This is the only place in ignifx that touches a Lite field\n * `index.d.ts` does not declare, which is what the adapter boundary exists for\n * (`CONSTITUTION.md` §3.4, ADR-0002); it is pinned by\n * `packages/core/test/lite/render/environment.browser.test.ts`, which fails loudly if the field is\n * renamed.\n */\n\n/**\n * The GPU-resident image-based-lighting textures `loadEnvironment` resolves to, re-exported under an\n * ignifx name (`CONSTITUTION.md` §3.4, coding standards §4).\n *\n * @remarks\n * Unstable; excluded from the stability guarantees of `CONSTITUTION.md` Article IV.\n *\n * @public\n */\nexport type LiteEnvironmentTextures = EnvironmentTextures;\n\n/**\n * ignifx fog mode names mapped to the numbers `FogConfig.mode` uses.\n *\n * @internal\n */\nexport const FOG_MODES = {\n /** No fog. */\n none: 0,\n /** Exponential fog. */\n exp: 1,\n /** Squared-exponential fog. */\n exp2: 2,\n /** Linear fog between `start` and `end`. */\n linear: 3,\n} as const;\n\n/**\n * The union of the fog mode names.\n *\n * @internal\n */\nexport type FogMode = keyof typeof FOG_MODES;\n\n/**\n * The tone-mapping curves `docs/architecture/07-rendering.md` §2.5 exposes. `\"agx\"` is ignifx's\n * own Lite curve (`./agx-tone-mapping.ts`); the others are Lite's built-ins.\n *\n * @public\n */\nexport const TONE_MAPPING_NAMES = [\"none\", \"standard\", \"aces\", \"neutral\", \"agx\"] as const;\n\n/**\n * The `id` of the AgX curve, repeated from `./agx-tone-mapping.ts` so recognising it does not load\n * that chunk.\n */\nconst AGX_TONE_MAPPING_ID = \"ignifx-agx\";\n\n/**\n * The union of the tone-mapping curve names.\n *\n * @internal\n */\nexport type ToneMappingName = (typeof TONE_MAPPING_NAMES)[number];\n\n/**\n * The image processing Lite's PBR shaders apply: exposure, contrast and the tone-mapping curve.\n *\n * @internal\n */\nexport interface ImageProcessingState {\n /** The exposure multiplier. */\n exposure: number;\n /** The contrast multiplier. */\n contrast: number;\n /** The tone-mapping curve, or `\"none\"`. */\n curve: ToneMappingName;\n}\n\n/**\n * How an ignifx `Environment` component configures image based lighting.\n *\n * @internal\n */\nexport interface EnvironmentLoadOptions {\n /** The `.env` file holding the prefiltered specular cube map and its spherical harmonics. */\n readonly url: string;\n /** The RGBD PNG BRDF lookup table. Required by Lite. */\n readonly brdfUrl: string;\n /** A `.dds` or `.env` skybox. Omit for a flat background. */\n readonly skyboxUrl?: string;\n /** The skybox cube's size, in metres. Lite defaults to 20. */\n readonly skyboxSize?: number;\n /** Skip the skybox entirely. */\n readonly skipSkybox?: boolean;\n /** Skip the reflective ground plane Lite would otherwise add. */\n readonly skipGround?: boolean;\n /** A texture for that ground plane. */\n readonly groundTextureUrl?: string;\n}\n\n/**\n * Loads an `.env` environment and installs it on a scene.\n *\n * @param scene - The scene to light.\n * @param options - The environment, BRDF, and skybox URLs.\n * @returns The GPU-resident environment textures, for materials that need them explicitly.\n *\n * @example\n * ```ts\n * await loadSceneEnvironment(scene, {\n * url: \"environments/studio.env\",\n * brdfUrl: \"environments/brdf-lut.png\",\n * });\n * ```\n *\n * @internal\n */\nexport function loadSceneEnvironment(\n scene: SceneContext,\n options: EnvironmentLoadOptions,\n): Promise<EnvironmentTextures> {\n const liteOptions: {\n brdfUrl: string;\n skyboxUrl?: string;\n skyboxSize?: number;\n skipSkybox?: boolean;\n skipGround?: boolean;\n groundTextureUrl?: string;\n } = { brdfUrl: options.brdfUrl };\n if (options.skyboxUrl !== undefined) {\n liteOptions.skyboxUrl = options.skyboxUrl;\n }\n if (options.skyboxSize !== undefined) {\n liteOptions.skyboxSize = options.skyboxSize;\n }\n if (options.skipSkybox !== undefined) {\n liteOptions.skipSkybox = options.skipSkybox;\n }\n if (options.skipGround !== undefined) {\n liteOptions.skipGround = options.skipGround;\n }\n if (options.groundTextureUrl !== undefined) {\n liteOptions.groundTextureUrl = options.groundTextureUrl;\n }\n return loadEnvironment(scene, options.url, liteOptions);\n}\n\n/**\n * The scene fields Babylon Lite 1.27.0 writes for image-based lighting but does not declare in\n * `index.d.ts`. Adapter-internal Lite mirror (coding standards §5.1); see the module header for the\n * `lib/` lines that prove each one.\n */\ninterface SceneEnvironmentSlot {\n /** What `loadEnvironment` installed, or `undefined` on a scene that has never had one. */\n _envTextures?: EnvironmentTextures | undefined;\n}\n\n/**\n * Views a scene through its undeclared environment slot.\n *\n * @param scene - The scene.\n * @returns The same object, typed so the slot is reachable.\n */\nfunction environmentSlotOf(scene: SceneContext): SceneEnvironmentSlot {\n // Boundary assertion (coding standards §5.2): `SceneContext` is a plain object literal Lite\n // creates in `lib/scene/scene-core.js`, and `_envTextures` is one of its own fields — it is\n // absent from `index.d.ts` because it is not part of Lite's declared surface, not because it is\n // a different object. See the module header for every `lib/` line that reads or writes it.\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion\n return scene as SceneContext & SceneEnvironmentSlot;\n}\n\n/**\n * Reports which environment textures a scene is currently lit by.\n *\n * @param scene - The scene to inspect.\n * @returns The installed textures, or `null` when no environment has ever been installed.\n *\n * @internal\n */\nexport function readSceneEnvironment(scene: SceneContext): EnvironmentTextures | null {\n // The underscore is Lite's, not ignifx's: coding standards §5.1 reserves `_field` for exactly\n // this, an adapter-internal mirror of a Lite field, and the module header proves the name.\n // oxlint-disable-next-line no-underscore-dangle\n return environmentSlotOf(scene)._envTextures ?? null;\n}\n\n/**\n * Points a scene at an already-loaded set of environment textures, without loading anything.\n *\n * @remarks\n * This is how an `Environment` component swaps environments at runtime: the textures belong to the\n * `EnvironmentAsset` that loaded them and stay alive as long as its handle is retained, so\n * switching between two loaded assets uploads nothing and frees nothing.\n *\n * The specular reflection follows only after the scene's material groups are rebuilt\n * (`rebuildRenderables` in `../shadow.ts`): a PBR bind group holds the cube map's `GPUTextureView`,\n * not the slot. The diffuse harmonics and the LOD scale follow immediately, because the render\n * task's scene-UBO cache is keyed on this object's identity.\n *\n * @param scene - The scene to light.\n * @param textures - The textures to light it with.\n * @returns `true` when the scene was lit by something else and now is not — the caller owes a\n * renderable rebuild; `false` when these textures were already installed and nothing was written.\n *\n * @example\n * ```ts\n * if (installSceneEnvironment(scene, asset.lite.textures)) {\n * await rebuildRenderables(scene);\n * }\n * ```\n *\n * @internal\n */\nexport function installSceneEnvironment(scene: SceneContext, textures: EnvironmentTextures): boolean {\n const slot = environmentSlotOf(scene);\n // As in `readSceneEnvironment`: an adapter-internal Lite mirror (coding standards §5.1).\n // oxlint-disable-next-line no-underscore-dangle\n if (slot._envTextures === textures) {\n return false;\n }\n // oxlint-disable-next-line no-underscore-dangle\n slot._envTextures = textures;\n return true;\n}\n\n/**\n * Loads a six-face cube-map skybox from a base URL.\n *\n * @param scene - The scene to give a background.\n * @param baseUrl - The URL prefix each face name is appended to.\n * @param extension - The face file extension, such as `\".jpg\"`.\n * @param size - The skybox cube's size, in metres.\n * @returns A promise that resolves when the faces are uploaded.\n *\n * @internal\n */\nexport function loadSceneSkybox(scene: SceneContext, baseUrl: string, extension: string, size?: number): Promise<void> {\n return loadSkybox(scene, baseUrl, extension, size);\n}\n\n/**\n * Rotates the environment around the world Y axis.\n *\n * @param scene - The scene to rotate the environment of.\n * @param degrees - The rotation, in degrees.\n *\n * @internal\n */\nexport function setSceneEnvironmentRotation(scene: SceneContext, degrees: number): void {\n setEnvironmentRotation(scene, degToRad(degrees));\n}\n\n/**\n * Blurs the visible skybox. Babylon Lite patches only the skybox shader; no material reads the value.\n *\n * @param scene - The scene to change.\n * @param blur - The blur amount, 0 to 1.\n *\n * @internal\n */\nexport function setSceneEnvironmentBlur(scene: SceneContext, blur: number): void {\n setEnvironmentBlur(scene, blur);\n}\n\n/**\n * Sets the colour the scene is cleared to each frame, so that it presents as the sRGB value given.\n *\n * @remarks\n * Lite stores the clear value into the colour target untouched. Tone mapping, image processing and\n * bloom's threshold never apply to it on the GPU (the renderer applies image processing before this\n * call, `src/render/image-processing-color.ts`), and Lite's own transmission and solid-skybox paths read it\n * as the colour that should come out (`lib/frame-graph/transmission.js` `executeRenderTaskLinear`,\n * `lib/material/pbr/background-solid-skybox.js`). The default surface format is not an sRGB one,\n * so the sRGB value is written unchanged. Only an `*-srgb` surface view (`rendering.srgb: true`)\n * encodes on write; there the value is decoded first, so that the GPU's encoding gives it back.\n * Every target ignifx renders the scene into uses the surface's format (`./render-path.ts`), so\n * the same rule holds on the offscreen path.\n *\n * @param scene - The scene to change.\n * @param r - The sRGB red component, 0 to 1.\n * @param g - The sRGB green component, 0 to 1.\n * @param b - The sRGB blue component, 0 to 1.\n * @param a - The alpha component; only meaningful with a premultiplied canvas alpha mode.\n *\n * @internal\n */\nexport function setSceneClearColor(scene: SceneContext, r: number, g: number, b: number, a: number): void {\n const clear = scene.clearColor;\n const decode = isSrgbEncodingFormat(scene.surface.format);\n clear.r = decode ? Color.srgbToLinear(r) : r;\n clear.g = decode ? Color.srgbToLinear(g) : g;\n clear.b = decode ? Color.srgbToLinear(b) : b;\n clear.a = a;\n}\n\n/**\n * Whether a colour target of this format encodes linear values to sRGB as they are stored.\n *\n * @param format - The target's format. Lite's null engine has none.\n * @returns `true` for an `*-srgb` format.\n *\n * @internal\n */\nexport function isSrgbEncodingFormat(format: string | undefined): boolean {\n return format?.endsWith(\"-srgb\") === true;\n}\n\n/**\n * Configures the scene's fog, or turns it off.\n *\n * @param scene - The scene to change.\n * @param mode - The fog falloff, or `\"none\"` to disable it.\n * @param r - The sRGB red component of the fog colour; Lite's fog block decodes it itself.\n * @param g - The sRGB green component.\n * @param b - The sRGB blue component.\n * @param density - The density, for the exponential modes.\n * @param start - Where linear fog begins, in metres.\n * @param end - Where linear fog reaches full strength, in metres.\n *\n * @internal\n */\nexport function setSceneFog(\n scene: SceneContext,\n mode: FogMode,\n r: number,\n g: number,\n b: number,\n density: number,\n start: number,\n end: number,\n): void {\n if (mode === \"none\" && scene.fog === null) {\n // A scene that never had fog pays nothing: no contributor, no fog block in any PBR pipeline.\n return;\n }\n setFog(scene, { mode: FOG_MODES[mode], density, start, end, color: [r, g, b] });\n}\n\n/**\n * Sets exposure, contrast, and the tone-mapping curve.\n *\n * @remarks\n * Asynchronous by nature: tone mapping is compiled into the PBR shaders, so changing it after\n * `registerScene` recompiles the scene's PBR pipelines. Exposure and contrast alone are uniform\n * values, but Lite routes them through the same call.\n *\n * @param scene - The scene to change.\n * @param exposure - The exposure multiplier.\n * @param contrast - The contrast multiplier.\n * @param toneMapping - The curve, or `\"none\"` to leave the colour untouched.\n * @returns A promise that resolves when any affected pipeline has been rebuilt.\n *\n * @internal\n */\nexport function setSceneImageProcessingOptions(\n scene: SceneContext,\n exposure: number,\n contrast: number,\n toneMapping: ToneMappingName,\n): Promise<void> {\n if (toneMapping === \"none\") {\n return setSceneImageProcessing(scene, { exposure, contrast, toneMappingEnabled: false });\n }\n if (toneMapping === \"agx\") {\n // Its own chunk: a project that never names AgX loads none of its WGSL (CONSTITUTION.md §2.5).\n return import(\"./agx-tone-mapping.js\").then(({ AgxToneMapping }) =>\n setSceneImageProcessing(scene, { exposure, contrast, toneMappingEnabled: true, toneMapping: AgxToneMapping }),\n );\n }\n return setSceneImageProcessing(scene, {\n exposure,\n contrast,\n toneMappingEnabled: true,\n toneMapping: toneMappingCurve(toneMapping),\n });\n}\n\n/**\n * Reads the image processing the scene's PBR shaders currently apply.\n *\n * @remarks\n * Read from Lite rather than from the `Environment` component, because Lite's `loadEnvironment`\n * also writes it (exposure 0.8, contrast 1.2, the standard curve) and the clear colour has to match\n * what the shaders actually do. A custom Lite curve set through `.lite` reads as `\"none\"`.\n *\n * @param scene - The scene.\n * @param out - Receives the exposure, contrast and curve.\n * @returns `out`.\n *\n * @internal\n */\nexport function readSceneImageProcessing(scene: SceneContext, out: ImageProcessingState): ImageProcessingState {\n const processing = scene.imageProcessing;\n out.exposure = processing.exposure;\n out.contrast = processing.contrast;\n out.curve = processing.toneMappingEnabled ? curveName(processing.toneMapping ?? StandardToneMapping) : \"none\";\n return out;\n}\n\n/**\n * Maps a Lite curve object back onto its ignifx name.\n *\n * @param curve - The Lite curve.\n * @returns The name, or `\"none\"` for a curve ignifx does not know.\n */\nfunction curveName(curve: ToneMapping): ToneMappingName {\n switch (curve.id) {\n case StandardToneMapping.id:\n return \"standard\";\n case AcesToneMapping.id:\n return \"aces\";\n case NeutralToneMapping.id:\n return \"neutral\";\n case AGX_TONE_MAPPING_ID:\n return \"agx\";\n default:\n return \"none\";\n }\n}\n\n/**\n * Maps an ignifx tone-mapping name onto the Lite curve object.\n *\n * @param name - The curve name; `\"none\"` and the lazily loaded `\"agx\"` are handled by the caller.\n * @returns The Lite curve.\n */\nfunction toneMappingCurve(name: Exclude<ToneMappingName, \"none\" | \"agx\">): ToneMapping {\n switch (name) {\n case \"standard\":\n return StandardToneMapping;\n case \"aces\":\n return AcesToneMapping;\n case \"neutral\":\n return NeutralToneMapping;\n default:\n return assertNever(name, \"tone mapping\");\n }\n}\n"],"mappings":";;;;;;;;;;AAiHA,MAAa,YAAY;;CAEvB,MAAM;;CAEN,KAAK;;CAEL,MAAM;;CAEN,QAAQ;AACV;;;;;;;AAeA,MAAa,qBAAqB;CAAC;CAAQ;CAAY;CAAQ;CAAW;AAAK;;;;;AAM/E,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;AA8D5B,SAAgB,qBACd,OACA,SAC8B;CAC9B,MAAM,cAOF,EAAE,SAAS,QAAQ,QAAQ;CAC/B,IAAI,QAAQ,cAAc,KAAA,GACxB,YAAY,YAAY,QAAQ;CAElC,IAAI,QAAQ,eAAe,KAAA,GACzB,YAAY,aAAa,QAAQ;CAEnC,IAAI,QAAQ,eAAe,KAAA,GACzB,YAAY,aAAa,QAAQ;CAEnC,IAAI,QAAQ,eAAe,KAAA,GACzB,YAAY,aAAa,QAAQ;CAEnC,IAAI,QAAQ,qBAAqB,KAAA,GAC/B,YAAY,mBAAmB,QAAQ;CAEzC,OAAO,gBAAgB,OAAO,QAAQ,KAAK,WAAW;AACxD;;;;;;;AAkBA,SAAS,kBAAkB,OAA2C;CAMpE,OAAO;AACT;;;;;;;;;AAUA,SAAgB,qBAAqB,OAAiD;CAIpF,OAAO,kBAAkB,KAAK,CAAC,CAAC,gBAAgB;AAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,SAAgB,wBAAwB,OAAqB,UAAwC;CACnG,MAAM,OAAO,kBAAkB,KAAK;CAGpC,IAAI,KAAK,iBAAiB,UACxB,OAAO;CAGT,KAAK,eAAe;CACpB,OAAO;AACT;;;;;;;;;AAyBA,SAAgB,4BAA4B,OAAqB,SAAuB;CACtF,uBAAuB,OAAO,SAAS,OAAO,CAAC;AACjD;;;;;;;;;AAUA,SAAgB,wBAAwB,OAAqB,MAAoB;CAC/E,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