@ignifx/core 0.21.0 → 0.22.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/README.md +22 -0
- package/dist/{agx-tone-mapping-Cgt844j6.js → agx-tone-mapping-CCdGk_ly.js} +2 -2
- package/dist/agx-tone-mapping-CCdGk_ly.js.map +1 -0
- package/dist/auto-exposure-uzPn0beO.js.map +1 -1
- package/dist/{bloom-hdr-CLtQj-oY.js → bloom-hdr-xPwkIdHG.js} +5 -6
- package/dist/bloom-hdr-xPwkIdHG.js.map +1 -0
- package/dist/contact-shadows-T523EXaP.js.map +1 -1
- package/dist/effect-task-CMbuO6Kb.js.map +1 -1
- package/dist/{environment-Bf4aphSb.js → environment-7fJbN402.js} +2 -2
- package/dist/{environment-Bf4aphSb.js.map → environment-7fJbN402.js.map} +1 -1
- package/dist/{gtao-Bpu5-0Ne.js → gtao-CVAYWBEJ.js} +10 -11
- package/dist/gtao-CVAYWBEJ.js.map +1 -0
- package/dist/{hdr-output-DBQwMphy.js → hdr-output-_2TU-jWy.js} +8 -8
- package/dist/hdr-output-_2TU-jWy.js.map +1 -0
- package/dist/index.d.ts +61 -48
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +148 -129
- package/dist/index.js.map +1 -1
- package/dist/{instanced-mesh-instance-B-fXKSrY.js → instanced-mesh-instance-BLdAJTj8.js} +3 -3
- package/dist/instanced-mesh-instance-BLdAJTj8.js.map +1 -0
- package/dist/{light-probe-asset-BqfSrJe9.js → light-probe-asset-DGNIwKNb.js} +2 -2
- package/dist/light-probe-asset-DGNIwKNb.js.map +1 -0
- package/dist/{light-probes-DDojYajw.js → light-probes-C8jharz9.js} +6 -6
- package/dist/light-probes-C8jharz9.js.map +1 -0
- package/dist/lightmaps-BUUIIkt9.js.map +1 -1
- package/dist/material-myMbl9mW.js.map +1 -1
- package/dist/{material-plugin-DapJNj04.js → material-plugin-BBxIy6eo.js} +4 -4
- package/dist/material-plugin-BBxIy6eo.js.map +1 -0
- package/dist/{overlay-CjVgsfrm.js → overlay-DokHzP6_.js} +2 -3
- package/dist/overlay-DokHzP6_.js.map +1 -0
- package/dist/{post-effect-Cu3Enpz7.js → post-effect-DEZD-r0I.js} +3 -3
- package/dist/post-effect-DEZD-r0I.js.map +1 -0
- package/dist/{post-effect-compiler-cCq9lcHt.js → post-effect-compiler-unDD3hod.js} +4 -4
- package/dist/post-effect-compiler-unDD3hod.js.map +1 -0
- package/dist/{prefab-overrides-C2GsgOQc.js → prefab-overrides-Bb7jVm7A.js} +3 -3
- package/dist/prefab-overrides-Bb7jVm7A.js.map +1 -0
- package/dist/{prefab-overrides-htDc_5Po.d.ts → prefab-overrides-CkwXhp5A.d.ts} +84 -64
- package/dist/{prefab-overrides-htDc_5Po.d.ts.map → prefab-overrides-CkwXhp5A.d.ts.map} +1 -1
- package/dist/prefab.d.ts +1 -1
- package/dist/prefab.js +1 -1
- package/dist/{reflection-probe-QkD1Fo_d.js → reflection-probe-C2jcreI1.js} +5 -5
- package/dist/reflection-probe-C2jcreI1.js.map +1 -0
- package/dist/{reflection-probes-CAzSuqf8.js → reflection-probes-BMVQfbhm.js} +10 -10
- package/dist/reflection-probes-BMVQfbhm.js.map +1 -0
- package/dist/{render-path-D11i_7X8.js → render-path-CWXHrRa2.js} +2 -2
- package/dist/render-path-CWXHrRa2.js.map +1 -0
- package/dist/scene-color-passes-CM_T2KF-.js +177 -0
- package/dist/scene-color-passes-CM_T2KF-.js.map +1 -0
- package/dist/scene-inputs-CbTkrkOw.js +489 -0
- package/dist/scene-inputs-CbTkrkOw.js.map +1 -0
- package/dist/{shader-declaration-5q__jycG.js → shader-declaration-BGprFBLq.js} +4 -4
- package/dist/shader-declaration-BGprFBLq.js.map +1 -0
- package/dist/{shader-material-TM4f8eKA.js → shader-material-C9sYMGWw.js} +8 -9
- package/dist/shader-material-C9sYMGWw.js.map +1 -0
- package/dist/{shader-material-CJIDFvSb.js → shader-material-vmkJ25II.js} +3 -3
- package/dist/shader-material-vmkJ25II.js.map +1 -0
- package/dist/{shader-pragma-ljmAbVc2.js → shader-pragma-D0MjCOIg.js} +3 -3
- package/dist/shader-pragma-D0MjCOIg.js.map +1 -0
- package/dist/ssgi-Dk20U3oR.js +492 -0
- package/dist/ssgi-Dk20U3oR.js.map +1 -0
- package/dist/{surface-shader-rpPpeosD.js → surface-shader-BfADq9Wx.js} +6 -6
- package/dist/surface-shader-BfADq9Wx.js.map +1 -0
- package/dist/{taa-BwBZLy11.js → taa-nxVA78Ur.js} +5 -6
- package/dist/taa-nxVA78Ur.js.map +1 -0
- package/dist/vec3-2C3LBZnt.js.map +1 -1
- package/package.json +1 -1
- package/dist/agx-tone-mapping-Cgt844j6.js.map +0 -1
- package/dist/bloom-hdr-CLtQj-oY.js.map +0 -1
- package/dist/gtao-Bpu5-0Ne.js.map +0 -1
- package/dist/hdr-output-DBQwMphy.js.map +0 -1
- package/dist/instanced-mesh-instance-B-fXKSrY.js.map +0 -1
- package/dist/light-probe-asset-BqfSrJe9.js.map +0 -1
- package/dist/light-probes-DDojYajw.js.map +0 -1
- package/dist/material-plugin-DapJNj04.js.map +0 -1
- package/dist/overlay-CjVgsfrm.js.map +0 -1
- package/dist/post-effect-Cu3Enpz7.js.map +0 -1
- package/dist/post-effect-compiler-cCq9lcHt.js.map +0 -1
- package/dist/prefab-overrides-C2GsgOQc.js.map +0 -1
- package/dist/reflection-probe-QkD1Fo_d.js.map +0 -1
- package/dist/reflection-probes-CAzSuqf8.js.map +0 -1
- package/dist/render-path-D11i_7X8.js.map +0 -1
- package/dist/scene-color-passes-B93qTOka.js +0 -88
- package/dist/scene-color-passes-B93qTOka.js.map +0 -1
- package/dist/scene-inputs-BxGOsnIZ.js +0 -318
- package/dist/scene-inputs-BxGOsnIZ.js.map +0 -1
- package/dist/shader-declaration-5q__jycG.js.map +0 -1
- package/dist/shader-material-CJIDFvSb.js.map +0 -1
- package/dist/shader-material-TM4f8eKA.js.map +0 -1
- package/dist/shader-pragma-ljmAbVc2.js.map +0 -1
- package/dist/ssgi-DSnhqotl.js +0 -113
- package/dist/ssgi-DSnhqotl.js.map +0 -1
- package/dist/surface-shader-rpPpeosD.js.map +0 -1
- package/dist/taa-BwBZLy11.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as CORE_ERROR_MESSAGES, c as THIRD_PARTY_ERROR_PREFIX, i as isIgnifxError, l as isValidErrorCode, n as assertNever, o as CoreErrorCode, r as formatErrorMessage, s as ErrorRange, t as IgnifxError } from "./ignifx-error-DwIZKxA2.js";
|
|
2
|
-
import { $ as Signal, A as str, B as readPickedIdentity, C as f64, D as optional, E as map, F as FieldKind, G as componentInternals, H as readPickedTag, I as createPickRay, J as toEntityHandle, K as INVALID_HANDLE, L as raycastScene, M as vec2, N as vec3, O as quat, P as vec4, Q as defineSchema, R as raycastSceneWhere, S as f32, T as layerMask, U as setPickRay, V as readPickedMeshName, W as Component, X as assertNoInheritedFieldNames, Y as applyInit, Z as createDefaults, _ as componentRef, b as entityRef, c as RENDER_TEXTURE_MAX_SIZE, d as bindFrameCameras, f as renderTextureUnusableError, g as color, h as bool, j as u32, k as record, l as RenderTextureImpl, m as asset, n as ReflectionProbe, p as array, q as toComponentHandle, s as EDITOR_ONLY_METADATA_KEY, t as REFLECTION_PROBE_REFRESH_MODES, u as assertRenderTextureSize, v as curve, w as i32, x as enumOf, y as custom, z as readOwnerTag } from "./reflection-probe-
|
|
3
|
-
import { A as childPath, C as canonicalizeNumber, D as encodeValue, E as encodeProps, F as asJsonObject, G as splitFragment, H as joinRoot, I as setOwnJsonProperty, L as SchemaIssueCode, M as isArray, N as isPlainObject, O as COLOR_CHANNELS, P as asJsonArray, R as issue, S as toJsonSchema, T as decodeValue, U as matchExtension, V as isAbsoluteAddress, W as normalizeExtension, _ as describeSceneFileFormat, a as applyOverrides, b as stringifySceneFile, c as remapInstancePath, d as createSceneAsset, f as findSceneDependency, g as SCENE_FORMAT_VERSION, h as SCENE_FILE_FORMAT, i as resolveInstancePath, j as indexPath, k as VECTOR_COMPONENTS, l as SceneAssetToken, m as SCENE_FILE_EXTENSIONS, n as revertOverrides, o as parseOverridePath, p as SCENE_ASSET_TYPE, r as enumerateInstanceTargets, s as instancePathResolver, t as applyOverridesToAsset, u as computeSceneHash, v as isSceneFileHeader, w as decodeProps, x as describeSchema, y as sceneFileJsonSchema } from "./prefab-overrides-
|
|
2
|
+
import { $ as Signal, A as str, B as readPickedIdentity, C as f64, D as optional, E as map, F as FieldKind, G as componentInternals, H as readPickedTag, I as createPickRay, J as toEntityHandle, K as INVALID_HANDLE, L as raycastScene, M as vec2, N as vec3, O as quat, P as vec4, Q as defineSchema, R as raycastSceneWhere, S as f32, T as layerMask, U as setPickRay, V as readPickedMeshName, W as Component, X as assertNoInheritedFieldNames, Y as applyInit, Z as createDefaults, _ as componentRef, b as entityRef, c as RENDER_TEXTURE_MAX_SIZE, d as bindFrameCameras, f as renderTextureUnusableError, g as color, h as bool, j as u32, k as record, l as RenderTextureImpl, m as asset, n as ReflectionProbe, p as array, q as toComponentHandle, s as EDITOR_ONLY_METADATA_KEY, t as REFLECTION_PROBE_REFRESH_MODES, u as assertRenderTextureSize, v as curve, w as i32, x as enumOf, y as custom, z as readOwnerTag } from "./reflection-probe-C2jcreI1.js";
|
|
3
|
+
import { A as childPath, C as canonicalizeNumber, D as encodeValue, E as encodeProps, F as asJsonObject, G as splitFragment, H as joinRoot, I as setOwnJsonProperty, L as SchemaIssueCode, M as isArray, N as isPlainObject, O as COLOR_CHANNELS, P as asJsonArray, R as issue, S as toJsonSchema, T as decodeValue, U as matchExtension, V as isAbsoluteAddress, W as normalizeExtension, _ as describeSceneFileFormat, a as applyOverrides, b as stringifySceneFile, c as remapInstancePath, d as createSceneAsset, f as findSceneDependency, g as SCENE_FORMAT_VERSION, h as SCENE_FILE_FORMAT, i as resolveInstancePath, j as indexPath, k as VECTOR_COMPONENTS, l as SceneAssetToken, m as SCENE_FILE_EXTENSIONS, n as revertOverrides, o as parseOverridePath, p as SCENE_ASSET_TYPE, r as enumerateInstanceTargets, s as instancePathResolver, t as applyOverridesToAsset, u as computeSceneHash, v as isSceneFileHeader, w as decodeProps, x as describeSchema, y as sceneFileJsonSchema } from "./prefab-overrides-Bb7jVm7A.js";
|
|
4
4
|
import { _ as smoothStep, a as clamp, c as deltaAngleDegrees, d as lerpAngleDegrees, f as moveTowards, g as sign, h as repeat, i as approximately, l as inverseLerp, m as radToDeg, n as EPSILON, o as clamp01, p as pingPong, r as RAD_TO_DEG, s as degToRad, t as DEG_TO_RAD, u as lerp, v as wrapAngleDegrees } from "./math-utils-BcDnL-gi.js";
|
|
5
5
|
import { n as Mat4, r as basisToQuatToRef, t as MAT4_IDENTITY } from "./mat4-D6exvAuO.js";
|
|
6
6
|
import { a as localRotation, d as setNodeName, f as setNodeSelfVisible, i as localPosition, l as readWorldMatrix, m as worldMatrixVersion, n as disposeNode, o as localScale, p as tagNode, r as linkParent, s as parentNode, t as createNode, u as reparentKeepingWorld } from "./node-DznSvwap.js";
|
|
7
7
|
import { t as Color } from "./color-DrR6GFTd.js";
|
|
8
|
-
import { a as readSceneImageProcessing, c as setSceneEnvironmentRotation, i as readSceneEnvironment, l as setSceneFog, n as installSceneEnvironment, o as setSceneClearColor, r as loadSceneEnvironment, s as setSceneEnvironmentBlur, t as TONE_MAPPING_NAMES, u as setSceneImageProcessingOptions } from "./environment-
|
|
8
|
+
import { a as readSceneImageProcessing, c as setSceneEnvironmentRotation, i as readSceneEnvironment, l as setSceneFog, n as installSceneEnvironment, o as setSceneClearColor, r as loadSceneEnvironment, s as setSceneEnvironmentBlur, t as TONE_MAPPING_NAMES, u as setSceneImageProcessingOptions } from "./environment-7fJbN402.js";
|
|
9
9
|
import { a as markMaterialDirty, c as setPbrBaseColor, i as createStandardMaterialFromProps, l as setPbrMetallicRoughness, n as createDefaultMaterial, r as createPbrMaterialFromProps, s as setMaterialAlpha, t as MATERIAL_ALPHA_MODES } from "./material-myMbl9mW.js";
|
|
10
10
|
import { A as setMeshPickable, C as overrideSubtreeMaterials, D as setMeshBounds, E as removeMeshFromScene, F as updateMeshNormals$1, I as updateMeshPositions$1, L as updateMeshUvs$1, M as setMeshRenderOrder, N as setMeshSubtreeVisible, O as setMeshId, P as updateMeshColors$1, S as disposeMeshTemplate, T as recomputeMeshBounds, _ as createMeshFromGeometry, a as VEC3_ONE, b as createTorusMesh, c as VEC3_ZERO, d as cloneMeshUnderNode, f as collectSubtreeMeshes, g as createGroundMesh, h as createCylinderMesh, i as VEC3_LEFT, j as setMeshReceiveShadows, k as setMeshMaterial, l as Vec3, m as createCapsuleMesh, n as VEC3_DOWN, o as VEC3_RIGHT, p as createBoxMesh, r as VEC3_FORWARD, s as VEC3_UP, t as VEC3_BACKWARD, u as addMeshToScene, v as createPlaneMesh, w as readMeshBakeSurface, x as detachMeshBounds, y as createSphereMesh } from "./vec3-2C3LBZnt.js";
|
|
11
|
-
import { a as LightProbeAsset, c as readLightProbeFile, d as writeLightProbeFile, i as LIGHT_PROBE_FORMAT_VERSION, l as readLightProbeGrid, n as LIGHT_PROBE_FILE_EXTENSIONS, o as createLightProbeAsset, r as LIGHT_PROBE_FILE_FORMAT, t as LIGHT_PROBE_ASSET_TYPE, u as sampleLightProbes } from "./light-probe-asset-
|
|
12
|
-
import { a as postEffectValuesCodec, i as declaredTextureBinding, n as POST_EFFECT_FUNCTION, r as customEffect, t as POST_EFFECT_BUILTIN_UNIFORMS } from "./post-effect-
|
|
13
|
-
import { n as installOffscreenRenderPath } from "./render-path-
|
|
14
|
-
import { a as SHADER_BLEND_MODES, c as SHADER_KINDS, d as SURFACE_HOOK_NAMES, f as SURFACE_UNIFORM_BLOCK, i as SHADER_ATTRIBUTE_NAMES, l as SHADER_TEXTURE_FALLBACKS, o as SHADER_CULL_MODES, r as LITE_SYSTEM_UNIFORM_NAMES, s as SHADER_INSTANCING_MODES, t as IGNIFX_UNIFORM_NAMES, u as SHADER_UNIFORM_TYPES } from "./shader-declaration-
|
|
15
|
-
import { a as defineMaterialPlugin, i as MATERIAL_PLUGIN_SAMPLER_BUDGET, n as MATERIAL_PLUGIN_DEFAULT_PRIORITY, o as isLiteMaterialPluginPoint, r as MATERIAL_PLUGIN_RESERVED_NAMES, t as LITE_MATERIAL_PLUGIN_POINTS } from "./material-plugin-
|
|
11
|
+
import { a as LightProbeAsset, c as readLightProbeFile, d as writeLightProbeFile, i as LIGHT_PROBE_FORMAT_VERSION, l as readLightProbeGrid, n as LIGHT_PROBE_FILE_EXTENSIONS, o as createLightProbeAsset, r as LIGHT_PROBE_FILE_FORMAT, t as LIGHT_PROBE_ASSET_TYPE, u as sampleLightProbes } from "./light-probe-asset-DGNIwKNb.js";
|
|
12
|
+
import { a as postEffectValuesCodec, i as declaredTextureBinding, n as POST_EFFECT_FUNCTION, r as customEffect, t as POST_EFFECT_BUILTIN_UNIFORMS } from "./post-effect-DEZD-r0I.js";
|
|
13
|
+
import { n as installOffscreenRenderPath } from "./render-path-CWXHrRa2.js";
|
|
14
|
+
import { a as SHADER_BLEND_MODES, c as SHADER_KINDS, d as SURFACE_HOOK_NAMES, f as SURFACE_UNIFORM_BLOCK, i as SHADER_ATTRIBUTE_NAMES, l as SHADER_TEXTURE_FALLBACKS, o as SHADER_CULL_MODES, r as LITE_SYSTEM_UNIFORM_NAMES, s as SHADER_INSTANCING_MODES, t as IGNIFX_UNIFORM_NAMES, u as SHADER_UNIFORM_TYPES } from "./shader-declaration-BGprFBLq.js";
|
|
15
|
+
import { a as defineMaterialPlugin, i as MATERIAL_PLUGIN_SAMPLER_BUDGET, n as MATERIAL_PLUGIN_DEFAULT_PRIORITY, o as isLiteMaterialPluginPoint, r as MATERIAL_PLUGIN_RESERVED_NAMES, t as LITE_MATERIAL_PLUGIN_POINTS } from "./material-plugin-BBxIy6eo.js";
|
|
16
16
|
import { acquireTexture, addTask, addToScene, buildFrameGraphTask, captureScreenshot, cloneTransformNode, createBloomPostProcessTask, createCsmDirectionalShadowGenerator, createDirectionalLight, createEngine, createEsmDirectionalShadowGenerator, createFontFromBuffer, createFreeCamera, createGpuPicker, createHemisphericLight, createImageProcessingTask, createMeshFromData, createNullEngine, createPcfDirectionalShadowGenerator, createPcfSpotlightShadowGenerator, createPointLight, createRenderTarget, createSceneContext, createSmaaPostProcessTask, createSpotLight, createStorageBuffer, createTexture2DFromPixels, disableOrthographicCamera, disposeEngine, disposePicker, disposeScene, disposeStorageBuffer, enableBoneControl, enableDeviceLostSceneRecovery, enableMaterialPlugins, enableMaterialStencil, enableOrthographicCamera, enablePbrLightmap, enableSkeletonShadows, enableStandardSkeleton, forceWebGpuDeviceLossForTesting, getEffectiveAspectRatio, getFrameGraph, getProjectionMatrix, getRenderTaskGpuTimings, getViewMatrix, getViewProjectionMatrix, isPbrMaterial, isShaderMaterial, loadTexture2D, onBeforeRender, pickAsync, rebuildSceneRenderables, registerScene, registerSceneWithShadowSupport, releaseTexture, removeFromScene, renderFrame, resizeEngine, resolveCameraViewport, setGpuTimingEnabled, setRenderTaskGpuTimingEnabled, setShadowTaskCasterMeshes, setSubtreeVisible, setSurfaceSize, startEngine, stopEngine, updateStorageBuffer, updateTexture2DFromPixels } from "@babylonjs/lite";
|
|
17
17
|
//#region src/assets/types.ts
|
|
18
18
|
/**
|
|
@@ -3903,7 +3903,7 @@ function createServiceKey(name) {
|
|
|
3903
3903
|
*
|
|
3904
3904
|
* @public
|
|
3905
3905
|
*/
|
|
3906
|
-
const VERSION = "0.
|
|
3906
|
+
const VERSION = "0.22.0";
|
|
3907
3907
|
//#endregion
|
|
3908
3908
|
//#region src/assets/delivery-system.ts
|
|
3909
3909
|
/**
|
|
@@ -4407,17 +4407,17 @@ function copyMatrix(source, out) {
|
|
|
4407
4407
|
* entity moves the view, with no per-frame copy. Cinemachine-style rigs are scripts in `@ignifx/3d`
|
|
4408
4408
|
* that drive that transform.
|
|
4409
4409
|
*
|
|
4410
|
-
* ## Decisions
|
|
4410
|
+
* ## Decisions
|
|
4411
4411
|
*
|
|
4412
|
-
* - **`clearColor` is optional
|
|
4413
|
-
*
|
|
4414
|
-
*
|
|
4415
|
-
*
|
|
4416
|
-
*
|
|
4417
|
-
*
|
|
4418
|
-
* - **`cullingMask` is not declared at all.**
|
|
4419
|
-
*
|
|
4420
|
-
*
|
|
4412
|
+
* - **`clearColor` is optional (§2.1).** A plain colour field cannot express "default from the
|
|
4413
|
+
* scene settings": every colour has a value. The field is `optional(color())`, so `null` means
|
|
4414
|
+
* "leave the scene's clear colour alone" — whatever the `rendering.clearColor` setting or an
|
|
4415
|
+
* `Environment` last put there — and a value means "this camera owns it while it is the main
|
|
4416
|
+
* camera". The main camera is written every frame, so it is the strongest of the three
|
|
4417
|
+
* (`RendererImpl.applyClearColor`).
|
|
4418
|
+
* - **`cullingMask` is not declared at all.** Lite has no per-camera mesh list. A field that
|
|
4419
|
+
* serialises but does nothing is worse than no field: it would round-trip through save files and
|
|
4420
|
+
* quietly stop mattering when the feature lands.
|
|
4421
4421
|
*
|
|
4422
4422
|
* ## Headless
|
|
4423
4423
|
*
|
|
@@ -5090,11 +5090,11 @@ function installLoadedEnvironment(scene, textures) {
|
|
|
5090
5090
|
*
|
|
5091
5091
|
* ## `ambientColor` does not exist
|
|
5092
5092
|
*
|
|
5093
|
-
*
|
|
5094
|
-
* `
|
|
5095
|
-
*
|
|
5096
|
-
*
|
|
5097
|
-
*
|
|
5093
|
+
* Babylon Lite 1.27.0 has no scene-level ambient term: `ambientColor` appears once in `index.d.ts`,
|
|
5094
|
+
* on `StandardMaterialProps`, and `SceneContext` declares nothing of the kind. A field that mapped
|
|
5095
|
+
* onto nothing would serialise into save files and quietly start mattering when the mapping
|
|
5096
|
+
* appeared, so the component does not declare one. The flat term a project wants from it is a
|
|
5097
|
+
* hemispheric `Light`, which Lite does have.
|
|
5098
5098
|
*
|
|
5099
5099
|
* ## Headless
|
|
5100
5100
|
*
|
|
@@ -5466,7 +5466,7 @@ let layer$1 = null;
|
|
|
5466
5466
|
* @internal
|
|
5467
5467
|
*/
|
|
5468
5468
|
async function loadInstancedMeshSupport() {
|
|
5469
|
-
const loaded = layer$1 ?? await import("./instanced-mesh-instance-
|
|
5469
|
+
const loaded = layer$1 ?? await import("./instanced-mesh-instance-BLdAJTj8.js");
|
|
5470
5470
|
layer$1 = loaded;
|
|
5471
5471
|
return loaded;
|
|
5472
5472
|
}
|
|
@@ -5494,7 +5494,7 @@ let surfaceLayer = null;
|
|
|
5494
5494
|
* @internal
|
|
5495
5495
|
*/
|
|
5496
5496
|
async function loadShaderSupport() {
|
|
5497
|
-
const loaded = shaderLayer ?? await import("./shader-material-
|
|
5497
|
+
const loaded = shaderLayer ?? await import("./shader-material-C9sYMGWw.js").then((n) => n.n);
|
|
5498
5498
|
shaderLayer = loaded;
|
|
5499
5499
|
await loaded.loadShaderMaterialAdapter();
|
|
5500
5500
|
return loaded;
|
|
@@ -5517,7 +5517,7 @@ function shaderSupport() {
|
|
|
5517
5517
|
* @internal
|
|
5518
5518
|
*/
|
|
5519
5519
|
async function loadSurfaceShaderSupport() {
|
|
5520
|
-
const loaded = surfaceLayer ?? await import("./surface-shader-
|
|
5520
|
+
const loaded = surfaceLayer ?? await import("./surface-shader-BfADq9Wx.js");
|
|
5521
5521
|
surfaceLayer = loaded;
|
|
5522
5522
|
return loaded;
|
|
5523
5523
|
}
|
|
@@ -5550,7 +5550,7 @@ function surfaceShaderSupport() {
|
|
|
5550
5550
|
* - **`"type": "shader"` is values applied to a `ShaderAsset`.** §2.6 lists the family, and the
|
|
5551
5551
|
* WGSL attribute, uniform, sampler, storage, define, and pipeline layout is declared by the
|
|
5552
5552
|
* `.wgsl` file's own `// @ignifx` pragmas rather than by the material file
|
|
5553
|
-
* (`src/render/shader-pragma.ts`,
|
|
5553
|
+
* (`src/render/shader-pragma.ts`, ADR-0024). So a
|
|
5554
5554
|
* shader `.material.json` names the shader, the values, the textures, and the defines, and
|
|
5555
5555
|
* nothing about Babylon Lite's `ShaderMaterialOptions` reaches the public API
|
|
5556
5556
|
* (`CONSTITUTION.md` §3.4). `IGX-0708` is still what an unknown `type` string produces.
|
|
@@ -5729,7 +5729,7 @@ var MaterialAsset = class {
|
|
|
5729
5729
|
}
|
|
5730
5730
|
/**
|
|
5731
5731
|
* The surface shaders layered onto this material, in the order they were attached
|
|
5732
|
-
* (
|
|
5732
|
+
* (ADR-0024).
|
|
5733
5733
|
*
|
|
5734
5734
|
* @returns The bindings, or an empty array.
|
|
5735
5735
|
*/
|
|
@@ -7302,7 +7302,7 @@ function disposeScenePicker(picker) {
|
|
|
7302
7302
|
*
|
|
7303
7303
|
* - `isGpuTimingSupported` and `getRenderTaskGpuTimings` both check
|
|
7304
7304
|
* `engine._device.features.has("timestamp-query")` (`lib/engine/gpu-task-timing.js`). Chromium's
|
|
7305
|
-
* SwiftShader now offers that feature too (
|
|
7305
|
+
* SwiftShader now offers that feature too (2026-11-02), but its timings measure a
|
|
7306
7306
|
* software rasteriser, so coding standards §10 still skips GPU-timing assertions there; real
|
|
7307
7307
|
* numbers come from the host-GPU `gpu-budget` project (§7).
|
|
7308
7308
|
* - `setSurfaceSize` writes `canvas.width`/`canvas.height` (`lib/engine/surface.js`), and a null
|
|
@@ -7482,8 +7482,8 @@ function captureFrame(surface) {
|
|
|
7482
7482
|
//#endregion
|
|
7483
7483
|
//#region src/lite/gpu/warm-up.ts
|
|
7484
7484
|
/**
|
|
7485
|
-
* Material warm-up (`docs/architecture/07-rendering.md` §1.1, ADR-0014).
|
|
7486
|
-
* "warming up" has to mean in Babylon Lite; this module is the answer.
|
|
7485
|
+
* Material warm-up (`docs/architecture/07-rendering.md` §1.1, ADR-0014). ADR-0002 Validation
|
|
7486
|
+
* records what "warming up" has to mean in Babylon Lite; this module is the answer.
|
|
7487
7487
|
*
|
|
7488
7488
|
* Everything here is `@internal`, and it needs a device.
|
|
7489
7489
|
*
|
|
@@ -8554,7 +8554,7 @@ function toSpotConfig(settings) {
|
|
|
8554
8554
|
//#endregion
|
|
8555
8555
|
//#region src/render/gpu/light-probe-host.ts
|
|
8556
8556
|
/**
|
|
8557
|
-
* The renderer's handle on light probes
|
|
8557
|
+
* The renderer's handle on light probes: it loads the light-probe chunk (`./light-probes.ts`)
|
|
8558
8558
|
* the first frame a world has a `LightProbeVolume` and forwards every frame to it. Device-only, like
|
|
8559
8559
|
* the rest of `src/render/gpu/`: a headless renderer never creates one.
|
|
8560
8560
|
*
|
|
@@ -8599,7 +8599,7 @@ var LightProbeHost = class {
|
|
|
8599
8599
|
}
|
|
8600
8600
|
if (volumes.length === 0 || this.#isLoading || this.#isDisposed) return;
|
|
8601
8601
|
this.#isLoading = true;
|
|
8602
|
-
import("./light-probes-
|
|
8602
|
+
import("./light-probes-C8jharz9.js").then((module) => module.createLightProbeRuntime(this.#engine, this.#scene)).then((created) => {
|
|
8603
8603
|
if (this.#isDisposed) {
|
|
8604
8604
|
created.dispose();
|
|
8605
8605
|
return;
|
|
@@ -8617,7 +8617,7 @@ var LightProbeHost = class {
|
|
|
8617
8617
|
//#endregion
|
|
8618
8618
|
//#region src/render/lightmap-asset.ts
|
|
8619
8619
|
/**
|
|
8620
|
-
* Lightmaps (`docs/
|
|
8620
|
+
* Lightmaps (`docs/architecture/07-rendering.md` §2.15): a baked texture that static
|
|
8621
8621
|
* `MeshRenderer`s sample through their second UV set, and the per-entity placement of each renderer
|
|
8622
8622
|
* in it. Everything here is plain data and runs in Node; the GPU half is `./gpu/lightmaps.ts`.
|
|
8623
8623
|
*/
|
|
@@ -8871,7 +8871,7 @@ function invalid(address, problem) {
|
|
|
8871
8871
|
//#endregion
|
|
8872
8872
|
//#region src/render/gpu/lightmap-host.ts
|
|
8873
8873
|
/**
|
|
8874
|
-
* The renderer's handle on lightmaps
|
|
8874
|
+
* The renderer's handle on lightmaps: it decides whether a `MeshRenderer` samples its
|
|
8875
8875
|
* lightmap, loads the lightmap chunk (`./lightmaps.ts`) the first time one does, and hands the
|
|
8876
8876
|
* renderer its lightmapped material. Device-only, like the rest of `src/render/gpu/`: only a
|
|
8877
8877
|
* renderer with a clone in the scene asks.
|
|
@@ -9018,7 +9018,7 @@ function hasSecondUvSet(owner) {
|
|
|
9018
9018
|
//#endregion
|
|
9019
9019
|
//#region src/render/gpu/reflection-probe-host.ts
|
|
9020
9020
|
/**
|
|
9021
|
-
* The renderer's handle on reflection probes
|
|
9021
|
+
* The renderer's handle on reflection probes: it loads the probe chunk
|
|
9022
9022
|
* (`./reflection-probes.ts`) the first frame a world has a probe and forwards every frame to it.
|
|
9023
9023
|
* Device-only, like the rest of `src/render/gpu/`: a headless renderer never creates one.
|
|
9024
9024
|
*
|
|
@@ -9074,7 +9074,7 @@ var ReflectionProbeHost = class {
|
|
|
9074
9074
|
}
|
|
9075
9075
|
if (probes.length === 0 || !hasEnvironment || this.#isLoading || this.#isDisposed) return;
|
|
9076
9076
|
this.#isLoading = true;
|
|
9077
|
-
import("./reflection-probes-
|
|
9077
|
+
import("./reflection-probes-BMVQfbhm.js").then(async (module) => module.createReflectionProbeRuntime(this.#engine, this.#scene, this.#warn)).then((created) => {
|
|
9078
9078
|
if (this.#isDisposed) {
|
|
9079
9079
|
created.dispose();
|
|
9080
9080
|
return;
|
|
@@ -9136,7 +9136,7 @@ function createPicker(scene) {
|
|
|
9136
9136
|
* @internal
|
|
9137
9137
|
*/
|
|
9138
9138
|
async function loadOverlayOpener() {
|
|
9139
|
-
return (await import("./overlay-
|
|
9139
|
+
return (await import("./overlay-DokHzP6_.js")).openOverlayScene;
|
|
9140
9140
|
}
|
|
9141
9141
|
/**
|
|
9142
9142
|
* Picks the object under one backing-store pixel, optionally restricted to the meshes a predicate
|
|
@@ -9500,16 +9500,16 @@ function saturate(value) {
|
|
|
9500
9500
|
* `07-rendering.md` §1 and §1.1): the engine options the swapchain is created with, and the feature
|
|
9501
9501
|
* opt-ins that have to be applied before the scene is registered.
|
|
9502
9502
|
*
|
|
9503
|
-
*
|
|
9503
|
+
* Four decisions this section makes:
|
|
9504
9504
|
*
|
|
9505
|
-
* - **There is no `powerPreference
|
|
9506
|
-
*
|
|
9505
|
+
* - **There is no `powerPreference`** (`07-rendering.md` §1). Babylon Lite 1.27.0 has no such
|
|
9506
|
+
* option — `lib/engine/engine.js` hard-codes
|
|
9507
9507
|
* `requestAdapter({ powerPreference: "high-performance" })` and neither `EngineOptions`
|
|
9508
9508
|
* (`index.d.ts` 4709) nor `SurfaceOptions` (12622) declares it — so ignifx does not expose one.
|
|
9509
|
-
*
|
|
9510
|
-
* - **`maxDevicePixelRatio` defaults to `0`, not `Infinity
|
|
9511
|
-
*
|
|
9512
|
-
*
|
|
9509
|
+
* `src/lite/render-diagnostics.ts` records it as well.
|
|
9510
|
+
* - **`maxDevicePixelRatio` defaults to `0`, not `Infinity`** (§1). The default behaviour is native
|
|
9511
|
+
* DPR; but a settings section is validated JSON, and `Infinity` is not a JSON number
|
|
9512
|
+
* (`06-serialization-and-scene-format.md` §3 rejects non-finite
|
|
9513
9513
|
* values with `IGX-0601`). `0` is the spelling of "do not clamp", and it is what the section
|
|
9514
9514
|
* documents.
|
|
9515
9515
|
* - **`brdfLut` lives here.** Lite's `loadEnvironment` takes a **required** `brdfUrl`
|
|
@@ -10166,13 +10166,13 @@ var RendererImpl = class {
|
|
|
10166
10166
|
#sceneInputsHost = null;
|
|
10167
10167
|
/** The GTAO pass (`../lite/gpu/gtao.ts`), when `rendering.ambientOcclusion` is on. */
|
|
10168
10168
|
#ambientOcclusion = null;
|
|
10169
|
-
/** The reflection probes' host, created on the first frame of a canvas-backed app
|
|
10169
|
+
/** The reflection probes' host, created on the first frame of a canvas-backed app. */
|
|
10170
10170
|
#reflectionProbes = null;
|
|
10171
10171
|
/** Detaches the reflection probes' `onDeviceLost` and `onDeviceRecovered` handlers. */
|
|
10172
10172
|
#disconnectProbeDeviceLoss = null;
|
|
10173
|
-
/** The light probes' host, created with the reflection probes' one
|
|
10173
|
+
/** The light probes' host, created with the reflection probes' one. */
|
|
10174
10174
|
#lightProbes = null;
|
|
10175
|
-
/** The lightmaps' host, created when the first renderer with a clone asks for its material
|
|
10175
|
+
/** The lightmaps' host, created when the first renderer with a clone asks for its material. */
|
|
10176
10176
|
#lightmaps = null;
|
|
10177
10177
|
/** The TAA passes (`../lite/gpu/taa.ts`), when `rendering.taa` installed them. */
|
|
10178
10178
|
#taa = null;
|
|
@@ -10312,23 +10312,26 @@ var RendererImpl = class {
|
|
|
10312
10312
|
* The first call loads the `scene-inputs` chunk and adds the pass to the frame graph; the last
|
|
10313
10313
|
* `release()` removes it. Nothing is loaded or added until an effect calls this.
|
|
10314
10314
|
*
|
|
10315
|
+
* @param options - What the user needs beyond depth, normals, velocity and the depth pyramid.
|
|
10315
10316
|
* @returns The lease, or `null` under the null engine or once the renderer is disposed.
|
|
10316
10317
|
*
|
|
10317
10318
|
* @internal
|
|
10318
10319
|
*/
|
|
10319
|
-
async acquireSceneInputs() {
|
|
10320
|
+
async acquireSceneInputs(options) {
|
|
10320
10321
|
if (this.isHeadless || this.#isDisposed) return null;
|
|
10321
10322
|
const { engine, scene } = this;
|
|
10322
|
-
this.#sceneInputs ??= import("./scene-inputs-
|
|
10323
|
-
const host = module.createSceneInputsHost(engine, scene)
|
|
10323
|
+
this.#sceneInputs ??= import("./scene-inputs-CbTkrkOw.js").then((module) => {
|
|
10324
|
+
const host = module.createSceneInputsHost(engine, scene, (message) => {
|
|
10325
|
+
this.#app.log.error(message);
|
|
10326
|
+
});
|
|
10324
10327
|
this.#sceneInputsHost = host;
|
|
10325
10328
|
if (this.#isDisposed) host.dispose();
|
|
10326
10329
|
return host;
|
|
10327
10330
|
});
|
|
10328
|
-
return (await this.#sceneInputs).acquire(this.#isSceneRegistered);
|
|
10331
|
+
return (await this.#sceneInputs).acquire(this.#isSceneRegistered, options);
|
|
10329
10332
|
}
|
|
10330
10333
|
/**
|
|
10331
|
-
* Installs temporal anti-aliasing when `rendering.taa.enabled` is on
|
|
10334
|
+
* Installs temporal anti-aliasing when `rendering.taa.enabled` is on.
|
|
10332
10335
|
*
|
|
10333
10336
|
* @remarks
|
|
10334
10337
|
* Loads the `taa` chunk and leases the scene inputs only then. TAA needs the HDR render path;
|
|
@@ -10347,7 +10350,7 @@ var RendererImpl = class {
|
|
|
10347
10350
|
this.#app.log.warn("rendering.taa needs rendering.hdr; temporal anti-aliasing stays off.");
|
|
10348
10351
|
return;
|
|
10349
10352
|
}
|
|
10350
|
-
const module = await import("./taa-
|
|
10353
|
+
const module = await import("./taa-nxVA78Ur.js");
|
|
10351
10354
|
const inputs = await this.acquireSceneInputs();
|
|
10352
10355
|
if (inputs === null) return;
|
|
10353
10356
|
this.#taa = module.installTemporalAntiAliasing(this.engine, this.scene, hdr, inputs, options, this.#isSceneRegistered);
|
|
@@ -10966,7 +10969,7 @@ var RendererImpl = class {
|
|
|
10966
10969
|
*/
|
|
10967
10970
|
async #installAmbientOcclusion() {
|
|
10968
10971
|
const settings = resolveAmbientOcclusion(this.settings.ambientOcclusion);
|
|
10969
|
-
const [module, inputs] = await Promise.all([import("./gtao-
|
|
10972
|
+
const [module, inputs] = await Promise.all([import("./gtao-CVAYWBEJ.js"), this.acquireSceneInputs()]);
|
|
10970
10973
|
if (inputs === null) return;
|
|
10971
10974
|
if (this.#isDisposed) {
|
|
10972
10975
|
inputs.release();
|
|
@@ -11003,12 +11006,11 @@ var RendererImpl = class {
|
|
|
11003
11006
|
this.#ambientOcclusion?.update(this.#isSceneRegistered);
|
|
11004
11007
|
}
|
|
11005
11008
|
/**
|
|
11006
|
-
* The baked-lighting components' per-frame work
|
|
11007
|
-
*
|
|
11008
|
-
*
|
|
11009
|
-
*
|
|
11010
|
-
*
|
|
11011
|
-
* app.
|
|
11009
|
+
* The baked-lighting components' per-frame work: `ReflectionProbe` captures what is due and
|
|
11010
|
+
* points each lit PBR material at its probe; `LightProbeVolume` keeps the winning grid on every
|
|
11011
|
+
* lit PBR material; lightmaps rebuild the material copies the `MeshRenderer`s took this frame.
|
|
11012
|
+
* Each loads its own chunk the first time a world has one of its components. The `PreRender`
|
|
11013
|
+
* system calls it every frame; it does nothing on a headless app.
|
|
11012
11014
|
*
|
|
11013
11015
|
* @param world - The world being reconciled.
|
|
11014
11016
|
* @param probes - Every `ReflectionProbe` in it.
|
|
@@ -11060,7 +11062,7 @@ var RendererImpl = class {
|
|
|
11060
11062
|
}
|
|
11061
11063
|
/**
|
|
11062
11064
|
* The material a `MeshRenderer` draws with this frame: its own lightmapped copy of `base` when it
|
|
11063
|
-
* samples a lightmap
|
|
11065
|
+
* samples a lightmap, else `base`'s. Only a renderer with a clone in the scene asks, so
|
|
11064
11066
|
* never a headless one.
|
|
11065
11067
|
*
|
|
11066
11068
|
* @param owner - The renderer.
|
|
@@ -11463,7 +11465,7 @@ function overlayAfterDisposeError() {
|
|
|
11463
11465
|
//#region src/render/instanced-mesh-renderer.ts
|
|
11464
11466
|
/**
|
|
11465
11467
|
* One mesh, one draw call, thousands of world matrices
|
|
11466
|
-
* (`docs/
|
|
11468
|
+
* (`docs/architecture/07-rendering.md` §2.9).
|
|
11467
11469
|
*
|
|
11468
11470
|
* The matrix slab stays the caller's: Babylon Lite keeps the reference and never copies
|
|
11469
11471
|
* (`lib/mesh/thin-instance.js`), so it has to stay alive and at least `count * 16` floats long, and
|
|
@@ -11509,8 +11511,8 @@ function noMatrices() {
|
|
|
11509
11511
|
return emptySlab;
|
|
11510
11512
|
}
|
|
11511
11513
|
/**
|
|
11512
|
-
* Draws one mesh many times from a caller-owned matrix slab, in a single draw call
|
|
11513
|
-
* §
|
|
11514
|
+
* Draws one mesh many times from a caller-owned matrix slab, in a single draw call
|
|
11515
|
+
* (`docs/architecture/07-rendering.md` §2.9).
|
|
11514
11516
|
*
|
|
11515
11517
|
* @example
|
|
11516
11518
|
* ```ts
|
|
@@ -11936,7 +11938,7 @@ function instancedMeshRendererSchema() {
|
|
|
11936
11938
|
//#region src/render/light-probe-volume.ts
|
|
11937
11939
|
/**
|
|
11938
11940
|
* Lights PBR materials with a baked light-probe grid instead of the scene environment's diffuse
|
|
11939
|
-
* light (`docs/
|
|
11941
|
+
* light (`docs/architecture/07-rendering.md` §2.15).
|
|
11940
11942
|
*
|
|
11941
11943
|
* @remarks
|
|
11942
11944
|
* Every lit PBR material samples the grid per pixel, blending the eight probes around it, so moving
|
|
@@ -13429,8 +13431,8 @@ function createFontLoader() {
|
|
|
13429
13431
|
//#endregion
|
|
13430
13432
|
//#region src/render/loaders/light-probe-loader.ts
|
|
13431
13433
|
/**
|
|
13432
|
-
* Builds the loader for `.probes.json` light-probe grids
|
|
13433
|
-
*
|
|
13434
|
+
* Builds the loader for `.probes.json` light-probe grids. It needs no device, so a grid loads in
|
|
13435
|
+
* Node too.
|
|
13434
13436
|
*
|
|
13435
13437
|
* @returns The loader to register with `ctx.registerAssetLoader`.
|
|
13436
13438
|
*
|
|
@@ -14044,9 +14046,8 @@ function readString$2(block, key, fallback) {
|
|
|
14044
14046
|
//#endregion
|
|
14045
14047
|
//#region src/render/loaders/lightmap-loader.ts
|
|
14046
14048
|
/**
|
|
14047
|
-
* Builds the loader for `.lightmap.json` lightmaps
|
|
14048
|
-
*
|
|
14049
|
-
* the lightmap.
|
|
14049
|
+
* Builds the loader for `.lightmap.json` lightmaps. The texture the file names loads as a
|
|
14050
|
+
* dependency, so it is released with the lightmap; a texture that fails to load fails the lightmap.
|
|
14050
14051
|
*
|
|
14051
14052
|
* @returns The loader to register with `ctx.registerAssetLoader`.
|
|
14052
14053
|
*
|
|
@@ -14140,8 +14141,8 @@ const SURFACE_PRIORITY = 500;
|
|
|
14140
14141
|
* `// @ignifx` declarations, and an undeclared name (`IGX-0712`) or a value of the wrong shape
|
|
14141
14142
|
* (`IGX-0713`) fails the load. A PBR property that does not exist is a typo with an obvious
|
|
14142
14143
|
* fallback — the default; a uniform that does not exist has none, and a shader that silently
|
|
14143
|
-
* ignores half its material is the failure mode custom shaders are hardest to debug from
|
|
14144
|
-
*
|
|
14144
|
+
* ignores half its material is the failure mode custom shaders are hardest to debug from.
|
|
14145
|
+
* The same file is checked at build time
|
|
14145
14146
|
* by `@ignifx/vite-plugin`, so this is the last line rather than the first.
|
|
14146
14147
|
*
|
|
14147
14148
|
* ```jsonc
|
|
@@ -16133,7 +16134,7 @@ let effectLayer = null;
|
|
|
16133
16134
|
* @internal
|
|
16134
16135
|
*/
|
|
16135
16136
|
async function loadPostEffectSupport() {
|
|
16136
|
-
const [compiler, effects] = await Promise.all([compilerLayer ?? import("./post-effect-compiler-
|
|
16137
|
+
const [compiler, effects] = await Promise.all([compilerLayer ?? import("./post-effect-compiler-unDD3hod.js"), effectLayer ?? import("./effect-task-CMbuO6Kb.js")]);
|
|
16137
16138
|
compilerLayer = compiler;
|
|
16138
16139
|
effectLayer = effects;
|
|
16139
16140
|
}
|
|
@@ -16161,7 +16162,7 @@ function effectTaskSupport() {
|
|
|
16161
16162
|
//#region src/render/shader-asset.ts
|
|
16162
16163
|
/**
|
|
16163
16164
|
* One `.wgsl` file: its text and the declaration its `// @ignifx` pragmas carry
|
|
16164
|
-
* (
|
|
16165
|
+
* (ADR-0024).
|
|
16165
16166
|
*
|
|
16166
16167
|
* The asset is the program plus the schema of what a material may set on it, never the values. It
|
|
16167
16168
|
* needs no device, so a `.wgsl` loads completely in Node. Two facts an author has to know:
|
|
@@ -16190,7 +16191,7 @@ const SHADER_ASSET_TYPE = "shader";
|
|
|
16190
16191
|
const SHADER_FILE_EXTENSIONS = Object.freeze([".wgsl"]);
|
|
16191
16192
|
/**
|
|
16192
16193
|
* A loaded `.wgsl` file: its source and what its pragmas declare
|
|
16193
|
-
* (
|
|
16194
|
+
* (ADR-0024).
|
|
16194
16195
|
*
|
|
16195
16196
|
* @remarks
|
|
16196
16197
|
* Shaders are shared: many materials reference one shader asset, and each material holds its own
|
|
@@ -16241,7 +16242,7 @@ var ShaderAsset = class {
|
|
|
16241
16242
|
//#region src/render/loaders/shader-loader.ts
|
|
16242
16243
|
/**
|
|
16243
16244
|
* The `shader` asset loader: `.wgsl` to `ShaderAsset`
|
|
16244
|
-
* (
|
|
16245
|
+
* (ADR-0024).
|
|
16245
16246
|
*
|
|
16246
16247
|
* One loader covers all three forms, because `.surface.wgsl` and `.post.wgsl` both end in `.wgsl`;
|
|
16247
16248
|
* the `@ignifx shader|surface|post` pragma is what says which form a file is.
|
|
@@ -16271,7 +16272,7 @@ function createShaderLoader() {
|
|
|
16271
16272
|
type: SHADER_ASSET_TYPE,
|
|
16272
16273
|
extensions: SHADER_FILE_EXTENSIONS,
|
|
16273
16274
|
async load(ctx) {
|
|
16274
|
-
const [source, pragma] = await Promise.all([ctx.fetchText(), import("./shader-pragma-
|
|
16275
|
+
const [source, pragma] = await Promise.all([ctx.fetchText(), import("./shader-pragma-D0MjCOIg.js")]);
|
|
16275
16276
|
const declaration = pragma.parseShaderDeclaration(source, ctx.address);
|
|
16276
16277
|
await loadShaderSupport();
|
|
16277
16278
|
if (declaration.kind === "surface") await loadSurfaceShaderSupport();
|
|
@@ -16417,8 +16418,8 @@ function loadByContainer(container, address, engine, url, options) {
|
|
|
16417
16418
|
*
|
|
16418
16419
|
* Every line here needs a WebGPU device: a clone only exists when the template does, and a template
|
|
16419
16420
|
* only exists when the engine uploaded its buffers. That is why the module lives under
|
|
16420
|
-
* `src/render/gpu/`, the render layer's
|
|
16421
|
-
*
|
|
16421
|
+
* `src/render/gpu/`, the render layer's counterpart of `src/lite/gpu/`: the root Vitest coverage
|
|
16422
|
+
* config excludes both, and the browser project is what measures them.
|
|
16422
16423
|
*
|
|
16423
16424
|
* The per-field "did it change" cache lives here rather than on the component for the same reason.
|
|
16424
16425
|
* It is only consulted when there is something to write to, so leaving it on the component would
|
|
@@ -17053,17 +17054,16 @@ var ModelInstance = class {
|
|
|
17053
17054
|
* case that actually needs an entity inside the model — a weapon in a hand — by parenting an
|
|
17054
17055
|
* entity's node under a glTF node, which makes it follow that bone with no per-frame copy.
|
|
17055
17056
|
*
|
|
17056
|
-
* ## Decisions
|
|
17057
|
+
* ## Decisions
|
|
17057
17058
|
*
|
|
17058
|
-
* - **glTF cameras and lights are ignored, and there is no way to ask otherwise
|
|
17059
|
-
*
|
|
17060
|
-
*
|
|
17061
|
-
*
|
|
17062
|
-
*
|
|
17063
|
-
*
|
|
17064
|
-
*
|
|
17065
|
-
*
|
|
17066
|
-
* the scene by ignifx, so they never light anything.
|
|
17059
|
+
* - **glTF cameras and lights are ignored, and there is no way to ask otherwise (§2.4).** Lite
|
|
17060
|
+
* gates cameras behind a process-global `enableGltfCameras()` that must run before the **first**
|
|
17061
|
+
* load (`src/lite/render-features.ts`), so a per-asset sidecar flag cannot decide it: whichever
|
|
17062
|
+
* asset loads first would fix the answer for every later one. Rather than ship a flag that
|
|
17063
|
+
* silently means "whatever the first model wanted", ignifx imports neither and the adapter keeps
|
|
17064
|
+
* `enableGltfCameraImport` ready for a project-level setting that does not exist yet. Lights
|
|
17065
|
+
* inside a container are shallow-copied by Lite's own clone and are not added to the scene by
|
|
17066
|
+
* ignifx, so they never light anything.
|
|
17067
17067
|
* - **`materialOverrides` matches on the glTF material *name*.** §2.4 says "by material name",
|
|
17068
17068
|
* which is the only stable identifier a glTF gives a material. The component records the map and
|
|
17069
17069
|
* applies it to the nodes whose material carries that name; a name nothing matches is ignored.
|
|
@@ -17839,7 +17839,7 @@ var PostProcessChain = class {
|
|
|
17839
17839
|
}
|
|
17840
17840
|
/**
|
|
17841
17841
|
* Under `rendering.hdr`, records the custom effects ordered before any built-in one ahead of the
|
|
17842
|
-
* output pass, where they read and write linear `rgba16float` colour
|
|
17842
|
+
* output pass, where they read and write linear `rgba16float` colour.
|
|
17843
17843
|
*
|
|
17844
17844
|
* @remarks
|
|
17845
17845
|
* The first reads the scene's HDR texture directly, which is already a sampled `Texture2D`, so no
|
|
@@ -18087,7 +18087,7 @@ let loading = null;
|
|
|
18087
18087
|
* @internal
|
|
18088
18088
|
*/
|
|
18089
18089
|
async function loadHdrBloomSupport() {
|
|
18090
|
-
loading ??= import("./bloom-hdr-
|
|
18090
|
+
loading ??= import("./bloom-hdr-xPwkIdHG.js").then((module) => {
|
|
18091
18091
|
layer = module;
|
|
18092
18092
|
return module;
|
|
18093
18093
|
});
|
|
@@ -18149,7 +18149,7 @@ var ScreenSpaceEffects = class {
|
|
|
18149
18149
|
const tier = renderer.qualityPreset;
|
|
18150
18150
|
const runsContact = contact.enabled && (tier === null || tier.contactShadows);
|
|
18151
18151
|
const runsSsgi = ssgi.enabled && (tier === null || tier.ssgi);
|
|
18152
|
-
const key = buildKey(renderer, runsContact, runsSsgi
|
|
18152
|
+
const key = buildKey(renderer, runsContact, runsSsgi ? ssgi : null, isEnabled);
|
|
18153
18153
|
if (key !== this.#key) {
|
|
18154
18154
|
this.#key = key;
|
|
18155
18155
|
this.#teardown(renderer.isSceneRegistered);
|
|
@@ -18182,8 +18182,8 @@ var ScreenSpaceEffects = class {
|
|
|
18182
18182
|
const built = this.#built;
|
|
18183
18183
|
this.#built = null;
|
|
18184
18184
|
if (built === null) return;
|
|
18185
|
-
built.ssgi?.dispose(isSceneRegistered);
|
|
18186
18185
|
built.installed.dispose();
|
|
18186
|
+
built.ssgi?.dispose(isSceneRegistered);
|
|
18187
18187
|
built.inputs.release();
|
|
18188
18188
|
}
|
|
18189
18189
|
/**
|
|
@@ -18196,10 +18196,10 @@ var ScreenSpaceEffects = class {
|
|
|
18196
18196
|
*/
|
|
18197
18197
|
async #build(renderer, contact, ssgi, generation) {
|
|
18198
18198
|
const [inputs, wiring, contactModule, ssgiModule] = await Promise.all([
|
|
18199
|
-
renderer.acquireSceneInputs(),
|
|
18200
|
-
import("./scene-color-passes-
|
|
18199
|
+
renderer.acquireSceneInputs({ albedo: ssgi !== null }),
|
|
18200
|
+
import("./scene-color-passes-CM_T2KF-.js"),
|
|
18201
18201
|
contact === null ? null : import("./contact-shadows-T523EXaP.js"),
|
|
18202
|
-
ssgi === null ? null : import("./ssgi-
|
|
18202
|
+
ssgi === null ? null : import("./ssgi-Dk20U3oR.js")
|
|
18203
18203
|
]);
|
|
18204
18204
|
const presenter = renderer.presenter;
|
|
18205
18205
|
const camera = renderer.isHeadless ? null : renderer.scene.camera;
|
|
@@ -18211,13 +18211,22 @@ var ScreenSpaceEffects = class {
|
|
|
18211
18211
|
const passes = [];
|
|
18212
18212
|
const contactPass = contact === null ? null : contactModule?.createContactShadowsPass(engine, scene, inputs.depthTarget, camera, contact) ?? null;
|
|
18213
18213
|
if (contactPass !== null) passes.push(contactPass);
|
|
18214
|
-
const ssgiPass = ssgi === null ? null : ssgiModule?.createSsgiPass(engine, scene, inputs
|
|
18214
|
+
const ssgiPass = ssgi === null ? null : ssgiModule?.createSsgiPass(engine, scene, inputs, camera, {
|
|
18215
18215
|
tuning: ssgi,
|
|
18216
18216
|
halfResolution: ssgi.halfResolution,
|
|
18217
|
+
denoisePasses: ssgi.denoisePasses,
|
|
18218
|
+
isLinear: presenter.hdr !== null,
|
|
18217
18219
|
usePlugin: renderer.settings.hdr || renderer.features.materialPlugins
|
|
18218
18220
|
}) ?? null;
|
|
18219
18221
|
if (ssgiPass !== null) passes.push(ssgiPass);
|
|
18220
|
-
|
|
18222
|
+
let installed;
|
|
18223
|
+
try {
|
|
18224
|
+
installed = wiring.installSceneColorPasses(engine, scene, presenter, passes, renderer.isSceneRegistered);
|
|
18225
|
+
} catch (failure) {
|
|
18226
|
+
ssgiPass?.dispose(renderer.isSceneRegistered);
|
|
18227
|
+
inputs.release();
|
|
18228
|
+
throw failure;
|
|
18229
|
+
}
|
|
18221
18230
|
this.#built = {
|
|
18222
18231
|
inputs,
|
|
18223
18232
|
installed,
|
|
@@ -18229,17 +18238,17 @@ var ScreenSpaceEffects = class {
|
|
|
18229
18238
|
}
|
|
18230
18239
|
};
|
|
18231
18240
|
/**
|
|
18232
|
-
* The build's identity: which passes run, SSGI's resolution, and the camera;
|
|
18241
|
+
* The build's identity: which passes run, SSGI's resolution and denoise pass count, and the camera;
|
|
18242
|
+
* `""` for none.
|
|
18233
18243
|
*
|
|
18234
18244
|
* @param renderer - The rendering service.
|
|
18235
18245
|
* @param runsContact - Whether contact shadows run.
|
|
18236
|
-
* @param
|
|
18237
|
-
* @param ssgiHalf - SSGI's `halfResolution`.
|
|
18246
|
+
* @param ssgi - The `ssgi` record when SSGI runs, else `null`.
|
|
18238
18247
|
* @param isEnabled - Whether the stack is enabled in the hierarchy.
|
|
18239
18248
|
* @returns The key.
|
|
18240
18249
|
*/
|
|
18241
|
-
function buildKey(renderer, runsContact,
|
|
18242
|
-
if (!isEnabled || !runsContact &&
|
|
18250
|
+
function buildKey(renderer, runsContact, ssgi, isEnabled) {
|
|
18251
|
+
if (!isEnabled || !runsContact && ssgi === null || renderer.isHeadless || renderer.presenter === null) return "";
|
|
18243
18252
|
const camera = renderer.scene.camera;
|
|
18244
18253
|
if (camera === null) return "";
|
|
18245
18254
|
cameraIds ??= /* @__PURE__ */ new WeakMap();
|
|
@@ -18249,7 +18258,8 @@ function buildKey(renderer, runsContact, runsSsgi, ssgiHalf, isEnabled) {
|
|
|
18249
18258
|
nextCameraId += 1;
|
|
18250
18259
|
cameraIds.set(camera, id);
|
|
18251
18260
|
}
|
|
18252
|
-
|
|
18261
|
+
const gi = ssgi === null ? "" : `ssgi:${ssgi.halfResolution ? "half" : "full"}:${String(ssgi.denoisePasses)}`;
|
|
18262
|
+
return `${runsContact ? "contact" : ""}|${gi}|camera:${String(id)}`;
|
|
18253
18263
|
}
|
|
18254
18264
|
//#endregion
|
|
18255
18265
|
//#region src/render/post-process-stack.ts
|
|
@@ -18772,7 +18782,7 @@ function postProcessSchema() {
|
|
|
18772
18782
|
intensity: f32(1, {
|
|
18773
18783
|
min: 0,
|
|
18774
18784
|
max: 4,
|
|
18775
|
-
tooltip: "How strongly the bounced light is added."
|
|
18785
|
+
tooltip: "How strongly the bounced light is added. At 1 a surface reflects what reaches it."
|
|
18776
18786
|
}),
|
|
18777
18787
|
radius: f32(2, {
|
|
18778
18788
|
min: .001,
|
|
@@ -18781,15 +18791,25 @@ function postProcessSchema() {
|
|
|
18781
18791
|
samples: u32(8, {
|
|
18782
18792
|
min: 1,
|
|
18783
18793
|
max: 64,
|
|
18784
|
-
tooltip: "March steps per ray."
|
|
18794
|
+
tooltip: "March steps per ray. More steps do not reduce grain."
|
|
18795
|
+
}),
|
|
18796
|
+
rays: u32(2, {
|
|
18797
|
+
min: 1,
|
|
18798
|
+
max: 8,
|
|
18799
|
+
tooltip: "Rays traced per pixel. More rays reduce grain and cost more."
|
|
18800
|
+
}),
|
|
18801
|
+
denoisePasses: u32(4, {
|
|
18802
|
+
min: 0,
|
|
18803
|
+
max: 4,
|
|
18804
|
+
tooltip: "Edge-aware blur passes over the bounce; each doubles the reach. A change rebuilds the pass."
|
|
18785
18805
|
}),
|
|
18786
|
-
halfResolution: bool(true, { tooltip: "Trace at half resolution. A change rebuilds the pass." }),
|
|
18787
|
-
environmentDiffuse: f32(
|
|
18806
|
+
halfResolution: bool(true, { tooltip: "Trace and filter at half resolution. A change rebuilds the pass." }),
|
|
18807
|
+
environmentDiffuse: f32(1, {
|
|
18788
18808
|
min: 0,
|
|
18789
18809
|
max: 1,
|
|
18790
|
-
tooltip: "How much of the environment's diffuse light remains while SSGI runs
|
|
18810
|
+
tooltip: "How much of the environment's diffuse light remains while SSGI runs. Needs rendering.hdr or the materialPlugins feature."
|
|
18791
18811
|
})
|
|
18792
|
-
}, { tooltip: "One bounce of the lit scene colour (beta, desktop tier). Runs on the scene colour before the chain; needs rendering.features.postProcessing." })
|
|
18812
|
+
}, { tooltip: "One bounce of the lit scene colour, reflected in each surface's own colour (beta, desktop tier). Runs on the scene colour before the chain; needs rendering.features.postProcessing." })
|
|
18793
18813
|
});
|
|
18794
18814
|
}
|
|
18795
18815
|
//#endregion
|
|
@@ -19208,7 +19228,7 @@ var RenderSyncSystem = class {
|
|
|
19208
19228
|
//#region src/render/shader-uniform-system.ts
|
|
19209
19229
|
/**
|
|
19210
19230
|
* The `PreRender` system that writes the ignifx-provided uniforms of every live shader material
|
|
19211
|
-
* (
|
|
19231
|
+
* (ADR-0024).
|
|
19212
19232
|
*
|
|
19213
19233
|
* Lite's shader materials get transforms, the camera position, the screen size and the alpha cutoff
|
|
19214
19234
|
* for free and nothing else — no clock, no lights, no shadows (`index.d.ts` 11432) — so a file that
|
|
@@ -19301,9 +19321,8 @@ var ShaderUniformSystem = class {
|
|
|
19301
19321
|
* @remarks
|
|
19302
19322
|
* The direction is the entity's world forward axis, read out of the world matrix's third column —
|
|
19303
19323
|
* the same axis `Light` itself writes onto the Lite light
|
|
19304
|
-
* (`docs/architecture/07-rendering.md` §2.2) — and normalised, which
|
|
19305
|
-
*
|
|
19306
|
-
* agree.
|
|
19324
|
+
* (`docs/architecture/07-rendering.md` §2.2) — and normalised, which a scaled light entity would
|
|
19325
|
+
* otherwise break. Lite's own PBR normalises in WGSL, so the two agree.
|
|
19307
19326
|
*
|
|
19308
19327
|
* @param world - The world being rendered.
|
|
19309
19328
|
* @returns `true` when a light supplied the values; `false` after zeroing them.
|
|
@@ -19454,7 +19473,7 @@ function freeStorageBuffer(buffer) {
|
|
|
19454
19473
|
//#endregion
|
|
19455
19474
|
//#region src/render/storage-buffer-asset.ts
|
|
19456
19475
|
/**
|
|
19457
|
-
* `StorageBufferAsset` (`docs/
|
|
19476
|
+
* `StorageBufferAsset` (`docs/architecture/07-rendering.md` §2.9): a read-only GPU
|
|
19458
19477
|
* buffer a custom WGSL shader indexes, addressed and reference-counted like any other asset.
|
|
19459
19478
|
*
|
|
19460
19479
|
* Babylon Lite 1.27.0 binds storage buffers as `var<storage,read>` and exposes no compute dispatch,
|
|
@@ -19477,7 +19496,7 @@ const STORAGE_BUFFER_ASSET_TYPE = "storagebuffer";
|
|
|
19477
19496
|
const WORD_BYTES = 4;
|
|
19478
19497
|
/**
|
|
19479
19498
|
* A read-only GPU buffer a custom shader indexes
|
|
19480
|
-
* (`docs/
|
|
19499
|
+
* (`docs/architecture/07-rendering.md` §2.9).
|
|
19481
19500
|
*
|
|
19482
19501
|
* @remarks
|
|
19483
19502
|
* Bind it to a material with `MaterialAsset.setStorageBuffer(name, handle)`, where `name` is a
|
|
@@ -23383,7 +23402,7 @@ function registerCore(ctx) {
|
|
|
23383
23402
|
}
|
|
23384
23403
|
/**
|
|
23385
23404
|
* Registers the rendering layer: the `rendering` settings section, the service behind
|
|
23386
|
-
* `app.renderer`, the
|
|
23405
|
+
* `app.renderer`, the components `docs/architecture/04-extensions.md` §7 lists, the GPU asset
|
|
23387
23406
|
* loaders, and the `PreRender` system that reconciles them with the Lite scene.
|
|
23388
23407
|
*
|
|
23389
23408
|
* @remarks
|
|
@@ -25595,7 +25614,7 @@ async function createRenderEngine(canvas, options, features) {
|
|
|
25595
25614
|
if (hdr) {
|
|
25596
25615
|
const knobs = features.autoExposure ?? null;
|
|
25597
25616
|
const exposure = knobs === null ? null : await import("./auto-exposure-uzPn0beO.js");
|
|
25598
|
-
presenter = (await import("./hdr-output-
|
|
25617
|
+
presenter = (await import("./hdr-output-_2TU-jWy.js")).installHdrRenderPath(engine, scene, exposure === null || knobs === null ? void 0 : (hdrTexture) => exposure.installAutoExposure(engine, scene, hdrTexture, knobs));
|
|
25599
25618
|
} else if (offscreen) presenter = installOffscreenRenderPath(engine, scene);
|
|
25600
25619
|
return {
|
|
25601
25620
|
engine,
|
|
@@ -27209,8 +27228,8 @@ function createFileSystemBackend(fs, directory) {
|
|
|
27209
27228
|
*
|
|
27210
27229
|
* @remarks
|
|
27211
27230
|
* Node only: the factory loads `node:fs/promises` and rejects on a host that has none. It is what
|
|
27212
|
-
* `createApp({ storage: { directory } })` calls, and it is exported so that tooling
|
|
27213
|
-
*
|
|
27231
|
+
* `createApp({ storage: { directory } })` calls, and it is exported so that tooling can build one
|
|
27232
|
+
* without an app.
|
|
27214
27233
|
*
|
|
27215
27234
|
* @param options - The root directory.
|
|
27216
27235
|
* @returns The backend.
|
|
@@ -34497,8 +34516,8 @@ function gridIndices(rows, columns) {
|
|
|
34497
34516
|
//#endregion
|
|
34498
34517
|
//#region src/render/light-probe-bake.ts
|
|
34499
34518
|
/**
|
|
34500
|
-
* The CPU light-probe bake (`docs/
|
|
34501
|
-
*
|
|
34519
|
+
* The CPU light-probe bake (`docs/architecture/07-rendering.md` §2.15): one bounce of diffuse
|
|
34520
|
+
* light, needing no device, so it runs headless, in a tool, or in a test.
|
|
34502
34521
|
*
|
|
34503
34522
|
* - **Geometry.** Triangles of every enabled `MeshRenderer` (a `MeshAsset.fromData` mesh's own
|
|
34504
34523
|
* arrays, or a primitive rebuilt on the CPU by `light-probe-bake-primitives.ts`) and every enabled
|
|
@@ -35405,9 +35424,9 @@ function transformSchema() {
|
|
|
35405
35424
|
* their `format`. A *file* format is not a component and has no type id, so the file formats
|
|
35406
35425
|
* below are keyed `ignifx/scene-file`, `ignifx/material-file`, `ignifx/environment-file`, and
|
|
35407
35426
|
* `ignifx/mesh-file` while declaring `format: "ignifx.scene"`, `"ignifx.material"`,
|
|
35408
|
-
* `"ignifx.environment"`, and `"ignifx.mesh"`.
|
|
35409
|
-
*
|
|
35410
|
-
*
|
|
35427
|
+
* `"ignifx.environment"`, and `"ignifx.mesh"`. A key of `"ignifx.scene"` would fail the namespacing
|
|
35428
|
+
* check, and the grouping — which is what actually decides the page — comes from `format` either
|
|
35429
|
+
* way.
|
|
35411
35430
|
*
|
|
35412
35431
|
* ## The transform
|
|
35413
35432
|
*
|
|
@@ -35756,7 +35775,7 @@ function describeMeshFileFormat() {
|
|
|
35756
35775
|
};
|
|
35757
35776
|
}
|
|
35758
35777
|
/**
|
|
35759
|
-
* Describes the `.probes.json` light-probe grid format
|
|
35778
|
+
* Describes the `.probes.json` light-probe grid format.
|
|
35760
35779
|
*
|
|
35761
35780
|
* @returns The description of the top-level file fields.
|
|
35762
35781
|
*
|
|
@@ -35814,7 +35833,7 @@ function describeLightProbeFileFormat() {
|
|
|
35814
35833
|
};
|
|
35815
35834
|
}
|
|
35816
35835
|
/**
|
|
35817
|
-
* Describes the `.lightmap.json` lightmap format
|
|
35836
|
+
* Describes the `.lightmap.json` lightmap format.
|
|
35818
35837
|
*
|
|
35819
35838
|
* @returns The description of the top-level file fields.
|
|
35820
35839
|
*
|