@threenative/core 0.3.12 → 0.3.15
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 +1 -1
- package/capabilities.json +1047 -44
- package/dist/{assets-YUbXa3-Y.d.ts → assets-CfMKnOsK.d.ts} +78 -1
- package/dist/{canvas-layer-CWuFRT7G.d.ts → canvas-layer-G7ttVy7y.d.ts} +1 -1
- package/dist/{chunk-7UUT3TY5.js → chunk-2GPHICV6.js} +1 -1
- package/dist/{chunk-GMHATRPW.js → chunk-GEMQJBY4.js} +1650 -383
- package/dist/{chunk-VAZM36TV.js → chunk-H4J6IAJE.js} +17 -10
- package/dist/{chunk-5O73CDMR.js → chunk-QAMSM3Z5.js} +415 -27
- package/dist/{chunk-2Z44XSI2.js → chunk-QAQHYOWY.js} +3 -7
- package/dist/{chunk-DBELTTTM.js → chunk-U4YHUKKL.js} +1 -1
- package/dist/{chunk-OKXUCASC.js → chunk-VBBYWGAT.js} +3 -4
- package/dist/chunk-VP43GIWW.js +18 -0
- package/dist/{chunk-N5LRP4BR.js → chunk-VQRPEOKY.js} +66 -3
- package/dist/{chunk-6KLNISRJ.js → chunk-XDTZ4QMO.js} +11 -4
- package/dist/default-tone-mapping-GgKPTiBP.d.ts +4 -0
- package/dist/{game-D7pAzZUY.d.ts → game-k8K3hZai.d.ts} +72 -8
- package/dist/hot.d.ts +5 -4
- package/dist/hot.js +5 -8
- package/dist/index.d.ts +871 -1018
- package/dist/index.js +4786 -1631
- package/dist/{model-lod-B6BMqS1r.d.ts → model-lod-DPTzeCcD.d.ts} +4 -2
- package/dist/playtest.d.ts +5 -4
- package/dist/playtest.js +6 -5
- package/dist/quality-BADStsTn.d.ts +868 -0
- package/dist/react.d.ts +3 -2
- package/dist/render-environment.d.ts +170 -0
- package/dist/render-environment.js +352 -0
- package/dist/{renderer-DvFVoAgj.d.ts → renderer-BtOSseYf.d.ts} +29 -31
- package/dist/spells/index.js +1 -1
- package/dist/ui-layer.js +3 -2
- package/dist/worker.js +12 -5
- package/dist/world.d.ts +280 -16
- package/dist/world.js +1529 -642
- package/mcp/animation-server.mjs +1 -1
- package/mcp/engine-server.mjs +135 -11
- package/mcp/servers.mjs +4 -4
- package/package.json +10 -6
- package/scripts/ensure-mcp.mjs +6 -1
- package/src/animation-batch.ts +193 -0
- package/src/animation-layers.ts +7 -3
- package/src/animation.ts +209 -29
- package/src/asset-cache.ts +3 -3
- package/src/asset-memo.ts +202 -0
- package/src/assets.ts +436 -131
- package/src/auto-batch.ts +190 -44
- package/src/clustered-batch.ts +146 -3
- package/src/clustered-mesh.ts +548 -20
- package/src/compute-driven.ts +1 -1
- package/src/config.ts +8 -0
- package/src/debug.ts +119 -22
- package/src/dev-global.ts +54 -0
- package/src/displaced-surface.ts +428 -0
- package/src/engine-hooks.ts +37 -0
- package/src/frame-budget.ts +35 -3
- package/src/game-boot-phase.ts +269 -0
- package/src/game-dev-tools.ts +7 -14
- package/src/game-frame-loop.ts +45 -82
- package/src/game-startup.ts +145 -70
- package/src/game-ui.ts +84 -0
- package/src/game.ts +168 -552
- package/src/gamepad-mappings.ts +269 -0
- package/src/generated/console-markers.ts +14 -0
- package/src/geometry-capture.ts +28 -4
- package/src/gpu-readings.ts +98 -0
- package/src/gpu-scene-bvh.ts +149 -36
- package/src/grass-field.ts +628 -0
- package/src/hot.ts +4 -7
- package/src/index.ts +227 -8
- package/src/input.ts +237 -25
- package/src/instanced-batch-lod.ts +3 -8
- package/src/interpolation.ts +171 -40
- package/src/look/ao-admission.ts +4 -3
- package/src/look/auto-exposure.ts +5 -16
- package/src/look/default-tone-mapping.ts +41 -5
- package/src/look/local-exposure.ts +2 -7
- package/src/look/quad-pass.ts +21 -0
- package/src/look/quality.ts +4 -0
- package/src/look/unreal-bloom.ts +4 -13
- package/src/look/world-environment.ts +58 -115
- package/src/merge-parts.ts +20 -24
- package/src/model-lod.ts +97 -14
- package/src/particle-significance.ts +12 -0
- package/src/particles.ts +19 -10
- package/src/platform.ts +23 -4
- package/src/profiling/FrameStages.ts +5 -6
- package/src/profiling/Spans.ts +3 -17
- package/src/profiling/debug-telemetry.ts +2 -6
- package/src/profiling/render-list-validate.ts +6 -15
- package/src/projection-marker.ts +2 -1
- package/src/quiet-markers.ts +3 -10
- package/src/render/cpu-bvh.ts +100 -0
- package/src/render/depth-pyramid.ts +6 -14
- package/src/render/environment/environmentContribution.ts +202 -0
- package/src/render/environment/environmentRadiance.ts +44 -0
- package/src/render/environment/environmentSampleCache.ts +56 -0
- package/src/render/environment/environmentSampling.ts +201 -0
- package/src/render/environment/environmentSnapshot.ts +71 -0
- package/src/render/environment/gate.ts +57 -0
- package/src/render/material-key.ts +21 -1
- package/src/render/mesh-pool.ts +3 -19
- package/src/render/probe-trace.ts +872 -0
- package/src/render/probe-volume.ts +780 -34
- package/src/render/radiance-cache.ts +17 -0
- package/src/render/screen-probe-gather.ts +303 -0
- package/src/render/short-range-ao.ts +274 -0
- package/src/render/virtual-shadow-partial.ts +13 -0
- package/src/render/virtual-shadow.ts +18 -16
- package/src/render/world-impostor-surface.ts +207 -9
- package/src/render/world-impostor.ts +5 -2
- package/src/render-camera-cull.ts +105 -4
- package/src/render-environment.ts +41 -0
- package/src/renderer-config.ts +36 -0
- package/src/renderer-facts.ts +37 -0
- package/src/renderer.ts +78 -32
- package/src/resolution-scaler.ts +3 -2
- package/src/scatter-field.ts +496 -0
- package/src/scene-entry-inspectors.ts +61 -0
- package/src/snow-field.ts +1 -0
- package/src/startup-offscreen-bytes.ts +84 -0
- package/src/state.ts +16 -3
- package/src/static-transform.ts +100 -25
- package/src/streamed-textures.ts +112 -0
- package/src/streaming.ts +68 -4
- package/src/texture-streaming.ts +331 -0
- package/src/tile-ring.ts +294 -0
- package/src/version.ts +1 -1
- package/src/warmup.ts +15 -2
- package/src/worker.ts +12 -2
- package/src/world-bundle-safety.ts +55 -10
- package/src/world-cell-batches.ts +166 -200
- package/src/world-cell-chunks.ts +3 -7
- package/src/world-cell-data.ts +7 -0
- package/src/world-cell-impostors.ts +20 -8
- package/src/world-cell-models.ts +36 -8
- package/src/world-cell-options.ts +2 -14
- package/src/world-cell-placements.ts +194 -90
- package/src/world-cell-prewarm.ts +39 -4
- package/src/world-cell-records.ts +401 -0
- package/src/world-cell-render-bundles.ts +2 -2
- package/src/world-cell-render-gpu-dress.ts +17 -19
- package/src/world-cell-render-main-cull.ts +73 -17
- package/src/world-cell-render-util.ts +18 -5
- package/src/world-cell-render.ts +13 -5
- package/src/world-cell-residency.ts +15 -6
- package/src/world-cell-stale.ts +238 -0
- package/src/world-cells.ts +23 -6
- package/src/world-gpu-flags.ts +18 -50
- package/src/world-gpu-reference.ts +22 -8
- package/src/world-gpu-scene.ts +44 -24
- package/src/world-gpu-shadow.ts +21 -8
- package/src/world-gpu-types.ts +41 -13
- package/src/world-load-limiter.ts +5 -0
- package/src/world-model-sections.ts +80 -0
- package/src/world-river-ribbon.ts +273 -0
- package/src/world-root-frame.ts +39 -0
- package/src/world-shore-field.ts +91 -0
- package/src/world-static-pose.ts +163 -0
- package/src/world-surface-sampler.ts +48 -0
- package/src/world-terrain-splat.ts +10 -18
- package/src/world-tile-budget.ts +4 -11
- package/src/world-tiles.ts +79 -12
- package/src/world-validate.ts +6 -14
- package/src/world-warm.ts +51 -0
- package/src/world-water-bodies.ts +113 -3
- package/src/world.ts +13 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,47 +1,25 @@
|
|
|
1
1
|
import * as three from 'three';
|
|
2
|
-
import { Object3D, AnimationClip, AnimationMixer, Vector3, Camera, Group, Scene, Texture, Matrix4, Mesh, BufferGeometry,
|
|
2
|
+
import { Object3D, AnimationClip, AnimationMixer, Vector3, Camera, Group, Scene, Texture, Matrix4, Mesh, BufferGeometry, Material, Color, InstancedMesh, ColorRepresentation, Box3, DirectionalLight, DepthTexture, LightShadow, HemisphereLight, ToneMapping, FogExp2, Vector4, Sprite, DataTexture, CatmullRomCurve3 } from 'three';
|
|
3
3
|
export { a as CameraShake, C as CameraShakeCurve, I as ICameraShakeOffset, b as ICameraShakeOptions } from './camera-shake-CZKOfGn4.js';
|
|
4
|
-
export { A as
|
|
4
|
+
export { A as ASSET_LATE_MARKER, b as AssetPriority, c as IAssetCacheReport, d as IAssetCacheState, I as IAssetLoader, a as IAssetLoaderOptions, e as IAssetPrefetchProgress, f as IAssetRequestOptions, g as ITextureOptions, h as createAssetLoader, i as fetchAsset, r as reconcileMirroredClips } from './assets-CfMKnOsK.js';
|
|
5
5
|
export { A as AudioBus, I as IAudioBusOptions, b as IAudioCompressorOptions, c as IAudioPlayOptions, r as resetAudioCueLedger } from './audio-DIJE5HTr.js';
|
|
6
|
-
export { C as CanvasLayer } from './canvas-layer-
|
|
7
|
-
import { b as IGamePluginRuntime, a as IGamePluginHooks } from './game-
|
|
8
|
-
export { A as AfterPhysicsCallback, C as ContextMenuPolicy, G as GEOMETRY_ASSET_KEY,
|
|
6
|
+
export { C as CanvasLayer } from './canvas-layer-G7ttVy7y.js';
|
|
7
|
+
import { E as EntitySnapshot, b as IGeometryCaptureRequest, c as IGeometryCaptureReport, d as IGamePluginRuntime, a as IGamePluginHooks } from './game-k8K3hZai.js';
|
|
8
|
+
export { A as AfterPhysicsCallback, C as ContextMenuPolicy, G as GEOMETRY_ASSET_KEY, e as GEOMETRY_CAPTURE_DEFAULT_LIMIT, f as GEOMETRY_CAPTURE_MAX_LIMIT, g as GEOMETRY_CAPTURE_SORTS, h as GEOMETRY_CAPTURE_TIMEOUT_MS, i as GEOMETRY_CAPTURE_WALK_CAP, j as GeometryCaptureSort, k as ICtx, I as IGame, l as IGameObservationContribution, m as IGameObservationSampleRequest, n as IGamePlatformSource, o as IGeometryCaptureAsset, p as IGeometryCaptureMesh, q as IGeometryCapturePass, r as IGeometryCaptureRow, s as IInputAction, t as IInputGamepad, u as IInputMapOptions, v as IPointerDragHandle, w as IPointerEvent3D, x as IPointerEvents3D, y as IPointerEvents3DOptions, z as IPointerEvents3DPicker, B as IPointerState, D as IRandom, F as IRawInputPointer, H as IRawInputPointerEdge, J as IRawInputState, K as IRaycastOptions, L as IScenePickerOptions, M as IThreeNativeAudioConfig, N as IThreeNativeAudioLoop, O as IThreeNativeAudioOverride, P as IThreeNativeAudioSpectrum, Q as IThreeNativeBootSplash, R as IThreeNativeConfig, S as IThreeNativeIconVariants, T as IThreeNativeLodConfig, U as IThreeNativeLodGenerationConfig, V as IThreeNativeLodOverride, W as IThreeNativeLodRuntimeConfig, X as IThreeNativeTexturesConfig, Y as ITweenOptions, Z as IWarmUpCacheOptions, _ as IWarmUpObservation, $ as IWarmUpOptions, a0 as IWarmUpProgress, a1 as IWarmUpRenderer, a2 as IWarmUpReport, a3 as InputBindings, a4 as InputMap, a5 as InputPlatformSource, a6 as PointerEvent3DListener, a7 as PointerEvent3DType, a8 as PointerEvents3D, a9 as Scene, aa as SceneFrame, ab as ScenePicker, ac as ScheduleHandle, ad as Scheduler, ae as ThreeNativeBackgroundMode, af as ThreeNativeLodMinTrianglesScope, ag as ThreeNativeLodPreset, ah as ThreeNativeOrientation, ai as ThreeNativeUiRenderer, aj as WarmUpCacheStatus, ak as WarmUpObservationStatus, al as afterPhysics, am as captureMouse, an as createRandom, ao as defineGame, ap as warmUpScene } from './game-k8K3hZai.js';
|
|
9
9
|
import * as three_webgpu from 'three/webgpu';
|
|
10
10
|
import { StorageTexture, ComputeNode, UniformNode, Node, TextureNode, CubeRenderTarget, WebGPURenderer, NodeMaterial, StorageBufferNode, StructTypeNode, Data3DTexture, ShadowBaseNode, NodeBuilder, NodeFrame, SpriteNodeMaterial, StorageTextureNode, Storage3DTexture } from 'three/webgpu';
|
|
11
|
-
import { I as IRendererLike, h as IStageGpuReading, F as FramePassKind, a as IFrameBudgetWindow } from './renderer-
|
|
12
|
-
export { D as DEFAULT_PIPELINE_CENSUS_LIMIT, i as DEFAULT_TARGET_FPS, j as FRAME_BUDGET_MARKER, k as FRAME_BUDGET_PHASES, l as FRAME_HITCH_MARKER, m as FrameBudget, n as FrameBudgetPhase, o as FrameCounters, p as ICounterDevice, g as IFrameBudgetOptions, q as IFrameBudgetPassSummary, b as IFrameBudgetSimulation, r as IFrameBudgetSummary, s as IFrameCounters, d as IFramePhaseSample,
|
|
13
|
-
import { I as IComputeDriven$1, a as IGPUReadbackSample, d as IBudgetCandidate } from './model-lod-
|
|
14
|
-
export { C as ComputeDrivenRegistry, D as DISCRETE_LOD_DEFAULT_ERROR_PIXELS, e as DISCRETE_LOD_DEFAULT_HYSTERESIS, G as GPUReadback, f as IGPUReadbackOptions, g as baseGeometryOf, l as lodChainOf, h as lodPixelScale, u as updateModelLods } from './model-lod-
|
|
11
|
+
import { I as IRendererLike, h as IStageGpuReading, F as FramePassKind, a as IFrameBudgetWindow } from './renderer-BtOSseYf.js';
|
|
12
|
+
export { D as DEFAULT_PIPELINE_CENSUS_LIMIT, i as DEFAULT_TARGET_FPS, j as FRAME_BUDGET_MARKER, k as FRAME_BUDGET_PHASES, l as FRAME_HITCH_MARKER, m as FrameBudget, n as FrameBudgetPhase, o as FrameCounters, p as ICounterDevice, g as IFrameBudgetOptions, q as IFrameBudgetPassSummary, b as IFrameBudgetSimulation, r as IFrameBudgetSummary, s as IFrameCounters, d as IFramePhaseSample, f as IPipelineCensus, t as IPipelineCensusCounts, u as IPipelineCensusEvent, v as IPipelineCensusOptions, w as IPipelineProvenance, x as IPipelineShaderObservation, y as IPlatformInfo, z as IRenderChainApplied, A as IRenderChainBudgetWindow, B as IRenderChainDroppedStage, C as IRenderChainOptions, E as IRenderChainRenderer, G as IRenderChainRequest, H as IRenderChainStage, J as IRenderChainStageContext, K as IRenderChainVelocityMeasurement, L as IRenderChainVelocityReport, M as IRenderChainVelocityRequest, N as IRenderChainVelocityResult, c as IRenderPassSample, O as ITargetFps, P as IVelocityRenderPass, Q as MAX_TARGET_FPS, R as MainDrawSource, S as PIPELINE_CENSUS_CAPABILITY, T as PIPELINE_CENSUS_VERSION, U as PipelineCensus, V as PipelineCensusMode, W as PipelineCensusStatus, X as PlatformFormFactor, Y as PlatformOS, Z as PlatformRuntime, _ as RENDER_CHAIN_MARKER, $ as RENDER_CHAIN_STAGE_ORDER, a0 as RENDER_CHAIN_TIERS, a1 as RenderChain, a2 as RenderChainSource, a3 as RenderChainStageId, a4 as RenderChainStageName, a5 as RenderChainTier, a6 as RenderChainTierRequest, a7 as RenderChainVelocitySource, a8 as TargetFpsSource, a9 as VELOCITY_OUTPUT_NAME, aa as VELOCITY_PREVIOUS_BONE_MATRICES, ab as VELOCITY_PREVIOUS_INSTANCE_MATRICES, ac as VELOCITY_PREVIOUS_WORLD_MATRIX, ad as VelocityTracker, ae as counterDeviceOf, af as createPipelineCensus, ag as ensureVelocityOutput, ah as getPlatform, ai as isConsole, aj as isMobile, ak as isNative, al as isPs4, am as isTouchscreenAvailable, an as isWeb, ao as prewarm, ap as readRenderChainObservation, aq as readRenderChainReport, ar as readVelocityPreviousBoneMatrices, as as readVelocityPreviousMatrices, at as readVelocityPreviousWorldMatrix, au as resolveTargetFps, av as snapRefreshRate, aw as stageGpuReading, ax as velocityTexture, ay as withVelocityContext } from './renderer-BtOSseYf.js';
|
|
13
|
+
import { I as IComputeDriven$1, a as IGPUReadbackSample, d as IBudgetCandidate } from './model-lod-DPTzeCcD.js';
|
|
14
|
+
export { C as ComputeDrivenRegistry, D as DISCRETE_LOD_DEFAULT_ERROR_PIXELS, e as DISCRETE_LOD_DEFAULT_HYSTERESIS, G as GPUReadback, f as IGPUReadbackOptions, g as baseGeometryOf, i as isStreamedGeometry, l as lodChainOf, h as lodPixelScale, u as updateModelLods } from './model-lod-DPTzeCcD.js';
|
|
15
|
+
import { T as TracedReflections, G as GIVisualizeMode } from './quality-BADStsTn.js';
|
|
16
|
+
export { A as AutoExposureNode, C as ChainStage, E as EPIC_SSGI, F as FinalGatherMethod, a as GIVisualize, b as GI_VISUALIZE_MODES, I as IExposureSettings, c as IGIVisualizeOptions, d as IGiTier, e as IReflectionRoute, f as IShadowFilter, g as IShadowTier, h as ITracedHit, i as ITracedRay, j as ITracedReflectionsOptions, k as IWorldEnvironmentOptions, l as IWorldEnvironmentStageContext, m as IWorldEnvironmentTarget, O as OutputRenderer, Q as QualityTier, S as ScreenSpaceAA, n as SsgiQuality, o as TonemapMode, W as WorldEnvironment, p as exposureSettings, q as installFilmicToneMapping, r as qualityPreset, s as qualityTiers } from './quality-BADStsTn.js';
|
|
15
17
|
import { SkyMesh } from 'three/addons/objects/SkyMesh.js';
|
|
16
|
-
|
|
18
|
+
export { R as RendererToneMapping } from './default-tone-mapping-GgKPTiBP.js';
|
|
17
19
|
import { Node as Node$1, UniformNode as UniformNode$1 } from 'three/src/nodes/Nodes.js';
|
|
18
20
|
import 'zustand/vanilla';
|
|
21
|
+
import 'three/tsl';
|
|
19
22
|
|
|
20
|
-
/**
|
|
21
|
-
* Nested cost spans across the render phase, default-off.
|
|
22
|
-
*
|
|
23
|
-
* The frame budget names six phases and one of them — `render` — is 16.1 ms of a 20.2 ms frame
|
|
24
|
-
* while every engine-owned thing inside it sums to under 1.5 ms. A phase that big with nothing
|
|
25
|
-
* inside it is not a measurement, it is a question, and four ranked optimisation options were
|
|
26
|
-
* priced against four different answers to it. This is the instrument that answers it: a span tree
|
|
27
|
-
* whose leaves are the parts of the render phase, with the leftover computed rather than assumed.
|
|
28
|
-
*
|
|
29
|
-
* Three properties make it trustworthy enough to price work against:
|
|
30
|
-
*
|
|
31
|
-
* - **The residual is arithmetic, not a category.** Every non-leaf reports its own duration minus
|
|
32
|
-
* the durations of the spans it contains, so an unmeasured part shows up as a number instead of
|
|
33
|
-
* being quietly filed under "other". A child that outlives its parent reports a negative
|
|
34
|
-
* residual rather than being clamped to zero, because a negative residual means the nesting is
|
|
35
|
-
* wrong and a clamped one means nothing at all.
|
|
36
|
-
* - **It is default-off and costs one guarded return when off.** `TN_FRAME_SPANS=1` installs it;
|
|
37
|
-
* unset, every call site is `if (recorder === undefined) return;` with no clock read.
|
|
38
|
-
* - **Nothing here decides anything.** It measures the path that exists. It does not select a
|
|
39
|
-
* renderer, a traversal strategy or a pass order, and no number it produces is evidence for
|
|
40
|
-
* owning the renderer.
|
|
41
|
-
*
|
|
42
|
-
* The ids are integers on the hot path — a span call must not allocate a string to be cheap enough
|
|
43
|
-
* to put around a per-draw call — and the names exist only in the report.
|
|
44
|
-
*/
|
|
45
23
|
declare const SPANS_MARKER = "TN_FRAME_SPANS";
|
|
46
24
|
/**
|
|
47
25
|
* The launch flag that installs the spans. Off by default: this is a diagnostic that adds work to
|
|
@@ -201,6 +179,104 @@ declare function spansRequested(): boolean;
|
|
|
201
179
|
/** The window as the marker line prints it. */
|
|
202
180
|
declare function formatSpansWindow(window: ISpanWindow): string;
|
|
203
181
|
|
|
182
|
+
/**
|
|
183
|
+
* The per-frame world-matrix walk, with a hidden subtree left where it stands.
|
|
184
|
+
*
|
|
185
|
+
* `three`'s `Object3D.updateMatrixWorld` recurses into every child of every node whatever its
|
|
186
|
+
* `visible` flag, multiplying a world matrix for each. That is the correct default for a library
|
|
187
|
+
* that cannot know what a game is doing, and it is the wrong one for a renderer that is about to
|
|
188
|
+
* skip exactly those subtrees: a full-detail body while its merged stand-in draws, a hidden LOD
|
|
189
|
+
* level, a parked or hangared model each pay the walk and none of them can draw.
|
|
190
|
+
*
|
|
191
|
+
* Native flight in `sandbox/midway-open-pacific` profiled `updateMatrixWorld` plus
|
|
192
|
+
* `multiplyMatrices` at **29 % of all JavaScript ticks**, and the same scene's hand-rolled
|
|
193
|
+
* visible-only pass walked **779 nodes per frame instead of 9,903**, 3.1 ms down to 0.3 ms. That
|
|
194
|
+
* pass was the game's; this is the engine's, so the next game does not write it again.
|
|
195
|
+
*
|
|
196
|
+
* The pass mirrors three exactly for a visible node: `matrixAutoUpdate` -> `updateMatrix()`, then
|
|
197
|
+
* the `matrixWorldNeedsUpdate || force` recompute honouring `matrixWorldAutoUpdate` and a null
|
|
198
|
+
* parent, then force the children. A node with `visible === false` defers its own compose and its
|
|
199
|
+
* subtree's walk. Every skipped root is remembered, so the first frame it is visible again both
|
|
200
|
+
* its own world matrix and its descendants are recomputed with `force = true`.
|
|
201
|
+
*
|
|
202
|
+
* Two things are never dropped by the pruning, because both are read while nothing above them is
|
|
203
|
+
* visible:
|
|
204
|
+
*
|
|
205
|
+
* - a class that overrides `updateMatrixWorld` runs its own — never a `Scene`, which three does not
|
|
206
|
+
* override and whose method only differs when something patched the prototype. `SkinnedMesh`
|
|
207
|
+
* refreshes `bindMatrixInverse`, `Camera` its `matrixWorldInverse`; re-implementing only the base
|
|
208
|
+
* walk left every deck-crew sailor that had moved since load drawing with a stale bind matrix and
|
|
209
|
+
* vanishing from the frame. Their subtrees are small, so walking them whole costs nothing;
|
|
210
|
+
* - a hidden node that holds a `Bone` is walked, because a visible `SkinnedMesh` draws with its
|
|
211
|
+
* skeleton's matrices wherever the armature happens to sit. Whether bones sit below a node is
|
|
212
|
+
* decided once and remembered — a rig is built whole and does not grow.
|
|
213
|
+
*
|
|
214
|
+
* A third thing is dropped, and it is the walk's largest single share on a streamed world: a subtree
|
|
215
|
+
* frozen with `markStatic`. `markStatic` composes the subtree once and turns off the two flags that
|
|
216
|
+
* would recompose it, which until now still left three's unconditional recursion visiting every node
|
|
217
|
+
* under it every frame. A frozen root that carries no dirty flag is a leaf here, and it is one
|
|
218
|
+
* whether the walk was forced or not: `refreshStaticTransforms` re-arms a root whose own transform
|
|
219
|
+
* moved, `invalidateStatic` re-arms one something wrote inside, and both compose the subtree once at
|
|
220
|
+
* that moment. `isStatic` is what separates the engine's freeze from a game that turned the flags off
|
|
221
|
+
* for its own reasons. See `static-transform.ts`.
|
|
222
|
+
*
|
|
223
|
+
* Where the root is a native-engine object it has its own walk, `__tnUpdateMatrixWorld(force, prune)`: this
|
|
224
|
+
* pass run natively in one call, answering the nodes it visited. The pass calls that and nothing else, since the
|
|
225
|
+
* walk above costs a bridge call per node read and written (about 16 to 25 thousand a frame at 4,096 cubes).
|
|
226
|
+
* With `prune` (the `"visible"` mode) the native walk leaves a hidden subtree where it stands by the same rules,
|
|
227
|
+
* bones included; `"all"` visits every node. A JS subclass of `Object3D` that overrides `updateMatrixWorld` is not
|
|
228
|
+
* called from inside it; the engine's own `SkinnedMesh` and `Camera` keep their derived matrices. The web and the
|
|
229
|
+
* legacy host have no such method and walk as above.
|
|
230
|
+
*
|
|
231
|
+
* A game that reads a **hidden** object's `matrixWorld` directly must not rely on this pass
|
|
232
|
+
* having reached it: use `getWorldPosition`/`getWorldQuaternion`/`getWorldScale` (which update the
|
|
233
|
+
* chain they need) or call `object.updateWorldMatrix(true, false)` first. The convention's named
|
|
234
|
+
* override is `renderer.matrixWorld: "all"`, which visits every node exactly as three's own walk
|
|
235
|
+
* does; `"visible"` is the default.
|
|
236
|
+
*/
|
|
237
|
+
/** How much of the scene graph the engine walks for world matrices each frame. */
|
|
238
|
+
type MatrixWorldMode = "visible" | "all";
|
|
239
|
+
/** What the pass did on the last frame, for the frame telemetry a window reports. */
|
|
240
|
+
interface IMatrixWorldReport {
|
|
241
|
+
readonly schemaVersion: 1;
|
|
242
|
+
readonly mode: MatrixWorldMode;
|
|
243
|
+
/**
|
|
244
|
+
* Nodes the engine walked this frame, summed over every application (authored scene and a
|
|
245
|
+
* projection mirror when one is in use). One number both ways, so `"all"` can be read as the
|
|
246
|
+
* cost of the walk the convention just removed.
|
|
247
|
+
*/
|
|
248
|
+
readonly visited: number;
|
|
249
|
+
}
|
|
250
|
+
interface IMatrixWorldOptions {
|
|
251
|
+
/** `"visible"` (default) skips a hidden subtree; `"all"` reproduces three's own walk. */
|
|
252
|
+
readonly mode?: MatrixWorldMode;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* One game's world-matrix walk, holding the state the pruning needs between frames.
|
|
256
|
+
*
|
|
257
|
+
* The stale set and the bone cache live on the instance rather than in module scope: two games,
|
|
258
|
+
* two playtest scenarios or two roots in one process must not share "this subtree was skipped
|
|
259
|
+
* while hidden", or one game's hidden node would be force-refreshed by the other's frame.
|
|
260
|
+
*/
|
|
261
|
+
declare class MatrixWorldPass {
|
|
262
|
+
#private;
|
|
263
|
+
constructor(options?: IMatrixWorldOptions);
|
|
264
|
+
get mode(): MatrixWorldMode;
|
|
265
|
+
/** What the current frame has walked so far, across every {@link apply} call. */
|
|
266
|
+
get report(): IMatrixWorldReport;
|
|
267
|
+
/** Starts a frame's count. The pass's state (stale set, bone cache) is untouched. */
|
|
268
|
+
beginFrame(): void;
|
|
269
|
+
/**
|
|
270
|
+
* Walks `root`, mirroring three for every node the mode visits.
|
|
271
|
+
*
|
|
272
|
+
* Returns the nodes this call visited, so a caller can report one application's cost without
|
|
273
|
+
* also reporting the frame's total.
|
|
274
|
+
*/
|
|
275
|
+
apply(root: Object3D, force?: boolean): number;
|
|
276
|
+
/** Forgets what was skipped. A whole-scene swap has no hidden ancestors left to refresh. */
|
|
277
|
+
dispose(): void;
|
|
278
|
+
}
|
|
279
|
+
|
|
204
280
|
/** A stride measured at unit world scale, so uniformly scaled clones can share it. */
|
|
205
281
|
interface ISharedStride {
|
|
206
282
|
/** Metres of ground per clip-second at rate 1, per unit of uniform world scale. */
|
|
@@ -902,6 +978,40 @@ declare class SoftBody3D extends Mesh<BufferGeometry, NodeMaterial> implements I
|
|
|
902
978
|
detach(): void;
|
|
903
979
|
}
|
|
904
980
|
|
|
981
|
+
/** The CPU snapshot a GPUSceneBVH packs, in BVH leaf order, that the probe trace reads. */
|
|
982
|
+
interface IProbeTraceScene {
|
|
983
|
+
/** three-mesh-bvh serialized root: 8 words per node. */
|
|
984
|
+
readonly nodes: Uint32Array;
|
|
985
|
+
/** World positions, 4 floats per vertex. */
|
|
986
|
+
readonly positions: Float32Array;
|
|
987
|
+
/** Leaf-ordered triangle corners, 3 per triangle. */
|
|
988
|
+
readonly indices: Uint32Array;
|
|
989
|
+
/** Leaf-ordered material slot per triangle, an index into `materials`. */
|
|
990
|
+
readonly triangleMaterials: Uint32Array;
|
|
991
|
+
readonly materials: readonly Material[];
|
|
992
|
+
}
|
|
993
|
+
/** The sun and sky the game already holds for its daylight; the volume owns no light. */
|
|
994
|
+
interface IProbeTraceLighting {
|
|
995
|
+
/** World direction toward the sun (the light's position minus its target). */
|
|
996
|
+
readonly direction: Vector3;
|
|
997
|
+
readonly color: Color;
|
|
998
|
+
readonly intensity: number;
|
|
999
|
+
/** Radiance of a ray that leaves the scene. Black for an interior with no sky. */
|
|
1000
|
+
readonly sky: Color;
|
|
1001
|
+
/**
|
|
1002
|
+
* Point lights, at most the count the kernels were built for. Intensity is the irradiance on a surface 1 m
|
|
1003
|
+
* from the light that faces it, in the same units as the sun; `distance` closes the attenuation window
|
|
1004
|
+
* (three's `getDistanceAttenuation`), 0 for none. A change to a point light needs `requestBake`.
|
|
1005
|
+
*/
|
|
1006
|
+
readonly points?: readonly IProbeTracePoint[];
|
|
1007
|
+
}
|
|
1008
|
+
interface IProbeTracePoint {
|
|
1009
|
+
readonly position: Vector3;
|
|
1010
|
+
readonly color: Color;
|
|
1011
|
+
readonly intensity: number;
|
|
1012
|
+
readonly distance?: number;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
905
1015
|
/** Selects the meshes that become part of a GPU trace set. */
|
|
906
1016
|
interface IGPUSceneBVHOptions {
|
|
907
1017
|
readonly include?: (object: Mesh) => boolean;
|
|
@@ -931,12 +1041,20 @@ declare const rayStruct: StructTypeNode;
|
|
|
931
1041
|
*/
|
|
932
1042
|
declare class GPUSceneBVH extends Group implements IComputeDriven$1 {
|
|
933
1043
|
#private;
|
|
934
|
-
readonly indices: StorageBufferNode<"uvec3">;
|
|
935
|
-
readonly nodes: StorageBufferNode<"struct">;
|
|
936
|
-
readonly normals: StorageBufferNode<"vec3">;
|
|
937
|
-
readonly positions: StorageBufferNode<"vec3">;
|
|
938
1044
|
readonly warmupNodes: readonly unknown[];
|
|
939
1045
|
constructor(scene: Object3D, options?: IGPUSceneBVHOptions);
|
|
1046
|
+
/** Packed triangle indices as a storage node, built on first read. */
|
|
1047
|
+
get indices(): StorageBufferNode<"uvec3">;
|
|
1048
|
+
/** Packed vertex normals as a storage node, built on first read. */
|
|
1049
|
+
get normals(): StorageBufferNode<"vec3">;
|
|
1050
|
+
/** Packed world-space vertex positions as a storage node, built on first read. */
|
|
1051
|
+
get positions(): StorageBufferNode<"vec3">;
|
|
1052
|
+
/** The upstream TSL query's node table, built on first read. */
|
|
1053
|
+
get nodes(): StorageBufferNode<"struct">;
|
|
1054
|
+
/** The CPU snapshot in leaf order, with one material slot per triangle: what `RadianceCache` traces. */
|
|
1055
|
+
get traceScene(): IProbeTraceScene;
|
|
1056
|
+
/** Increments on every rebuild, so a consumer of `traceScene` knows to re-upload. */
|
|
1057
|
+
get version(): number;
|
|
940
1058
|
get buildMs(): number;
|
|
941
1059
|
get materialGroups(): readonly IGPUSceneBVHMaterialGroup[];
|
|
942
1060
|
get objectCount(): number;
|
|
@@ -951,138 +1069,174 @@ declare class GPUSceneBVH extends Group implements IComputeDriven$1 {
|
|
|
951
1069
|
detach(): void;
|
|
952
1070
|
}
|
|
953
1071
|
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
readonly
|
|
960
|
-
readonly
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
readonly
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
readonly materials: readonly Material[];
|
|
967
|
-
readonly nodes: DataTexture;
|
|
968
|
-
readonly triangles: DataTexture;
|
|
969
|
-
readonly materialTable: DataTexture;
|
|
970
|
-
readonly nodeData: Float32Array;
|
|
971
|
-
readonly triangleData: Float32Array;
|
|
972
|
-
readonly materialData: Float32Array;
|
|
973
|
-
dispose(): void;
|
|
1072
|
+
/** The gather's pass groups, in the order they draw (the engine's own, `three-native/src/addons/screen-space.ts`). */
|
|
1073
|
+
declare const SCREEN_PROBE_PASSES: readonly ["trace", "filter", "gather"];
|
|
1074
|
+
type ScreenProbePass = (typeof SCREEN_PROBE_PASSES)[number];
|
|
1075
|
+
/** The camera the scene pass draws with: a projection to map the screen, and a world matrix to leave it. */
|
|
1076
|
+
interface IScreenProbeCamera {
|
|
1077
|
+
readonly near: number;
|
|
1078
|
+
readonly projectionMatrix: {
|
|
1079
|
+
readonly elements: readonly number[];
|
|
1080
|
+
};
|
|
1081
|
+
readonly matrixWorld: {
|
|
1082
|
+
readonly elements: readonly number[];
|
|
1083
|
+
};
|
|
974
1084
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1085
|
+
interface IScreenProbeGatherOptions {
|
|
1086
|
+
/** The camera the scene pass draws with. */
|
|
1087
|
+
readonly camera: IScreenProbeCamera;
|
|
1088
|
+
/** The drawing buffer, in pixels. It fixes the probe grid; a resize needs a new gather. */
|
|
1089
|
+
readonly viewport: {
|
|
1090
|
+
readonly width: number;
|
|
1091
|
+
readonly height: number;
|
|
1092
|
+
};
|
|
1093
|
+
/** Pixels between probes: Unreal's `DownsampleFactor`, 16 at Epic and 32 at High. */
|
|
1094
|
+
readonly downsampleFactor?: number;
|
|
1095
|
+
/** Rays on a side of each probe's octahedron: Unreal's `TracingOctahedronResolution`, 8 at Epic. */
|
|
1096
|
+
readonly tracingOctahedronResolution?: number;
|
|
983
1097
|
/**
|
|
984
|
-
*
|
|
985
|
-
*
|
|
1098
|
+
* The tier below the screen along a ray that hits, in view space, exactly as the engine asks it: the light the radiance
|
|
1099
|
+
* cache would have returned along that ray, which the gather subtracts so the two tiers never add the same light twice.
|
|
1100
|
+
* A game with its own tier passes it here; without either tier a hit keeps the frame's own light, as three's SSGINode.
|
|
986
1101
|
*/
|
|
987
|
-
readonly
|
|
988
|
-
/** The share of diffuse GI rises from 0 to 1 over this much roughness, ending at the limit above: 0.2. */
|
|
989
|
-
readonly roughSpecularFadeLength?: number;
|
|
1102
|
+
readonly fallback?: (position: Node<"vec3">, direction: Node<"vec3">, normal: Node<"vec3">) => Node<"vec3">;
|
|
990
1103
|
/**
|
|
991
|
-
*
|
|
992
|
-
*
|
|
993
|
-
*
|
|
1104
|
+
* The radiance cache in world space, in the frame's units: the light arriving along a direction at a point. It answers
|
|
1105
|
+
* the tier past the screen, where a ray that leaves it reads the cache. With no `fallback`, it also answers the tier
|
|
1106
|
+
* below along each ray. Unreal reads its cache per ray direction the same way (UE 5.8.3:
|
|
1107
|
+
* Engine/Shaders/Private/Lumen/LumenScreenProbeTracing.usf, SampleRadianceCacheAndApply).
|
|
994
1108
|
*/
|
|
995
|
-
readonly
|
|
996
|
-
/**
|
|
1109
|
+
readonly radiance?: (position: Node<"vec3">, direction: Node<"vec3">) => Node<"vec3">;
|
|
1110
|
+
/**
|
|
1111
|
+
* The packed scene a ray that leaves the screen walks before it reads `radiance`: Unreal continues the ray in the
|
|
1112
|
+
* distance field up to the cache's coverage and reads the cache where it ended, so a miss is a direction's radiance
|
|
1113
|
+
* and not the pixel's mean over the hemisphere. Without it there is no walk and no miss tier.
|
|
1114
|
+
*/
|
|
1115
|
+
readonly trace?: Pick<TracedReflections, "trace">;
|
|
1116
|
+
/** Metres a ray that left the screen walks the packed scene before it reads `radiance`. 1: the cache's cell. */
|
|
1117
|
+
readonly cacheCellSize?: number;
|
|
1118
|
+
/**
|
|
1119
|
+
* Diagnosis: label only this pass group as the `SSGI` GPU stage, so `info.engine.gpuStages.SSGI` times it alone.
|
|
1120
|
+
* Omit to label every pass; `null` labels none (another stage is being timed).
|
|
1121
|
+
*/
|
|
1122
|
+
readonly timedPass?: ScreenProbePass | null;
|
|
1123
|
+
/** False silences the `TN_SCREEN_PROBE_GATHER` line, not the report. */
|
|
997
1124
|
readonly marker?: boolean;
|
|
998
1125
|
}
|
|
999
|
-
/**
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
readonly
|
|
1005
|
-
|
|
1006
|
-
readonly
|
|
1007
|
-
|
|
1008
|
-
/**
|
|
1009
|
-
|
|
1010
|
-
/** 1 where the ray found a surface, else 0. */
|
|
1011
|
-
readonly hit: Node<"float">;
|
|
1012
|
-
/** Metres along the (unit) ray, or -1 on a miss. */
|
|
1013
|
-
readonly distance: Node<"float">;
|
|
1014
|
-
readonly position: Node<"vec3">;
|
|
1015
|
-
/** The interpolated vertex normal, flipped to face the ray. */
|
|
1016
|
-
readonly normal: Node<"vec3">;
|
|
1017
|
-
/** The hit triangle's index in the pack's leaf order. */
|
|
1018
|
-
readonly triangle: Node<"float">;
|
|
1019
|
-
/** The hit material's colour, roughness, emissive (times intensity) and metalness, from the pack's table. */
|
|
1020
|
-
readonly albedo: Node<"vec3">;
|
|
1021
|
-
readonly roughness: Node<"float">;
|
|
1022
|
-
readonly emissive: Node<"vec3">;
|
|
1023
|
-
readonly metalness: Node<"float">;
|
|
1024
|
-
/** The index into `TracedReflections.scene.materials`: a game that needs a map or a node looks the material up. */
|
|
1025
|
-
readonly material: Node<"float">;
|
|
1026
|
-
}
|
|
1027
|
-
interface ITracedRay {
|
|
1028
|
-
readonly origin: Node<"vec3">;
|
|
1029
|
-
/** Unit length. */
|
|
1030
|
-
readonly direction: Node<"vec3">;
|
|
1031
|
-
/** Closest hit allowed, in metres. Default 0.001. */
|
|
1032
|
-
readonly near?: Node<"float"> | number;
|
|
1033
|
-
/** Farthest hit allowed, in metres. Default 1e4. */
|
|
1034
|
-
readonly far?: Node<"float"> | number;
|
|
1035
|
-
/**
|
|
1036
|
-
* Stop at the first surface found, which need not be the nearest: the answer for a shadow ray, which only asks
|
|
1037
|
-
* whether anything is in the way. `distance`, `position` and the material then describe that surface.
|
|
1038
|
-
*/
|
|
1039
|
-
readonly anyHit?: boolean;
|
|
1126
|
+
/** What the gather placed, printed once and readable by a tool: Unreal's grid, in pixels and probes. */
|
|
1127
|
+
interface IScreenProbeGatherReport {
|
|
1128
|
+
readonly downsampleFactor: number;
|
|
1129
|
+
readonly tracingOctahedronResolution: number;
|
|
1130
|
+
readonly viewportWidth: number;
|
|
1131
|
+
readonly viewportHeight: number;
|
|
1132
|
+
/** Probes over the whole grid: one per tile, the last row and column rounded up. */
|
|
1133
|
+
readonly probes: number;
|
|
1134
|
+
readonly raysPerProbe: number;
|
|
1135
|
+
/** Whether a ray that leaves the screen walks the scene, or reads the cache at its cell with none. */
|
|
1136
|
+
readonly worldTrace: boolean;
|
|
1040
1137
|
}
|
|
1041
1138
|
/**
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1139
|
+
* Lumen's Screen Probe Gather (PRD-640): one probe per `downsampleFactor` pixel tile traces an octahedron of rays
|
|
1140
|
+
* instead of every pixel tracing its own, the probes' radiance is filtered into an irradiance octahedron each, and a
|
|
1141
|
+
* pixel blends the four nearest probes it can see. The engine owns the three passes
|
|
1142
|
+
* (`three-native/src/addons/screen-space.ts`); this composes the tier below them, which every game repeats:
|
|
1143
|
+
*
|
|
1144
|
+
* a ray that hits on screen returns the lit frame minus the cache along it (`fallback`), so the two never add the
|
|
1145
|
+
* same light twice;
|
|
1146
|
+
* a ray that leaves the screen continues through the packed scene (`trace`) up to `cacheCellSize` and reads the
|
|
1147
|
+
* radiance cache where it ended (`miss`), so the light it brings is that direction's, not the pixel's mean.
|
|
1044
1148
|
*
|
|
1045
|
-
*
|
|
1046
|
-
*
|
|
1047
|
-
*
|
|
1048
|
-
*
|
|
1149
|
+
* The result is the incident radiance the traces add to what the game's composite already holds, E / pi units: multiply
|
|
1150
|
+
* it by the receiver's albedo (`mrt({ diffuseColor })`) and add it after the scene pass.
|
|
1151
|
+
*
|
|
1152
|
+
* The owned engine only: on `engine: "threejs"` the upstream node takes the camera as its fourth argument and has no
|
|
1153
|
+
* probes, which `gather()` refuses rather than drawing a frame with no bounce light.
|
|
1049
1154
|
*/
|
|
1050
|
-
declare class
|
|
1155
|
+
declare class ScreenProbeGather {
|
|
1051
1156
|
#private;
|
|
1052
|
-
|
|
1053
|
-
readonly
|
|
1054
|
-
readonly
|
|
1055
|
-
readonly
|
|
1056
|
-
|
|
1057
|
-
readonly roughSpecularFadeLength: number;
|
|
1058
|
-
readonly maxSteps: number;
|
|
1059
|
-
constructor(root: Object3D, options?: ITracedReflectionsOptions);
|
|
1060
|
-
get report(): ITraceSceneReport & {
|
|
1061
|
-
readonly bytes: number;
|
|
1062
|
-
};
|
|
1063
|
-
/**
|
|
1064
|
-
* 1 for a surface at least as smooth as the cut-off minus the fade, falling to 0 at `maxRoughnessToTrace`.
|
|
1065
|
-
* Multiply a traced reflection by it so a rough surface never shows a trace's noise.
|
|
1066
|
-
*/
|
|
1067
|
-
weight(roughness: Node<"float">): Node<"float">;
|
|
1068
|
-
/** `weight` for one roughness on the CPU: a surface rougher than `maxRoughnessToTrace` casts no ray. */
|
|
1069
|
-
weightAt(roughness: number): number;
|
|
1157
|
+
readonly report: IScreenProbeGatherReport;
|
|
1158
|
+
readonly downsampleFactor: number;
|
|
1159
|
+
readonly tracingOctahedronResolution: number;
|
|
1160
|
+
readonly cacheCellSize: number;
|
|
1161
|
+
constructor(options: IScreenProbeGatherOptions);
|
|
1070
1162
|
/**
|
|
1071
|
-
*
|
|
1072
|
-
*
|
|
1073
|
-
* the diffuse GI). The ray's share is `weight`; of the rest, the diffuse share rises from 0 at the limit minus the
|
|
1074
|
-
* fade to 1 at the limit, and the radiance cache answers for what is left.
|
|
1163
|
+
* The gather itself: `ssgi(base, depth, normal, { camera, probes, fallback, miss })`, with `base` the lit frame the
|
|
1164
|
+
* traces read and the depth and normal of the scene pass. `getGINode()` and `getAONode()` read what it built.
|
|
1075
1165
|
*/
|
|
1076
|
-
|
|
1077
|
-
/**
|
|
1078
|
-
|
|
1166
|
+
gather(colorNode: Node, depthNode: Node, normalNode: Node): Node<"vec4">;
|
|
1167
|
+
/** The gather's radiance, E / pi: multiply by the receiver's albedo and add it after the scene pass. */
|
|
1168
|
+
getGINode(): Node<"vec4">;
|
|
1169
|
+
/** The share of the gather's rays that found nothing, as the occlusion the caller applies to the lit frame. */
|
|
1170
|
+
getAONode(): Node<"vec4">;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/** The scene camera the pass reads: a projection to map the screen and a depth to come back to view space. */
|
|
1174
|
+
interface IShortRangeAOCamera {
|
|
1175
|
+
readonly projectionMatrix: {
|
|
1176
|
+
readonly elements: readonly number[];
|
|
1177
|
+
};
|
|
1178
|
+
}
|
|
1179
|
+
interface IShortRangeAOOptions {
|
|
1180
|
+
/** The camera the scene pass drew with: a post quad's own camera nodes are the quad's, not the scene's. */
|
|
1181
|
+
readonly camera: IShortRangeAOCamera;
|
|
1182
|
+
/** The drawing buffer, in pixels. The search's reach is a distance on the screen, so it needs the size. */
|
|
1183
|
+
readonly viewport: {
|
|
1184
|
+
readonly width: number;
|
|
1185
|
+
readonly height: number;
|
|
1186
|
+
};
|
|
1187
|
+
/** Sweeps around the view normal (`horizonSearchSliceCount`): 2, Unreal's Epic setting. */
|
|
1188
|
+
readonly horizonSearchSliceCount?: number;
|
|
1189
|
+
/** Samples per sweep (`horizonSearchStepCount`): 3, Unreal's Epic setting. */
|
|
1190
|
+
readonly horizonSearchStepCount?: number;
|
|
1191
|
+
/** The reach in pixels of the drawing buffer: 32, twice Unreal's 16 px screen probe downsample. */
|
|
1192
|
+
readonly reachPx?: number;
|
|
1193
|
+
/**
|
|
1194
|
+
* Whether the pass also answers the bent normal (`.rgb`), Unreal's Epic-only setting. The occlusion alone is
|
|
1195
|
+
* `.a`, so a composite that does not read a bent normal pays one channel, not a second pass.
|
|
1196
|
+
*/
|
|
1197
|
+
readonly bentNormal?: boolean;
|
|
1198
|
+
/** How strongly the occlusion applies: 1 keeps the horizon's own answer. */
|
|
1199
|
+
readonly intensity?: number;
|
|
1200
|
+
/** False silences the `TN_SHORT_RANGE_AO` line, not the report. */
|
|
1201
|
+
readonly marker?: boolean;
|
|
1202
|
+
}
|
|
1203
|
+
/** What the pass swept, printed once and readable by a tool. */
|
|
1204
|
+
interface IShortRangeAOReport {
|
|
1205
|
+
readonly horizonSearchSliceCount: number;
|
|
1206
|
+
readonly horizonSearchStepCount: number;
|
|
1207
|
+
readonly reachPx: number;
|
|
1208
|
+
/** Samples each pixel's normal hemisphere took: slices x steps. */
|
|
1209
|
+
readonly samplesPerPixel: number;
|
|
1210
|
+
readonly bentNormal: boolean;
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Unreal's Short Range AO (PRD-640 Phase 3): a horizon search of `horizonSearchSliceCount` sweeps around the view
|
|
1214
|
+
* normal, `horizonSearchStepCount` samples each at the squared fraction of a screen-space reach, at full resolution,
|
|
1215
|
+
* with a bent normal at Epic. It is the AO that runs *with* dynamic GI: the contact detail Lumen keeps after the screen
|
|
1216
|
+
* probe gather has already answered the wide occlusion, so the frame is not darkened twice by two wide treatments
|
|
1217
|
+
* (UE 5.8.3: Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenSpaceBentNormal.cpp and
|
|
1218
|
+
* Engine/Shaders/Private/Lumen/LumenScreenSpaceBentNormal.usf). GTAO through `ambientOcclusion` stays the AO of the
|
|
1219
|
+
* tiers without dynamic GI.
|
|
1220
|
+
*
|
|
1221
|
+
* The result is one texture: `rgb` the bent normal in view space (the space the normal target and the GI gather work
|
|
1222
|
+
* in), `a` the share of the hemisphere left open, which multiplies *indirect* light only — direct light and emission
|
|
1223
|
+
* keep their own occlusion, as Unreal's `DiffuseIndirectComposite` applies it. Multi-bounce and the albedo cap belong
|
|
1224
|
+
* to the game's composite, because they decide how a surface looks.
|
|
1225
|
+
*/
|
|
1226
|
+
declare class ShortRangeAO {
|
|
1227
|
+
#private;
|
|
1228
|
+
readonly report: IShortRangeAOReport;
|
|
1229
|
+
readonly horizonSearchSliceCount: number;
|
|
1230
|
+
readonly horizonSearchStepCount: number;
|
|
1231
|
+
readonly reachPx: number;
|
|
1232
|
+
readonly bentNormal: boolean;
|
|
1233
|
+
readonly intensity: number;
|
|
1234
|
+
constructor(options: IShortRangeAOOptions);
|
|
1079
1235
|
/**
|
|
1080
|
-
* The
|
|
1081
|
-
*
|
|
1082
|
-
* inner node steps to its left child, a leaf tests its triangles in a loop.
|
|
1236
|
+
* The occlusion of one frame: `rgb` the bent normal in view space, `a` the share of the hemisphere left open. `depth`
|
|
1237
|
+
* is the scene pass's depth target and `normal` its view-space normal target.
|
|
1083
1238
|
*/
|
|
1084
|
-
|
|
1085
|
-
dispose(): void;
|
|
1239
|
+
occlusion(depthNode: TextureNode, normalNode: TextureNode): Node<"vec4">;
|
|
1086
1240
|
}
|
|
1087
1241
|
|
|
1088
1242
|
interface IInstancedLodOptions {
|
|
@@ -1304,18 +1458,10 @@ declare function mergeParts(parts: Iterable<IMergePart>, options: IMergePartsOpt
|
|
|
1304
1458
|
*/
|
|
1305
1459
|
declare function mergeByMaterial(root: Object3D, options: IMergeByMaterialOptions): Mesh[];
|
|
1306
1460
|
|
|
1307
|
-
/**
|
|
1308
|
-
* A debug switch a game reads the same way on every platform it ships to.
|
|
1309
|
-
*
|
|
1310
|
-
* Two questions an agent answers differently in every game, both of which cost a rewrite: how do I
|
|
1311
|
-
* turn this on for one run without changing the code, and how does a capture script reach the object
|
|
1312
|
-
* it wants to look at. The answers here are one function each, and neither decides how anything
|
|
1313
|
-
* looks.
|
|
1314
|
-
*/
|
|
1315
1461
|
/**
|
|
1316
1462
|
* A debug switch read from the URL, or from the environment on a native launch.
|
|
1317
1463
|
*
|
|
1318
|
-
* @situation read a debug toggle from the URL
|
|
1464
|
+
* @situation read a debug toggle from the URL, an environment variable or a harness global
|
|
1319
1465
|
*
|
|
1320
1466
|
* A browser asks with the query string — `?freeCam`, or `?freeCam=0` to force it off — and a native
|
|
1321
1467
|
* launch asks with `TN_DEBUG_FREE_CAM`, because a query string is not something a developer sets on
|
|
@@ -1323,6 +1469,19 @@ declare function mergeByMaterial(root: Object3D, options: IMergeByMaterialOption
|
|
|
1323
1469
|
* "off" rather than quietly turning it back on.
|
|
1324
1470
|
*/
|
|
1325
1471
|
declare function debugFlag(name: string): boolean;
|
|
1472
|
+
/**
|
|
1473
|
+
* The text this launch gave a debug switch, or `undefined` when no seam named it.
|
|
1474
|
+
*
|
|
1475
|
+
* `debugFlag`'s non-boolean sibling: the same naming rule — `?name` on the web, `TN_DEBUG_NAME` on
|
|
1476
|
+
* a native launch — for a switch whose value is a word rather than a yes or no, such as a quality
|
|
1477
|
+
* tier or a mode. An empty string means a seam named the switch and gave no value.
|
|
1478
|
+
*
|
|
1479
|
+
* @situation read a debug override whose value is not a boolean
|
|
1480
|
+
* @situation override a quality tier or a mode for one run without changing the code
|
|
1481
|
+
* @constraint a name in camelCase becomes UPPER_SNAKE: `debugValue("quality")` reads `?quality=` or `TN_DEBUG_QUALITY`
|
|
1482
|
+
* @example const tier = debugValue("quality");
|
|
1483
|
+
*/
|
|
1484
|
+
declare function debugValue(name: string): string | undefined;
|
|
1326
1485
|
/**
|
|
1327
1486
|
* Publish one game object for a capture script or the console, in development builds only.
|
|
1328
1487
|
*
|
|
@@ -1335,6 +1494,40 @@ declare function debugFlag(name: string): boolean;
|
|
|
1335
1494
|
*/
|
|
1336
1495
|
declare function exposeDebug(name: string, value: unknown): void;
|
|
1337
1496
|
|
|
1497
|
+
/**
|
|
1498
|
+
* The one owner of `__THREENATIVE__`, the object every dev surface publishes under.
|
|
1499
|
+
*
|
|
1500
|
+
* Five places used to spell the key itself — the debug flag, hot reload, the game's dev tools, the
|
|
1501
|
+
* UI overlay and the engine's export — so the global's name and its shape were written twice at
|
|
1502
|
+
* least. The worker keeps its own mirror list: that list is a typed tuple its mirror machinery is
|
|
1503
|
+
* built from, and moving it here changed what the worker host forwarded.
|
|
1504
|
+
*
|
|
1505
|
+
* Nothing here decides how anything looks: it is the seam a capture script, the console and the dev
|
|
1506
|
+
* overlay reach the running game through.
|
|
1507
|
+
*/
|
|
1508
|
+
/** The property name a dev surface publishes under, on the window and on a worker's global. */
|
|
1509
|
+
declare const DEV_GLOBAL_KEY = "__THREENATIVE__";
|
|
1510
|
+
/** What the game's own dev tools publish: a snapshot, and an armed geometry capture. */
|
|
1511
|
+
interface IDevTools {
|
|
1512
|
+
snapshot(): EntitySnapshot;
|
|
1513
|
+
/**
|
|
1514
|
+
* Arms one per-object geometry capture for a development overlay. Absent until the game has a
|
|
1515
|
+
* render loop; the overlay treats that as "not ready", never as an empty scene.
|
|
1516
|
+
*/
|
|
1517
|
+
geometry?(request?: IGeometryCaptureRequest): Promise<IGeometryCaptureReport>;
|
|
1518
|
+
}
|
|
1519
|
+
/** What a dev surface may publish under {@link DEV_GLOBAL_KEY}. */
|
|
1520
|
+
type DevGlobal = Partial<IDevTools> & Record<string, unknown>;
|
|
1521
|
+
/**
|
|
1522
|
+
* The global a host installed, or `undefined` outside a dev launch.
|
|
1523
|
+
*
|
|
1524
|
+
* `scope` is required on purpose: a default of `globalThis` would make an explicit `undefined` read
|
|
1525
|
+
* the page's global, which is exactly the worker case a caller is asking about.
|
|
1526
|
+
*/
|
|
1527
|
+
declare function devGlobal(scope: unknown): DevGlobal | undefined;
|
|
1528
|
+
/** Adds one member to the global, keeping whatever another surface already published. */
|
|
1529
|
+
declare function publishDevGlobal(name: string, value: unknown, scope: unknown): void;
|
|
1530
|
+
|
|
1338
1531
|
/**
|
|
1339
1532
|
* A mesh that draws only the clusters this camera can resolve.
|
|
1340
1533
|
*
|
|
@@ -1351,12 +1544,26 @@ declare function exposeDebug(name: string, value: unknown): void;
|
|
|
1351
1544
|
*/
|
|
1352
1545
|
/** The baked payload, exactly as `TN_virtual_geometry` stores it. */
|
|
1353
1546
|
interface IClusterTable {
|
|
1354
|
-
/**
|
|
1547
|
+
/**
|
|
1548
|
+
* Per cluster, `[centreX, centreY, centreZ, radius]`, in the mesh's own space.
|
|
1549
|
+
*
|
|
1550
|
+
* "The mesh's own space" is the one its `POSITION` attribute is in, which is why the asset pass
|
|
1551
|
+
* never quantizes a primitive that carries this table: quantization keeps the drawn positions but
|
|
1552
|
+
* moves the space out from under them, and every sphere below is tested against a transform.
|
|
1553
|
+
*/
|
|
1355
1554
|
readonly bounds: Float32Array;
|
|
1356
|
-
/** Per cluster, `[axisX, axisY, axisZ, cutoff]`. */
|
|
1555
|
+
/** Per cluster, `[axisX, axisY, axisZ, cutoff]`. Read into a field nothing uses yet. */
|
|
1357
1556
|
readonly cones: Float32Array;
|
|
1358
1557
|
/** Per cluster, `[ownError, parentError]`, in the mesh's own units. */
|
|
1359
1558
|
readonly errors: Float32Array;
|
|
1559
|
+
/**
|
|
1560
|
+
* Per cluster, `[group, sourceGroup]`, or absent on a table built by hand.
|
|
1561
|
+
*
|
|
1562
|
+
* `group` is the group that folded this cluster one level up (`NO_GROUP` when nothing above
|
|
1563
|
+
* replaces it), and `sourceGroup` is the group whose simplification produced it. Inverting `group`
|
|
1564
|
+
* gives the children of every group, which is the descent a view-pruned cut walks.
|
|
1565
|
+
*/
|
|
1566
|
+
readonly groups?: Uint32Array;
|
|
1360
1567
|
/** Cluster-ordered triangles for every level, indexing the geometry's vertex buffer. */
|
|
1361
1568
|
readonly indices: Uint32Array;
|
|
1362
1569
|
/** Per cluster, the sphere `parentError` is projected through. */
|
|
@@ -1384,6 +1591,24 @@ interface IClusteredMeshOptions {
|
|
|
1384
1591
|
* radius.
|
|
1385
1592
|
*/
|
|
1386
1593
|
readonly recutDistance?: number;
|
|
1594
|
+
/**
|
|
1595
|
+
* Whether clusters the camera cannot see are skipped.
|
|
1596
|
+
*
|
|
1597
|
+
* On by default, because a cluster behind the camera is a cluster nobody can resolve. A mesh that
|
|
1598
|
+
* casts shadows keeps the unpruned cut until shadows have a cut of their own, and a game that
|
|
1599
|
+
* renders the mesh through a second camera (a mirror, a portal) can turn it off; either way the
|
|
1600
|
+
* mesh reports what it did through {@link ClusteredMesh.viewCullReport}.
|
|
1601
|
+
*/
|
|
1602
|
+
readonly viewCull?: boolean;
|
|
1603
|
+
/**
|
|
1604
|
+
* How far the camera may turn, in radians, before the cut is taken again.
|
|
1605
|
+
*
|
|
1606
|
+
* A cut pruned by the view is only valid for the view it was taken with, so the frustum it was
|
|
1607
|
+
* pruned by is widened by this angle and the cut is kept until the camera turns past it. It is the
|
|
1608
|
+
* one constant this technique needs: too small re-cuts on every nudge, too large draws a sliver of
|
|
1609
|
+
* clusters that turning would reveal. Default {@link DEFAULT_VIEW_MARGIN}.
|
|
1610
|
+
*/
|
|
1611
|
+
readonly viewMargin?: number;
|
|
1387
1612
|
}
|
|
1388
1613
|
declare class ClusteredMesh extends Mesh {
|
|
1389
1614
|
#private;
|
|
@@ -1393,6 +1618,13 @@ declare class ClusteredMesh extends Mesh {
|
|
|
1393
1618
|
errorPixels: number;
|
|
1394
1619
|
/** Camera movement, in the mesh's own units, below which the previous cut is kept. */
|
|
1395
1620
|
recutDistance: number;
|
|
1621
|
+
/**
|
|
1622
|
+
* Whether the cut skips clusters the camera cannot see. Writable — a mesh drawn through a second
|
|
1623
|
+
* camera can turn it off, and {@link ClusteredMesh.viewCullReport} says what happened either way.
|
|
1624
|
+
*/
|
|
1625
|
+
viewCull: boolean;
|
|
1626
|
+
/** Camera turn, in radians, the kept cut stays valid for. Writable. */
|
|
1627
|
+
viewMargin: number;
|
|
1396
1628
|
constructor(geometry: BufferGeometry, surface: Material | Material[], table: IClusterTable, options?: IClusteredMeshOptions);
|
|
1397
1629
|
/**
|
|
1398
1630
|
* A second mesh over the same body, cut for its own place in the scene.
|
|
@@ -1417,6 +1649,39 @@ declare class ClusteredMesh extends Mesh {
|
|
|
1417
1649
|
get drawnClusters(): number;
|
|
1418
1650
|
/** Triangles the current cut submits. */
|
|
1419
1651
|
get drawnTriangles(): number;
|
|
1652
|
+
/**
|
|
1653
|
+
* Triangles in the current cut whose cluster bounds lie wholly outside the view volume.
|
|
1654
|
+
*
|
|
1655
|
+
* A measurement, not a cull: PRD-600 records this number before and after the walk learns to skip
|
|
1656
|
+
* what the view does not hold. It is taken when the cut is taken, so a still camera reads the
|
|
1657
|
+
* number its standing cut was made with.
|
|
1658
|
+
*/
|
|
1659
|
+
get drawnTrianglesOutsideView(): number;
|
|
1660
|
+
/** Clusters in the current cut whose bounds lie wholly outside the view volume. */
|
|
1661
|
+
get drawnClustersOutsideView(): number;
|
|
1662
|
+
/**
|
|
1663
|
+
* Milliseconds the last re-cut took, from choosing the cut to the index buffer being marked for
|
|
1664
|
+
* upload.
|
|
1665
|
+
*
|
|
1666
|
+
* The whole re-cut, because that is the cost a game pays for turning the camera and the number
|
|
1667
|
+
* `viewMargin` is chosen against. The bytes below are only the compact's copy, so the throughput
|
|
1668
|
+
* this divides out is the pessimistic one.
|
|
1669
|
+
*/
|
|
1670
|
+
get recutMs(): number;
|
|
1671
|
+
/** Index bytes the last re-cut copied and uploaded. */
|
|
1672
|
+
get recutBytes(): number;
|
|
1673
|
+
/** Throughput of the last re-cut's copy of the cut, in megabytes per second. */
|
|
1674
|
+
get recutMegabytesPerSecond(): number;
|
|
1675
|
+
/** How many re-cuts this mesh has taken, so a reader can tell a fresh one from a stale reading. */
|
|
1676
|
+
get recutCount(): number;
|
|
1677
|
+
/**
|
|
1678
|
+
* What this mesh does about clusters outside the view, and why.
|
|
1679
|
+
*
|
|
1680
|
+
* `"on"` when the cut is pruned, and a reason when it is not — a mesh that silently kept drawing
|
|
1681
|
+
* what nobody can see would be a performance bug with no symptom, and one that silently dropped
|
|
1682
|
+
* what a second camera can see would be a hole with no cause.
|
|
1683
|
+
*/
|
|
1684
|
+
get viewCullReport(): string;
|
|
1420
1685
|
/**
|
|
1421
1686
|
* Chooses this frame's cut and compacts it into one index range.
|
|
1422
1687
|
*
|
|
@@ -1486,6 +1751,16 @@ interface IClusteredBatchOptions {
|
|
|
1486
1751
|
readonly distanceRatio?: number;
|
|
1487
1752
|
/** Screen-space error budget in pixels, as {@link ClusteredMesh}. Default 1. */
|
|
1488
1753
|
readonly errorPixels?: number;
|
|
1754
|
+
/**
|
|
1755
|
+
* Whether copies the camera cannot see are skipped.
|
|
1756
|
+
*
|
|
1757
|
+
* On by default. A batch that casts shadows keeps every copy regardless — a copy out of the main
|
|
1758
|
+
* view can still cast into it — until shadows have a cut of their own. The batch reports what it
|
|
1759
|
+
* did through {@link ClusteredBatch.viewCullReport}.
|
|
1760
|
+
*/
|
|
1761
|
+
readonly viewCull?: boolean;
|
|
1762
|
+
/** How far the camera may turn, in radians, before the bands are taken again. Default two degrees. */
|
|
1763
|
+
readonly viewMargin?: number;
|
|
1489
1764
|
/** The shape every copy draws, carrying the baked cluster table. */
|
|
1490
1765
|
readonly geometry: BufferGeometry;
|
|
1491
1766
|
/** The surface every copy draws with, supplied by the game and used by reference. */
|
|
@@ -1501,6 +1776,13 @@ interface IClusteredBatchBuildOptions {
|
|
|
1501
1776
|
}
|
|
1502
1777
|
declare class ClusteredBatch {
|
|
1503
1778
|
#private;
|
|
1779
|
+
/** Radians the camera may turn before the bands are taken again. */
|
|
1780
|
+
readonly viewMargin: number;
|
|
1781
|
+
/**
|
|
1782
|
+
* Whether copies the camera cannot see are skipped. Writable; the batch reports what it did
|
|
1783
|
+
* through {@link ClusteredBatch.viewCullReport}.
|
|
1784
|
+
*/
|
|
1785
|
+
viewCull: boolean;
|
|
1504
1786
|
constructor(options: IClusteredBatchOptions);
|
|
1505
1787
|
/** How many copies are placed. */
|
|
1506
1788
|
get count(): number;
|
|
@@ -1508,6 +1790,22 @@ declare class ClusteredBatch {
|
|
|
1508
1790
|
get drawCalls(): number;
|
|
1509
1791
|
/** Triangles the current cut submits, over every copy. */
|
|
1510
1792
|
get drawnTriangles(): number;
|
|
1793
|
+
/**
|
|
1794
|
+
* Copies the current cut submits whose own bounding sphere lies wholly outside the view volume.
|
|
1795
|
+
*
|
|
1796
|
+
* A measurement, not a cull: see {@link ClusteredMesh.drawnTrianglesOutsideView}.
|
|
1797
|
+
*/
|
|
1798
|
+
get drawnCopiesOutsideView(): number;
|
|
1799
|
+
/** Triangles those copies submit: their own band's cut, times how many copies are outside. */
|
|
1800
|
+
get drawnTrianglesOutsideView(): number;
|
|
1801
|
+
/**
|
|
1802
|
+
* What this batch does about copies outside the view, and why.
|
|
1803
|
+
*
|
|
1804
|
+
* `"on"` when copies the camera cannot see are skipped, and a reason when they are not — a batch
|
|
1805
|
+
* that silently kept drawing a whole copy behind the camera would be a cost with no symptom, and
|
|
1806
|
+
* one that silently dropped what a shadow camera can see would be a missing shadow with no cause.
|
|
1807
|
+
*/
|
|
1808
|
+
get viewCullReport(): string;
|
|
1511
1809
|
/** Adds one copy. Returns its index, so the game can move it later. */
|
|
1512
1810
|
place(placement: IClusteredPlacement): number;
|
|
1513
1811
|
/** Attaches the batch to the scene. Nothing draws until {@link ClusteredBatch.update} runs. */
|
|
@@ -1588,104 +1886,6 @@ interface IRenderCameraCullReport {
|
|
|
1588
1886
|
*/
|
|
1589
1887
|
declare function alwaysRender(object: Object3D, enabled?: boolean): void;
|
|
1590
1888
|
|
|
1591
|
-
/**
|
|
1592
|
-
* The per-frame world-matrix walk, with a hidden subtree left where it stands.
|
|
1593
|
-
*
|
|
1594
|
-
* `three`'s `Object3D.updateMatrixWorld` recurses into every child of every node whatever its
|
|
1595
|
-
* `visible` flag, multiplying a world matrix for each. That is the correct default for a library
|
|
1596
|
-
* that cannot know what a game is doing, and it is the wrong one for a renderer that is about to
|
|
1597
|
-
* skip exactly those subtrees: a full-detail body while its merged stand-in draws, a hidden LOD
|
|
1598
|
-
* level, a parked or hangared model each pay the walk and none of them can draw.
|
|
1599
|
-
*
|
|
1600
|
-
* Native flight in `sandbox/midway-open-pacific` profiled `updateMatrixWorld` plus
|
|
1601
|
-
* `multiplyMatrices` at **29 % of all JavaScript ticks**, and the same scene's hand-rolled
|
|
1602
|
-
* visible-only pass walked **779 nodes per frame instead of 9,903**, 3.1 ms down to 0.3 ms. That
|
|
1603
|
-
* pass was the game's; this is the engine's, so the next game does not write it again.
|
|
1604
|
-
*
|
|
1605
|
-
* The pass mirrors three exactly for a visible node: `matrixAutoUpdate` -> `updateMatrix()`, then
|
|
1606
|
-
* the `matrixWorldNeedsUpdate || force` recompute honouring `matrixWorldAutoUpdate` and a null
|
|
1607
|
-
* parent, then force the children. A node with `visible === false` defers its own compose and its
|
|
1608
|
-
* subtree's walk. Every skipped root is remembered, so the first frame it is visible again both
|
|
1609
|
-
* its own world matrix and its descendants are recomputed with `force = true`.
|
|
1610
|
-
*
|
|
1611
|
-
* Two things are never dropped by the pruning, because both are read while nothing above them is
|
|
1612
|
-
* visible:
|
|
1613
|
-
*
|
|
1614
|
-
* - a class that overrides `updateMatrixWorld` runs its own — never a `Scene`, which three does not
|
|
1615
|
-
* override and whose method only differs when something patched the prototype. `SkinnedMesh`
|
|
1616
|
-
* refreshes `bindMatrixInverse`, `Camera` its `matrixWorldInverse`; re-implementing only the base
|
|
1617
|
-
* walk left every deck-crew sailor that had moved since load drawing with a stale bind matrix and
|
|
1618
|
-
* vanishing from the frame. Their subtrees are small, so walking them whole costs nothing;
|
|
1619
|
-
* - a hidden node that holds a `Bone` is walked, because a visible `SkinnedMesh` draws with its
|
|
1620
|
-
* skeleton's matrices wherever the armature happens to sit. Whether bones sit below a node is
|
|
1621
|
-
* decided once and remembered — a rig is built whole and does not grow.
|
|
1622
|
-
*
|
|
1623
|
-
* A third thing is dropped, and it is the walk's largest single share on a streamed world: a subtree
|
|
1624
|
-
* frozen with `markStatic`. `markStatic` composes the subtree once and turns off the two flags that
|
|
1625
|
-
* would recompose it, which until now still left three's unconditional recursion visiting every node
|
|
1626
|
-
* under it every frame. A frozen root that carries no dirty flag is a leaf here, and it is one
|
|
1627
|
-
* whether the walk was forced or not: `refreshStaticTransforms` re-arms a root whose own transform
|
|
1628
|
-
* moved, `invalidateStatic` re-arms one something wrote inside, and both compose the subtree once at
|
|
1629
|
-
* that moment. `isStatic` is what separates the engine's freeze from a game that turned the flags off
|
|
1630
|
-
* for its own reasons. See `static-transform.ts`.
|
|
1631
|
-
*
|
|
1632
|
-
* Where the root is a native-engine object it has its own walk, `__tnUpdateMatrixWorld(force, prune)`: this
|
|
1633
|
-
* pass run natively in one call, answering the nodes it visited. The pass calls that and nothing else, since the
|
|
1634
|
-
* walk above costs a bridge call per node read and written (about 16 to 25 thousand a frame at 4,096 cubes).
|
|
1635
|
-
* With `prune` (the `"visible"` mode) the native walk leaves a hidden subtree where it stands by the same rules,
|
|
1636
|
-
* bones included; `"all"` visits every node. A JS subclass of `Object3D` that overrides `updateMatrixWorld` is not
|
|
1637
|
-
* called from inside it; the engine's own `SkinnedMesh` and `Camera` keep their derived matrices. The web and the
|
|
1638
|
-
* legacy host have no such method and walk as above.
|
|
1639
|
-
*
|
|
1640
|
-
* A game that reads a **hidden** object's `matrixWorld` directly must not rely on this pass
|
|
1641
|
-
* having reached it: use `getWorldPosition`/`getWorldQuaternion`/`getWorldScale` (which update the
|
|
1642
|
-
* chain they need) or call `object.updateWorldMatrix(true, false)` first. The convention's named
|
|
1643
|
-
* override is `renderer.matrixWorld: "all"`, which visits every node exactly as three's own walk
|
|
1644
|
-
* does; `"visible"` is the default.
|
|
1645
|
-
*/
|
|
1646
|
-
/** How much of the scene graph the engine walks for world matrices each frame. */
|
|
1647
|
-
type MatrixWorldMode = "visible" | "all";
|
|
1648
|
-
/** What the pass did on the last frame, for the frame telemetry a window reports. */
|
|
1649
|
-
interface IMatrixWorldReport {
|
|
1650
|
-
readonly schemaVersion: 1;
|
|
1651
|
-
readonly mode: MatrixWorldMode;
|
|
1652
|
-
/**
|
|
1653
|
-
* Nodes the engine walked this frame, summed over every application (authored scene and a
|
|
1654
|
-
* projection mirror when one is in use). One number both ways, so `"all"` can be read as the
|
|
1655
|
-
* cost of the walk the convention just removed.
|
|
1656
|
-
*/
|
|
1657
|
-
readonly visited: number;
|
|
1658
|
-
}
|
|
1659
|
-
interface IMatrixWorldOptions {
|
|
1660
|
-
/** `"visible"` (default) skips a hidden subtree; `"all"` reproduces three's own walk. */
|
|
1661
|
-
readonly mode?: MatrixWorldMode;
|
|
1662
|
-
}
|
|
1663
|
-
/**
|
|
1664
|
-
* One game's world-matrix walk, holding the state the pruning needs between frames.
|
|
1665
|
-
*
|
|
1666
|
-
* The stale set and the bone cache live on the instance rather than in module scope: two games,
|
|
1667
|
-
* two playtest scenarios or two roots in one process must not share "this subtree was skipped
|
|
1668
|
-
* while hidden", or one game's hidden node would be force-refreshed by the other's frame.
|
|
1669
|
-
*/
|
|
1670
|
-
declare class MatrixWorldPass {
|
|
1671
|
-
#private;
|
|
1672
|
-
constructor(options?: IMatrixWorldOptions);
|
|
1673
|
-
get mode(): MatrixWorldMode;
|
|
1674
|
-
/** What the current frame has walked so far, across every {@link apply} call. */
|
|
1675
|
-
get report(): IMatrixWorldReport;
|
|
1676
|
-
/** Starts a frame's count. The pass's state (stale set, bone cache) is untouched. */
|
|
1677
|
-
beginFrame(): void;
|
|
1678
|
-
/**
|
|
1679
|
-
* Walks `root`, mirroring three for every node the mode visits.
|
|
1680
|
-
*
|
|
1681
|
-
* Returns the nodes this call visited, so a caller can report one application's cost without
|
|
1682
|
-
* also reporting the frame's total.
|
|
1683
|
-
*/
|
|
1684
|
-
apply(root: Object3D, force?: boolean): number;
|
|
1685
|
-
/** Forgets what was skipped. A whole-scene swap has no hidden ancestors left to refresh. */
|
|
1686
|
-
dispose(): void;
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
1889
|
/**
|
|
1690
1890
|
* The frame-period rule that decides when a render cost moves, as Unreal's DynamicRenderScaling does.
|
|
1691
1891
|
*
|
|
@@ -1888,34 +2088,6 @@ declare class GIBudget {
|
|
|
1888
2088
|
/** Parses a `TN_GI` line back into its report, or `undefined` for any other line. */
|
|
1889
2089
|
declare function readGIMarker(line: string): IGIBudgetReport | undefined;
|
|
1890
2090
|
|
|
1891
|
-
/**
|
|
1892
|
-
* What a visualize mode shows. `off` is the finished frame; `indirectDiffuse` is the bounce light alone, the
|
|
1893
|
-
* counterpart of Unreal's `r.Lumen.Visualize.IndirectDiffuse`. Other GI work adds its modes here when its data exists.
|
|
1894
|
-
*/
|
|
1895
|
-
declare const GI_VISUALIZE_MODES: readonly ["off", "indirectDiffuse"];
|
|
1896
|
-
type GIVisualizeMode = (typeof GI_VISUALIZE_MODES)[number];
|
|
1897
|
-
interface IGIVisualizeOptions {
|
|
1898
|
-
readonly mode: GIVisualizeMode;
|
|
1899
|
-
/** The finished frame, returned unchanged in `off` mode. */
|
|
1900
|
-
readonly beauty: Node<"vec4">;
|
|
1901
|
-
/**
|
|
1902
|
-
* The indirect diffuse light as the surface returns it: the gathered and cached light times the surface's own
|
|
1903
|
-
* albedo, in the frame's exposure. The game's chain builds it, because it owns what the chain gathers.
|
|
1904
|
-
*/
|
|
1905
|
-
readonly indirectDiffuse?: Node<"vec3">;
|
|
1906
|
-
}
|
|
1907
|
-
/**
|
|
1908
|
-
* Shows one lighting term of a frame by itself, so a lighting difference against a reference can be told apart from a
|
|
1909
|
-
* scene difference. The game builds each term in its own chain and picks the mode; this class only selects, and it
|
|
1910
|
-
* fails when the chain did not build the term the mode needs, so a frame never claims to show a term it does not hold.
|
|
1911
|
-
*/
|
|
1912
|
-
declare class GIVisualize {
|
|
1913
|
-
readonly mode: GIVisualizeMode;
|
|
1914
|
-
/** The node to output: `beauty` for `off`, the chosen term with an opaque alpha otherwise. */
|
|
1915
|
-
readonly node: Node<"vec4">;
|
|
1916
|
-
constructor(options: IGIVisualizeOptions);
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
2091
|
/** The shadow filter tiers, cheapest first. The game maps each one to its own sample counts. */
|
|
1920
2092
|
declare const SHADOW_FILTER_TIERS: readonly ["low", "medium", "high"];
|
|
1921
2093
|
type ShadowFilterTier = (typeof SHADOW_FILTER_TIERS)[number];
|
|
@@ -2214,7 +2386,7 @@ declare function renderTrapAudit(scene: Object3D & {
|
|
|
2214
2386
|
* **Staticness is authored, never guessed.** A heuristic that decides an object has "not moved in
|
|
2215
2387
|
* 60 frames" is a correctness bug with no reproduction, so nothing here watches gameplay. What the
|
|
2216
2388
|
* engine does do is check the promise where it is cheap to check it: the root's own local transform
|
|
2217
|
-
*
|
|
2389
|
+
* and its parent's world matrix are compared against what was frozen, once per frame, and a root the author moved thaws and
|
|
2218
2390
|
* refreezes itself. That is O(static roots), not O(objects), and it turns the most common way to
|
|
2219
2391
|
* get this wrong into a non-event. Writes deeper inside a frozen subtree are the author's to
|
|
2220
2392
|
* announce with `invalidateStatic`, and `TN_RENDERLIST_VALIDATE=1` is what proves they did.
|
|
@@ -2272,22 +2444,6 @@ declare function staticTransformCensus(): IStaticTransformCensus;
|
|
|
2272
2444
|
/** Drops every registration. A game that tore down its scene must not keep its roots alive. */
|
|
2273
2445
|
declare function resetStaticTransforms(): void;
|
|
2274
2446
|
|
|
2275
|
-
/**
|
|
2276
|
-
* The parity oracle for anything that stops recomputing a transform.
|
|
2277
|
-
*
|
|
2278
|
-
* A cache that is right on the scene you tested and wrong on the one you did not is worse than no
|
|
2279
|
-
* cache, because it ships as a visual bug nobody can reproduce. This is the instrument that makes
|
|
2280
|
-
* the difference falsifiable: with `TN_RENDERLIST_VALIDATE=1`, every frame recomputes every world
|
|
2281
|
-
* matrix from the authored transforms, the long way, and compares it elementwise against the one
|
|
2282
|
-
* the frame is about to draw with. The first disagreement throws, naming the object and the
|
|
2283
|
-
* element, because a validation mode that logs and continues is a validation mode nobody reads.
|
|
2284
|
-
*
|
|
2285
|
-
* It is a validation mode, not a proof: it proves the frames it ran on. Run it on the scenes you
|
|
2286
|
-
* care about, in CI, for as many frames as you can afford.
|
|
2287
|
-
*
|
|
2288
|
-
* Off by default and expensive by construction — it does the work it is checking, twice.
|
|
2289
|
-
*/
|
|
2290
|
-
|
|
2291
2447
|
/** Marker printed when the validator is installed, so a log says which mode produced it. */
|
|
2292
2448
|
declare const RENDERLIST_VALIDATE_MARKER = "TN_RENDERLIST_VALIDATE";
|
|
2293
2449
|
/** The launch flag. */
|
|
@@ -2391,6 +2547,64 @@ interface IProbeVolumeOptions {
|
|
|
2391
2547
|
/** Injectable clock for deterministic scheduling tests. */
|
|
2392
2548
|
readonly now?: () => number;
|
|
2393
2549
|
readonly report?: (line: string) => void;
|
|
2550
|
+
/**
|
|
2551
|
+
* Refresh probes by tracing a GPUSceneBVH (PRD-603) instead of drawing the scene six times per probe.
|
|
2552
|
+
* The default is `trace` when `trace` inputs are given and `capture` otherwise. `capture` is the named
|
|
2553
|
+
* override for scenes that need textured albedo or local lights in their bounce.
|
|
2554
|
+
*/
|
|
2555
|
+
readonly update?: "capture" | "trace";
|
|
2556
|
+
/** The traced refresh's inputs: the packed scene, and the sun and sky the game already holds. */
|
|
2557
|
+
readonly trace?: IProbeVolumeTrace;
|
|
2558
|
+
/** Most probes one frame traces (Unreal's r.Lumen.RadianceCache.NumProbesToTraceBudget, 100). */
|
|
2559
|
+
readonly numProbesToTraceBudget?: number;
|
|
2560
|
+
/**
|
|
2561
|
+
* A fixed batch: probes traced a frame, up to `numProbesToTraceBudget`, whatever the GPU reports. Unset, the batch follows
|
|
2562
|
+
* the measured GPU time toward `bakeBudgetMs` and stays at 16 where the adapter reports none (the owned engine today). A
|
|
2563
|
+
* capture that must trace a whole field before its frame sets it; a game leaves it unset.
|
|
2564
|
+
*/
|
|
2565
|
+
readonly probesPerFrame?: number;
|
|
2566
|
+
/**
|
|
2567
|
+
* Rays per probe along one side: `probeResolution` squared rays. The default is 8 (64 rays), the cost gate's
|
|
2568
|
+
* figure: an Intel Xe traces about 0.09 ms a probe at 8 and 0.41 ms at 32 (1,024 rays, Unreal's radiance-cache
|
|
2569
|
+
* ProbeResolution). A small emitter far from a probe needs the larger value to be hit at all.
|
|
2570
|
+
*/
|
|
2571
|
+
readonly probeResolution?: number;
|
|
2572
|
+
/**
|
|
2573
|
+
* Cells per side of an octahedral radiance map per probe, beside the SH: the traced rays binned by direction, as
|
|
2574
|
+
* Unreal's radiance cache stores 32 x 32 radiance per probe (UE 5.8.3:
|
|
2575
|
+
* Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:641, GRadianceCacheProbeResolution).
|
|
2576
|
+
* `sampleRadianceNode` then reads the map, sharp where SH L2 smears a coloured wall across the sphere. 0 (the default)
|
|
2577
|
+
* keeps SH only. Traced refresh only.
|
|
2578
|
+
*/
|
|
2579
|
+
readonly radianceProbeResolution?: number;
|
|
2580
|
+
/**
|
|
2581
|
+
* Weight each of the eight probes a read blends by Unreal's depth test: a probe whose map depth toward the read point is
|
|
2582
|
+
* shorter than the point's distance sees a surface first, so it sits behind a wall and drops out (UE 5.8.3:
|
|
2583
|
+
* Engine/Shaders/Private/Lumen/LumenRadianceCacheInterpolation.ush:390, `StepHitDistanceFromProbe` against
|
|
2584
|
+
* `StepRayDistanceFromProbeSq`). Stops light leaking through a wall thinner than a probe spacing. Needs
|
|
2585
|
+
* `radianceProbeResolution`. Off by default.
|
|
2586
|
+
*/
|
|
2587
|
+
readonly probeVisibility?: boolean;
|
|
2588
|
+
}
|
|
2589
|
+
/** What a traced refresh reads. Every value is the game's: the volume owns no light and no colour. */
|
|
2590
|
+
interface IProbeVolumeTrace {
|
|
2591
|
+
/** A GPUSceneBVH, or anything with its CPU snapshot and version. */
|
|
2592
|
+
readonly bvh: {
|
|
2593
|
+
readonly traceScene: IProbeTraceScene;
|
|
2594
|
+
readonly version: number;
|
|
2595
|
+
};
|
|
2596
|
+
/** World direction toward the sun, its linear colour and its intensity; read every frame. */
|
|
2597
|
+
readonly sun: {
|
|
2598
|
+
readonly direction: Vector3;
|
|
2599
|
+
readonly color: Color;
|
|
2600
|
+
readonly intensity: number;
|
|
2601
|
+
};
|
|
2602
|
+
/** Radiance of a ray that leaves the scene; black for a closed interior. Read every frame. */
|
|
2603
|
+
readonly sky: Color;
|
|
2604
|
+
/** Point lights read every frame; the first `points.length` at build are traced (see `IProbeTraceLighting`). */
|
|
2605
|
+
readonly points?: IProbeTraceLighting["points"];
|
|
2606
|
+
/** The view whose frustum marks probes as in use, so they refresh first. Absent: none ranks first. */
|
|
2607
|
+
readonly camera?: Camera;
|
|
2394
2608
|
}
|
|
2395
2609
|
interface IProbeVolumeBakeProgress {
|
|
2396
2610
|
readonly completed: number;
|
|
@@ -2421,6 +2635,16 @@ interface IProbeVolumeObservation {
|
|
|
2421
2635
|
readonly bakeBudgetMs: number;
|
|
2422
2636
|
/** True while pass zero samples a black texture instead of a previous bake. */
|
|
2423
2637
|
readonly samplingIsolated: boolean;
|
|
2638
|
+
/** Which refresh ran: `capture` (six scene draws a probe) or `trace` (one dispatch). Absent means capture. */
|
|
2639
|
+
readonly update?: "capture" | "trace";
|
|
2640
|
+
/** Trace path: probes traced in the last frame. */
|
|
2641
|
+
readonly probesTraced?: number;
|
|
2642
|
+
/** Trace path: probes of the last field that sat inside a solid or behind a wall, filled from open neighbours. */
|
|
2643
|
+
readonly probesRejected?: number;
|
|
2644
|
+
/** Trace path: frames since the least recently traced probe was traced, `null` while one never was. */
|
|
2645
|
+
readonly oldestProbeAgeFrames?: number | null;
|
|
2646
|
+
/** Trace path: materials whose texture or node graph the flat material table ignored. */
|
|
2647
|
+
readonly ignoredTextureMaterials?: number;
|
|
2424
2648
|
}
|
|
2425
2649
|
/** Read a complete marker-shaped observation without accepting malformed data. */
|
|
2426
2650
|
declare function readProbeVolumeObservation(value: unknown): IProbeVolumeObservation | undefined;
|
|
@@ -2475,6 +2699,12 @@ declare class ProbeVolume extends Object3D implements IComputeDriven$1 {
|
|
|
2475
2699
|
sample(position: Vector3, normal: Vector3): Vector3;
|
|
2476
2700
|
sample(position: IProbePosition, normal?: Vector3 | Node<"vec3">): Vector3 | Node<"vec3">;
|
|
2477
2701
|
sampleIrradiance(position: Vector3, normal: Vector3): Vector3;
|
|
2702
|
+
/**
|
|
2703
|
+
* The radiance arriving along `direction` (the SH itself, not convolved with a cosine lobe), clamped at zero. A
|
|
2704
|
+
* screen gather subtracts this per ray, because a hit replaces the cache's radiance along that ray: Lumen reads its
|
|
2705
|
+
* radiance cache per ray direction (UE 5.8.3: Engine/Shaders/Private/Lumen/LumenScreenProbeTracing.usf:831).
|
|
2706
|
+
*/
|
|
2707
|
+
sampleRadiance(position: Vector3, direction: Vector3): Vector3;
|
|
2478
2708
|
/**
|
|
2479
2709
|
* The irradiance averaged over every normal at a point, for a surface or a sample that has no side facing the light:
|
|
2480
2710
|
* a translucent pane (Unreal's default Volumetric NonDirectional lighting) and a fog sample (its isotropic term). It
|
|
@@ -2488,10 +2718,17 @@ declare class ProbeVolume extends Object3D implements IComputeDriven$1 {
|
|
|
2488
2718
|
sampleNonDirectional(position?: Node<"vec3">): Node<"vec3">;
|
|
2489
2719
|
/** The GPU graph used by `sample`; exposed so generated materials can compose it explicitly. */
|
|
2490
2720
|
sampleNode(position?: Node<"vec3">, normal?: Node<"vec3">): Node<"vec3">;
|
|
2721
|
+
/** The GPU graph of `sampleRadiance`: the radiance arriving along `direction`, clamped at zero. */
|
|
2722
|
+
sampleRadianceNode(position?: Node<"vec3">, direction?: Node<"vec3">): Node<"vec3">;
|
|
2491
2723
|
/** Internal data seam used by unit/conformance fixtures to seed a known SH atlas without a GPU. */
|
|
2492
2724
|
setProbeCoefficients(ix: number, iy: number, iz: number, coefficients: readonly IProbeVolumeCoefficient[]): void;
|
|
2493
2725
|
/** One bounded render-phase slice. The game loop calls this through IComputeDriven. */
|
|
2494
2726
|
process(renderer: IRendererLike): void;
|
|
2727
|
+
/**
|
|
2728
|
+
* The stale probes this frame traces, at most the budget: never-traced first, then the largest gap between
|
|
2729
|
+
* last use and last trace (Unreal's priority, UE 5.8.3: LumenRadianceCacheUpdate.usf:221-241), then index.
|
|
2730
|
+
*/
|
|
2731
|
+
selectStaleProbes(): number[];
|
|
2495
2732
|
detach(): void;
|
|
2496
2733
|
get paddedSlices(): number;
|
|
2497
2734
|
get maximumDimension(): number;
|
|
@@ -2499,6 +2736,19 @@ declare class ProbeVolume extends Object3D implements IComputeDriven$1 {
|
|
|
2499
2736
|
probePosition(ix: number, iy: number, iz: number, target?: Vector3): Vector3;
|
|
2500
2737
|
}
|
|
2501
2738
|
|
|
2739
|
+
interface IRadianceCacheOptions extends Omit<IProbeVolumeOptions, "trace" | "update"> {
|
|
2740
|
+
/** The packed scene a probe traces, the sun and the sky it reads. Every value is the game's. */
|
|
2741
|
+
readonly trace: IProbeVolumeTrace;
|
|
2742
|
+
}
|
|
2743
|
+
/**
|
|
2744
|
+
* A probe field that refreshes by tracing the packed scene, Unreal's radiance-cache update model: probes in view
|
|
2745
|
+
* refresh first, the oldest first, a few hundred a frame at most, and the old values serve until replaced.
|
|
2746
|
+
* It is a `ProbeVolume` whose update is always `trace`; sample it with `sampleNode`.
|
|
2747
|
+
*/
|
|
2748
|
+
declare class RadianceCache extends ProbeVolume {
|
|
2749
|
+
constructor(options: IRadianceCacheOptions);
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2502
2752
|
/**
|
|
2503
2753
|
* The Surface Cache: what a traced global-illumination ray reads at the surface it hits (PRD-639).
|
|
2504
2754
|
*
|
|
@@ -3594,618 +3844,6 @@ declare class Daylight extends Group implements IComputeDriven$1 {
|
|
|
3594
3844
|
detach(): void;
|
|
3595
3845
|
}
|
|
3596
3846
|
|
|
3597
|
-
interface IFilmicCurve {
|
|
3598
|
-
readonly slope: number;
|
|
3599
|
-
readonly toe: number;
|
|
3600
|
-
readonly shoulder: number;
|
|
3601
|
-
readonly blackClip: number;
|
|
3602
|
-
readonly whiteClip: number;
|
|
3603
|
-
readonly blueCorrection: number;
|
|
3604
|
-
/**
|
|
3605
|
-
* Unreal's "Expand Gamut" (1 in a fresh project, `Engine/Source/Runtime/Engine/Private/Scene.cpp:437`): bright,
|
|
3606
|
-
* saturated colour is pushed toward a wider gamut before the blue correction and the curve. 0 turns it off.
|
|
3607
|
-
* Unreal's linear EXR frames are taken after this step (`Engine/Shaders/Private/PostProcessCombineLUTs.usf`,
|
|
3608
|
-
* the expansion runs before the output-device branches), so a curve applied to an Unreal EXR needs 0 here.
|
|
3609
|
-
*/
|
|
3610
|
-
readonly expandGamut: number;
|
|
3611
|
-
/**
|
|
3612
|
-
* The ACES reference rendering's glow, which Unreal keeps in its filmic curve (`Engine/Shaders/Private/TonemapCommon.ush`):
|
|
3613
|
-
* dark, saturated colour gets up to 5% brighter. 1 is Unreal's amount, 0 turns it off.
|
|
3614
|
-
*/
|
|
3615
|
-
readonly glow: number;
|
|
3616
|
-
/**
|
|
3617
|
-
* The ACES reference rendering's red modifier, also in Unreal's filmic curve: the red of a saturated red is pulled
|
|
3618
|
-
* toward a dark pivot, up to 18%. 1 is Unreal's amount, 0 turns it off.
|
|
3619
|
-
*/
|
|
3620
|
-
readonly redModifier: number;
|
|
3621
|
-
/**
|
|
3622
|
-
* Output dither in 8-bit steps: triangular grain added to the display colour before the backbuffer rounds it.
|
|
3623
|
-
* Unreal 5.8.3 uses one step for an 8-bit backbuffer, so a dim gradient reads as grain of one level instead of
|
|
3624
|
-
* contour bands. 0 turns it off. Only the tone-mapping node dithers; `filmicToneMap()` stays noise-free.
|
|
3625
|
-
*/
|
|
3626
|
-
readonly dither: number;
|
|
3627
|
-
/**
|
|
3628
|
-
* The largest scene-linear value, after exposure, that one channel can hold when the colour goes into Unreal's
|
|
3629
|
-
* colour LUT (the top of its 14-stop log shaper, `Engine/Shaders/Private/GammaCorrectionCommon.ush`: `LogToLin(1)`
|
|
3630
|
-
* minus `LogToLin(0)`). A channel above it is clipped there, so the sun disc and a hot emitter lose their hue
|
|
3631
|
-
* earlier than an unbounded curve would. `LUT_CLIP` is the default, as in Unreal; 0 is the named override that leaves
|
|
3632
|
-
* the channel unbounded.
|
|
3633
|
-
*/
|
|
3634
|
-
readonly lutClip: number;
|
|
3635
|
-
}
|
|
3636
|
-
/** Red, green, blue and a master factor, as Unreal's colour grading panel shows each control. */
|
|
3637
|
-
type Vec4$1 = readonly [number, number, number, number];
|
|
3638
|
-
/** One set of Unreal's colour grading controls. */
|
|
3639
|
-
interface IGradeControls {
|
|
3640
|
-
readonly saturation: Vec4$1;
|
|
3641
|
-
readonly contrast: Vec4$1;
|
|
3642
|
-
readonly gamma: Vec4$1;
|
|
3643
|
-
readonly gain: Vec4$1;
|
|
3644
|
-
readonly offset: Vec4$1;
|
|
3645
|
-
}
|
|
3646
|
-
/**
|
|
3647
|
-
* Unreal's colour grading and white balance, run in the combined LUT before the film curve
|
|
3648
|
-
* (`Engine/Shaders/Private/PostProcessCombineLUTs.usf:88-140` and `:369-403`; defaults in
|
|
3649
|
-
* `Engine/Source/Runtime/Engine/Private/Scene.cpp:405-433`). Every default below is Unreal's, and at the
|
|
3650
|
-
* defaults none of it costs a shader instruction.
|
|
3651
|
-
*/
|
|
3652
|
-
interface IColorGrade {
|
|
3653
|
-
/** Kelvin, 1500 to 15000. 6500 with tint 0 is a no-op. */
|
|
3654
|
-
readonly whiteTemp: number;
|
|
3655
|
-
/** -1 to 1 along the isotherm. */
|
|
3656
|
-
readonly whiteTint: number;
|
|
3657
|
-
/**
|
|
3658
|
-
* `"whiteBalance"`: the temperature is the light the scene was lit by, and it turns neutral.
|
|
3659
|
-
* `"colorTemperature"`: neutral turns into that temperature.
|
|
3660
|
-
*/
|
|
3661
|
-
readonly temperatureMode: "whiteBalance" | "colorTemperature";
|
|
3662
|
-
/** 1 is the full film curve, 0 the graded colour with no curve. */
|
|
3663
|
-
readonly toneCurveAmount: number;
|
|
3664
|
-
/** Applied to every pixel, and combined with each range below. */
|
|
3665
|
-
readonly global: IGradeControls;
|
|
3666
|
-
readonly shadows: IGradeControls;
|
|
3667
|
-
readonly midtones: IGradeControls;
|
|
3668
|
-
readonly highlights: IGradeControls;
|
|
3669
|
-
/** Luma (AP1) up to which the shadows range has full weight, fading out by here. */
|
|
3670
|
-
readonly shadowsMax: number;
|
|
3671
|
-
/** Luma where the highlights range starts and where it has full weight. */
|
|
3672
|
-
readonly highlightsMin: number;
|
|
3673
|
-
readonly highlightsMax: number;
|
|
3674
|
-
}
|
|
3675
|
-
type RangeName = "global" | "shadows" | "midtones" | "highlights";
|
|
3676
|
-
/** What a game passes: any field, and any control of a range. */
|
|
3677
|
-
type ColorGradeOptions = {
|
|
3678
|
-
readonly [K in keyof IColorGrade]?: K extends RangeName ? Partial<IGradeControls> : IColorGrade[K];
|
|
3679
|
-
};
|
|
3680
|
-
/**
|
|
3681
|
-
* Registers the curve with a WebGPU renderer and returns the tone-mapping constant to assign.
|
|
3682
|
-
* A renderer without a node library (the WebGL fallback) keeps ACES and says so.
|
|
3683
|
-
*/
|
|
3684
|
-
declare function installFilmicToneMapping(raw: unknown, c?: IFilmicCurve, grade?: IColorGrade): number | undefined;
|
|
3685
|
-
|
|
3686
|
-
interface IExposureSettings {
|
|
3687
|
-
enabled: boolean;
|
|
3688
|
-
/** Middle-grey target; increase to brighten the metered subject. */
|
|
3689
|
-
key: number;
|
|
3690
|
-
/** Exposure limits in stops. Expand only if the scene needs more range. */
|
|
3691
|
-
minStops: number;
|
|
3692
|
-
maxStops: number;
|
|
3693
|
-
/**
|
|
3694
|
-
* Percent of metered weight, dark to bright, ignored at each end of the histogram.
|
|
3695
|
-
* Raise highPercent's gap (lower it) when a large bright backdrop still sets the exposure.
|
|
3696
|
-
*/
|
|
3697
|
-
lowPercent: number;
|
|
3698
|
-
highPercent: number;
|
|
3699
|
-
/** Exponential response per second in log2 space. Up opens the eye; down squints. */
|
|
3700
|
-
rateUp: number;
|
|
3701
|
-
rateDown: number;
|
|
3702
|
-
/** Stop error where cut acceleration begins / reaches its authored maximum. */
|
|
3703
|
-
snapLo: number;
|
|
3704
|
-
snapHi: number;
|
|
3705
|
-
snapGain: number;
|
|
3706
|
-
/**
|
|
3707
|
-
* Seed for reset(value). The first frame and reset() without a value adopt the measured target.
|
|
3708
|
-
*/
|
|
3709
|
-
initialExposure: number;
|
|
3710
|
-
settleStops: number;
|
|
3711
|
-
/**
|
|
3712
|
-
* Limit catch-up after a suspended frame, avoiding an unrequested cut. A frame the renderer's
|
|
3713
|
-
* gate declined is not a suspension: the drawn frame already spans that time, so it is spent.
|
|
3714
|
-
*/
|
|
3715
|
-
maxDelta: number;
|
|
3716
|
-
/** Readback/marker cadence in seconds. Metering still runs on every drawn frame. */
|
|
3717
|
-
reportInterval: number;
|
|
3718
|
-
}
|
|
3719
|
-
declare const exposureSettings: Readonly<IExposureSettings>;
|
|
3720
|
-
|
|
3721
|
-
type ColourTexture = TextureNode;
|
|
3722
|
-
type Meter = (colour: Node<"vec4">, uv: Node<"vec2">) => Node<"vec2">;
|
|
3723
|
-
type Decode = (mean: Node<"float">) => Node<"float">;
|
|
3724
|
-
|
|
3725
|
-
/** Owns scratch targets only. Never draws the world or installs another output transform. */
|
|
3726
|
-
declare class AutoExposureNode extends Node<"float"> {
|
|
3727
|
-
#private;
|
|
3728
|
-
static get type(): string;
|
|
3729
|
-
readonly input: ColourTexture;
|
|
3730
|
-
readonly settings: Readonly<IExposureSettings>;
|
|
3731
|
-
constructor(input: ColourTexture, settings: IExposureSettings, constantExposure: number, meter?: Meter, decode?: Decode);
|
|
3732
|
-
setup(builder: NodeBuilder): Node<"float">;
|
|
3733
|
-
get exposureNode(): Node<"float">;
|
|
3734
|
-
reset(exposure?: number): void;
|
|
3735
|
-
setEnabled(enabled: boolean): void;
|
|
3736
|
-
/**
|
|
3737
|
-
* Exposure compensation in stops over the metered key, live: Unreal's AutoExposureBias
|
|
3738
|
-
* (UE 5.8.3: Engine/Source/Runtime/Engine/Classes/Engine/Scene.h:1933), which post-process
|
|
3739
|
-
* volumes blend at run time. Unreal applies 2^bias outside the smoothing
|
|
3740
|
-
* (Engine/Shaders/Private/PostProcessEyeAdaptation.usf:179); here it moves the goal, so a change
|
|
3741
|
-
* adapts at `rateUp`/`rateDown` and the reported exposure includes it.
|
|
3742
|
-
*/
|
|
3743
|
-
setExposureBias(stops: number): void;
|
|
3744
|
-
getObservation(): Record<string, unknown>;
|
|
3745
|
-
updateBefore(frame: NodeFrame): undefined;
|
|
3746
|
-
dispose(): void;
|
|
3747
|
-
}
|
|
3748
|
-
|
|
3749
|
-
/** Godot's `Viewport.screen_space_aa`: which post-process antialiasing smooths the frame's edges. */
|
|
3750
|
-
type ScreenSpaceAA = "smaa" | "fxaa" | "disabled";
|
|
3751
|
-
/**
|
|
3752
|
-
* Godot's `Environment.tonemap_mode`: the modes Three.js ships, plus `filmic`, the Unreal 5
|
|
3753
|
-
* default curve written in `tonemap.ts`.
|
|
3754
|
-
*/
|
|
3755
|
-
type TonemapMode = "aces" | "agx" | "filmic" | "neutral";
|
|
3756
|
-
/**
|
|
3757
|
-
* SSGI sample budget. The three tiers are the presets SSGINode's own documentation
|
|
3758
|
-
* recommends for the temporally-filtered case, not numbers invented here. An unknown
|
|
3759
|
-
* tier throws rather than quietly becoming the default.
|
|
3760
|
-
*/
|
|
3761
|
-
type SsgiQuality = "low" | "medium" | "high" | "epic";
|
|
3762
|
-
interface IWorldEnvironmentOptions {
|
|
3763
|
-
/** World-pass MSAA samples. Omit to inherit the renderer; 0 leaves post AA in charge. */
|
|
3764
|
-
readonly samples?: number;
|
|
3765
|
-
/**
|
|
3766
|
-
* How bounce light reaches a pixel, Unreal's `r.Lumen.FinalGatherMethod` by the quality tier's name
|
|
3767
|
-
* (`giPreset`). The screen-space gather runs only for `screenProbeGather`; the world cache is
|
|
3768
|
-
* installed by the scene (`giCache.ts`) for `irradianceField` and `screenProbeGather`. Omit it and
|
|
3769
|
-
* the harness layer decides.
|
|
3770
|
-
*/
|
|
3771
|
-
readonly finalGatherMethod?: "none" | "irradianceField" | "screenProbeGather";
|
|
3772
|
-
/** Screen-space indirect diffuse light. Godot calls this `ssil_enabled`. */
|
|
3773
|
-
readonly ssgiEnabled?: boolean;
|
|
3774
|
-
readonly ssgiQuality?: SsgiQuality;
|
|
3775
|
-
/** How much of the gathered indirect light reaches the frame. Godot's `ssil_intensity`. */
|
|
3776
|
-
readonly ssgiIntensity?: number;
|
|
3777
|
-
/** How far, in world units, indirect light is gathered from. Room scale, not contact scale. */
|
|
3778
|
-
readonly ssgiRadius?: number;
|
|
3779
|
-
/** Screen-space reflections. Godot's `ssr_enabled`. */
|
|
3780
|
-
readonly ssrEnabled?: boolean;
|
|
3781
|
-
/**
|
|
3782
|
-
* How far, in world units, a reflection ray is traced.
|
|
3783
|
-
*
|
|
3784
|
-
* `SSRNode` defaults this to **1**, which is one metre. On any scene larger than a
|
|
3785
|
-
* tabletop that reads as "screen-space reflections are on and do nothing" — the ray
|
|
3786
|
-
* terminates before it reaches the thing that should be standing in the floor.
|
|
3787
|
-
*/
|
|
3788
|
-
readonly ssrMaxDistance?: number;
|
|
3789
|
-
/**
|
|
3790
|
-
* Fraction of the display resolution the reflection is traced at.
|
|
3791
|
-
*
|
|
3792
|
-
* A reflection in a rough surface carries almost no high-frequency detail, so tracing it
|
|
3793
|
-
* at half resolution costs a quarter of the rays and is very hard to see in the result.
|
|
3794
|
-
*/
|
|
3795
|
-
readonly ssrResolutionScale?: number;
|
|
3796
|
-
/**
|
|
3797
|
-
* The most steps one reflection ray marches. Defaults to Unreal's count for the render chain
|
|
3798
|
-
* tier (`RENDER_CHAIN_TIERS`: 32 on high, 16 on medium, 8 on low). Fewer steps cost less and
|
|
3799
|
-
* step over thin objects sooner.
|
|
3800
|
-
*/
|
|
3801
|
-
readonly ssrMaxSteps?: number;
|
|
3802
|
-
/** Spatial denoise over the SSGI result. Off is noisier and cheaper. */
|
|
3803
|
-
readonly denoiseEnabled?: boolean;
|
|
3804
|
-
/** The SSGI denoise's reach in gather pixels; omit for DenoiseNode's 5. A half-resolution gather wants more. */
|
|
3805
|
-
readonly ssgiDenoiseRadius?: number;
|
|
3806
|
-
/**
|
|
3807
|
-
* Gather the SSGI with screen probes (one per 16 x 16 pixels, an 8 x 8 octahedron of rays each) instead of per-pixel
|
|
3808
|
-
* rays: Unreal's ScreenProbeGather at its Epic settings (PRD-640). Owned engine only; elsewhere the per-pixel gather runs.
|
|
3809
|
-
*/
|
|
3810
|
-
readonly ssgiScreenProbes?: boolean;
|
|
3811
|
-
/** Shows one lighting term alone (`GIVisualize`); `off` draws the finished frame. Needs the gather (`ssgiEnabled`). */
|
|
3812
|
-
readonly giVisualize?: GIVisualizeMode;
|
|
3813
|
-
/** Screen probes only: 0 keeps every probe's rays on the same octahedron, 1 (default) offsets them per probe. */
|
|
3814
|
-
readonly ssgiProbeJitter?: number;
|
|
3815
|
-
/** Screen probes only: rays on a side of each probe's octahedron. Omit for 8 (Unreal's real-time Epic; its cinematic setting is 16). */
|
|
3816
|
-
readonly ssgiProbeRays?: number;
|
|
3817
|
-
/** Screen probes only, diagnosis: 1 draws the probes' weight and trust, 2 the sign of the gathered delta. */
|
|
3818
|
-
readonly ssgiProbeDebug?: number;
|
|
3819
|
-
/**
|
|
3820
|
-
* Diagnosis, owned engine only: label one pass group as the `SSGI` GPU stage and leave the others in the frame, so
|
|
3821
|
-
* `info.engine.gpuStages.SSGI` times that group alone (`trace`, `filter`, `gather` of the screen probes, or the chain's
|
|
3822
|
-
* `denoise`). Omit to time every GI pass.
|
|
3823
|
-
*/
|
|
3824
|
-
readonly ssgiTimedPass?: "trace" | "filter" | "gather" | "denoise";
|
|
3825
|
-
/**
|
|
3826
|
-
* Denoise passes over the SSGI gather, each turning the tap pattern by its index. The default is the render chain
|
|
3827
|
-
* tier's `denoiseIterations` (high 3, medium 2, low 1): one pass left the sunlit room's walls grainy at `high`.
|
|
3828
|
-
*/
|
|
3829
|
-
readonly giDenoisePasses?: number;
|
|
3830
|
-
/** Raymarched shafts. Needs `godraysLight`, and that light must cast shadows. */
|
|
3831
|
-
readonly godraysEnabled?: boolean;
|
|
3832
|
-
/** How dense the participating medium is. Higher is foggier — and the whole frame brighter. */
|
|
3833
|
-
readonly godraysDensity?: number;
|
|
3834
|
-
/**
|
|
3835
|
-
* Haze below this value is discarded instead of added to the frame.
|
|
3836
|
-
*
|
|
3837
|
-
* Without it the pass is a uniform brightener rather than a shaft renderer: it returns a
|
|
3838
|
-
* non-zero value for nearly every pixel, and that "something" is tiny in linear space and
|
|
3839
|
-
* enormous after the tone curve, which lifts shadows hardest. Subtracting a floor keeps
|
|
3840
|
-
* the air inside a real beam and discards the ambient lift.
|
|
3841
|
-
*/
|
|
3842
|
-
readonly godraysFloor?: number;
|
|
3843
|
-
/** Multiplier applied after the floor, so beams can be bright without the haze returning. */
|
|
3844
|
-
readonly godraysIntensity?: number;
|
|
3845
|
-
/**
|
|
3846
|
-
* Raymarch steps per pixel. `GodraysNode` defaults to 60.
|
|
3847
|
-
*
|
|
3848
|
-
* Every step is a shadow-map sample, so this multiplies directly into the cost of the
|
|
3849
|
-
* whole pass. The pass jitters its sample positions, so a lower count trades a hard shaft
|
|
3850
|
-
* edge for a slightly noisier one rather than for banding — which the denoiser then
|
|
3851
|
-
* largely absorbs.
|
|
3852
|
-
*/
|
|
3853
|
-
readonly godraysSteps?: number;
|
|
3854
|
-
/**
|
|
3855
|
-
* Ceiling on shaft brightness.
|
|
3856
|
-
*
|
|
3857
|
-
* This is also the single strongest control over how bright the *whole* scene looks: the
|
|
3858
|
-
* pass adds its accumulated illumination to every pixel, not only to the pixels inside a
|
|
3859
|
-
* visible beam, so raising it raises the shadow floor of the entire frame.
|
|
3860
|
-
*/
|
|
3861
|
-
readonly godraysMaxDensity?: number;
|
|
3862
|
-
/**
|
|
3863
|
-
* Ground-truth ambient occlusion, at contact scale. Godot's `ssao_enabled`.
|
|
3864
|
-
*
|
|
3865
|
-
* Deliberately a *second* occlusion term next to the one SSGI already produces. SSGI's AO
|
|
3866
|
-
* is gathered over `ssgiRadius` — metres — the right scale for "this hall is enclosed"
|
|
3867
|
-
* and the wrong one for "this foot is standing on this floor". This pass runs at a radius
|
|
3868
|
-
* of centimetres and multiplies on top.
|
|
3869
|
-
*/
|
|
3870
|
-
readonly gtaoEnabled?: boolean;
|
|
3871
|
-
/**
|
|
3872
|
-
* Occlusion gather radius in world units, a named override. Left out, the radius follows Unreal's rule
|
|
3873
|
-
* instead: a fixed reach on the screen (`gtaoReachPx`), so a contact is as wide at any distance.
|
|
3874
|
-
*/
|
|
3875
|
-
readonly gtaoRadius?: number;
|
|
3876
|
-
/** Screen reach of the occlusion in pixels at the display height when `gtaoRadius` is not set. Unreal's is 32. */
|
|
3877
|
-
readonly gtaoReachPx?: number;
|
|
3878
|
-
/** Exponent on the occlusion term: higher is a darker, tighter contact. */
|
|
3879
|
-
readonly gtaoScale?: number;
|
|
3880
|
-
/** Directions sampled per pixel. Cost is linear in this. */
|
|
3881
|
-
readonly gtaoSamples?: number;
|
|
3882
|
-
/** Spacing of the samples along a direction: 1 is even, 2 packs them near the pixel, as Unreal's horizon search does. */
|
|
3883
|
-
readonly gtaoDistanceExponent?: number;
|
|
3884
|
-
/** 0 weighs every sample alike, 1 (the node's default) weighs far samples less. */
|
|
3885
|
-
readonly gtaoDistanceFalloff?: number;
|
|
3886
|
-
/** Depth difference in world units beyond which a sample is no occluder. */
|
|
3887
|
-
readonly gtaoThickness?: number;
|
|
3888
|
-
/** The occlusion denoise's reach in pixels (DenoiseNode's 5 when omitted); 0 leaves the occlusion raw. */
|
|
3889
|
-
readonly gtaoDenoiseRadius?: number;
|
|
3890
|
-
/**
|
|
3891
|
-
* The albedo cap of the occlusion's multi-bounce: pale surfaces keep more of the light a crease blocks. Unreal's is
|
|
3892
|
-
* 0.5 (`MaxMultibounceAlbedo`); 0 leaves the occlusion as GTAO computed it. Applies where the cache holds the
|
|
3893
|
-
* indirect light.
|
|
3894
|
-
*/
|
|
3895
|
-
readonly gtaoMultiBounceAlbedo?: number;
|
|
3896
|
-
/**
|
|
3897
|
-
* Where the cache holds the indirect light, only that share takes the occlusion (Unreal's AO darkens indirect light
|
|
3898
|
-
* only). `false` is the named override: the whole frame takes the occlusion, as an engine without a cache does.
|
|
3899
|
-
*/
|
|
3900
|
-
readonly gtaoIndirectOnly?: boolean;
|
|
3901
|
-
/** Fraction of display resolution the occlusion is traced at. */
|
|
3902
|
-
readonly gtaoResolutionScale?: number;
|
|
3903
|
-
/**
|
|
3904
|
-
* The fraction of the frame SSGI actually gathers at. Half by default.
|
|
3905
|
-
*
|
|
3906
|
-
* `GTAONode` and `SSRNode` both carry a `resolutionScale` of their own; **`SSGINode` does not**,
|
|
3907
|
-
* and its `setSize` passes width and height straight into its render target with no factor. So
|
|
3908
|
-
* screen-space GI — a low-frequency effect every production renderer gathers at half or quarter
|
|
3909
|
-
* res — was the only stage in this chain running at full resolution, and it cost accordingly.
|
|
3910
|
-
*
|
|
3911
|
-
* Measured on a 46,190-instance forest at 1600x900 on an RTX 2080, with the resolution scaler
|
|
3912
|
-
* left on auto so the engine's own verdict is part of the result:
|
|
3913
|
-
*
|
|
3914
|
-
* fps still/walk scale it settled on interior median dead shadow
|
|
3915
|
-
* full res 38.0 / 47.2 0.44 704x396 0.0299 19.19%
|
|
3916
|
-
* off 60.0 / 60.0 0.61 976x549 0.0987 4.54%
|
|
3917
|
-
* half res 59.8 / 60.0 0.72 1152x648 0.0301 18.58%
|
|
3918
|
-
*
|
|
3919
|
-
* Half res is better than both: it holds the budget like switching SSGI off, keeps the look
|
|
3920
|
-
* within noise of full res, and produces the *sharpest* frame of the three — because the budget
|
|
3921
|
-
* it hands back is spent by the scaler on pixels rather than on a gather nobody can see at full
|
|
3922
|
-
* rate. Full-res SSGI was not buying quality, it was trading it.
|
|
3923
|
-
*
|
|
3924
|
-
* Fixed without touching three: `setSize` is public and the pass drives the node through it with
|
|
3925
|
-
* the full frame size, so the instance is wrapped to hand it a smaller one. The node's own maths
|
|
3926
|
-
* reads the `_resolution` uniform that `setSize` writes, so it stays self-consistent, and the
|
|
3927
|
-
* result is sampled by UV rather than by texel — which is what makes the upsample free and is
|
|
3928
|
-
* exactly the mechanism `GTAONode` uses internally.
|
|
3929
|
-
*/
|
|
3930
|
-
readonly ssgiResolutionScale?: number;
|
|
3931
|
-
/**
|
|
3932
|
-
* Contrast-adaptive sharpening (RCAS) over the finished frame.
|
|
3933
|
-
*
|
|
3934
|
-
* Everything upstream of it blurs: the GI gather is denoised, the reflection is traced at
|
|
3935
|
-
* reduced resolution and roughness-blurred. Each is worth its softness on its own and the
|
|
3936
|
-
* sum is a frame with no micro-detail left. RCAS is contrast-adaptive, so it puts the
|
|
3937
|
-
* edges back without ringing the soft areas.
|
|
3938
|
-
*/
|
|
3939
|
-
readonly sharpenEnabled?: boolean;
|
|
3940
|
-
/** RCAS sharpness. **0 is maximum sharpening and 2 is none** — it is a radius, not a gain. */
|
|
3941
|
-
readonly sharpenStrength?: number;
|
|
3942
|
-
/** Unreal's VignetteIntensity (Scene.cpp default 0.4), the cosine-fourth law. Zero disables it. */
|
|
3943
|
-
readonly vignetteAmount?: number;
|
|
3944
|
-
/** Unreal's default motion blur on the velocity the render chain provisions (harness overlay). */
|
|
3945
|
-
readonly motionBlurEnabled?: boolean;
|
|
3946
|
-
/**
|
|
3947
|
-
* Post-process antialiasing, run last. Godot's `Viewport.screen_space_aa`. Default `"smaa"`.
|
|
3948
|
-
*
|
|
3949
|
-
* Not optional in practice: the chain renders `pass(scene, camera)` single-sampled, so the moment
|
|
3950
|
-
* any stage runs, the renderer's own multisampling no longer reaches the frame and every edge
|
|
3951
|
-
* stairsteps — the single loudest "this is a prototype" signal in a frame. It is requested only
|
|
3952
|
-
* when some other stage (or a `baseColour`) installs a chain; with nothing installed the renderer
|
|
3953
|
-
* draws straight to the canvas with its own MSAA and this would be paying twice.
|
|
3954
|
-
*/
|
|
3955
|
-
readonly screenSpaceAA?: ScreenSpaceAA;
|
|
3956
|
-
/**
|
|
3957
|
-
* Temporal antialiasing, Unreal's default method (`r.AntiAliasingMethod` 4, temporal super resolution). Default `false`
|
|
3958
|
-
* here, and `true` in the `high` and `medium` tiers of `quality.ts`.
|
|
3959
|
-
*
|
|
3960
|
-
* The engine jitters the camera by a sub-pixel offset every frame, draws each pixel's motion, and blends the frames
|
|
3961
|
-
* before it into this one. The `traa` stage resolves the finished frame, after the screen-space stages (occlusion,
|
|
3962
|
-
* global illumination, reflections) and ahead of blur, bloom and the grade, so their edges are smoothed with the rest.
|
|
3963
|
-
* It replaces `screenSpaceAA` while it runs: Unreal runs one method too. It runs on the owned engine only. On
|
|
3964
|
-
* `engine: "threejs"` and on a fallback renderer this option is refused with a reason in the applied report and
|
|
3965
|
-
* `screenSpaceAA` stays in charge. Read `debug().temporal` for the live frame, history and jitter.
|
|
3966
|
-
*/
|
|
3967
|
-
readonly temporalAA?: boolean;
|
|
3968
|
-
/** Godot's `glow_enabled`. */
|
|
3969
|
-
readonly bloomEnabled?: boolean;
|
|
3970
|
-
readonly bloomStrength?: number;
|
|
3971
|
-
/** How far a bright pixel bleeds, as a fraction of the screen. */
|
|
3972
|
-
readonly bloomRadius?: number;
|
|
3973
|
-
/** Luminance a pixel must exceed before it blooms at all. */
|
|
3974
|
-
readonly bloomThreshold?: number;
|
|
3975
|
-
/**
|
|
3976
|
-
* Which of this kit's authored stages to run.
|
|
3977
|
-
*
|
|
3978
|
-
* Separate from the graph below, and not for tidiness: the chain has to know whether anything
|
|
3979
|
-
* was requested at all before the scene pass exists — with nothing requested it sets an
|
|
3980
|
-
* exposure and returns, and no pass is ever built. So the request is a static decision the kit
|
|
3981
|
-
* makes from its own config, and only the graph needs the pass.
|
|
3982
|
-
*/
|
|
3983
|
-
readonly authoredStageNames?: readonly string[];
|
|
3984
|
-
/**
|
|
3985
|
-
* This kit's own stages, composed after the built-ins.
|
|
3986
|
-
*
|
|
3987
|
-
* A factory because an authored stage needs the two things only this file can produce: the
|
|
3988
|
-
* scene pass's depth texture node, which does not exist until the pass is built, and the
|
|
3989
|
-
* resolved tier. It returns the complete graph — including stages left dormant this frame — so
|
|
3990
|
-
* that an anchor like `watercolor after kuwahara` keeps naming a stage that exists.
|
|
3991
|
-
*
|
|
3992
|
-
* Naming specific stages here instead — an `outlineEnabled`, a `kuwaharaRadius` — is what put
|
|
3993
|
-
* one kit's look inside the plumbing every kit copies verbatim, which
|
|
3994
|
-
* `shared-render-sources.spec.ts` exists to refuse.
|
|
3995
|
-
*/
|
|
3996
|
-
readonly authoredStages?: (context: IWorldEnvironmentStageContext) => readonly ChainStage[];
|
|
3997
|
-
/** Quality tier passed to the measured chain; the quality module owns this value. */
|
|
3998
|
-
readonly renderChainTier?: ChainTier;
|
|
3999
|
-
readonly tonemapMode?: TonemapMode;
|
|
4000
|
-
/**
|
|
4001
|
-
* The numbers of the `"filmic"` curve, any field of `IFilmicCurve` (slope, toe, shoulder, black clip, white
|
|
4002
|
-
* clip, blue correction, expand gamut, glow, red modifier, dither, lutClip). Unreal 5.8.3's project defaults
|
|
4003
|
-
* apply to every field left out. Only `tonemapMode: "filmic"` reads it; any other mode with this set throws.
|
|
4004
|
-
*/
|
|
4005
|
-
readonly filmicCurve?: Partial<IFilmicCurve>;
|
|
4006
|
-
/**
|
|
4007
|
-
* Unreal's colour grade and white balance for `"filmic"`: saturation, contrast, gamma, gain and offset
|
|
4008
|
-
* (`[red, green, blue, master]`) for the whole frame and for `shadows`, `midtones` and `highlights`, the
|
|
4009
|
-
* luma limits, `whiteTemp` and `whiteTint` in Kelvin and -1 to 1, and `toneCurveAmount`. Left out, the grade
|
|
4010
|
-
* is neutral and costs no shader instruction. Only `tonemapMode: "filmic"` reads it.
|
|
4011
|
-
*/
|
|
4012
|
-
readonly colorGrade?: ColorGradeOptions;
|
|
4013
|
-
/**
|
|
4014
|
-
* Scene-referred exposure: multiplied into the scene pass **before** the tone curve, so
|
|
4015
|
-
* the GI gather, reflections and bloom threshold all see the exposed image and the bloom
|
|
4016
|
-
* threshold means the same thing at any exposure.
|
|
4017
|
-
*
|
|
4018
|
-
* `renderer.toneMappingExposure` is live too (measured on three@0.185.1 — see
|
|
4019
|
-
* `docs/verification/exposure-ab-2026-08-30.md`), and applies at the same point in the
|
|
4020
|
-
* graph, but only when no output node is installed. When every stage here is off, this
|
|
4021
|
-
* class falls back to that scalar; when any stage runs, this multiply is the shutter.
|
|
4022
|
-
*/
|
|
4023
|
-
readonly exposure?: number;
|
|
4024
|
-
/** Cost opt-in. False retains the direct constant-exposure path. */
|
|
4025
|
-
readonly autoExposureEnabled?: boolean;
|
|
4026
|
-
/** Unreal's bilateral local exposure on top of the automatic exposure (harness overlay). */
|
|
4027
|
-
readonly localExposureEnabled?: boolean;
|
|
4028
|
-
/** Unreal's standard bloom in place of the stock bloom stage (harness overlay). */
|
|
4029
|
-
readonly unrealBloomEnabled?: boolean;
|
|
4030
|
-
/** Editable game policy; disabled application still measures when cost is opted in. */
|
|
4031
|
-
readonly exposurePolicy?: Readonly<IExposureSettings>;
|
|
4032
|
-
}
|
|
4033
|
-
interface IWorldEnvironmentTarget {
|
|
4034
|
-
/** The directional light godrays are raymarched against. Required only by `godraysEnabled`. */
|
|
4035
|
-
readonly godraysLight?: DirectionalLight;
|
|
4036
|
-
/**
|
|
4037
|
-
* Composes the colour the chain starts from, given the scene pass it renders.
|
|
4038
|
-
*
|
|
4039
|
-
* The chain builds `pass(scene, camera)` itself, so a game that composes something onto the
|
|
4040
|
-
* beauty pass before any stage runs — aerial perspective, read against that pass's own view-Z,
|
|
4041
|
-
* is the one in these templates — has nowhere else to put it. The node returned here is the
|
|
4042
|
-
* game's; the chain only decides where it is spliced in, which is first, ahead of exposure and
|
|
4043
|
-
* every stage.
|
|
4044
|
-
*/
|
|
4045
|
-
readonly baseColour?: (scenePass: ReturnType<typeof pass>) => Node<"vec4">;
|
|
4046
|
-
/**
|
|
4047
|
-
* The scene's static triangles, for the `ssr` stage: a smooth surface (roughness under the trace's
|
|
4048
|
-
* `maxRoughnessToTrace`) then reflects what its ray hits in the scene, as Unreal's Lumen reflections do,
|
|
4049
|
-
* not only what the screen drew. Build it after the static scene exists; omit it and the stage marches the screen.
|
|
4050
|
-
* @alias Lumen reflections, hit lighting, reflection rays
|
|
4051
|
-
*/
|
|
4052
|
-
readonly reflectionTrace?: TracedReflections;
|
|
4053
|
-
}
|
|
4054
|
-
type ResolutionSubrectView = {
|
|
4055
|
-
readonly viewFraction: Vector2;
|
|
4056
|
-
readonly halfTexel: Vector2;
|
|
4057
|
-
};
|
|
4058
|
-
/**
|
|
4059
|
-
* The scene pass's depth texture, as the pass itself types it.
|
|
4060
|
-
*
|
|
4061
|
-
* Named through `pass()` rather than written out because the addon's return type is the only
|
|
4062
|
-
* honest spelling of it, and a hand-written alias here would drift the first time three changes it.
|
|
4063
|
-
*/
|
|
4064
|
-
type DepthTextureNode = ReturnType<ReturnType<typeof pass>["getTextureNode"]>;
|
|
4065
|
-
type ChainTier = "high" | "medium" | "low" | "off";
|
|
4066
|
-
type ChainContext = {
|
|
4067
|
-
readonly tier: ChainTier;
|
|
4068
|
-
readonly resolutionSubrect?: ResolutionSubrectView;
|
|
4069
|
-
/**
|
|
4070
|
-
* The sampled velocity texture, present only when this chain request provisioned one.
|
|
4071
|
-
*
|
|
4072
|
-
* Distinct from the accessor TRAANode wants: the chain passes the texture here and installs the
|
|
4073
|
-
* accessor on the graph separately, so a stage that handed this node over as the accessor would
|
|
4074
|
-
* sample a texture that no fragment stage writes.
|
|
4075
|
-
*/
|
|
4076
|
-
readonly velocityNode?: Node;
|
|
4077
|
-
};
|
|
4078
|
-
/**
|
|
4079
|
-
* What a kit's `authoredStages` factory is handed. The depth node is the scene pass's, so a
|
|
4080
|
-
* stage that reads depth gets the same texture the built-in stages read rather than its own.
|
|
4081
|
-
*/
|
|
4082
|
-
interface IWorldEnvironmentStageContext {
|
|
4083
|
-
readonly depthNode: DepthTextureNode;
|
|
4084
|
-
readonly tier: ChainTier;
|
|
4085
|
-
/** The camera the scene pass renders with, which is the one a temporal stage must jitter. */
|
|
4086
|
-
readonly camera: Camera;
|
|
4087
|
-
}
|
|
4088
|
-
type ChainStage = {
|
|
4089
|
-
readonly name: string;
|
|
4090
|
-
readonly supportsResolutionSubrect?: boolean;
|
|
4091
|
-
readonly before?: string;
|
|
4092
|
-
readonly after?: string;
|
|
4093
|
-
/**
|
|
4094
|
-
* This stage reads display-referred colour — tone-mapped and sRGB-encoded — so the chain
|
|
4095
|
-
* installs the graph with the renderer's automatic output transform switched off and the stage
|
|
4096
|
-
* applies that transform itself (`renderOutput` from `three/tsl`).
|
|
4097
|
-
*
|
|
4098
|
-
* For effects authored against the picture rather than against light: a `.cube` table, an
|
|
4099
|
-
* sRGB-space edge filter. Such a stage runs last and may not declare an anchor, and the chain
|
|
4100
|
-
* only hands the renderer its transform back when the stage was actually refused.
|
|
4101
|
-
*/
|
|
4102
|
-
readonly afterOutputTransform?: boolean;
|
|
4103
|
-
readonly available?: (context: ChainContext) => boolean | string;
|
|
4104
|
-
readonly dispose?: () => void;
|
|
4105
|
-
readonly minimumTier?: ChainTier;
|
|
4106
|
-
/**
|
|
4107
|
-
* A temporal stage's completed rejection measurement. Its shape is the engine's velocity
|
|
4108
|
-
* contract, restated here so this file keeps importing nothing, and it is asked once per frame
|
|
4109
|
-
* after rendering. A stage that has not built, or has nothing landed yet, answers `undefined` —
|
|
4110
|
-
* which the chain reports as absent rather than as zero.
|
|
4111
|
-
*/
|
|
4112
|
-
readonly rejectionMeasurement?: () => {
|
|
4113
|
-
frame: number;
|
|
4114
|
-
rejectionFraction: number;
|
|
4115
|
-
} | undefined;
|
|
4116
|
-
/** The chain plumbing is stage-agnostic, so it names the node it carries `unknown`. */
|
|
4117
|
-
readonly build: (input: unknown, context: ChainContext) => unknown;
|
|
4118
|
-
};
|
|
4119
|
-
type OutputInstallation = {
|
|
4120
|
-
isCurrent(): boolean;
|
|
4121
|
-
dispose(): void;
|
|
4122
|
-
};
|
|
4123
|
-
type ResolutionSubrectTarget = {
|
|
4124
|
-
setSize(width: number, height: number, depth?: number): void;
|
|
4125
|
-
};
|
|
4126
|
-
type ResolutionSubrectController = {
|
|
4127
|
-
readonly active?: boolean;
|
|
4128
|
-
readonly view?: ResolutionSubrectView;
|
|
4129
|
-
retain(node: ResolutionSubrectTarget, targets: readonly RenderTarget[]): void;
|
|
4130
|
-
release(node: ResolutionSubrectTarget): void;
|
|
4131
|
-
textureView(texture: Texture): ResolutionSubrectView | undefined;
|
|
4132
|
-
dispose(): void;
|
|
4133
|
-
};
|
|
4134
|
-
type OutputSetter = ((node: unknown, worldPass?: unknown) => void) | ((node: unknown, worldPass?: unknown) => OutputInstallation);
|
|
4135
|
-
type OutputRenderer = {
|
|
4136
|
-
kind: string;
|
|
4137
|
-
raw: unknown;
|
|
4138
|
-
createResolutionSubrect?: () => ResolutionSubrectController;
|
|
4139
|
-
/**
|
|
4140
|
-
* Installs a node graph directly. Only reached when a `baseColour` is composed and every
|
|
4141
|
-
* stage is off: the chain installs nothing for an empty stage list, and dropping the game's
|
|
4142
|
-
* own composition on the floor would be the silent no-op this class exists to prevent.
|
|
4143
|
-
*/
|
|
4144
|
-
setOutputNode?: OutputSetter;
|
|
4145
|
-
/** Legacy node-only clear. The returned receipt distinguishes same-node reinstalls. */
|
|
4146
|
-
clearOutputNode?: (expectedNode?: unknown) => void;
|
|
4147
|
-
createRenderChain?: (options: {
|
|
4148
|
-
input?: unknown;
|
|
4149
|
-
worldPass?: unknown;
|
|
4150
|
-
request?: {
|
|
4151
|
-
stages?: readonly string[];
|
|
4152
|
-
tier?: ChainContext["tier"];
|
|
4153
|
-
/**
|
|
4154
|
-
* The scene pass that owns the shared velocity output, for a temporal stage to read. Its
|
|
4155
|
-
* shape is the engine's velocity contract, restated here so this file keeps importing
|
|
4156
|
-
* nothing: `pass(scene, camera)` returns exactly this.
|
|
4157
|
-
*/
|
|
4158
|
-
velocity?: {
|
|
4159
|
-
pass?: ReturnType<typeof pass>;
|
|
4160
|
-
/** How a host whose scene pass owns the velocity output provides it; the chain's MRT route is the default. */
|
|
4161
|
-
provision?: {
|
|
4162
|
-
texture(scenePass: ReturnType<typeof pass>): Node;
|
|
4163
|
-
attach<T>(node: T, source: unknown): T;
|
|
4164
|
-
};
|
|
4165
|
-
rejectionMeasurement?: () => {
|
|
4166
|
-
frame: number;
|
|
4167
|
-
rejectionFraction: number;
|
|
4168
|
-
} | undefined;
|
|
4169
|
-
};
|
|
4170
|
-
};
|
|
4171
|
-
stages?: readonly ChainStage[];
|
|
4172
|
-
resolutionSubrect?: ResolutionSubrectController;
|
|
4173
|
-
}) => {
|
|
4174
|
-
applied: {
|
|
4175
|
-
dropped: readonly {
|
|
4176
|
-
name: string;
|
|
4177
|
-
reason: string;
|
|
4178
|
-
}[];
|
|
4179
|
-
stages: readonly string[];
|
|
4180
|
-
};
|
|
4181
|
-
dispose(): void;
|
|
4182
|
-
};
|
|
4183
|
-
};
|
|
4184
|
-
declare class WorldEnvironment {
|
|
4185
|
-
#private;
|
|
4186
|
-
/**
|
|
4187
|
-
* A scene with no options starts from the `high` quality tier, a fresh Unreal 5.8.3 project's look; the tier named by
|
|
4188
|
-
* `renderChainTier` ("medium" or "low") starts from that tier instead. An option you give always wins, and an
|
|
4189
|
-
* `undefined` one does not count as given.
|
|
4190
|
-
*/
|
|
4191
|
-
constructor(given?: IWorldEnvironmentOptions);
|
|
4192
|
-
/**
|
|
4193
|
-
* Installs the chain. Returns what actually ran — the same applied report the chain
|
|
4194
|
-
* printed — so a scene can assert on it instead of scraping the console.
|
|
4195
|
-
*/
|
|
4196
|
-
apply(renderer: OutputRenderer, scene: Scene, camera: Camera, target?: IWorldEnvironmentTarget): {
|
|
4197
|
-
dropped: readonly {
|
|
4198
|
-
name: string;
|
|
4199
|
-
reason: string;
|
|
4200
|
-
}[];
|
|
4201
|
-
stages: readonly string[];
|
|
4202
|
-
dispose?: () => void;
|
|
4203
|
-
exposure?: AutoExposureNode;
|
|
4204
|
-
/** The engine's live temporal state; present only while `temporalAA` runs. */
|
|
4205
|
-
temporalReport?: () => Record<string, unknown>;
|
|
4206
|
-
};
|
|
4207
|
-
}
|
|
4208
|
-
|
|
4209
3847
|
/**
|
|
4210
3848
|
* Diagnosis knobs of the calibration harness, kept out of the engine's own reading of the page URL: the harness sets
|
|
4211
3849
|
* them before it builds a `WorldEnvironment`, and a game never needs to. The defaults are the shipped look.
|
|
@@ -4223,93 +3861,6 @@ declare const lookDiagnostics: {
|
|
|
4223
3861
|
giVisualize: GIVisualizeMode;
|
|
4224
3862
|
};
|
|
4225
3863
|
|
|
4226
|
-
/**
|
|
4227
|
-
* This game's authored looks. GPU family picks the start; measured frame budgets refine it.
|
|
4228
|
-
* Edit these presets to change the look without changing the framework.
|
|
4229
|
-
*/
|
|
4230
|
-
type QualityTier = "low" | "medium" | "high";
|
|
4231
|
-
/**
|
|
4232
|
-
* Picks the tier: an explicit `tier` always wins, otherwise the platform decides.
|
|
4233
|
-
*
|
|
4234
|
-
* Fails closed. An unrecognised tier name throws with the value it was handed rather than
|
|
4235
|
-
* quietly rendering the default, because a silent fallback here looks exactly like a tier that
|
|
4236
|
-
* turned out to have no effect.
|
|
4237
|
-
*/
|
|
4238
|
-
declare function resolveQualityTier(request?: {
|
|
4239
|
-
readonly gpuClass?: string;
|
|
4240
|
-
readonly mobile?: boolean;
|
|
4241
|
-
readonly software?: boolean;
|
|
4242
|
-
readonly tier?: string;
|
|
4243
|
-
}): QualityTier;
|
|
4244
|
-
/**
|
|
4245
|
-
* Harness: the screen-space gather Unreal's L7 (Epic) is judged against: 32 rays a pixel at half resolution, denoised
|
|
4246
|
-
* over 16 gather pixels. A calibration tool, not a shipping tier (PRD-640 Phase 1: about 31 ms at 1080p). Every harness
|
|
4247
|
-
* scene that renders global illumination spreads it, so no scene falls back to the `high` preset's 2-slice gather.
|
|
4248
|
-
*/
|
|
4249
|
-
declare const EPIC_SSGI: IWorldEnvironmentOptions;
|
|
4250
|
-
/** The stages and strengths a tier turns on. Throws on a name that is not a tier. */
|
|
4251
|
-
declare function qualityPreset(tier: string): IWorldEnvironmentOptions;
|
|
4252
|
-
/**
|
|
4253
|
-
* Global illumination and shadow filtering per tier, named after Unreal's scalability levels
|
|
4254
|
-
* (Engine/Config/BaseScalability.ini, `[GlobalIlluminationQuality@0..3]` and `[ShadowQuality@0..3]`).
|
|
4255
|
-
* A fresh Unreal project runs Epic (3), so `high` is Epic; `medium` is level 1 and `low` is level 0.
|
|
4256
|
-
* Unreal's own level 2 (High) is not a ThreeNative tier: the three tiers are the three levels a
|
|
4257
|
-
* calibration scene is judged against (PRD-644, PRD-652).
|
|
4258
|
-
*/
|
|
4259
|
-
type FinalGatherMethod = "none" | "irradianceField" | "screenProbeGather";
|
|
4260
|
-
interface IGiTier {
|
|
4261
|
-
/**
|
|
4262
|
-
* How bounce light reaches a pixel. `none` is Unreal's Low: no diffuse GI, the sky light at 0.8.
|
|
4263
|
-
* `irradianceField` is Medium: world-space probes only (the baked cache here). `screenProbeGather`
|
|
4264
|
-
* is Epic: the screen-space gather over the same cache. The preset of the tier names it.
|
|
4265
|
-
*/
|
|
4266
|
-
readonly finalGatherMethod: FinalGatherMethod;
|
|
4267
|
-
/** Read-only report: the `sg.GlobalIlluminationQuality` this tier follows. */
|
|
4268
|
-
readonly globalIlluminationQuality: 0 | 1 | 3;
|
|
4269
|
-
/**
|
|
4270
|
-
* `r.DistanceFieldAO`: whether the scene's distance fields shadow the sky light. Unreal's Low turns it off, so
|
|
4271
|
-
* the sky light reaches the inside of a room unoccluded (measured on `sunlit-room`, PRD-644 `## Decisions`).
|
|
4272
|
-
*/
|
|
4273
|
-
readonly distanceFieldAO: boolean;
|
|
4274
|
-
/** `r.SkylightIntensityMultiplier`: Unreal suppresses the sky light to 0.8 at Low, where DFAO is off. */
|
|
4275
|
-
readonly skylightIntensityMultiplier: number;
|
|
4276
|
-
}
|
|
4277
|
-
/** The GI method and Unreal level of a tier. Throws on a name that is not a tier. */
|
|
4278
|
-
declare function giPreset(tier: string): IGiTier;
|
|
4279
|
-
interface IShadowFilter {
|
|
4280
|
-
readonly blockerSamples: number;
|
|
4281
|
-
readonly filterSamples: number;
|
|
4282
|
-
}
|
|
4283
|
-
interface IShadowTier {
|
|
4284
|
-
/** Read-only report: the `sg.ShadowQuality` this tier follows. */
|
|
4285
|
-
readonly shadowQuality: 0 | 1 | 3;
|
|
4286
|
-
/**
|
|
4287
|
-
* Whether the sun and the lamps cast dynamic shadows. Unreal draws none at `sg.ShadowQuality` 0
|
|
4288
|
-
* (`r.ShadowQuality=0`), measured on `penumbra-lab` (PRD-652 `## Decisions`), so `low` casts none.
|
|
4289
|
-
*/
|
|
4290
|
-
readonly castShadows: boolean;
|
|
4291
|
-
/**
|
|
4292
|
-
* The receiver filter taps of the sun and of every lamp: Unreal's directional and local ray counts
|
|
4293
|
-
* are equal at Medium and Epic, so one pair serves both.
|
|
4294
|
-
*/
|
|
4295
|
-
readonly filter: IShadowFilter;
|
|
4296
|
-
/** `r.Shadow.Virtual.ResolutionLodBiasDirectional`: -1 halves the finest sun level's texel. */
|
|
4297
|
-
readonly resolutionLodBiasDirectional: number;
|
|
4298
|
-
}
|
|
4299
|
-
/** The shadow filter and resolution bias of a tier. Throws on a name that is not a tier. */
|
|
4300
|
-
declare function shadowPreset(tier: string): IShadowTier;
|
|
4301
|
-
/** The tier tables as one object: `resolve` a start tier from a GPU class, `gi` and `shadow` settings of a tier. */
|
|
4302
|
-
declare const qualityTiers: {
|
|
4303
|
-
readonly resolutionScale: {
|
|
4304
|
-
readonly low: 1;
|
|
4305
|
-
readonly medium: 0.72;
|
|
4306
|
-
readonly high: 0.85;
|
|
4307
|
-
};
|
|
4308
|
-
readonly gi: typeof giPreset;
|
|
4309
|
-
readonly resolve: typeof resolveQualityTier;
|
|
4310
|
-
readonly shadow: typeof shadowPreset;
|
|
4311
|
-
};
|
|
4312
|
-
|
|
4313
3864
|
/** The renderer multiplier for an exposure value at ISO 100.
|
|
4314
3865
|
* @situation expose a frame lit in lux and nits with a physical camera exposure value
|
|
4315
3866
|
* @constraint ev100 must be finite; a unitless scene keeps its own multiplier instead
|
|
@@ -4621,6 +4172,316 @@ declare class SpectralOcean extends Object3D implements IComputeDriven$1 {
|
|
|
4621
4172
|
detach(): void;
|
|
4622
4173
|
}
|
|
4623
4174
|
|
|
4175
|
+
/** The instance attributes every chunk carries; the game's material reads them by these names. */
|
|
4176
|
+
declare const GRASS_FIELD_ATTRIBUTES: {
|
|
4177
|
+
/** vec3: the blade's root, chunk-local (the chunk mesh sits at its corner). */
|
|
4178
|
+
readonly root: "grassRoot";
|
|
4179
|
+
/** vec4: facing 0..1, height 0..1, thinning priority 0..1, coverage scale 0..1. */
|
|
4180
|
+
readonly rand: "grassRand";
|
|
4181
|
+
/** vec4: angle away from the tuft centre, tuft random 0..1, ground normal x, ground normal z. */
|
|
4182
|
+
readonly clump: "grassClump";
|
|
4183
|
+
};
|
|
4184
|
+
interface IGrassFieldBounds {
|
|
4185
|
+
readonly minX: number;
|
|
4186
|
+
readonly minZ: number;
|
|
4187
|
+
readonly maxX: number;
|
|
4188
|
+
readonly maxZ: number;
|
|
4189
|
+
}
|
|
4190
|
+
/** The blade shape the game built: every LOD level packed in one geometry, each a draw range. */
|
|
4191
|
+
interface IGrassFieldBlade {
|
|
4192
|
+
readonly geometry: BufferGeometry;
|
|
4193
|
+
/** Index ranges near to far; `lodDistances` picks between them. */
|
|
4194
|
+
readonly lods: readonly {
|
|
4195
|
+
readonly start: number;
|
|
4196
|
+
readonly count: number;
|
|
4197
|
+
}[];
|
|
4198
|
+
/** The tallest a blade can stand, metres: pads each chunk's bounds so culling never clips a tip. */
|
|
4199
|
+
readonly reach: number;
|
|
4200
|
+
}
|
|
4201
|
+
/** TSL uniforms the field keeps current; the game's material reads them so its thinning matches the CPU trim. */
|
|
4202
|
+
interface IGrassFieldNodes {
|
|
4203
|
+
readonly thinStart: UniformNode<"float", number>;
|
|
4204
|
+
readonly thinEnd: UniformNode<"float", number>;
|
|
4205
|
+
readonly farDensity: UniformNode<"float", number>;
|
|
4206
|
+
readonly fadeStart: UniformNode<"float", number>;
|
|
4207
|
+
readonly drawDistance: UniformNode<"float", number>;
|
|
4208
|
+
readonly pushers: readonly UniformNode<"vec4", Vector4>[];
|
|
4209
|
+
/**
|
|
4210
|
+
* The pushers' pull on a root, as vec3(push x, push z, press): push is the summed unit direction
|
|
4211
|
+
* away from each pusher times its falloff, press the strongest falloff 0..1. `pressAt` mirrors it.
|
|
4212
|
+
*/
|
|
4213
|
+
push(rootWorld: Node<"vec3">): Node<"vec3">;
|
|
4214
|
+
}
|
|
4215
|
+
interface IGrassField3DOptions {
|
|
4216
|
+
readonly blade: IGrassFieldBlade;
|
|
4217
|
+
/** Builds the game's blade material from the field's uniforms. Called once. */
|
|
4218
|
+
readonly material: (nodes: IGrassFieldNodes) => Material;
|
|
4219
|
+
/** Ground height at (x, z), field-local metres. */
|
|
4220
|
+
readonly getHeight: (x: number, z: number) => number;
|
|
4221
|
+
/** Coverage 0..1 at (x, z, height, normal y): paths, clearings, biome masks. */
|
|
4222
|
+
readonly getDensity?: (x: number, z: number, height: number, normalY: number) => number;
|
|
4223
|
+
readonly bounds?: IGrassFieldBounds | null;
|
|
4224
|
+
/** Blades per square metre at full coverage. */
|
|
4225
|
+
readonly density?: number;
|
|
4226
|
+
readonly chunkSize?: number;
|
|
4227
|
+
readonly seed?: number;
|
|
4228
|
+
readonly heightSampleSpacing?: number;
|
|
4229
|
+
/** Degrees: no grass steeper than `maxSlope`, thinning over `slopeFade` degrees before it. */
|
|
4230
|
+
readonly maxSlope?: number;
|
|
4231
|
+
readonly slopeFade?: number;
|
|
4232
|
+
readonly minAltitude?: number;
|
|
4233
|
+
readonly maxAltitude?: number;
|
|
4234
|
+
/** Tuft size, metres: blades in one tuft share a centre to lean from. */
|
|
4235
|
+
readonly clumpSize?: number;
|
|
4236
|
+
readonly drawDistance?: number;
|
|
4237
|
+
/** Share of `drawDistance` over which blades sink away at the far edge. */
|
|
4238
|
+
readonly fadeRange?: number;
|
|
4239
|
+
/** Distances at which the next blade LOD takes over: `blade.lods.length - 1` of them. */
|
|
4240
|
+
readonly lodDistances?: readonly number[];
|
|
4241
|
+
readonly thinStart?: number;
|
|
4242
|
+
readonly thinEnd?: number;
|
|
4243
|
+
/** The share of blades left past `thinEnd`. */
|
|
4244
|
+
readonly farDensity?: number;
|
|
4245
|
+
/** Milliseconds per frame allowed for building chunks; one chunk always builds. */
|
|
4246
|
+
readonly buildBudgetMs?: number;
|
|
4247
|
+
readonly receiveShadow?: boolean;
|
|
4248
|
+
/** Scales every density at once, as Unreal's `grass.densityScale`. */
|
|
4249
|
+
readonly densityScale?: number;
|
|
4250
|
+
/** Scales every distance at once, as Unreal's `grass.CullDistanceScale`. */
|
|
4251
|
+
readonly cullDistanceScale?: number;
|
|
4252
|
+
}
|
|
4253
|
+
interface IGrassFieldStats {
|
|
4254
|
+
chunks: number;
|
|
4255
|
+
visibleChunks: number;
|
|
4256
|
+
blades: number;
|
|
4257
|
+
triangles: number;
|
|
4258
|
+
pending: number;
|
|
4259
|
+
/** Chunks built since the field was made. */
|
|
4260
|
+
built: number;
|
|
4261
|
+
}
|
|
4262
|
+
/**
|
|
4263
|
+
* Streamed, seeded, instanced grass around the camera; the game owns the blade and the material.
|
|
4264
|
+
*
|
|
4265
|
+
* Square chunks around the camera, each one instanced draw, built nearest first inside
|
|
4266
|
+
* `buildBudgetMs` per frame. A chunk is built inside 1.3 × the draw distance and discarded past
|
|
4267
|
+
* 1.4 ×, Unreal Landscape grass's guard band (UE 5.8.3:
|
|
4268
|
+
* Engine/Source/Runtime/Landscape/Private/LandscapeGrass.cpp:88, :94), so the edge never thrashes.
|
|
4269
|
+
* Each blade carries a priority; the material shrinks low-priority blades away with distance through
|
|
4270
|
+
* `thinStart`/`thinEnd`/`farDensity`, and the CPU only trims the instances the shader already hid.
|
|
4271
|
+
* Blade LOD is a draw-range switch on `blade.lods`. Up to four pushers flatten grass around them.
|
|
4272
|
+
*
|
|
4273
|
+
* The node creates no colour, shading or blade shape: `blade` and `material` come from the game's
|
|
4274
|
+
* `src/render/grass.ts`, which reads `GRASS_FIELD_ATTRIBUTES` and the `nodes` uniforms.
|
|
4275
|
+
*
|
|
4276
|
+
* @situation Grass that sways and parts around the player across a large terrain.
|
|
4277
|
+
* @situation Stream instanced ground cover in chunks around the camera under a frame budget.
|
|
4278
|
+
* @situation Meadow, lawn or field grass with distance thinning and LOD that does not pop.
|
|
4279
|
+
* @constraint Call `update(camera)` once per rendered frame, from `ctx.beforeRender`.
|
|
4280
|
+
* @constraint Rotating or scaling the field is not supported; translating it is.
|
|
4281
|
+
* @example
|
|
4282
|
+
* import { GrassField3D } from "@threenative/core";
|
|
4283
|
+
* // grassBlade and grassMaterial come from the game's own src/render/grass.ts.
|
|
4284
|
+
* const grass = new GrassField3D({ blade: grassBlade(), material: grassMaterial, getHeight: height });
|
|
4285
|
+
* ctx.add(grass);
|
|
4286
|
+
* ctx.beforeRender(() => { grass.pushers[0]?.set(hero.x, hero.y, hero.z, 1.2); grass.update(camera); });
|
|
4287
|
+
*/
|
|
4288
|
+
declare class GrassField3D extends Group {
|
|
4289
|
+
#private;
|
|
4290
|
+
readonly blade: IGrassFieldBlade;
|
|
4291
|
+
readonly material: Material;
|
|
4292
|
+
readonly nodes: IGrassFieldNodes;
|
|
4293
|
+
/** x, y, z world position and w radius (0 = off) of what flattens the grass. */
|
|
4294
|
+
readonly pushers: readonly Vector4[];
|
|
4295
|
+
/** Chunks and budget from the shared ring; blades and triangles from this frame's LOD pass. */
|
|
4296
|
+
get stats(): IGrassFieldStats;
|
|
4297
|
+
getHeight: (x: number, z: number) => number;
|
|
4298
|
+
getDensity: ((x: number, z: number, height: number, normalY: number) => number) | null;
|
|
4299
|
+
bounds: IGrassFieldBounds | null;
|
|
4300
|
+
density: number;
|
|
4301
|
+
chunkSize: number;
|
|
4302
|
+
seed: number;
|
|
4303
|
+
heightSampleSpacing: number;
|
|
4304
|
+
maxSlope: number;
|
|
4305
|
+
slopeFade: number;
|
|
4306
|
+
minAltitude: number;
|
|
4307
|
+
maxAltitude: number;
|
|
4308
|
+
clumpSize: number;
|
|
4309
|
+
drawDistance: number;
|
|
4310
|
+
fadeRange: number;
|
|
4311
|
+
lodDistances: readonly number[];
|
|
4312
|
+
thinStart: number;
|
|
4313
|
+
thinEnd: number;
|
|
4314
|
+
farDensity: number;
|
|
4315
|
+
buildBudgetMs: number;
|
|
4316
|
+
receiveShadow: boolean;
|
|
4317
|
+
densityScale: number;
|
|
4318
|
+
cullDistanceScale: number;
|
|
4319
|
+
constructor(options: IGrassField3DOptions);
|
|
4320
|
+
/** The pushers' press 0..1 at a world point: the CPU mirror of `nodes.push`'s z. */
|
|
4321
|
+
pressAt(x: number, y: number, z: number): number;
|
|
4322
|
+
/** Builds every chunk in range on the next `update` regardless of budget: on load or after a teleport. */
|
|
4323
|
+
prewarm(): void;
|
|
4324
|
+
/** Re-scatter after the ground or the density changed: all chunks, or those touching a rectangle. */
|
|
4325
|
+
refresh(rect?: IGrassFieldBounds): void;
|
|
4326
|
+
/** Streams, thins and LODs the chunks around `camera`. Call once per rendered frame. */
|
|
4327
|
+
update(camera: Camera): void;
|
|
4328
|
+
dispose(): void;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
interface ITileBounds {
|
|
4332
|
+
readonly minX: number;
|
|
4333
|
+
readonly minZ: number;
|
|
4334
|
+
readonly maxX: number;
|
|
4335
|
+
readonly maxZ: number;
|
|
4336
|
+
}
|
|
4337
|
+
|
|
4338
|
+
/** One part of the scattered mesh — a glTF primitive — and the baked levels to draw it at. */
|
|
4339
|
+
interface IScatterPart {
|
|
4340
|
+
/** Near to far: `lods[0]` is the full mesh, the last is the farthest level. */
|
|
4341
|
+
readonly lods: readonly BufferGeometry[];
|
|
4342
|
+
/** The game's material for this part. The field chooses neither geometry nor look. */
|
|
4343
|
+
readonly material: Material;
|
|
4344
|
+
}
|
|
4345
|
+
/** The ground under a candidate, in field-local metres, with its unit normal. */
|
|
4346
|
+
interface IScatterPoint {
|
|
4347
|
+
readonly x: number;
|
|
4348
|
+
readonly y: number;
|
|
4349
|
+
readonly z: number;
|
|
4350
|
+
readonly nx: number;
|
|
4351
|
+
readonly ny: number;
|
|
4352
|
+
readonly nz: number;
|
|
4353
|
+
}
|
|
4354
|
+
/** Where a candidate goes. The game writes the transform; the field owns `priority`. */
|
|
4355
|
+
interface IScatterPlacement {
|
|
4356
|
+
x: number;
|
|
4357
|
+
y: number;
|
|
4358
|
+
z: number;
|
|
4359
|
+
/** Radians about the ground normal, so a prop's own facing is the game's choice. */
|
|
4360
|
+
yaw: number;
|
|
4361
|
+
/** Uniform scale on the baked metres. */
|
|
4362
|
+
scale: number;
|
|
4363
|
+
/** 0..1: the candidate's order in the seeded shuffle. Lower instances thin away first. */
|
|
4364
|
+
readonly priority: number;
|
|
4365
|
+
}
|
|
4366
|
+
type IScatterFieldBounds = ITileBounds;
|
|
4367
|
+
interface IScatterField3DOptions {
|
|
4368
|
+
/** One entry per part of the baked mesh; a log's bark and its foliage are two. */
|
|
4369
|
+
readonly parts: readonly IScatterPart[];
|
|
4370
|
+
/**
|
|
4371
|
+
* Decides one candidate: write `out` and return true to place it, or return false to leave the
|
|
4372
|
+
* spot empty (a path, a rock, a stump's own footprint). Called once per candidate per tile build.
|
|
4373
|
+
*/
|
|
4374
|
+
readonly place: (point: IScatterPoint, out: IScatterPlacement) => boolean;
|
|
4375
|
+
/** Ground height at (x, z), field-local metres. */
|
|
4376
|
+
readonly getHeight: (x: number, z: number) => number;
|
|
4377
|
+
/** Coverage 0..1 at (x, z, height, normal y): paths, clearings, biome masks. */
|
|
4378
|
+
readonly getDensity?: (x: number, z: number, height: number, normalY: number) => number;
|
|
4379
|
+
readonly bounds?: IScatterFieldBounds | null;
|
|
4380
|
+
/** Candidates per square metre at full coverage. */
|
|
4381
|
+
readonly density?: number;
|
|
4382
|
+
readonly chunkSize?: number;
|
|
4383
|
+
readonly seed?: number;
|
|
4384
|
+
readonly heightSampleSpacing?: number;
|
|
4385
|
+
/** Degrees: nothing is placed on ground steeper than `maxSlope`, thinning over `slopeFade`. */
|
|
4386
|
+
readonly maxSlope?: number;
|
|
4387
|
+
readonly slopeFade?: number;
|
|
4388
|
+
readonly minAltitude?: number;
|
|
4389
|
+
readonly maxAltitude?: number;
|
|
4390
|
+
readonly drawDistance?: number;
|
|
4391
|
+
/** Distances at which the next level takes over, one per step down a part's `lods`. */
|
|
4392
|
+
readonly lodDistances?: readonly number[];
|
|
4393
|
+
readonly thinStart?: number;
|
|
4394
|
+
readonly thinEnd?: number;
|
|
4395
|
+
/** The share of instances left past `thinEnd`. */
|
|
4396
|
+
readonly farDensity?: number;
|
|
4397
|
+
/** Milliseconds per frame allowed for building tiles; one tile always builds. */
|
|
4398
|
+
readonly buildBudgetMs?: number;
|
|
4399
|
+
/** Tilt each instance onto the ground normal. Off keeps every instance upright. */
|
|
4400
|
+
readonly alignToGround?: boolean;
|
|
4401
|
+
readonly receiveShadow?: boolean;
|
|
4402
|
+
readonly castShadow?: boolean;
|
|
4403
|
+
/** Scales every density at once, as Unreal's `grass.densityScale`. */
|
|
4404
|
+
readonly densityScale?: number;
|
|
4405
|
+
/** Scales every distance at once, as Unreal's `grass.CullDistanceScale`. */
|
|
4406
|
+
readonly cullDistanceScale?: number;
|
|
4407
|
+
}
|
|
4408
|
+
interface IScatterFieldStats {
|
|
4409
|
+
tiles: number;
|
|
4410
|
+
visibleTiles: number;
|
|
4411
|
+
instances: number;
|
|
4412
|
+
pending: number;
|
|
4413
|
+
/** Tiles built since the field was made. */
|
|
4414
|
+
built: number;
|
|
4415
|
+
}
|
|
4416
|
+
/**
|
|
4417
|
+
* Streamed, seeded, instanced scatter of any baked mesh around a follow point; the game owns the
|
|
4418
|
+
* mesh, the material and where each instance lands.
|
|
4419
|
+
*
|
|
4420
|
+
* Square tiles round the follow point, built nearest first inside `buildBudgetMs` through the same
|
|
4421
|
+
* ring `GrassField3D` uses (`TileRing`): a tile is built inside 1.3 × the draw distance and freed
|
|
4422
|
+
* past 1.4 ×, Unreal Landscape grass's guard band (UE 5.8.3:
|
|
4423
|
+
* Engine/Source/Runtime/Landscape/Private/LandscapeGrass.cpp:88, :94). Each part draws one
|
|
4424
|
+
* `InstancedMesh` per level, so swapping detail is a visibility toggle on a baked level the game
|
|
4425
|
+
* loaded. Thinning is a plain instance count: the ring's tiles hold instances in the seeded shuffle
|
|
4426
|
+
* order, so any prefix covers the tile evenly and the far edge keeps a share of them.
|
|
4427
|
+
*
|
|
4428
|
+
* The field creates no colour, shading or shape: `parts` and `place` come from the game, and so does
|
|
4429
|
+
* every appearance constant.
|
|
4430
|
+
*
|
|
4431
|
+
* @situation scatter fallen logs, twigs, leaf litter, stones and ferns over a forest floor
|
|
4432
|
+
* @situation stream instanced props of any baked mesh round the player without one draw per prop
|
|
4433
|
+
* @situation place rocks, debris or plants on a heightfield with distance thinning and level of detail
|
|
4434
|
+
* @constraint call `update(follow)` once per rendered frame
|
|
4435
|
+
* @constraint `place` runs once per candidate per tile build: return false for paths and clearings
|
|
4436
|
+
* @constraint rotating or scaling the field is not supported; translating it is
|
|
4437
|
+
* @example
|
|
4438
|
+
* import { ScatterField3D } from "@threenative/core";
|
|
4439
|
+
* const floor = new ScatterField3D({
|
|
4440
|
+
* parts: [{ lods: [logLod0, logLod1], material }],
|
|
4441
|
+
* getHeight: (x, z) => height(x, z),
|
|
4442
|
+
* density: 0.05,
|
|
4443
|
+
* place: (point, out) => { out.x = point.x; out.y = point.y; out.z = point.z; out.yaw = point.x * 0.7; out.scale = 1; return !onPath(point.x, point.z); },
|
|
4444
|
+
* });
|
|
4445
|
+
* ctx.add(floor);
|
|
4446
|
+
* ctx.beforeRender(() => floor.update(hero.position));
|
|
4447
|
+
*/
|
|
4448
|
+
declare class ScatterField3D extends Group {
|
|
4449
|
+
#private;
|
|
4450
|
+
readonly parts: readonly IScatterPart[];
|
|
4451
|
+
place: (point: IScatterPoint, out: IScatterPlacement) => boolean;
|
|
4452
|
+
getHeight: (x: number, z: number) => number;
|
|
4453
|
+
getDensity: ((x: number, z: number, height: number, normalY: number) => number) | null;
|
|
4454
|
+
bounds: IScatterFieldBounds | null;
|
|
4455
|
+
density: number;
|
|
4456
|
+
chunkSize: number;
|
|
4457
|
+
seed: number;
|
|
4458
|
+
heightSampleSpacing: number;
|
|
4459
|
+
maxSlope: number;
|
|
4460
|
+
slopeFade: number;
|
|
4461
|
+
minAltitude: number;
|
|
4462
|
+
maxAltitude: number;
|
|
4463
|
+
drawDistance: number;
|
|
4464
|
+
lodDistances: readonly number[];
|
|
4465
|
+
thinStart: number;
|
|
4466
|
+
thinEnd: number;
|
|
4467
|
+
farDensity: number;
|
|
4468
|
+
buildBudgetMs: number;
|
|
4469
|
+
alignToGround: boolean;
|
|
4470
|
+
receiveShadow: boolean;
|
|
4471
|
+
castShadow: boolean;
|
|
4472
|
+
densityScale: number;
|
|
4473
|
+
cullDistanceScale: number;
|
|
4474
|
+
constructor(options: IScatterField3DOptions);
|
|
4475
|
+
get stats(): IScatterFieldStats;
|
|
4476
|
+
/** Builds every tile in range on the next `update` regardless of budget: on load or after a teleport. */
|
|
4477
|
+
prewarm(): void;
|
|
4478
|
+
/** Re-scatter after the ground or the coverage changed: all tiles, or those touching a rectangle. */
|
|
4479
|
+
refresh(rect?: IScatterFieldBounds): void;
|
|
4480
|
+
/** Streams, thins and LODs the tiles round `follow`. Call once per rendered frame. */
|
|
4481
|
+
update(follow: Vector3): void;
|
|
4482
|
+
dispose(): void;
|
|
4483
|
+
}
|
|
4484
|
+
|
|
4624
4485
|
interface IGPUParticles3DBuffers {
|
|
4625
4486
|
readonly positions: StorageBufferNode<"vec3">;
|
|
4626
4487
|
readonly velocities: StorageBufferNode<"vec3">;
|
|
@@ -5968,14 +5829,6 @@ declare function boneLengths(root: Object3D): IBoneLengthSnapshot;
|
|
|
5968
5829
|
*/
|
|
5969
5830
|
declare function boneLengthDeviations(root: Object3D, bind: IBoneLengthSnapshot, options?: IBoneLengthDeviationsOptions): IBoneLengthDeviationReport;
|
|
5970
5831
|
|
|
5971
|
-
|
|
5972
|
-
* The version this library reports.
|
|
5973
|
-
*
|
|
5974
|
-
* It read `0.1.0` while the package published `0.2.0`, and `__tests__/build.spec.ts` asserted the
|
|
5975
|
-
* stale literal, so the test held the bug in place rather than catching it. A literal is
|
|
5976
|
-
* unavoidable here — core is bundled for browsers and cannot read `package.json` at runtime — so
|
|
5977
|
-
* the spec now asserts this equals the manifest instead of asserting a number somebody typed.
|
|
5978
|
-
*/
|
|
5979
|
-
declare const version = "0.3.12";
|
|
5832
|
+
declare const version = "0.3.15";
|
|
5980
5833
|
|
|
5981
|
-
export { ATLAS_PADDING, ATMOSPHERE_LUT_RESOLUTIONS, AnimationComposer, AnimationPlayer, Atmosphere, type AtmosphereDirection, AtmosphereLuts, type AtmosphereRgb,
|
|
5834
|
+
export { ATLAS_PADDING, ATMOSPHERE_LUT_RESOLUTIONS, AnimationComposer, AnimationPlayer, Atmosphere, type AtmosphereDirection, AtmosphereLuts, type AtmosphereRgb, Billboard3D, type BillboardLockAxis, BlendSpace1D, BlendSpace2D, BudgetLadder, type BudgetVerdict, ClusteredBatch, ClusteredMesh, DEV_GLOBAL_KEY, Daylight, type DevGlobal, ENVIRONMENT_TOO_SMALL_MARKER, FlightModel, FluidField2D, FluidParticles3D, FramePassKind, GIBudget, type GIMethod, GIVisualizeMode, GI_METHODS, GPUParticles3D, GPUSceneBVH, type GPUSceneBVHTraceFunction, GRASS_FIELD_ATTRIBUTES, GrassField3D, GroundSnap, type IAddInSlicesOptions, type IAddInSlicesProgress, type IAddInSlicesReport, type IAircraftAirframe, type IAnimationComposerOptions, type IAnimationLayer, type IAnimationMask, type IAnimationMotionDelta, type IAnimationPlayOptions, type IAnimationPlayerOptions, type IAnimationRootMotionOptions, type IAnimationUpdateRateReport, type IAtmosphereLutResolution, type IAtmosphereLutResolutions, type IAtmosphereOptions, type IAtmosphereParameterPatch, type IAtmosphereParameters, type IAtmosphereScenePass, type IBillboard3DOptions, type IBoneContactReport, type IBoneLengthDeviation, type IBoneLengthDeviationReport, type IBoneLengthDeviationsOptions, type IBoneLengthSnapshot, type IBonePoseError, type IBudgetLadderOptions, type IBudgetWindow, type IClipBindingReport, type IClipCoverageReport, type IClipPoseErrorOptions, type IClipPoseErrorReport, type IClipPoseSubject, type IClipTrackBinding, type IClusterTable, type IClusteredBatchBuildOptions, type IClusteredBatchOptions, type IClusteredMeshOptions, type IClusteredPlacement, IComputeDriven$1 as IComputeDriven, type IDaylightOptions, type IDevTools, type IEmitParticleRequest, type IFlightAxes, type IFlightControls, type IFlightDeck, type IFlightEnvironment, type IFlightForces, type IFlightModelOptions, type IFlightModifiers, type IFlightQuaternion, type IFlightState, type IFlightVector3, type IFluidBounds, type IFluidCollider, type IFluidFieldOptions, type IFluidFieldSampler, type IFluidFieldVector2, type IFluidParticlesOptions, type IFluidParticlesStats, IFrameBudgetWindow, type IGIBudgetOptions, type IGIBudgetReport, type IGPUParticles3DOptions, type IGPUParticles3DRuntime, type IGPUParticles3DSpawnBuffers, type IGPUParticles3DSpawnRequest, type IGPUParticles3DStats, IGPUReadbackSample, type IGPUSceneBVHMaterialGroup, type IGPUSceneBVHOptions, IGamePluginHooks, IGamePluginRuntime, IGeometryCaptureReport, IGeometryCaptureRequest, type IGrassField3DOptions, type IGrassFieldBlade, type IGrassFieldBounds, type IGrassFieldNodes, type IGrassFieldStats, type IGroundSnapOptions, type IInstancedBatchBuildOptions, type IInstancedBatchOptions, type IInstancedPlacement, type ILampShadowStats, type ILaunchFailure, type ILoadAllOptions, type ILoadAllProgress, type IMatrixWorldReport, type IMeasureThreePoseOptions, type IMergeByMaterialOptions, type IMergePart, type IMergePartsOptions, type INormaliseToMetresOptions, type IPathFollow3DOptions, type IPathFollow3DProjection, type IPathFollow3DSample, type IProbeVolumeBakeProgress, type IProbeVolumeCoefficient, type IProbeVolumeObservation, type IProbeVolumeOptions, type IRadianceCacheOptions, type IReplayOptions, type IReplayRecording, type IReplayRecordingSample, type IResolvedAtmosphereParameters, type IRippleFieldFlow, type IRippleFieldOptions, type IScatterField3DOptions, type IScatterFieldBounds, type IScatterFieldStats, type IScatterPart, type IScatterPlacement, type IScatterPoint, type ISceneShape, type ISceneWarning, type IScreenProbeCamera, type IScreenProbeGatherOptions, type IScreenProbeGatherReport, type IShadowFilterBudgetOptions, type IShadowFilterReport, type IShortRangeAOCamera, type IShortRangeAOOptions, type IShortRangeAOReport, type ISkeletalMesh3DOptions, type ISkyCaptureOptions, type ISoftBody3DOptions, type ISoftBodyCollision, type ISolarPosition, type ISolarPositionInput, type ISourceAngleShadowInputs, type ISourceAngleShadowOptions, type ISpanProbeTarget, type ISpanSummary, type ISpanWindow, type ISpectralOceanCascade, type ISpectralOceanHeight, type ISpectralOceanOptions, type ISpriteAnimator3DOptions, type ISpriteFrame3D, IStageGpuReading, type IStaticTransformCensus, type IStrideReport, type ISurfaceCacheMaterial, type ISurfaceCacheOptions, type ISurfaceCacheReport, type ISurfaceCacheTexture, type ISurfaceLight, type ISurfaceLightsOptions, type IThreePoseBounds, type IThreePoseMeasurement, type ITracerPool3DOptions, type ITracerSpawnOptions, type IUnlitFoliageWarning, type IValidationReport, type IVirtualShadowOptions, type IVirtualShadowStats, type IWaterReflectionOptions, type IWaterSurfaceOptions, type IWaveFieldDomainWarp, type IWaveFieldGraphOptions, type IWaveFieldOptions, type IWaveFieldSample, type IWaveFieldWave, InstancedBatch, LAMP_SHADOW_MARKER, LUT_RESOLUTIONS, type LaunchFailureKind, type MatrixWorldMode, MatrixWorldPass, NEUTRAL_FLIGHT_MODIFIERS, type NormaliseAxis, OPACITY_IGNORED_MARKER, PROBE_VOLUME_MARKER, PathFollow3D, ProbeVolume, type ProbeVolumeDensity, RENDERLIST_VALIDATE_FLAG, RENDERLIST_VALIDATE_MARKER, RadianceCache, type Recording, RenderListValidator, type ReplayPointer, RippleField, SCENE_WARNING_MARKER, SHADOW_FILTER_TIERS, SHADOW_STAGES, SPANS, SPANS_FLAG, SPANS_MARKER, SPAN_COUNT, SPAN_NAMES, STATIC_TRANSFORM_MARKER, ScatterField3D, ScreenProbeGather, type ScreenProbePass, ShadowFilterBudget, type ShadowFilterTier, ShortRangeAO, SkeletalMesh3D, SkyCapture, SkyCaptureSchedule, SoftBody3D, type SpanId, SpanRecorder, SpectralOcean, SpriteAnimator3D, type SpritePlaybackMode, SurfaceCache, SurfaceLights, type ThreePoseQuaternion, type ThreePoseVector, TracedReflections, TracerPool3D, UNLIT_FOLIAGE_FIX, UNLIT_FOLIAGE_MARKER, VIRTUAL_SHADOW_CASTER_LAYER, VIRTUAL_SHADOW_MARKER, VIRTUAL_SHADOW_MOVER_LAYER, VIRTUAL_SHADOW_WIDE_CASTER_LAYER, VirtualShadowNode, WaterSurface3D, type WaveDirection, WaveField, addFoliageBackLight, addInSlices, addSpan, aerodynamicCoefficients, airDensity, aircraftMass, alwaysRender, attachToBone, attitudeAxes, beginSpan, boneContact, boneLengthDeviations, boneLengths, bvhIntersectFirstHit, clipBoneCoverage, clipPoseError, clipTrackBindings, createReplayDriver, debugFlag, debugValue, describeSceneShape, describeSceneWarning, devGlobal, directionFromSolarPosition, directionalTransmittance, displayPeriodMs, endSpan, ev100FromCamera, ev100FromExposure, ev100FromLuminance, exposeDebug, exposureFromEv100, formatSceneWarning, formatSpansWindow, formatUnlitFoliageWarning, formatValidationReport, gearClearance, installSpanProbes, invalidateStatic, isStatic, lampPenumbraTangent, lampShadowMarker, loadAll, lookDiagnostics, markStatic, measureThreePose, mergeByMaterial, mergeParts, normaliseToMetres, onLaunchFailure, parseReplayRecording, penumbraUv, posedBounds, publishDevGlobal, rayStruct, readGIMarker, readLampShadowMarker, readProbeVolumeObservation, readShadowTierMarker, readVirtualShadowMarker, refreshStaticTransforms, renderListValidationRequested, renderTrapAudit, replay, resetStaticTransforms, resolveAtmosphereLutResolutions, resolveAtmosphereParameters, sceneWarning, setAttitude, setSpanRecorder, skeletonBones, softCircleDataTexture, solarPosition, solarPositionAt, sourceAngleShadowFilter, sourceRadiusShadowFilter, spanNow, spanRecorder, spansRequested, staticTransformCensus, thinCards, unlitFoliageWarning, unmarkStatic, updateAtmosphereParameters, updateClusteredMeshes, useRoughDiffuse, validateWorldMatrices, version, zenithTransmittance };
|