@zephyr3d/scene 0.9.18 → 0.9.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/scriptregistry.js +124 -6
- package/dist/app/scriptregistry.js.map +1 -1
- package/dist/index.d.ts +270 -7
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/material/mixins/lightmodel/pbrblueprintmixin.js +11 -5
- package/dist/material/mixins/lightmodel/pbrblueprintmixin.js.map +1 -1
- package/dist/material/shader/helper.js +21 -8
- package/dist/material/shader/helper.js.map +1 -1
- package/dist/material/skin.js +4 -6
- package/dist/material/skin.js.map +1 -1
- package/dist/material/water.js +1 -1
- package/dist/material/water.js.map +1 -1
- package/dist/posteffect/bloom.js +177 -29
- package/dist/posteffect/bloom.js.map +1 -1
- package/dist/posteffect/compositor.js +111 -204
- package/dist/posteffect/compositor.js.map +1 -1
- package/dist/posteffect/motionblur.js +3 -0
- package/dist/posteffect/motionblur.js.map +1 -1
- package/dist/posteffect/posteffect.js +79 -0
- package/dist/posteffect/posteffect.js.map +1 -1
- package/dist/posteffect/skinsss.js +10 -10
- package/dist/posteffect/skinsss.js.map +1 -1
- package/dist/posteffect/ssr.js +247 -16
- package/dist/posteffect/ssr.js.map +1 -1
- package/dist/posteffect/taa.js +121 -19
- package/dist/posteffect/taa.js.map +1 -1
- package/dist/posteffect/tonemap.js +6 -6
- package/dist/posteffect/tonemap.js.map +1 -1
- package/dist/render/abuffer_oit.js +2 -1
- package/dist/render/abuffer_oit.js.map +1 -1
- package/dist/render/envlight.js +6 -3
- package/dist/render/envlight.js.map +1 -1
- package/dist/render/hzb.js +11 -4
- package/dist/render/hzb.js.map +1 -1
- package/dist/render/lightpass.js +7 -15
- package/dist/render/lightpass.js.map +1 -1
- package/dist/render/renderer.js +4 -3
- package/dist/render/renderer.js.map +1 -1
- package/dist/render/rendergraph/blackboard.js +78 -0
- package/dist/render/rendergraph/blackboard.js.map +1 -0
- package/dist/render/rendergraph/executor.js +41 -11
- package/dist/render/rendergraph/executor.js.map +1 -1
- package/dist/render/rendergraph/forward_plus_builder.js +495 -201
- package/dist/render/rendergraph/forward_plus_builder.js.map +1 -1
- package/dist/render/rendergraph/rendergraph.js +29 -0
- package/dist/render/rendergraph/rendergraph.js.map +1 -1
- package/dist/render/rendergraph/types.js.map +1 -1
- package/dist/shaders/ssr.js +52 -21
- package/dist/shaders/ssr.js.map +1 -1
- package/dist/utility/misc.js +10 -1
- package/dist/utility/misc.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _zephyr3d_device from '@zephyr3d/device';
|
|
2
|
-
import { TextureCube, FrameBuffer, Texture2D, GPUDataBuffer, PrimitiveType, TextureSampler, BindGroupLayout, ProgramBuilder, PBInsideFunctionScope, PBShaderExp, PBGlobalScope, VertexSemantic, StructuredBuffer, VertexAttribFormat, VertexStepMode, IndexBuffer, BindGroup, GPUProgram, RenderStateSet, FaceMode, PBFunctionScope, Texture2DArray, BaseTexture, ShaderTypeFunc, TextureFormat, AbstractDevice, TimestampQueryStatus, ColorState, TextureAddressMode, TextureFilterMode,
|
|
2
|
+
import { TextureCube, FrameBuffer, Texture2D, GPUDataBuffer, PrimitiveType, TextureSampler, SamplerOptions, BindGroupLayout, ProgramBuilder, PBInsideFunctionScope, PBShaderExp, PBGlobalScope, VertexSemantic, StructuredBuffer, VertexAttribFormat, VertexStepMode, IndexBuffer, BindGroup, GPUProgram, RenderStateSet, FaceMode, PBFunctionScope, Texture2DArray, BaseTexture, ShaderTypeFunc, TextureFormat, AbstractDevice, TimestampQueryStatus, ColorState, TextureAddressMode, TextureFilterMode, TextureAtlasManager, DeviceBackend } from '@zephyr3d/device';
|
|
3
3
|
import * as _zephyr3d_base from '@zephyr3d/base';
|
|
4
4
|
import { Disposable, TypedArray, Ray, AABB, Matrix4x4, Plane, Frustum, Vector3, Nullable, GenericConstructor, RequireOptionals, Immutable, Vector4, Clonable, IDisposable, Vector2, IEventTarget, Observable, DRef, Rect, CubeFace, Quaternion, Interpolator, InterpolationMode, InterpolatorScalar, DeepPartial, VFS, HttpRequest, WriteOptions, ReadOptions, DeepRequireOptionals } from '@zephyr3d/base';
|
|
5
5
|
|
|
@@ -232,6 +232,14 @@ type SamplerType = 'clamp_linear' | 'clamp_linear_nomip' | 'clamp_nearest' | 'cl
|
|
|
232
232
|
* @public
|
|
233
233
|
*/
|
|
234
234
|
declare function fetchSampler(type: SamplerType): TextureSampler<unknown> | null;
|
|
235
|
+
/**
|
|
236
|
+
* Get the sampler options of a sampler preset, e.g. for use with the
|
|
237
|
+
* withSampler() shader declaration modifier.
|
|
238
|
+
* @param type - The sampler type
|
|
239
|
+
* @returns The sampler options for the given type
|
|
240
|
+
* @public
|
|
241
|
+
*/
|
|
242
|
+
declare function getSamplerOptions(type: SamplerType): SamplerOptions;
|
|
235
243
|
|
|
236
244
|
/**
|
|
237
245
|
* Enumerates supported data types for serializable properties.
|
|
@@ -6272,6 +6280,13 @@ interface OIT extends IDisposable {
|
|
|
6272
6280
|
/**
|
|
6273
6281
|
* Begins rendering the transparent objects.
|
|
6274
6282
|
*
|
|
6283
|
+
* @remarks
|
|
6284
|
+
* Contract: the caller (the transparent scene pass) must have explicitly
|
|
6285
|
+
* bound the transparent scene target framebuffer before calling begin(),
|
|
6286
|
+
* beginPass() or endPass(). Implementations may redirect rendering to
|
|
6287
|
+
* internal buffers, but must composite into that bound target and restore
|
|
6288
|
+
* it before returning.
|
|
6289
|
+
*
|
|
6275
6290
|
* @param ctx - The draw context.
|
|
6276
6291
|
* @returns The number of passes required for rendering.
|
|
6277
6292
|
*/
|
|
@@ -7519,6 +7534,13 @@ interface RGFramebufferDesc {
|
|
|
7519
7534
|
* The executor calls `allocate()` before a resource's first use and
|
|
7520
7535
|
* `release()` after its last use.
|
|
7521
7536
|
*
|
|
7537
|
+
* Lifetime contract: the graph compiler extends a texture's lifetime to cover
|
|
7538
|
+
* every graph-managed framebuffer it is attached to, and the executor releases
|
|
7539
|
+
* framebuffers before textures at the same pass boundary. Allocators may
|
|
7540
|
+
* therefore assume `releaseFramebuffer()` is called before `release()` of its
|
|
7541
|
+
* attachments, and must keep a released framebuffer's attachments intact until
|
|
7542
|
+
* their own `release()` call.
|
|
7543
|
+
*
|
|
7522
7544
|
* @typeParam TTexture - The concrete texture type (e.g. `Texture2D`).
|
|
7523
7545
|
* @public
|
|
7524
7546
|
*/
|
|
@@ -7965,6 +7987,74 @@ declare const RGHistoryResources: {
|
|
|
7965
7987
|
readonly SSR_MOTION_VECTOR: "ssrMotionVector";
|
|
7966
7988
|
};
|
|
7967
7989
|
|
|
7990
|
+
/**
|
|
7991
|
+
* Canonical names for well-known per-frame resources shared through {@link RGBlackboard}.
|
|
7992
|
+
*
|
|
7993
|
+
* Producer passes register their output handles under these names so that
|
|
7994
|
+
* consumers (e.g. post effects) can declare reads without hard-coupling to
|
|
7995
|
+
* the pass that produced them.
|
|
7996
|
+
*
|
|
7997
|
+
* @public
|
|
7998
|
+
*/
|
|
7999
|
+
declare const FrameResources: {
|
|
8000
|
+
readonly SceneColor: "sceneColor";
|
|
8001
|
+
readonly SceneColorCopy: "sceneColorCopy";
|
|
8002
|
+
readonly LinearDepth: "linearDepth";
|
|
8003
|
+
readonly SceneDepthAttachment: "sceneDepthAttachment";
|
|
8004
|
+
readonly MotionVector: "motionVector";
|
|
8005
|
+
readonly HiZ: "hiZ";
|
|
8006
|
+
readonly SSRRoughness: "ssrRoughness";
|
|
8007
|
+
readonly SSRNormal: "ssrNormal";
|
|
8008
|
+
readonly SSSProfile: "sssProfile";
|
|
8009
|
+
readonly SSSParam: "sssParam";
|
|
8010
|
+
readonly SSSDiffuse: "sssDiffuse";
|
|
8011
|
+
readonly SSSTransmission: "sssTransmission";
|
|
8012
|
+
readonly SkinSSS: "skinSSS";
|
|
8013
|
+
};
|
|
8014
|
+
/**
|
|
8015
|
+
* Named registry of render graph resource handles for the current frame.
|
|
8016
|
+
*
|
|
8017
|
+
* The blackboard decouples resource producers from consumers: passes that
|
|
8018
|
+
* create shared resources register the returned handles by name, and later
|
|
8019
|
+
* passes look them up to declare read dependencies. This replaces passing
|
|
8020
|
+
* textures through mutable `DrawContext` fields.
|
|
8021
|
+
*
|
|
8022
|
+
* A blackboard instance is valid for a single graph build; create a new one
|
|
8023
|
+
* (or clear it) every frame together with the graph.
|
|
8024
|
+
*
|
|
8025
|
+
* @public
|
|
8026
|
+
*/
|
|
8027
|
+
declare class RGBlackboard {
|
|
8028
|
+
/**
|
|
8029
|
+
* Register a resource handle under a name, replacing any previous entry.
|
|
8030
|
+
* @param name - Resource name, typically one of {@link FrameResources}.
|
|
8031
|
+
* @param handle - The handle to register.
|
|
8032
|
+
*/
|
|
8033
|
+
set(name: string, handle: RGHandle): void;
|
|
8034
|
+
/**
|
|
8035
|
+
* Look up a resource handle by name.
|
|
8036
|
+
* @param name - Resource name, typically one of {@link FrameResources}.
|
|
8037
|
+
* @returns The registered handle, or null if not present this frame.
|
|
8038
|
+
*/
|
|
8039
|
+
get(name: string): Nullable<RGHandle>;
|
|
8040
|
+
/**
|
|
8041
|
+
* Check whether a resource is registered.
|
|
8042
|
+
* @param name - Resource name.
|
|
8043
|
+
* @returns true if a handle is registered under the name.
|
|
8044
|
+
*/
|
|
8045
|
+
has(name: string): boolean;
|
|
8046
|
+
/**
|
|
8047
|
+
* Look up a resource handle that must exist.
|
|
8048
|
+
* @param name - Resource name.
|
|
8049
|
+
* @returns The registered handle.
|
|
8050
|
+
*/
|
|
8051
|
+
expect(name: string): RGHandle;
|
|
8052
|
+
/**
|
|
8053
|
+
* Remove all registered handles.
|
|
8054
|
+
*/
|
|
8055
|
+
clear(): void;
|
|
8056
|
+
}
|
|
8057
|
+
|
|
7968
8058
|
/**
|
|
7969
8059
|
* Options controlling which features are enabled in the forward+ pipeline.
|
|
7970
8060
|
*
|
|
@@ -8032,6 +8122,80 @@ declare enum PostEffectLayer {
|
|
|
8032
8122
|
transparent = 1,
|
|
8033
8123
|
end = 2
|
|
8034
8124
|
}
|
|
8125
|
+
/**
|
|
8126
|
+
* History texture binding required while a post effect executes.
|
|
8127
|
+
* @public
|
|
8128
|
+
*/
|
|
8129
|
+
interface PostEffectHistoryRead {
|
|
8130
|
+
/** History resource name (see {@link RGHistoryResources}). */
|
|
8131
|
+
name: string;
|
|
8132
|
+
/** Graph handle of the imported previous-frame texture. */
|
|
8133
|
+
handle: RGHandle;
|
|
8134
|
+
}
|
|
8135
|
+
/**
|
|
8136
|
+
* Output target of a post effect, created through {@link PostEffectSetupContext.createOutput}.
|
|
8137
|
+
* @public
|
|
8138
|
+
*/
|
|
8139
|
+
interface PostEffectOutput {
|
|
8140
|
+
/** Color handle produced by this effect. Return it from {@link AbstractPostEffect.setup}. */
|
|
8141
|
+
color: RGHandle;
|
|
8142
|
+
/**
|
|
8143
|
+
* Graph framebuffer to render into, or null when the effect must render to the
|
|
8144
|
+
* device default framebuffer (screen).
|
|
8145
|
+
*/
|
|
8146
|
+
framebuffer: Nullable<RGHandle>;
|
|
8147
|
+
/** Whether the effect must gamma-correct its final write. */
|
|
8148
|
+
srgbOutput: boolean;
|
|
8149
|
+
}
|
|
8150
|
+
/**
|
|
8151
|
+
* Build-time context handed to {@link AbstractPostEffect.setup}.
|
|
8152
|
+
*
|
|
8153
|
+
* The context carries everything an effect needs to declare its passes on the
|
|
8154
|
+
* render graph. Where the effect output physically lands (intermediate texture,
|
|
8155
|
+
* backbuffer or screen) is decided by {@link PostEffectSetupContext.createOutput};
|
|
8156
|
+
* effect implementations never deal with final-target selection themselves.
|
|
8157
|
+
*
|
|
8158
|
+
* @public
|
|
8159
|
+
*/
|
|
8160
|
+
interface PostEffectSetupContext {
|
|
8161
|
+
/** The render graph being built for this frame. */
|
|
8162
|
+
readonly graph: RenderGraph;
|
|
8163
|
+
/** Frame draw context. Read configuration from it, never textures. */
|
|
8164
|
+
readonly ctx: DrawContext;
|
|
8165
|
+
/** Named frame resources (linear depth, motion vectors, GBuffer, ...). */
|
|
8166
|
+
readonly blackboard: RGBlackboard;
|
|
8167
|
+
/** Chain input: color output of the previous effect (or the scene color). */
|
|
8168
|
+
readonly input: RGHandle;
|
|
8169
|
+
/** Intermediate color format of the post effect chain. */
|
|
8170
|
+
readonly colorFormat: TextureFormat;
|
|
8171
|
+
/** Render width in pixels. */
|
|
8172
|
+
readonly width: number;
|
|
8173
|
+
/** Render height in pixels. */
|
|
8174
|
+
readonly height: number;
|
|
8175
|
+
/** Cross-frame history resources, or null when unavailable. */
|
|
8176
|
+
readonly history: Nullable<HistoryResourceManager<Texture2D>>;
|
|
8177
|
+
/**
|
|
8178
|
+
* Scene depth attachment for intermediate passes that depth-test against
|
|
8179
|
+
* scene depth: either a graph texture handle or a backend depth texture.
|
|
8180
|
+
* Pass it as the depthAttachment of intermediate framebuffers; the final
|
|
8181
|
+
* pass gets it through createOutput({needDepthAttachment: true}).
|
|
8182
|
+
*/
|
|
8183
|
+
readonly sceneDepthAttachment: unknown;
|
|
8184
|
+
/**
|
|
8185
|
+
* Create the output target for the effect's final pass.
|
|
8186
|
+
*
|
|
8187
|
+
* Must be called exactly once, inside the setup callback of the pass that
|
|
8188
|
+
* produces the effect's final color. The compositor decides whether this
|
|
8189
|
+
* resolves to an intermediate texture or a direct write to the final target.
|
|
8190
|
+
*
|
|
8191
|
+
* @param builder - The pass builder of the effect's final pass.
|
|
8192
|
+
* @param opts - Set needDepthAttachment when the pass depth-tests against scene depth.
|
|
8193
|
+
* @returns The resolved output target.
|
|
8194
|
+
*/
|
|
8195
|
+
createOutput(builder: RGPassBuilder, opts?: {
|
|
8196
|
+
needDepthAttachment?: boolean;
|
|
8197
|
+
}): PostEffectOutput;
|
|
8198
|
+
}
|
|
8035
8199
|
/**
|
|
8036
8200
|
* Base class for any type of post effect
|
|
8037
8201
|
* @public
|
|
@@ -8066,6 +8230,11 @@ declare class AbstractPostEffect extends Disposable {
|
|
|
8066
8230
|
* @returns true if the scene depth buffer is required.
|
|
8067
8231
|
*/
|
|
8068
8232
|
requireDepthAttachment(_ctx: DrawContext): boolean;
|
|
8233
|
+
/**
|
|
8234
|
+
* Checks whether this post effect requires the motion vector texture
|
|
8235
|
+
* @returns true if the motion vector texture is required.
|
|
8236
|
+
*/
|
|
8237
|
+
requireMotionVectorTexture(_ctx: DrawContext): boolean;
|
|
8069
8238
|
/**
|
|
8070
8239
|
* Apply the post effect
|
|
8071
8240
|
* @param camera - Camera used the render the scene
|
|
@@ -8077,6 +8246,19 @@ declare class AbstractPostEffect extends Disposable {
|
|
|
8077
8246
|
* The frame buffer of the post effect is already set when apply() is called.
|
|
8078
8247
|
*/
|
|
8079
8248
|
apply(ctx: DrawContext, inputColorTexture: Texture2D, sceneDepthTexture: Texture2D, srgbOutput: boolean): void;
|
|
8249
|
+
/**
|
|
8250
|
+
* Declare this effect's passes on the render graph.
|
|
8251
|
+
*
|
|
8252
|
+
* The default implementation wraps {@link AbstractPostEffect.apply} into a
|
|
8253
|
+
* single graph pass, so effects only overriding apply() work unchanged.
|
|
8254
|
+
* Multi-pass effects override this method to declare each internal step as
|
|
8255
|
+
* its own pass, calling {@link PostEffectSetupContext.createOutput} inside
|
|
8256
|
+
* the final pass.
|
|
8257
|
+
*
|
|
8258
|
+
* @param s - Build-time setup context.
|
|
8259
|
+
* @returns The effect's output color handle.
|
|
8260
|
+
*/
|
|
8261
|
+
setup(s: PostEffectSetupContext): RGHandle;
|
|
8080
8262
|
/**
|
|
8081
8263
|
*
|
|
8082
8264
|
* @param ctx - Draw context
|
|
@@ -8093,13 +8275,58 @@ declare class AbstractPostEffect extends Disposable {
|
|
|
8093
8275
|
}
|
|
8094
8276
|
|
|
8095
8277
|
/**
|
|
8096
|
-
*
|
|
8278
|
+
* Options for building a post effect layer as render graph passes.
|
|
8279
|
+
* @public
|
|
8280
|
+
*/
|
|
8281
|
+
interface CompositorBuildLayerOptions {
|
|
8282
|
+
/** The render graph being built. */
|
|
8283
|
+
graph: RenderGraph;
|
|
8284
|
+
/** Frame draw context. */
|
|
8285
|
+
ctx: DrawContext;
|
|
8286
|
+
/** The layer to build. */
|
|
8287
|
+
layer: PostEffectLayer;
|
|
8288
|
+
/** Named frame resources. */
|
|
8289
|
+
blackboard: RGBlackboard;
|
|
8290
|
+
/** Chain input color handle. */
|
|
8291
|
+
input: RGHandle;
|
|
8292
|
+
/**
|
|
8293
|
+
* Direct final target for the last effect of the chain, or null to always
|
|
8294
|
+
* end the chain in an intermediate texture. Pass the imported backbuffer
|
|
8295
|
+
* handle together with isScreen=false when rendering into a framebuffer,
|
|
8296
|
+
* or isScreen=true when the final target is the device default framebuffer.
|
|
8297
|
+
*/
|
|
8298
|
+
finalOutput?: Nullable<{
|
|
8299
|
+
handle: RGHandle;
|
|
8300
|
+
isScreen: boolean;
|
|
8301
|
+
}>;
|
|
8302
|
+
/**
|
|
8303
|
+
* True when the chain input physically resides in the final target (final
|
|
8304
|
+
* framebuffer used as scene intermediate). An effect whose input is the
|
|
8305
|
+
* final target must never direct-write it — sampling and rendering the same
|
|
8306
|
+
* texture in one pass is a feedback loop.
|
|
8307
|
+
*/
|
|
8308
|
+
inputResidesInFinalTarget?: boolean;
|
|
8309
|
+
/**
|
|
8310
|
+
* Depth attachment for intermediate effect outputs that request one:
|
|
8311
|
+
* either a graph texture handle or a backend depth texture.
|
|
8312
|
+
*/
|
|
8313
|
+
sceneDepthAttachment?: unknown;
|
|
8314
|
+
/** Ordering/lifetime dependencies declared by every effect pass. */
|
|
8315
|
+
dependencies?: RGHandle[];
|
|
8316
|
+
/** History bindings kept in a read scope while effects execute. */
|
|
8317
|
+
historyReads?: PostEffectHistoryRead[];
|
|
8318
|
+
/** Cross-frame history resource manager. */
|
|
8319
|
+
history?: Nullable<HistoryResourceManager<Texture2D>>;
|
|
8320
|
+
}
|
|
8321
|
+
/**
|
|
8322
|
+
* Result of {@link Compositor.buildLayer}.
|
|
8097
8323
|
* @public
|
|
8098
8324
|
*/
|
|
8099
|
-
interface
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8325
|
+
interface CompositorBuildLayerResult {
|
|
8326
|
+
/** Chain output color handle. Equals the input when no effect is enabled. */
|
|
8327
|
+
color: RGHandle;
|
|
8328
|
+
/** True when the last effect wrote the final target directly. */
|
|
8329
|
+
wroteFinal: boolean;
|
|
8103
8330
|
}
|
|
8104
8331
|
/**
|
|
8105
8332
|
* Post processing compositor
|
|
@@ -8110,6 +8337,19 @@ declare class Compositor {
|
|
|
8110
8337
|
* Creates an instance of Compositor
|
|
8111
8338
|
*/
|
|
8112
8339
|
constructor();
|
|
8340
|
+
/**
|
|
8341
|
+
* Build the enabled effects of a layer as render graph passes.
|
|
8342
|
+
*
|
|
8343
|
+
* Effects are chained through graph texture handles: each effect's setup()
|
|
8344
|
+
* declares its passes reading the previous output. Where each effect output
|
|
8345
|
+
* lands (intermediate texture or the final target) is decided here through
|
|
8346
|
+
* the {@link PostEffectSetupContext.createOutput} implementation, so effect
|
|
8347
|
+
* code never handles final-target selection.
|
|
8348
|
+
*
|
|
8349
|
+
* @param options - Build inputs.
|
|
8350
|
+
* @returns The chain output handle and whether the final target was written directly.
|
|
8351
|
+
*/
|
|
8352
|
+
buildLayer(options: CompositorBuildLayerOptions): CompositorBuildLayerResult;
|
|
8113
8353
|
/**
|
|
8114
8354
|
* Adds a posteffect
|
|
8115
8355
|
*
|
|
@@ -9189,6 +9429,14 @@ declare class Bloom extends AbstractPostEffect {
|
|
|
9189
9429
|
requireLinearDepthTexture(): boolean;
|
|
9190
9430
|
/** {@inheritDoc AbstractPostEffect.requireDepthAttachment} */
|
|
9191
9431
|
requireDepthAttachment(): boolean;
|
|
9432
|
+
/** {@inheritDoc AbstractPostEffect.setup}
|
|
9433
|
+
*
|
|
9434
|
+
* Native multi-pass implementation: prefilter, one pass per pyramid level
|
|
9435
|
+
* (separable blur), one additive upsample pass per level, and a final
|
|
9436
|
+
* compose pass. Pyramid sizes are computed at build time with the same math
|
|
9437
|
+
* as {@link Bloom.apply}, so both paths produce identical results.
|
|
9438
|
+
*/
|
|
9439
|
+
setup(s: PostEffectSetupContext): RGHandle;
|
|
9192
9440
|
/** {@inheritDoc AbstractPostEffect.apply} */
|
|
9193
9441
|
apply(ctx: DrawContext, inputColorTexture: Texture2D, _sceneDepthTexture: Texture2D, _srgbOutput: boolean): void;
|
|
9194
9442
|
}
|
|
@@ -19713,6 +19961,13 @@ declare class InputManager {
|
|
|
19713
19961
|
*
|
|
19714
19962
|
* Caching:
|
|
19715
19963
|
* - Built bundles are memoized in `_built` map keyed by canonical source path.
|
|
19964
|
+
* - At runtime, all bundles built by the same registry share one realm-global
|
|
19965
|
+
* module registry (keyed by a per-registry namespace): a local module is
|
|
19966
|
+
* evaluated once no matter how many entry bundles inline it, so module-level
|
|
19967
|
+
* singletons are identical across entries. Module records are versioned by a
|
|
19968
|
+
* content hash — rebuilding an unchanged module reuses its evaluated
|
|
19969
|
+
* instance, while changed content replaces the record so the next load
|
|
19970
|
+
* re-evaluates the new code.
|
|
19716
19971
|
*
|
|
19717
19972
|
* @public
|
|
19718
19973
|
*/
|
|
@@ -19722,6 +19977,7 @@ declare class ScriptRegistry {
|
|
|
19722
19977
|
private _built;
|
|
19723
19978
|
private _building;
|
|
19724
19979
|
private _builtDeps;
|
|
19980
|
+
private _namespace;
|
|
19725
19981
|
/**
|
|
19726
19982
|
* @param vfs - The virtual file system for existence checks, reads, and path ops.
|
|
19727
19983
|
* @param scriptsRoot - Root directory for script resolution (used with `#/` specifiers).
|
|
@@ -19804,6 +20060,13 @@ declare class ScriptRegistry {
|
|
|
19804
20060
|
private build;
|
|
19805
20061
|
private buildBundle;
|
|
19806
20062
|
private collectModule;
|
|
20063
|
+
/**
|
|
20064
|
+
* Rewrites each collected module's version to a Merkle-style hash combining
|
|
20065
|
+
* its own content hash with the effective versions of its local
|
|
20066
|
+
* dependencies. Cycles fall back to the plain content hash, which is
|
|
20067
|
+
* deterministic on both sides of the cycle.
|
|
20068
|
+
*/
|
|
20069
|
+
private applyEffectiveVersions;
|
|
19807
20070
|
private resolveModuleInfo;
|
|
19808
20071
|
private getTypeScriptRuntime;
|
|
19809
20072
|
private transpileToESModule;
|
|
@@ -28058,4 +28321,4 @@ declare const ATMOSPHERIC_FOG_BIT: number;
|
|
|
28058
28321
|
*/
|
|
28059
28322
|
declare const HEIGHT_FOG_BIT: number;
|
|
28060
28323
|
|
|
28061
|
-
export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationController, type AnimationControllerEventMap, type AnimationControllerSetStateOptions, type AnimationControllerStateDefinition, type AnimationFrameEvent, type AnimationMarker, type AnimationMarkerEvent, AnimationPlayback, type AnimationPlaybackEvent, type AnimationPlaybackEventMap, type AnimationPlaybackState, type AnimationPlaybackStopEvent, type AnimationPlaybackSyncMode, type AnimationPlaybackSyncOptions, AnimationSet, type AnimationSetEventMap, type AnimationStopReason, type AnimationTimeRef, AnimationTimeline, type AnimationTimelineActiveDisposition, type AnimationTimelineDefinition, type AnimationTimelineEventPolicy, type AnimationTimelineEventResponse, type AnimationTimelineEventResult, type AnimationTimelineEventTarget, AnimationTimelineRunner, type AnimationTimelineRunnerEventMap, type AnimationTimelineRunnerState, type AnimationTimelineStateReturnTarget, type AnimationTimelineStep, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, type AssetGeometryCacheFrame, AssetHierarchyNode, type AssetImageInfo, type AssetJointDynamicsChain, type AssetJointDynamicsCollider, type AssetJointDynamicsFlatPlane, type AssetJointDynamicsSpringBone, type AssetMToonMaterial, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetMorphTargetBinding, type AssetMorphTargetGroup, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetPrimitiveInfo, type AssetRotationTrack, type AssetSamplerInfo, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSpringBone, type AssetSpringBoneCollider, type AssetSpringBoneColliderGroup, type AssetSpringBoneColliderShape, type AssetSpringBoneJoint, type AssetSubMeshData, type AssetTextureInfo, type AssetTranslationTrack, type AssetUnlitMaterial, type AssetVertexBufferInfo, type AvatarBindMode, type AvatarBodyRegionTarget, type AvatarBodyRegions, type AvatarEquipOptions, type AvatarFitMode, type AvatarJointMap, AvatarOutfitInstance, type AvatarOutfitSource, type AvatarOutfitValidation, type AvatarSlotId, type AvatarSlotOptions, AvatarWardrobe, type AvatarWardrobeOptions, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, type BaseFetchOptions, BaseGraphNode, BaseLight, BaseSprite, BaseTextureNode, type BatchDrawable, BatchGroup, BillboardMatrixNode, type BlendMode, BlinnMaterial, type BlitType, Blitter, Bloom, type BluePrintEditorState, type BluePrintUniformTexture, type BluePrintUniformValue, type BlueprintDAG, type BoneNode, BoundingBox, type BoundingVolume, type BoxCreationOptions, BoxFilterBlitter, BoxFrameShape, BoxShape, CCDSolver, type CachedBindGroup, Camera, type CameraHistoryData, CameraNearFarNode, type CameraOITMode, CameraPositionNode, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, type ColoredEdge, type ColoredLineEdge, type ColoredQuadraticEdge, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, type CompiledRenderGraph, Compositor, type CompositorContext, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, type ControllerConfigUpdate, CopyBlitter, type CopyHumanoidAnimationOptions, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DevicePoolAllocator, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, EPSILON, type EdgeColor, type EditorMode, ElapsedTimeNode, type EmitterBehavior, type EmitterShape, Engine, EnvConstantAmbient, EnvHemisphericAmbient, type EnvLightType, EnvLightWrapper, EnvShIBL, Environment, EnvironmentLighting, EqualNode, Exp2Node, ExpNode, type ExtractMixinReturnType, type ExtractMixinType, FABRIKSolver, FBMWaveGenerator, FFTWaveGenerator, FPSCameraController, type FPSCameraControllerOptions, FWidthNode, FXAA, FaceForwardNode, type FixedGeometryCacheFrame, type FixedGeometryCacheState, FixedGeometryCacheTrack, type FlatPlane, FloorNode, FmaNode, type FogType, FontAsset, type FontAssetFetchOptions, type FontAssetMSDFAtlasSettings, type FontMetrics, type ForwardPlusOptions, FractNode, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GlyphContour, type GlyphData, type GlyphPoint, type GrabberR, type GrabberRW, GraphNode, type GraphNodeInput, type GraphNodeOutput, type GraphStructure, type GrassInstanceInfo, GrassLayer, GrassMaterial, GrassRenderer, Grayscale, HEIGHT_FOG_BIT, Hash1Node, Hash2Node, Hash3Node, HistoryResourceManager, type Host, HumanoidBodyRig, HumanoidHandRig, type HumanoidJointMapping, type HumanoidRetargetAxisLocks, type HumanoidRootMotionMode, type HumanoidRootMotionScaleMode, type HumanoidSkeletalAnimationMaskOptions, type HumanoidSkeletalAnimationMaskPreset, type IAttachedScript, type IBaseEvent, type IControllerKeyboardEvent, type IControllerKeydownEvent, type IControllerKeypressEvent, type IControllerKeyupEvent, type IControllerMouseEvent, type IControllerPointerCancelEvent, type IControllerPointerDownEvent, type IControllerPointerMoveEvent, type IControllerPointerUpEvent, type IControllerWheelEvent, type IGraphNode, IKAngleConstraint, IKChain, IKConstraint, type IKJoint, IKModifier, IKSolver, type IMixinAlbedoColor, type IMixinBlinnPhong, type IMixinFoliage, type IMixinLambert, type IMixinLight, type IMixinPBRBluePrint, type IMixinPBRCommon, type IMixinPBRMetallicRoughness, type IMixinPBRSpecularGlossiness, type IMixinVertexColor, type IModKey, type IRUniformTexture, type IRUniformValue, type IRenderHook, type IRenderable, type InputEventHandler, InputManager, InstanceBindGroupAllocator, type InstanceData, InstanceIndexNode, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsColliderSnapshot, type JointDynamicsFlatPlaneHandle, type JointDynamicsFlatPlaneSnapshot, type JointDynamicsGrabberHandle, type JointDynamicsGrabberSnapshot, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, type JointNameMatcher, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_CLUSTERED_LIGHTS, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_TERRAIN_MIPMAP_LEVELS, MORPH_ATTRIBUTE_VECTOR_COUNT, MORPH_TARGET_COLOR, MORPH_TARGET_NORMAL, MORPH_TARGET_POSITION, MORPH_TARGET_TANGENT, MORPH_TARGET_TEX0, MORPH_TARGET_TEX1, MORPH_TARGET_TEX2, MORPH_TARGET_TEX3, MORPH_WEIGHTS_VECTOR_COUNT, type MSDFBitmap, type MSDFOptions, type MSDFShape, MSDFText, MSDFTextAtlasManager, MSDFTextSprite, MToonMaterial, type MToonOutlineWidthMode, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh$1 as Mesh, MeshMaterial, type MeshUpdateCallback, type Metadata$1 as Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type ModelLoader, type MorphBoundingInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetGroupTrack, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, type NamedJointsSkeletalAnimationMaskOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, type PBRBlueprintOutputName, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, type PairAdjustment, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, PerspectiveCamera, type PhysicsCurves, type PickResult, type PickTarget, PixelNormalNode, PixelWorldPositionNode, type PlaneCollider, type PlaneCreationOptions, PlaneShape, type PlayAnimationOptions, type PointInit, PointLight, type PointR, type PointRW, type PointTransform, PostEffectLayer, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, type RGExecuteContext, type RGExecuteFn, type RGFramebufferDesc, RGHandle, RGHistoryResources, type RGPassBuilder, type RGProfileResult, type RGProfileScopeResult, type RGProfileScopeType, type RGProfilingOptions, type RGResolvedSize, type RGResourceLifetime, type RGSizeMode, RGSubpass, type RGTextureAllocator, type RGTextureDesc, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, type RenderFunc, RenderGraph, RenderGraphExecutor, type RenderGraphExecutorOptions, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, type RenderPath, RenderQueue, type RenderQueueItem, type RenderQueueRef, RenderTarget, type ResolutionTransform, ResolveVertexNormalNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResourceManager, RotateAboutAxisNode, RuntimeScript, type RuntimeScriptArrayDeclaration, type RuntimeScriptArrayElementDeclaration, type RuntimeScriptConfig, type RuntimeScriptObjectDeclaration, type RuntimeScriptObjectFieldDeclaration, type RuntimeScriptPropertyDeclaration, type RuntimeScriptPropertyInfo, type RuntimeScriptPropertyOptions, type RuntimeScriptPropertyType, type RuntimeScriptValueDeclaration, type RuntimeScriptValueType, SAO, type SSSDebugView, type SSSQualityPreset, type SSSResolvedSettings, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, type SerializedMorphTargetBinding, type SerializedMorphTargetGroup, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, ShadowRegion, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, type SkeletalAnimationMaskCommonOptions, type SkeletalAnimationMaskOptions, type SkeletalAnimationMaskRootMotionMode, type SkeletalAnimationMaskUnsupportedTrackMode, Skeleton, type SkeletonBindPose, SkeletonModifier, SkeletonRig, type SkeletonRigOptions, SkinBinding, SkinMaterial, SkinSSS, type SkinnedBoundingBox, SkyEnvTextureNode, SkyRenderer, type SkyType, SmoothStepNode, type SphereCollider, type SphereCreationOptions, SphereShape, SpotLight, SpringChain, type SpringCollider, type SpringConstraint, SpringModifier, type SpringParticle, SpringSystem, type SpringSystemOptions, Sprite, SpriteBlockNode, SpriteBlueprintMaterial, SpriteMaterial, SqrtNode, StandardSpriteMaterial, StepNode, type StopAnimationOptions, SubsurfaceProfile, type SubsurfaceProfilePreset, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, TextSprite, type TextureFetchOptions, type TextureMixinInstanceTypes, type TextureMixinTypes, type TextureProp, type TexturePropUniforms, TextureSampleGrad, TextureSampleNode, type ToMixedTextureType, Tonemap, type TorusCreationOptions, TorusShape, type TransformAccess, TransformNode, type TwistConstraint, TwoBoneIKSolver, UnlitMaterial, VertexBinormalNode, VertexBlockNode, VertexColorNode, VertexIndexNode, VertexNormalNode, VertexOutputNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildForwardPlusGraph, buildMSDFShape, buildSurfaceFaces, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, executeForwardPlusGraph, fetchSampler, gammaToLinear, generateMSDF, getApp, getDevice, getEngine, getInput, getRuntimeScriptProperties, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mixGeometryCacheBoundingBox, mixinAlbedoColor, mixinBlinnPhong, mixinFoliage, mixinLambert, mixinLight, mixinPBRBluePrint, mixinPBRCommon, mixinPBRMetallicRoughness, mixinPBRSpecularGlossness, mixinTextureProps, mixinVertexColor, noise3D, normalizeRuntimeScriptConfig, normalizeScriptAttachmentConfig, normalizeScriptAttachments, panoramaToCubemap, perlinNoise2D, perlinNoise3D, prefilterCubemap, pushInCollisionDetection, pushInFromCapsule, pushInFromCollider, pushInFromSphere, pushoutFromCapsule, pushoutFromCollider, pushoutFromSphere, resolveCapsuleCollision, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };
|
|
28324
|
+
export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationController, type AnimationControllerEventMap, type AnimationControllerSetStateOptions, type AnimationControllerStateDefinition, type AnimationFrameEvent, type AnimationMarker, type AnimationMarkerEvent, AnimationPlayback, type AnimationPlaybackEvent, type AnimationPlaybackEventMap, type AnimationPlaybackState, type AnimationPlaybackStopEvent, type AnimationPlaybackSyncMode, type AnimationPlaybackSyncOptions, AnimationSet, type AnimationSetEventMap, type AnimationStopReason, type AnimationTimeRef, AnimationTimeline, type AnimationTimelineActiveDisposition, type AnimationTimelineDefinition, type AnimationTimelineEventPolicy, type AnimationTimelineEventResponse, type AnimationTimelineEventResult, type AnimationTimelineEventTarget, AnimationTimelineRunner, type AnimationTimelineRunnerEventMap, type AnimationTimelineRunnerState, type AnimationTimelineStateReturnTarget, type AnimationTimelineStep, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, type AssetGeometryCacheFrame, AssetHierarchyNode, type AssetImageInfo, type AssetJointDynamicsChain, type AssetJointDynamicsCollider, type AssetJointDynamicsFlatPlane, type AssetJointDynamicsSpringBone, type AssetMToonMaterial, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetMorphTargetBinding, type AssetMorphTargetGroup, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetPrimitiveInfo, type AssetRotationTrack, type AssetSamplerInfo, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSpringBone, type AssetSpringBoneCollider, type AssetSpringBoneColliderGroup, type AssetSpringBoneColliderShape, type AssetSpringBoneJoint, type AssetSubMeshData, type AssetTextureInfo, type AssetTranslationTrack, type AssetUnlitMaterial, type AssetVertexBufferInfo, type AvatarBindMode, type AvatarBodyRegionTarget, type AvatarBodyRegions, type AvatarEquipOptions, type AvatarFitMode, type AvatarJointMap, AvatarOutfitInstance, type AvatarOutfitSource, type AvatarOutfitValidation, type AvatarSlotId, type AvatarSlotOptions, AvatarWardrobe, type AvatarWardrobeOptions, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, type BaseFetchOptions, BaseGraphNode, BaseLight, BaseSprite, BaseTextureNode, type BatchDrawable, BatchGroup, BillboardMatrixNode, type BlendMode, BlinnMaterial, type BlitType, Blitter, Bloom, type BluePrintEditorState, type BluePrintUniformTexture, type BluePrintUniformValue, type BlueprintDAG, type BoneNode, BoundingBox, type BoundingVolume, type BoxCreationOptions, BoxFilterBlitter, BoxFrameShape, BoxShape, CCDSolver, type CachedBindGroup, Camera, type CameraHistoryData, CameraNearFarNode, type CameraOITMode, CameraPositionNode, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, type ColoredEdge, type ColoredLineEdge, type ColoredQuadraticEdge, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, type CompiledRenderGraph, Compositor, type CompositorBuildLayerOptions, type CompositorBuildLayerResult, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, type ControllerConfigUpdate, CopyBlitter, type CopyHumanoidAnimationOptions, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DevicePoolAllocator, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, EPSILON, type EdgeColor, type EditorMode, ElapsedTimeNode, type EmitterBehavior, type EmitterShape, Engine, EnvConstantAmbient, EnvHemisphericAmbient, type EnvLightType, EnvLightWrapper, EnvShIBL, Environment, EnvironmentLighting, EqualNode, Exp2Node, ExpNode, type ExtractMixinReturnType, type ExtractMixinType, FABRIKSolver, FBMWaveGenerator, FFTWaveGenerator, FPSCameraController, type FPSCameraControllerOptions, FWidthNode, FXAA, FaceForwardNode, type FixedGeometryCacheFrame, type FixedGeometryCacheState, FixedGeometryCacheTrack, type FlatPlane, FloorNode, FmaNode, type FogType, FontAsset, type FontAssetFetchOptions, type FontAssetMSDFAtlasSettings, type FontMetrics, type ForwardPlusOptions, FractNode, FrameResources, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GlyphContour, type GlyphData, type GlyphPoint, type GrabberR, type GrabberRW, GraphNode, type GraphNodeInput, type GraphNodeOutput, type GraphStructure, type GrassInstanceInfo, GrassLayer, GrassMaterial, GrassRenderer, Grayscale, HEIGHT_FOG_BIT, Hash1Node, Hash2Node, Hash3Node, HistoryResourceManager, type Host, HumanoidBodyRig, HumanoidHandRig, type HumanoidJointMapping, type HumanoidRetargetAxisLocks, type HumanoidRootMotionMode, type HumanoidRootMotionScaleMode, type HumanoidSkeletalAnimationMaskOptions, type HumanoidSkeletalAnimationMaskPreset, type IAttachedScript, type IBaseEvent, type IControllerKeyboardEvent, type IControllerKeydownEvent, type IControllerKeypressEvent, type IControllerKeyupEvent, type IControllerMouseEvent, type IControllerPointerCancelEvent, type IControllerPointerDownEvent, type IControllerPointerMoveEvent, type IControllerPointerUpEvent, type IControllerWheelEvent, type IGraphNode, IKAngleConstraint, IKChain, IKConstraint, type IKJoint, IKModifier, IKSolver, type IMixinAlbedoColor, type IMixinBlinnPhong, type IMixinFoliage, type IMixinLambert, type IMixinLight, type IMixinPBRBluePrint, type IMixinPBRCommon, type IMixinPBRMetallicRoughness, type IMixinPBRSpecularGlossiness, type IMixinVertexColor, type IModKey, type IRUniformTexture, type IRUniformValue, type IRenderHook, type IRenderable, type InputEventHandler, InputManager, InstanceBindGroupAllocator, type InstanceData, InstanceIndexNode, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsColliderSnapshot, type JointDynamicsFlatPlaneHandle, type JointDynamicsFlatPlaneSnapshot, type JointDynamicsGrabberHandle, type JointDynamicsGrabberSnapshot, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, type JointNameMatcher, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_CLUSTERED_LIGHTS, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_TERRAIN_MIPMAP_LEVELS, MORPH_ATTRIBUTE_VECTOR_COUNT, MORPH_TARGET_COLOR, MORPH_TARGET_NORMAL, MORPH_TARGET_POSITION, MORPH_TARGET_TANGENT, MORPH_TARGET_TEX0, MORPH_TARGET_TEX1, MORPH_TARGET_TEX2, MORPH_TARGET_TEX3, MORPH_WEIGHTS_VECTOR_COUNT, type MSDFBitmap, type MSDFOptions, type MSDFShape, MSDFText, MSDFTextAtlasManager, MSDFTextSprite, MToonMaterial, type MToonOutlineWidthMode, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh$1 as Mesh, MeshMaterial, type MeshUpdateCallback, type Metadata$1 as Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type ModelLoader, type MorphBoundingInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetGroupTrack, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, type NamedJointsSkeletalAnimationMaskOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, type PBRBlueprintOutputName, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, type PairAdjustment, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, PerspectiveCamera, type PhysicsCurves, type PickResult, type PickTarget, PixelNormalNode, PixelWorldPositionNode, type PlaneCollider, type PlaneCreationOptions, PlaneShape, type PlayAnimationOptions, type PointInit, PointLight, type PointR, type PointRW, type PointTransform, type PostEffectHistoryRead, PostEffectLayer, type PostEffectOutput, type PostEffectSetupContext, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, RGBlackboard, type RGExecuteContext, type RGExecuteFn, type RGFramebufferDesc, RGHandle, RGHistoryResources, type RGPassBuilder, type RGProfileResult, type RGProfileScopeResult, type RGProfileScopeType, type RGProfilingOptions, type RGResolvedSize, type RGResourceLifetime, type RGSizeMode, RGSubpass, type RGTextureAllocator, type RGTextureDesc, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, type RenderFunc, RenderGraph, RenderGraphExecutor, type RenderGraphExecutorOptions, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, type RenderPath, RenderQueue, type RenderQueueItem, type RenderQueueRef, RenderTarget, type ResolutionTransform, ResolveVertexNormalNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResourceManager, RotateAboutAxisNode, RuntimeScript, type RuntimeScriptArrayDeclaration, type RuntimeScriptArrayElementDeclaration, type RuntimeScriptConfig, type RuntimeScriptObjectDeclaration, type RuntimeScriptObjectFieldDeclaration, type RuntimeScriptPropertyDeclaration, type RuntimeScriptPropertyInfo, type RuntimeScriptPropertyOptions, type RuntimeScriptPropertyType, type RuntimeScriptValueDeclaration, type RuntimeScriptValueType, SAO, type SSSDebugView, type SSSQualityPreset, type SSSResolvedSettings, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, type SerializedMorphTargetBinding, type SerializedMorphTargetGroup, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, ShadowRegion, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, type SkeletalAnimationMaskCommonOptions, type SkeletalAnimationMaskOptions, type SkeletalAnimationMaskRootMotionMode, type SkeletalAnimationMaskUnsupportedTrackMode, Skeleton, type SkeletonBindPose, SkeletonModifier, SkeletonRig, type SkeletonRigOptions, SkinBinding, SkinMaterial, SkinSSS, type SkinnedBoundingBox, SkyEnvTextureNode, SkyRenderer, type SkyType, SmoothStepNode, type SphereCollider, type SphereCreationOptions, SphereShape, SpotLight, SpringChain, type SpringCollider, type SpringConstraint, SpringModifier, type SpringParticle, SpringSystem, type SpringSystemOptions, Sprite, SpriteBlockNode, SpriteBlueprintMaterial, SpriteMaterial, SqrtNode, StandardSpriteMaterial, StepNode, type StopAnimationOptions, SubsurfaceProfile, type SubsurfaceProfilePreset, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, TextSprite, type TextureFetchOptions, type TextureMixinInstanceTypes, type TextureMixinTypes, type TextureProp, type TexturePropUniforms, TextureSampleGrad, TextureSampleNode, type ToMixedTextureType, Tonemap, type TorusCreationOptions, TorusShape, type TransformAccess, TransformNode, type TwistConstraint, TwoBoneIKSolver, UnlitMaterial, VertexBinormalNode, VertexBlockNode, VertexColorNode, VertexIndexNode, VertexNormalNode, VertexOutputNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildForwardPlusGraph, buildMSDFShape, buildSurfaceFaces, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, executeForwardPlusGraph, fetchSampler, gammaToLinear, generateMSDF, getApp, getDevice, getEngine, getInput, getRuntimeScriptProperties, getSamplerOptions, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mixGeometryCacheBoundingBox, mixinAlbedoColor, mixinBlinnPhong, mixinFoliage, mixinLambert, mixinLight, mixinPBRBluePrint, mixinPBRCommon, mixinPBRMetallicRoughness, mixinPBRSpecularGlossness, mixinTextureProps, mixinVertexColor, noise3D, normalizeRuntimeScriptConfig, normalizeScriptAttachmentConfig, normalizeScriptAttachments, panoramaToCubemap, perlinNoise2D, perlinNoise3D, prefilterCubemap, pushInCollisionDetection, pushInFromCapsule, pushInFromCollider, pushInFromSphere, pushoutFromCapsule, pushoutFromCollider, pushoutFromSphere, resolveCapsuleCollision, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ export { panoramaToCubemap } from './utility/panorama.js';
|
|
|
3
3
|
export { CubemapSHProjector } from './utility/shprojector.js';
|
|
4
4
|
export { AABBTree } from './utility/aabbtree.js';
|
|
5
5
|
export { BoundingBox } from './utility/bounding_volume.js';
|
|
6
|
-
export { copyTexture, fetchSampler } from './utility/misc.js';
|
|
6
|
+
export { copyTexture, fetchSampler, getSamplerOptions } from './utility/misc.js';
|
|
7
7
|
export { debugTexture } from './utility/debug.js';
|
|
8
8
|
export { getBatchGroupClass } from './utility/serialization/scene/batch.js';
|
|
9
9
|
export { getCameraClass, getOrthoCameraClass, getPerspectiveCameraClass } from './utility/serialization/scene/camera.js';
|
|
@@ -56,6 +56,7 @@ export { RenderGraphExecutor } from './render/rendergraph/executor.js';
|
|
|
56
56
|
export { DevicePoolAllocator } from './render/rendergraph/device_pool_allocator.js';
|
|
57
57
|
export { HistoryResourceManager } from './render/rendergraph/history_resource_manager.js';
|
|
58
58
|
export { RGHistoryResources } from './render/rendergraph/history_resources.js';
|
|
59
|
+
export { FrameResources, RGBlackboard } from './render/rendergraph/blackboard.js';
|
|
59
60
|
export { buildForwardPlusGraph, executeForwardPlusGraph } from './render/rendergraph/forward_plus_builder.js';
|
|
60
61
|
export { ShaderHelper } from './material/shader/helper.js';
|
|
61
62
|
export { LambertMaterial } from './material/lambert.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -90,6 +90,16 @@ const PBR_REFLECTION_MODE = {
|
|
|
90
90
|
this.lightNormal = pb.neg(this.lightNormal);
|
|
91
91
|
this.$if(pb.greaterThan(this.area, 0), function() {
|
|
92
92
|
this.$l.baseColor = pb.mul(colorIntensity.rgb, colorIntensity.a, this.area, 0.25);
|
|
93
|
+
// calculateShadow() samples with implicit derivatives (dpdx);
|
|
94
|
+
// WGSL requires uniform control flow, so sample once per light
|
|
95
|
+
// toward the rect center instead of inside the per-sample
|
|
96
|
+
// NoL_light branch.
|
|
97
|
+
this.$l.rectShadow = pb.float(1);
|
|
98
|
+
if (shadow) {
|
|
99
|
+
this.$l.rectL = pb.normalize(pb.sub(this.center, this.worldPos));
|
|
100
|
+
this.$l.rectNoL = pb.clamp(pb.dot(this.pbrData.normal, this.rectL), 0, 1);
|
|
101
|
+
this.rectShadow = that.calculateShadow(this, this.worldPos, pb.max(this.rectNoL, 1e-5));
|
|
102
|
+
}
|
|
93
103
|
this.$l.samplePos = pb.vec3();
|
|
94
104
|
this.$l.Lvec = pb.vec3();
|
|
95
105
|
this.$l.L = pb.vec3();
|
|
@@ -109,17 +119,13 @@ const PBR_REFLECTION_MODE = {
|
|
|
109
119
|
this.NoL = pb.clamp(pb.dot(this.pbrData.normal, this.L), 0, 1);
|
|
110
120
|
this.NoL_light = pb.clamp(pb.dot(this.lightNormal, pb.neg(this.L)), 0, 1);
|
|
111
121
|
this.$if(pb.greaterThan(this.NoL_light, 0), function() {
|
|
112
|
-
this.$l.sampleShadow = pb.float(1);
|
|
113
122
|
this.falloff = pb.float(1);
|
|
114
123
|
this.$if(pb.greaterThan(this.range, 0), function() {
|
|
115
124
|
this.falloff = pb.max(0, pb.sub(1, pb.div(this.dist, this.range)));
|
|
116
125
|
this.falloff = pb.mul(this.falloff, this.falloff);
|
|
117
126
|
});
|
|
118
|
-
if (shadow) {
|
|
119
|
-
this.sampleShadow = that.calculateShadow(this, this.worldPos, pb.max(this.NoL, 1e-5));
|
|
120
|
-
}
|
|
121
127
|
this.atten = pb.mul(this.invDist2, this.NoL_light, this.falloff);
|
|
122
|
-
this.lightColor = pb.mul(this.baseColor, this.atten, this.NoL, this.
|
|
128
|
+
this.lightColor = pb.mul(this.baseColor, this.atten, this.NoL, this.rectShadow);
|
|
123
129
|
if (outSSSDiffuse) {
|
|
124
130
|
that.directLighting(this, this.L, this.lightColor, this.viewVec, this.pbrData, pb.float(1), pb.float(1), pb.float(0), this.lightingColor, this.sssDiffuseColor);
|
|
125
131
|
} else {
|