hilo3d 2.0.0-alpha.3 → 2.0.0-alpha.5
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/CHANGELOG.md +431 -13
- package/README.md +180 -302
- package/README_ZH.md +172 -277
- package/dist/Hilo3d.d.ts +2692 -1296
- package/dist/Hilo3d.d.ts.map +1 -1
- package/dist/Hilo3d.js +43773 -24502
- package/dist/Hilo3d.js.map +1 -1
- package/dist/{web_naga-CFIYl7dc.js → web_naga-DucvGikP.js} +2 -2
- package/dist/{web_naga-CFIYl7dc.js.map → web_naga-DucvGikP.js.map} +1 -1
- package/package.json +33 -16
package/dist/Hilo3d.d.ts
CHANGED
|
@@ -3156,6 +3156,8 @@ interface GeometryDataParameters {
|
|
|
3156
3156
|
bufferViewId?: string;
|
|
3157
3157
|
stride?: number;
|
|
3158
3158
|
offset?: number;
|
|
3159
|
+
/** Advance this stream once per vertex or once per direct-draw instance. */
|
|
3160
|
+
stepMode?: 'vertex' | 'instance';
|
|
3159
3161
|
}
|
|
3160
3162
|
interface SubDataUpdate {
|
|
3161
3163
|
readonly revision: number;
|
|
@@ -3199,6 +3201,10 @@ declare class GeometryData {
|
|
|
3199
3201
|
get isDirty(): boolean;
|
|
3200
3202
|
set isDirty(value: boolean);
|
|
3201
3203
|
bufferViewId: string;
|
|
3204
|
+
private _stepMode;
|
|
3205
|
+
/** Portable RHI vertex-buffer stepping policy. */
|
|
3206
|
+
get stepMode(): 'vertex' | 'instance';
|
|
3207
|
+
set stepMode(value: 'vertex' | 'instance');
|
|
3202
3208
|
readonly id: string;
|
|
3203
3209
|
private _data;
|
|
3204
3210
|
private readonly subDataList;
|
|
@@ -3761,6 +3767,65 @@ declare class Frustum {
|
|
|
3761
3767
|
intersectsSphere(sphere: Sphere): boolean;
|
|
3762
3768
|
}
|
|
3763
3769
|
|
|
3770
|
+
/**
|
|
3771
|
+
* 颜色类
|
|
3772
|
+
*/
|
|
3773
|
+
declare class Color extends Vector4 {
|
|
3774
|
+
/**
|
|
3775
|
+
* 类名
|
|
3776
|
+
*/
|
|
3777
|
+
className: string;
|
|
3778
|
+
isColor: boolean;
|
|
3779
|
+
/**
|
|
3780
|
+
* r
|
|
3781
|
+
*/
|
|
3782
|
+
get r(): number;
|
|
3783
|
+
set r(value: number);
|
|
3784
|
+
/**
|
|
3785
|
+
* g
|
|
3786
|
+
*/
|
|
3787
|
+
get g(): number;
|
|
3788
|
+
set g(value: number);
|
|
3789
|
+
/**
|
|
3790
|
+
* b
|
|
3791
|
+
*/
|
|
3792
|
+
get b(): number;
|
|
3793
|
+
set b(value: number);
|
|
3794
|
+
/**
|
|
3795
|
+
* a
|
|
3796
|
+
*/
|
|
3797
|
+
get a(): number;
|
|
3798
|
+
set a(value: number);
|
|
3799
|
+
/**
|
|
3800
|
+
* @param r -
|
|
3801
|
+
* @param g -
|
|
3802
|
+
* @param b -
|
|
3803
|
+
* @param a -
|
|
3804
|
+
*/
|
|
3805
|
+
constructor(r?: number, g?: number, b?: number, a?: number);
|
|
3806
|
+
/**
|
|
3807
|
+
* 转换到数组
|
|
3808
|
+
* @param array - 转换到的数组
|
|
3809
|
+
* @param offset - 数组偏移值
|
|
3810
|
+
*/
|
|
3811
|
+
toRGBArray(array?: number[], offset?: number): number[];
|
|
3812
|
+
/**
|
|
3813
|
+
* 从数组赋值
|
|
3814
|
+
* @param array - 数组
|
|
3815
|
+
* @param offset - 数组偏移值
|
|
3816
|
+
*/
|
|
3817
|
+
fromUintArray(array: ArrayLike<number>, offset?: number): this;
|
|
3818
|
+
/**
|
|
3819
|
+
* 从十六进制值赋值
|
|
3820
|
+
* @param hex - 颜色的十六进制值,可以以下形式:"#ff9966", "ff9966", "#f96", "f96", 0xff9966
|
|
3821
|
+
*/
|
|
3822
|
+
fromHEX(hex: string | number): this;
|
|
3823
|
+
/**
|
|
3824
|
+
* 转16进制
|
|
3825
|
+
*/
|
|
3826
|
+
toHEX(): string;
|
|
3827
|
+
}
|
|
3828
|
+
|
|
3764
3829
|
type TextureImageSource = HTMLImageElement | HTMLCanvasElement | ImageBitmap | ImageData | OffscreenCanvas | HTMLVideoElement | TexturePixelData;
|
|
3765
3830
|
type TextureUVChannel = 0 | 1;
|
|
3766
3831
|
/**
|
|
@@ -4033,65 +4098,6 @@ declare class Texture<Image = TextureImageSource> extends EventDispatcher {
|
|
|
4033
4098
|
clone(): Texture<Image>;
|
|
4034
4099
|
}
|
|
4035
4100
|
|
|
4036
|
-
/**
|
|
4037
|
-
* 颜色类
|
|
4038
|
-
*/
|
|
4039
|
-
declare class Color extends Vector4 {
|
|
4040
|
-
/**
|
|
4041
|
-
* 类名
|
|
4042
|
-
*/
|
|
4043
|
-
className: string;
|
|
4044
|
-
isColor: boolean;
|
|
4045
|
-
/**
|
|
4046
|
-
* r
|
|
4047
|
-
*/
|
|
4048
|
-
get r(): number;
|
|
4049
|
-
set r(value: number);
|
|
4050
|
-
/**
|
|
4051
|
-
* g
|
|
4052
|
-
*/
|
|
4053
|
-
get g(): number;
|
|
4054
|
-
set g(value: number);
|
|
4055
|
-
/**
|
|
4056
|
-
* b
|
|
4057
|
-
*/
|
|
4058
|
-
get b(): number;
|
|
4059
|
-
set b(value: number);
|
|
4060
|
-
/**
|
|
4061
|
-
* a
|
|
4062
|
-
*/
|
|
4063
|
-
get a(): number;
|
|
4064
|
-
set a(value: number);
|
|
4065
|
-
/**
|
|
4066
|
-
* @param r -
|
|
4067
|
-
* @param g -
|
|
4068
|
-
* @param b -
|
|
4069
|
-
* @param a -
|
|
4070
|
-
*/
|
|
4071
|
-
constructor(r?: number, g?: number, b?: number, a?: number);
|
|
4072
|
-
/**
|
|
4073
|
-
* 转换到数组
|
|
4074
|
-
* @param array - 转换到的数组
|
|
4075
|
-
* @param offset - 数组偏移值
|
|
4076
|
-
*/
|
|
4077
|
-
toRGBArray(array?: number[], offset?: number): number[];
|
|
4078
|
-
/**
|
|
4079
|
-
* 从数组赋值
|
|
4080
|
-
* @param array - 数组
|
|
4081
|
-
* @param offset - 数组偏移值
|
|
4082
|
-
*/
|
|
4083
|
-
fromUintArray(array: ArrayLike<number>, offset?: number): this;
|
|
4084
|
-
/**
|
|
4085
|
-
* 从十六进制值赋值
|
|
4086
|
-
* @param hex - 颜色的十六进制值,可以以下形式:"#ff9966", "ff9966", "#f96", "f96", 0xff9966
|
|
4087
|
-
*/
|
|
4088
|
-
fromHEX(hex: string | number): this;
|
|
4089
|
-
/**
|
|
4090
|
-
* 转16进制
|
|
4091
|
-
*/
|
|
4092
|
-
toHEX(): string;
|
|
4093
|
-
}
|
|
4094
|
-
|
|
4095
4101
|
type Std140ScalarType = 'float' | 'int' | 'uint' | 'bool';
|
|
4096
4102
|
type Std140VectorType = 'vec2' | 'vec3' | 'vec4' | 'ivec2' | 'ivec3' | 'ivec4' | 'uvec2' | 'uvec3' | 'uvec4' | 'bvec2' | 'bvec3' | 'bvec4';
|
|
4097
4103
|
type Std140MatrixType = 'mat2' | 'mat3' | 'mat4' | 'mat2x3' | 'mat2x4' | 'mat3x2' | 'mat3x4' | 'mat4x2' | 'mat4x3';
|
|
@@ -4298,6 +4304,8 @@ interface LightParameters extends NodeParameters {
|
|
|
4298
4304
|
quadraticAttenuation?: number;
|
|
4299
4305
|
range?: number;
|
|
4300
4306
|
isDirty?: boolean;
|
|
4307
|
+
/** Receiver-layer mask used by clustered lighting; defaults to every layer. */
|
|
4308
|
+
lightLayerMask?: number;
|
|
4301
4309
|
}
|
|
4302
4310
|
/** Parameters shared only by light kinds that implement shadows on every rendering backend. */
|
|
4303
4311
|
interface ShadowCastingLightParameters extends LightParameters {
|
|
@@ -4320,6 +4328,10 @@ declare class Light extends Node {
|
|
|
4320
4328
|
* 光强度
|
|
4321
4329
|
*/
|
|
4322
4330
|
amount: number;
|
|
4331
|
+
private lightLayerMaskValue;
|
|
4332
|
+
/** Receiver-layer mask evaluated independently from camera/node visibility. */
|
|
4333
|
+
get lightLayerMask(): number;
|
|
4334
|
+
set lightLayerMask(value: number);
|
|
4323
4335
|
/**
|
|
4324
4336
|
* 是否开启灯光
|
|
4325
4337
|
*/
|
|
@@ -4478,8 +4490,36 @@ declare class AreaLight extends Light {
|
|
|
4478
4490
|
set ltcTexture2(texture: DataTexture | null);
|
|
4479
4491
|
}
|
|
4480
4492
|
|
|
4481
|
-
|
|
4493
|
+
/**
|
|
4494
|
+
* Directional-light shadow controls.
|
|
4495
|
+
*
|
|
4496
|
+
* Values greater than one for `cascadeCount` enable camera-relative cascaded shadow maps. Manual
|
|
4497
|
+
* `cameraInfo` bounds remain available for the single-cascade compatibility path.
|
|
4498
|
+
*/
|
|
4499
|
+
interface DirectionalLightShadowOptions extends LightShadowOptions {
|
|
4500
|
+
/** Number of camera-frustum cascades. Defaults to `1`; the supported range is 1–4. */
|
|
4501
|
+
cascadeCount?: number;
|
|
4502
|
+
/**
|
|
4503
|
+
* Blend between uniform (`0`) and logarithmic (`1`) cascade split placement. Defaults to
|
|
4504
|
+
* `0.5`.
|
|
4505
|
+
*/
|
|
4506
|
+
cascadeSplitLambda?: number;
|
|
4507
|
+
/** Maximum view-space shadow distance. Defaults to the active camera far plane. */
|
|
4508
|
+
cascadeMaxDistance?: number;
|
|
4509
|
+
/** Fraction of each cascade interval blended into the following cascade. Defaults to `0.1`. */
|
|
4510
|
+
cascadeBlend?: number;
|
|
4511
|
+
/** Snap automatic cascade projections to shadow texels. Defaults to `true`. */
|
|
4512
|
+
stabilizeCascades?: boolean;
|
|
4513
|
+
/**
|
|
4514
|
+
* Art-directed contrast applied to filtered directional-shadow occlusion. `1` preserves the
|
|
4515
|
+
* physically sampled visibility, values above `1` deepen partial PCF coverage, and `0`
|
|
4516
|
+
* disables the visible shadow contribution. Defaults to `1`; the supported range is 0–4.
|
|
4517
|
+
*/
|
|
4518
|
+
shadowStrength?: number;
|
|
4519
|
+
}
|
|
4520
|
+
interface DirectionalLightParameters extends Omit<ShadowCastingLightParameters, 'shadow'> {
|
|
4482
4521
|
direction?: Vector3;
|
|
4522
|
+
shadow?: DirectionalLightShadowOptions | null;
|
|
4483
4523
|
}
|
|
4484
4524
|
/**
|
|
4485
4525
|
* 平行光
|
|
@@ -4489,6 +4529,9 @@ declare class DirectionalLight extends Light {
|
|
|
4489
4529
|
isDirectionalLight: boolean;
|
|
4490
4530
|
className: string;
|
|
4491
4531
|
direction: Vector3;
|
|
4532
|
+
/** Directional shadow options, including the optional cascaded-shadow controls. */
|
|
4533
|
+
get shadow(): DirectionalLightShadowOptions | null;
|
|
4534
|
+
set shadow(value: DirectionalLightShadowOptions | null);
|
|
4492
4535
|
/**
|
|
4493
4536
|
* @param params - 创建对象的属性参数。可包含此类的所有属性。
|
|
4494
4537
|
* - `params.color`: 光颜色
|
|
@@ -4530,6 +4573,28 @@ interface SpotLightParameters extends ShadowCastingLightParameters {
|
|
|
4530
4573
|
direction?: Vector3;
|
|
4531
4574
|
cutoff?: number;
|
|
4532
4575
|
outerCutoff?: number;
|
|
4576
|
+
/** Optional analytic projected cookie for native clustered lighting. */
|
|
4577
|
+
cookie?: Readonly<SpotLightCookie> | null;
|
|
4578
|
+
/** Optional normalized axial IES fit for native clustered lighting. */
|
|
4579
|
+
iesProfile?: Readonly<SpotLightIESProfile> | null;
|
|
4580
|
+
}
|
|
4581
|
+
/** Analytic projected cookie carried by the high-end clustered-light ABI. */
|
|
4582
|
+
interface SpotLightCookie {
|
|
4583
|
+
/** Projected half-extent on the light plane. */
|
|
4584
|
+
readonly scale?: readonly [number, number];
|
|
4585
|
+
/** Projected cookie-center offset. */
|
|
4586
|
+
readonly offset?: readonly [number, number];
|
|
4587
|
+
/** Cookie multiplier. Defaults to one. */
|
|
4588
|
+
readonly intensity?: number;
|
|
4589
|
+
/** Edge transition as a fraction of the cookie extent. Defaults to 0.1. */
|
|
4590
|
+
readonly softness?: number;
|
|
4591
|
+
}
|
|
4592
|
+
/** Compact axial fit for an imported IES photometric profile. */
|
|
4593
|
+
interface SpotLightIESProfile {
|
|
4594
|
+
/** Candela multiplier after normalization. Defaults to one. */
|
|
4595
|
+
readonly intensity?: number;
|
|
4596
|
+
/** Axial concentration exponent. Defaults to one. */
|
|
4597
|
+
readonly exponent?: number;
|
|
4533
4598
|
}
|
|
4534
4599
|
/**
|
|
4535
4600
|
* 聚光灯
|
|
@@ -4539,6 +4604,16 @@ declare class SpotLight extends Light {
|
|
|
4539
4604
|
isSpotLight: boolean;
|
|
4540
4605
|
className: string;
|
|
4541
4606
|
direction: Vector3;
|
|
4607
|
+
private cookieValue;
|
|
4608
|
+
private iesProfileValue;
|
|
4609
|
+
/** Analytic projected cookie used by native clustered Spot lighting. */
|
|
4610
|
+
get cookie(): Readonly<Required<SpotLightCookie>> | null;
|
|
4611
|
+
/** Analytic projected cookie used by native clustered Spot lighting. */
|
|
4612
|
+
set cookie(value: Readonly<SpotLightCookie> | null);
|
|
4613
|
+
/** Normalized axial IES fit used by native clustered Spot lighting. */
|
|
4614
|
+
get iesProfile(): Readonly<Required<SpotLightIESProfile>> | null;
|
|
4615
|
+
/** Normalized axial IES fit used by native clustered Spot lighting. */
|
|
4616
|
+
set iesProfile(value: Readonly<SpotLightIESProfile> | null);
|
|
4542
4617
|
private cutoffCosine;
|
|
4543
4618
|
private cutoffDegrees;
|
|
4544
4619
|
/**
|
|
@@ -4707,6 +4782,342 @@ declare class LightManager {
|
|
|
4707
4782
|
getShadowMapCount(type: LightGroupName): number;
|
|
4708
4783
|
}
|
|
4709
4784
|
|
|
4785
|
+
/** Semantic material pass requested by a render pipeline. */
|
|
4786
|
+
type MaterialPassRole = 'forward' | 'depth-only' | 'shadow-caster' | 'motion-vector' | 'material-attributes' | 'picking' | `user:${string}`;
|
|
4787
|
+
/** High-level surface family. It selects a surface evaluator, not a render pass. */
|
|
4788
|
+
type MaterialFamily = 'basic' | 'pbr' | 'geometry' | 'sprite' | 'custom';
|
|
4789
|
+
/** Domain in which a material definition can be evaluated. */
|
|
4790
|
+
type MaterialSurfaceDomain = 'surface' | 'unlit' | 'post-process';
|
|
4791
|
+
/** Portable profile supported by a material definition. */
|
|
4792
|
+
type MaterialRenderingProfile = 'portable' | 'webgpu-high-end';
|
|
4793
|
+
/** How a missing semantic role is handled before an RHI frame begins. */
|
|
4794
|
+
type MaterialPassFallback = 'required' | 'safe-fallback' | 'skip';
|
|
4795
|
+
/** Stable fragment-output contract selected by a semantic pass. */
|
|
4796
|
+
type MaterialFragmentOutput = 'color' | 'depth-only' | 'motion-vector' | 'material-attributes' | 'picking';
|
|
4797
|
+
/** Backend-neutral fixed-function state names. */
|
|
4798
|
+
type MaterialFrontFace = 'ccw' | 'cw';
|
|
4799
|
+
type MaterialCullMode = 'none' | 'front' | 'back';
|
|
4800
|
+
type MaterialCompareFunction = 'never' | 'less' | 'equal' | 'less-equal' | 'greater' | 'not-equal' | 'greater-equal' | 'always';
|
|
4801
|
+
type MaterialStencilOperation = 'keep' | 'zero' | 'replace' | 'invert' | 'increment-clamp' | 'decrement-clamp' | 'increment-wrap' | 'decrement-wrap';
|
|
4802
|
+
type MaterialBlendOperation = 'add' | 'subtract' | 'reverse-subtract' | 'min' | 'max';
|
|
4803
|
+
type MaterialBlendFactor = 'zero' | 'one' | 'src' | 'one-minus-src' | 'src-alpha' | 'one-minus-src-alpha' | 'dst' | 'one-minus-dst' | 'dst-alpha' | 'one-minus-dst-alpha' | 'src-alpha-saturated' | 'constant' | 'one-minus-constant';
|
|
4804
|
+
interface MaterialBlendComponent {
|
|
4805
|
+
readonly operation: MaterialBlendOperation;
|
|
4806
|
+
readonly srcFactor: MaterialBlendFactor;
|
|
4807
|
+
readonly dstFactor: MaterialBlendFactor;
|
|
4808
|
+
}
|
|
4809
|
+
interface MaterialBlendState {
|
|
4810
|
+
readonly color: Readonly<MaterialBlendComponent>;
|
|
4811
|
+
readonly alpha: Readonly<MaterialBlendComponent>;
|
|
4812
|
+
}
|
|
4813
|
+
interface MaterialStencilFaceState {
|
|
4814
|
+
readonly compare: MaterialCompareFunction;
|
|
4815
|
+
readonly failOp: MaterialStencilOperation;
|
|
4816
|
+
readonly depthFailOp: MaterialStencilOperation;
|
|
4817
|
+
readonly passOp: MaterialStencilOperation;
|
|
4818
|
+
}
|
|
4819
|
+
interface MaterialStencilState {
|
|
4820
|
+
readonly front: Readonly<MaterialStencilFaceState>;
|
|
4821
|
+
readonly back: Readonly<MaterialStencilFaceState>;
|
|
4822
|
+
readonly readMask: number;
|
|
4823
|
+
readonly writeMask: number;
|
|
4824
|
+
readonly reference: number;
|
|
4825
|
+
}
|
|
4826
|
+
/** Immutable pipeline state owned by one semantic material pass. */
|
|
4827
|
+
interface MaterialPipelineState {
|
|
4828
|
+
/** Line-list rasterization request. Geometry normalization remains a renderer concern. */
|
|
4829
|
+
readonly wireframe: boolean;
|
|
4830
|
+
readonly frontFace: MaterialFrontFace;
|
|
4831
|
+
readonly cullMode: MaterialCullMode;
|
|
4832
|
+
readonly depthTest: boolean;
|
|
4833
|
+
readonly depthWrite: boolean;
|
|
4834
|
+
readonly depthCompare: MaterialCompareFunction;
|
|
4835
|
+
readonly depthRange: readonly [number, number];
|
|
4836
|
+
readonly blend?: Readonly<MaterialBlendState>;
|
|
4837
|
+
readonly stencil?: Readonly<MaterialStencilState>;
|
|
4838
|
+
readonly alphaToCoverage: boolean;
|
|
4839
|
+
}
|
|
4840
|
+
/** Coverage controls whether a surface exists; it is independent of transmission and blending. */
|
|
4841
|
+
type MaterialCoverage = Readonly<{
|
|
4842
|
+
mode: 'opaque';
|
|
4843
|
+
}> | Readonly<{
|
|
4844
|
+
mode: 'mask';
|
|
4845
|
+
cutoff: number;
|
|
4846
|
+
}> | Readonly<{
|
|
4847
|
+
mode: 'alpha-to-coverage';
|
|
4848
|
+
cutoff: number;
|
|
4849
|
+
}>;
|
|
4850
|
+
/** Compositing controls how a shaded result combines with the existing color target. */
|
|
4851
|
+
type MaterialCompositing = Readonly<{
|
|
4852
|
+
mode: 'opaque';
|
|
4853
|
+
}> | Readonly<{
|
|
4854
|
+
mode: 'alpha-blend';
|
|
4855
|
+
premultiplied: boolean;
|
|
4856
|
+
}> | Readonly<{
|
|
4857
|
+
mode: 'additive';
|
|
4858
|
+
premultiplied: boolean;
|
|
4859
|
+
}> | Readonly<{
|
|
4860
|
+
mode: 'custom';
|
|
4861
|
+
blend: Readonly<MaterialBlendState>;
|
|
4862
|
+
depthWrite: boolean;
|
|
4863
|
+
}>;
|
|
4864
|
+
/** Encoding applied to a sampled texture before it enters the surface evaluator. */
|
|
4865
|
+
type MaterialTextureEncoding = 'linear' | 'srgb' | 'data';
|
|
4866
|
+
/** Stable four-channel source mapping. */
|
|
4867
|
+
type MaterialTextureChannel = 'r' | 'g' | 'b' | 'a' | 'zero' | 'one';
|
|
4868
|
+
interface MaterialTextureSlotDefinition {
|
|
4869
|
+
readonly name: string;
|
|
4870
|
+
readonly index: number;
|
|
4871
|
+
readonly encoding: MaterialTextureEncoding;
|
|
4872
|
+
readonly channels: readonly [
|
|
4873
|
+
MaterialTextureChannel,
|
|
4874
|
+
MaterialTextureChannel,
|
|
4875
|
+
MaterialTextureChannel,
|
|
4876
|
+
MaterialTextureChannel
|
|
4877
|
+
];
|
|
4878
|
+
readonly sampleType: 'float' | 'depth' | 'sint' | 'uint';
|
|
4879
|
+
readonly viewDimension: '2d' | 'cube' | '3d' | '2d-array';
|
|
4880
|
+
readonly presence: 'static' | 'fallback';
|
|
4881
|
+
/** UV sets for which this definition compiled vertex inputs. */
|
|
4882
|
+
readonly uvSets: readonly (0 | 1)[];
|
|
4883
|
+
}
|
|
4884
|
+
/** Per-instance texture binding. Transform and UV selection belong to the slot, not the material. */
|
|
4885
|
+
interface MaterialTextureSlotBinding {
|
|
4886
|
+
readonly texture: Texture<unknown>;
|
|
4887
|
+
readonly uvSet: 0 | 1;
|
|
4888
|
+
readonly transform: Matrix3 | null;
|
|
4889
|
+
readonly encoding: MaterialTextureEncoding;
|
|
4890
|
+
readonly channels: MaterialTextureSlotDefinition['channels'];
|
|
4891
|
+
}
|
|
4892
|
+
interface MaterialTextureSlotInput {
|
|
4893
|
+
readonly texture: Texture<unknown>;
|
|
4894
|
+
readonly uvSet?: 0 | 1;
|
|
4895
|
+
readonly transform?: Matrix3 | null;
|
|
4896
|
+
readonly encoding?: MaterialTextureEncoding;
|
|
4897
|
+
readonly channels?: MaterialTextureSlotDefinition['channels'];
|
|
4898
|
+
}
|
|
4899
|
+
/** Shader source recipe retained across device loss; it never contains a native pipeline. */
|
|
4900
|
+
type MaterialShaderModule = Readonly<{
|
|
4901
|
+
kind: 'builtin';
|
|
4902
|
+
family: Exclude<MaterialFamily, 'custom'>;
|
|
4903
|
+
}> | Readonly<{
|
|
4904
|
+
kind: 'glsl';
|
|
4905
|
+
vertexSource: string;
|
|
4906
|
+
fragmentSource: string;
|
|
4907
|
+
sourceRevision: string;
|
|
4908
|
+
}>;
|
|
4909
|
+
interface MaterialPassDefinition {
|
|
4910
|
+
readonly role: MaterialPassRole;
|
|
4911
|
+
readonly shader: MaterialShaderModule;
|
|
4912
|
+
readonly fragmentOutput: MaterialFragmentOutput;
|
|
4913
|
+
readonly state: Readonly<MaterialPipelineState>;
|
|
4914
|
+
readonly fallback: MaterialPassFallback;
|
|
4915
|
+
}
|
|
4916
|
+
interface MaterialDefinitionParameters {
|
|
4917
|
+
readonly id: string;
|
|
4918
|
+
readonly family: MaterialFamily;
|
|
4919
|
+
readonly domain?: MaterialSurfaceDomain;
|
|
4920
|
+
readonly shaderRevision?: string;
|
|
4921
|
+
readonly staticFeatures?: Readonly<Record<string, number>>;
|
|
4922
|
+
readonly coverage?: MaterialCoverage;
|
|
4923
|
+
readonly compositing?: MaterialCompositing;
|
|
4924
|
+
readonly instanceOverrides?: Readonly<{
|
|
4925
|
+
coverage?: boolean;
|
|
4926
|
+
compositing?: boolean;
|
|
4927
|
+
}>;
|
|
4928
|
+
readonly textureSlots?: readonly Readonly<MaterialTextureSlotDefinition>[];
|
|
4929
|
+
readonly passes: readonly Readonly<MaterialPassDefinition>[];
|
|
4930
|
+
readonly profiles?: readonly MaterialRenderingProfile[];
|
|
4931
|
+
}
|
|
4932
|
+
/**
|
|
4933
|
+
* Immutable material structure shared by any number of instances.
|
|
4934
|
+
*
|
|
4935
|
+
* Definitions own shader topology, texture layout, supported pass roles and pass state. Runtime
|
|
4936
|
+
* parameters and texture identities deliberately live in {@link MaterialInstance}.
|
|
4937
|
+
*/
|
|
4938
|
+
declare class MaterialDefinition {
|
|
4939
|
+
#private;
|
|
4940
|
+
readonly id: string;
|
|
4941
|
+
readonly family: MaterialFamily;
|
|
4942
|
+
readonly domain: MaterialSurfaceDomain;
|
|
4943
|
+
readonly shaderRevision: string;
|
|
4944
|
+
readonly staticFeatures: Readonly<Record<string, number>>;
|
|
4945
|
+
readonly coverage: MaterialCoverage;
|
|
4946
|
+
readonly compositing: MaterialCompositing;
|
|
4947
|
+
readonly instanceOverrides: Readonly<{
|
|
4948
|
+
coverage: boolean;
|
|
4949
|
+
compositing: boolean;
|
|
4950
|
+
}>;
|
|
4951
|
+
readonly textureSlots: readonly Readonly<MaterialTextureSlotDefinition>[];
|
|
4952
|
+
readonly profiles: readonly MaterialRenderingProfile[];
|
|
4953
|
+
readonly passes: readonly Readonly<MaterialPassDefinition>[];
|
|
4954
|
+
constructor(parameters: Readonly<MaterialDefinitionParameters>);
|
|
4955
|
+
getPass(role: MaterialPassRole): Readonly<MaterialPassDefinition> | null;
|
|
4956
|
+
getTextureSlot(name: string): Readonly<MaterialTextureSlotDefinition> | null;
|
|
4957
|
+
}
|
|
4958
|
+
declare const DEFAULT_MATERIAL_PIPELINE_STATE: Readonly<MaterialPipelineState>;
|
|
4959
|
+
declare const DEFAULT_MATERIAL_TEXTURE_CHANNELS: readonly ["r", "g", "b", "a"];
|
|
4960
|
+
|
|
4961
|
+
/** Stable vertex-attribute semantics understood by the shared renderer. */
|
|
4962
|
+
declare const MaterialAttributeSemantic: Readonly<{
|
|
4963
|
+
readonly POSITION: "POSITION";
|
|
4964
|
+
readonly NORMAL: "NORMAL";
|
|
4965
|
+
readonly TANGENT: "TANGENT";
|
|
4966
|
+
readonly TEXCOORD_0: "TEXCOORD_0";
|
|
4967
|
+
readonly TEXCOORD_1: "TEXCOORD_1";
|
|
4968
|
+
readonly COLOR_0: "COLOR_0";
|
|
4969
|
+
readonly SKIN_INDICES: "SKININDICES";
|
|
4970
|
+
readonly SKIN_WEIGHTS: "SKINWEIGHTS";
|
|
4971
|
+
}>;
|
|
4972
|
+
/** Stable non-texture uniform semantics understood by the shared renderer. */
|
|
4973
|
+
declare const MaterialUniformSemantic: Readonly<{
|
|
4974
|
+
readonly LOCAL: "LOCAL";
|
|
4975
|
+
readonly MODEL: "MODEL";
|
|
4976
|
+
readonly OBJECT_ID_COLOR: "OBJECTIDCOLOR";
|
|
4977
|
+
readonly VIEW: "VIEW";
|
|
4978
|
+
readonly PROJECTION: "PROJECTION";
|
|
4979
|
+
readonly VIEW_PROJECTION: "VIEWPROJECTION";
|
|
4980
|
+
readonly MODEL_VIEW: "MODELVIEW";
|
|
4981
|
+
readonly MODEL_VIEW_PROJECTION: "MODELVIEWPROJECTION";
|
|
4982
|
+
readonly MODEL_INVERSE: "MODELINVERSE";
|
|
4983
|
+
readonly VIEW_INVERSE: "VIEWINVERSE";
|
|
4984
|
+
readonly VIEW_INVERSE_NORMAL: "VIEWINVERSEINVERSETRANSPOSE";
|
|
4985
|
+
readonly PROJECTION_INVERSE: "PROJECTIONINVERSE";
|
|
4986
|
+
readonly MODEL_VIEW_INVERSE: "MODELVIEWINVERSE";
|
|
4987
|
+
readonly MODEL_VIEW_PROJECTION_INVERSE: "MODELVIEWPROJECTIONINVERSE";
|
|
4988
|
+
readonly MODEL_NORMAL: "MODELINVERSETRANSPOSE";
|
|
4989
|
+
readonly MODEL_VIEW_NORMAL: "MODELVIEWINVERSETRANSPOSE";
|
|
4990
|
+
readonly VIEWPORT: "VIEWPORT";
|
|
4991
|
+
readonly CAMERA_FAR: "CAMERAFAR";
|
|
4992
|
+
readonly CAMERA_NEAR: "CAMERANEAR";
|
|
4993
|
+
readonly CAMERA_TYPE: "CAMERATYPE";
|
|
4994
|
+
readonly CAMERA_POSITION: "CAMERAPOSITION";
|
|
4995
|
+
readonly RENDERER_SIZE: "RENDERERSIZE";
|
|
4996
|
+
readonly JOINT_MATRIX: "JOINTMATRIX";
|
|
4997
|
+
readonly NORMAL_MAP_SCALE: "NORMALMAPSCALE";
|
|
4998
|
+
readonly DIFFUSE_COLOR: "DIFFUSE";
|
|
4999
|
+
readonly SPECULAR_COLOR: "SPECULAR";
|
|
5000
|
+
readonly AMBIENT_COLOR: "AMBIENT";
|
|
5001
|
+
readonly EMISSION_COLOR: "EMISSION";
|
|
5002
|
+
readonly OPACITY: "TRANSPARENCY";
|
|
5003
|
+
readonly OCCLUSION_STRENGTH: "OCCLUSIONSTRENGTH";
|
|
5004
|
+
readonly SHININESS: "SHININESS";
|
|
5005
|
+
readonly SPECULAR_ENV_MATRIX: "SPECULARENVMATRIX";
|
|
5006
|
+
readonly REFLECTIVITY: "REFLECTIVITY";
|
|
5007
|
+
readonly REFRACT_RATIO: "REFRACTRATIO";
|
|
5008
|
+
readonly REFRACTIVITY: "REFRACTIVITY";
|
|
5009
|
+
readonly LOG_DEPTH: "LOGDEPTH";
|
|
5010
|
+
readonly AMBIENT_LIGHTS_COLOR: "AMBIENTLIGHTSCOLOR";
|
|
5011
|
+
readonly DIRECTIONAL_LIGHTS_COLOR: "DIRECTIONALLIGHTSCOLOR";
|
|
5012
|
+
readonly DIRECTIONAL_LIGHTS_INFO: "DIRECTIONALLIGHTSINFO";
|
|
5013
|
+
readonly DIRECTIONAL_LIGHTS_SHADOW_MAP_SIZE: "DIRECTIONALLIGHTSSHADOWMAPSIZE";
|
|
5014
|
+
readonly DIRECTIONAL_LIGHTS_SHADOW_BIAS: "DIRECTIONALLIGHTSSHADOWBIAS";
|
|
5015
|
+
readonly DIRECTIONAL_LIGHT_SPACE_MATRIX: "DIRECTIONALLIGHTSPACEMATRIX";
|
|
5016
|
+
readonly DIRECTIONAL_CASCADE_SPLITS: "DIRECTIONALCASCADESPLITS";
|
|
5017
|
+
readonly DIRECTIONAL_CASCADE_PARAMS: "DIRECTIONALCASCADEPARAMS";
|
|
5018
|
+
readonly DIRECTIONAL_CASCADE_MATRICES: "DIRECTIONALCASCADEMATRICES";
|
|
5019
|
+
readonly POINT_LIGHTS_POSITION: "POINTLIGHTSPOS";
|
|
5020
|
+
readonly POINT_LIGHTS_COLOR: "POINTLIGHTSCOLOR";
|
|
5021
|
+
readonly POINT_LIGHTS_INFO: "POINTLIGHTSINFO";
|
|
5022
|
+
readonly POINT_LIGHTS_RANGE: "POINTLIGHTSRANGE";
|
|
5023
|
+
readonly POINT_LIGHTS_SHADOW_BIAS: "POINTLIGHTSSHADOWBIAS";
|
|
5024
|
+
readonly POINT_LIGHT_SPACE_MATRIX: "POINTLIGHTSPACEMATRIX";
|
|
5025
|
+
readonly POINT_LIGHT_CAMERA: "POINTLIGHTCAMERA";
|
|
5026
|
+
readonly SPOT_LIGHTS_POSITION: "SPOTLIGHTSPOS";
|
|
5027
|
+
readonly SPOT_LIGHTS_DIRECTION: "SPOTLIGHTSDIR";
|
|
5028
|
+
readonly SPOT_LIGHTS_COLOR: "SPOTLIGHTSCOLOR";
|
|
5029
|
+
readonly SPOT_LIGHTS_CUTOFFS: "SPOTLIGHTSCUTOFFS";
|
|
5030
|
+
readonly SPOT_LIGHTS_INFO: "SPOTLIGHTSINFO";
|
|
5031
|
+
readonly SPOT_LIGHTS_RANGE: "SPOTLIGHTSRANGE";
|
|
5032
|
+
readonly SPOT_LIGHTS_SHADOW_MAP_SIZE: "SPOTLIGHTSSHADOWMAPSIZE";
|
|
5033
|
+
readonly SPOT_LIGHTS_SHADOW_BIAS: "SPOTLIGHTSSHADOWBIAS";
|
|
5034
|
+
readonly SPOT_LIGHT_SPACE_MATRIX: "SPOTLIGHTSPACEMATRIX";
|
|
5035
|
+
readonly AREA_LIGHTS_POSITION: "AREALIGHTSPOS";
|
|
5036
|
+
readonly AREA_LIGHTS_COLOR: "AREALIGHTSCOLOR";
|
|
5037
|
+
readonly AREA_LIGHTS_WIDTH: "AREALIGHTSWIDTH";
|
|
5038
|
+
readonly AREA_LIGHTS_HEIGHT: "AREALIGHTSHEIGHT";
|
|
5039
|
+
readonly FOG_COLOR: "FOGCOLOR";
|
|
5040
|
+
readonly FOG_INFO: "FOGINFO";
|
|
5041
|
+
readonly SHADOW_ATLAS_SIZE: "SHADOWATLASSIZE";
|
|
5042
|
+
readonly SHADOW_ATLAS_RECTS: "SHADOWATLASRECTS";
|
|
5043
|
+
readonly POINT_SHADOW_MATRICES: "POINTSHADOWMATRICES";
|
|
5044
|
+
readonly POSITION_DECODE_MATRIX: "POSITIONDECODEMAT";
|
|
5045
|
+
readonly NORMAL_DECODE_MATRIX: "NORMALDECODEMAT";
|
|
5046
|
+
readonly UV_DECODE_MATRIX: "UVDECODEMAT";
|
|
5047
|
+
readonly UV1_DECODE_MATRIX: "UV1DECODEMAT";
|
|
5048
|
+
readonly BASE_COLOR: "BASECOLOR";
|
|
5049
|
+
readonly EMISSION_FACTOR: "EMISSIONFACTOR";
|
|
5050
|
+
readonly METALLIC: "METALLIC";
|
|
5051
|
+
readonly ROUGHNESS: "ROUGHNESS";
|
|
5052
|
+
readonly DIFFUSE_ENV_INTENSITY: "DIFFUSEENVINTENSITY";
|
|
5053
|
+
readonly SPECULAR_ENV_INTENSITY: "SPECULARENVINTENSITY";
|
|
5054
|
+
readonly SPECULAR_ENV_MIP_COUNT: "SPECULARENVMAPMIPCOUNT";
|
|
5055
|
+
readonly DIFFUSE_ENV_SPHERICAL_HARMONICS: "DIFFUSEENVSPHEREHARMONICS3";
|
|
5056
|
+
readonly GLOSSINESS: "GLOSSINESS";
|
|
5057
|
+
readonly ALPHA_CUTOFF: "ALPHACUTOFF";
|
|
5058
|
+
readonly TEMPORAL_REACTIVE_FACTOR: "TEMPORALREACTIVEFACTOR";
|
|
5059
|
+
readonly MORPH_WEIGHTS: "MORPHWEIGHTS";
|
|
5060
|
+
readonly CLEARCOAT_FACTOR: "CLEARCOATFACTOR";
|
|
5061
|
+
readonly CLEARCOAT_ROUGHNESS_FACTOR: "CLEARCOATROUGHNESSFACTOR";
|
|
5062
|
+
readonly CLEARCOAT_NORMAL_SCALE: "CLEARCOATNORMALSCALE";
|
|
5063
|
+
readonly ANISOTROPY_STRENGTH: "ANISOTROPYSTRENGTH";
|
|
5064
|
+
readonly ANISOTROPY_ROTATION: "ANISOTROPYROTATION";
|
|
5065
|
+
readonly TRANSMISSION_FACTOR: "TRANSMISSIONFACTOR";
|
|
5066
|
+
readonly THICKNESS_FACTOR: "THICKNESSFACTOR";
|
|
5067
|
+
readonly ATTENUATION_DISTANCE: "ATTENUATIONDISTANCE";
|
|
5068
|
+
readonly ATTENUATION_COLOR: "ATTENUATIONCOLOR";
|
|
5069
|
+
readonly IOR: "IOR";
|
|
5070
|
+
readonly IRIDESCENCE_FACTOR: "IRIDESCENCEFACTOR";
|
|
5071
|
+
readonly IRIDESCENCE_IOR: "IRIDESCENCEIOR";
|
|
5072
|
+
readonly IRIDESCENCE_THICKNESS_MINIMUM: "IRIDESCENCETHICKNESSMINIMUM";
|
|
5073
|
+
readonly IRIDESCENCE_THICKNESS_MAXIMUM: "IRIDESCENCETHICKNESSMAXIMUM";
|
|
5074
|
+
readonly MATERIAL_TEXTURE_TRANSFORMS: "MATERIALTEXTURETRANSFORMS";
|
|
5075
|
+
readonly MATERIAL_TEXTURE_INFO: "MATERIALTEXTUREINFO";
|
|
5076
|
+
readonly MATERIAL_TEXTURE_CHANNELS: "MATERIALTEXTURECHANNELS";
|
|
5077
|
+
}>;
|
|
5078
|
+
/** Stable sampled-resource semantics understood by the shared renderer. */
|
|
5079
|
+
declare const MaterialTextureSemantic: Readonly<{
|
|
5080
|
+
readonly SHADOW_ATLAS: "SHADOWATLAS";
|
|
5081
|
+
readonly DIRECTIONAL_LIGHTS_SHADOW_MAP: "DIRECTIONALLIGHTSSHADOWMAP";
|
|
5082
|
+
readonly POINT_LIGHTS_SHADOW_MAP: "POINTLIGHTSSHADOWMAP";
|
|
5083
|
+
readonly SPOT_LIGHTS_SHADOW_MAP: "SPOTLIGHTSSHADOWMAP";
|
|
5084
|
+
readonly AREA_LIGHTS_LTC_TEXTURE_1: "AREALIGHTSLTCTEXTURE1";
|
|
5085
|
+
readonly AREA_LIGHTS_LTC_TEXTURE_2: "AREALIGHTSLTCTEXTURE2";
|
|
5086
|
+
readonly DIFFUSE: "DIFFUSE";
|
|
5087
|
+
readonly SPECULAR: "SPECULAR";
|
|
5088
|
+
readonly EMISSION: "EMISSION";
|
|
5089
|
+
readonly AMBIENT: "AMBIENT";
|
|
5090
|
+
readonly NORMAL_MAP: "NORMALMAP";
|
|
5091
|
+
readonly PARALLAX_MAP: "PARALLAXMAP";
|
|
5092
|
+
readonly OPACITY: "TRANSPARENCY";
|
|
5093
|
+
readonly BASE_COLOR_MAP: "BASECOLORMAP";
|
|
5094
|
+
readonly METALLIC_MAP: "METALLICMAP";
|
|
5095
|
+
readonly ROUGHNESS_MAP: "ROUGHNESSMAP";
|
|
5096
|
+
readonly METALLIC_ROUGHNESS_MAP: "METALLICROUGHNESSMAP";
|
|
5097
|
+
readonly OCCLUSION_MAP: "OCCLUSIONMAP";
|
|
5098
|
+
readonly SPECULAR_GLOSSINESS_MAP: "SPECULARGLOSSINESSMAP";
|
|
5099
|
+
readonly LIGHT_MAP: "LIGHTMAP";
|
|
5100
|
+
readonly CLEARCOAT_MAP: "CLEARCOATMAP";
|
|
5101
|
+
readonly CLEARCOAT_ROUGHNESS_MAP: "CLEARCOATROUGHNESSMAP";
|
|
5102
|
+
readonly CLEARCOAT_NORMAL_MAP: "CLEARCOATNORMALMAP";
|
|
5103
|
+
readonly ANISOTROPY_MAP: "ANISOTROPYMAP";
|
|
5104
|
+
readonly TRANSMISSION_MAP: "TRANSMISSIONMAP";
|
|
5105
|
+
readonly THICKNESS_MAP: "THICKNESSMAP";
|
|
5106
|
+
readonly IRIDESCENCE_MAP: "IRIDESCENCEMAP";
|
|
5107
|
+
readonly IRIDESCENCE_THICKNESS_MAP: "IRIDESCENCETHICKNESSMAP";
|
|
5108
|
+
readonly DIFFUSE_ENV_MAP: "DIFFUSEENVMAP";
|
|
5109
|
+
readonly BRDF_LUT: "BRDFLUT";
|
|
5110
|
+
readonly SPECULAR_ENV_MAP: "SPECULARENVMAP";
|
|
5111
|
+
readonly OPAQUE_SCENE_TEXTURE: "OPAQUETEXTURE";
|
|
5112
|
+
/** Pass-global ground-truth ambient visibility texture. */
|
|
5113
|
+
readonly GROUND_TRUTH_AMBIENT_OCCLUSION: "GTAOTEXTURE";
|
|
5114
|
+
}>;
|
|
5115
|
+
type MaterialAttributeSemanticName = (typeof MaterialAttributeSemantic)[keyof typeof MaterialAttributeSemantic] | `MORPH${'POSITION' | 'NORMAL' | 'TANGENT'}${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7}`;
|
|
5116
|
+
type MaterialUniformSemanticName = (typeof MaterialUniformSemantic)[keyof typeof MaterialUniformSemantic];
|
|
5117
|
+
type MaterialTextureSemanticName = (typeof MaterialTextureSemantic)[keyof typeof MaterialTextureSemantic] | `${'DIFFUSE' | 'SPECULAR' | 'EMISSION' | 'AMBIENT'}UV` | `${'NORMALMAP' | 'PARALLAXMAP' | 'BASECOLORMAP' | 'METALLICMAP' | 'ROUGHNESSMAP' | 'METALLICROUGHNESSMAP' | 'OCCLUSIONMAP' | 'SPECULARGLOSSINESSMAP' | 'LIGHTMAP' | 'CLEARCOATMAP' | 'CLEARCOATROUGHNESSMAP' | 'CLEARCOATNORMALMAP' | 'ANISOTROPYMAP' | 'TRANSMISSIONMAP' | 'THICKNESSMAP' | 'IRIDESCENCEMAP' | 'IRIDESCENCETHICKNESSMAP'}UV` | 'TRANSPARENCYUV';
|
|
5118
|
+
/** Any built-in semantic identifier accepted by a string material binding. */
|
|
5119
|
+
type MaterialSemanticName = MaterialAttributeSemanticName | MaterialUniformSemanticName | MaterialTextureSemanticName;
|
|
5120
|
+
|
|
4710
5121
|
interface ProgramBindingInfo {
|
|
4711
5122
|
textureIndex?: number;
|
|
4712
5123
|
name?: string;
|
|
@@ -4715,502 +5126,214 @@ interface MaterialBindingInfo {
|
|
|
4715
5126
|
readonly isBlankInfo?: boolean;
|
|
4716
5127
|
readonly isDependMesh?: boolean;
|
|
4717
5128
|
readonly notSupportInstanced?: boolean;
|
|
4718
|
-
get(mesh: Mesh, material:
|
|
5129
|
+
get(mesh: Mesh, material: MaterialInstance, programInfo: ProgramBindingInfo): unknown;
|
|
4719
5130
|
}
|
|
4720
|
-
type MaterialBinding =
|
|
5131
|
+
type MaterialBinding = MaterialSemanticName | MaterialBindingInfo;
|
|
4721
5132
|
type MaterialBindingMap = Record<string, MaterialBinding>;
|
|
4722
|
-
interface MaterialShaderSource {
|
|
4723
|
-
vs: string;
|
|
4724
|
-
fs: string;
|
|
4725
|
-
}
|
|
4726
|
-
type MaterialBeforeCompile = (vs: string, fs: string) => MaterialShaderSource;
|
|
4727
5133
|
type MaterialTexture = Texture<unknown>;
|
|
4728
5134
|
type MaterialTextureValue = MaterialTexture | Color | null;
|
|
4729
|
-
interface
|
|
4730
|
-
name?: string | null;
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
cullFace?: boolean;
|
|
4742
|
-
cullFaceType?: GLenum;
|
|
4743
|
-
side?: GLenum;
|
|
4744
|
-
normalMap?: Texture | null;
|
|
4745
|
-
parallaxMap?: Texture | null;
|
|
4746
|
-
emission?: MaterialTextureValue;
|
|
4747
|
-
normalMapScale?: number;
|
|
4748
|
-
ignoreTransparent?: boolean;
|
|
4749
|
-
gammaCorrection?: boolean;
|
|
4750
|
-
usePhysicsLight?: boolean;
|
|
4751
|
-
isDiffuseEnvAndAmbientLightWorkTogether?: boolean;
|
|
4752
|
-
userData?: unknown;
|
|
4753
|
-
renderOrder?: number;
|
|
4754
|
-
premultiplyAlpha?: boolean;
|
|
4755
|
-
gammaFactor?: number;
|
|
4756
|
-
castShadows?: boolean;
|
|
4757
|
-
receiveShadows?: boolean;
|
|
4758
|
-
uvMatrix?: Matrix3 | null;
|
|
4759
|
-
uvMatrix1?: Matrix3 | null;
|
|
4760
|
-
blend?: boolean;
|
|
4761
|
-
blendEquation?: GLenum;
|
|
4762
|
-
blendEquationAlpha?: GLenum;
|
|
4763
|
-
blendSrc?: GLenum;
|
|
4764
|
-
blendDst?: GLenum;
|
|
4765
|
-
blendSrcAlpha?: GLenum;
|
|
4766
|
-
blendDstAlpha?: GLenum;
|
|
4767
|
-
stencilTest?: boolean;
|
|
4768
|
-
stencilMask?: number;
|
|
4769
|
-
stencilFunc?: GLenum;
|
|
4770
|
-
stencilFuncRef?: number;
|
|
4771
|
-
stencilFuncMask?: number;
|
|
4772
|
-
stencilOpFail?: GLenum;
|
|
4773
|
-
stencilOpZFail?: GLenum;
|
|
4774
|
-
stencilOpZPass?: GLenum;
|
|
4775
|
-
isDirty?: boolean;
|
|
4776
|
-
transparency?: number | Texture;
|
|
4777
|
-
transparent?: boolean;
|
|
4778
|
-
alphaCutoff?: number;
|
|
4779
|
-
useHDR?: boolean;
|
|
4780
|
-
exposure?: number;
|
|
4781
|
-
enableTextureLod?: boolean;
|
|
4782
|
-
enableDrawBuffers?: boolean;
|
|
4783
|
-
needBasicUniforms?: boolean;
|
|
4784
|
-
needBasicAttributes?: boolean;
|
|
4785
|
-
/**
|
|
4786
|
-
* Semantic resolvers used by canonical UBO packing and standalone sampler bindings.
|
|
4787
|
-
* Application-defined classic uniforms must be sampler types; put every numeric value in
|
|
4788
|
-
* `uniformBlocks`.
|
|
4789
|
-
*/
|
|
4790
|
-
uniforms?: MaterialBindingMap;
|
|
4791
|
-
attributes?: MaterialBindingMap;
|
|
5135
|
+
interface MaterialInstanceParameters {
|
|
5136
|
+
readonly name?: string | null;
|
|
5137
|
+
readonly userData?: unknown;
|
|
5138
|
+
readonly coverage?: MaterialCoverage;
|
|
5139
|
+
readonly compositing?: MaterialCompositing;
|
|
5140
|
+
readonly opacity?: number;
|
|
5141
|
+
/** Authored TAA history suppression for unstable shading, from zero to one. */
|
|
5142
|
+
readonly temporalReactiveFactor?: number;
|
|
5143
|
+
readonly opacityMap?: Texture<unknown> | MaterialTextureSlotInput | null;
|
|
5144
|
+
readonly normalMap?: Texture<unknown> | MaterialTextureSlotInput | null;
|
|
5145
|
+
readonly normalScale?: number;
|
|
5146
|
+
readonly parallaxMap?: Texture<unknown> | MaterialTextureSlotInput | null;
|
|
4792
5147
|
/** Registered std140 blocks keyed by their globally stable GLSL block name. */
|
|
4793
|
-
uniformBlocks?: Record<string, UniformBuffer
|
|
4794
|
-
onBeforeCompile?: MaterialBeforeCompile | null;
|
|
5148
|
+
readonly uniformBlocks?: Readonly<Record<string, UniformBuffer>>;
|
|
4795
5149
|
}
|
|
4796
5150
|
interface InstancedUniform {
|
|
4797
|
-
name: string;
|
|
4798
|
-
info: MaterialBindingInfo;
|
|
4799
|
-
}
|
|
4800
|
-
declare class TextureOptionBuilder {
|
|
4801
|
-
private readonly uvTypes;
|
|
4802
|
-
private option;
|
|
4803
|
-
reset(option: ShaderOptions): this;
|
|
4804
|
-
add(texture: unknown, optionName: string, callback?: () => void): this;
|
|
4805
|
-
update(): this;
|
|
5151
|
+
readonly name: string;
|
|
5152
|
+
readonly info: MaterialBindingInfo;
|
|
4806
5153
|
}
|
|
4807
5154
|
/**
|
|
4808
|
-
*
|
|
5155
|
+
* Mutable material data bound to one immutable {@link MaterialDefinition}.
|
|
5156
|
+
*
|
|
5157
|
+
* Ordinary parameter and texture changes advance `revision` but never alter the definition,
|
|
5158
|
+
* resource layout, supported pass roles or shader topology. A topology change requires a new
|
|
5159
|
+
* instance created with another definition.
|
|
4809
5160
|
*/
|
|
4810
|
-
declare class
|
|
4811
|
-
|
|
5161
|
+
declare class MaterialInstance {
|
|
5162
|
+
#private;
|
|
5163
|
+
readonly isMaterialInstance = true;
|
|
4812
5164
|
readonly className: string;
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
4816
|
-
|
|
5165
|
+
readonly id: string;
|
|
5166
|
+
readonly materialId: number;
|
|
5167
|
+
readonly definition: MaterialDefinition;
|
|
5168
|
+
readonly coverage: MaterialCoverage;
|
|
5169
|
+
readonly compositing: MaterialCompositing;
|
|
4817
5170
|
name: string | null;
|
|
5171
|
+
userData: unknown;
|
|
5172
|
+
readonly uniforms: MaterialBindingMap;
|
|
5173
|
+
readonly attributes: MaterialBindingMap;
|
|
5174
|
+
readonly uniformBlocks: Record<string, UniformBuffer>;
|
|
5175
|
+
constructor(definition: MaterialDefinition, parameters?: Readonly<MaterialInstanceParameters>, initializeBindings?: boolean);
|
|
5176
|
+
/** Monotonic instance-data revision observed independently by each renderer. */
|
|
5177
|
+
get revision(): number;
|
|
5178
|
+
get opacity(): number;
|
|
5179
|
+
set opacity(value: number);
|
|
5180
|
+
/** Authored TAA history suppression written by the material's motion-vector pass. */
|
|
5181
|
+
get temporalReactiveFactor(): number;
|
|
5182
|
+
set temporalReactiveFactor(value: number);
|
|
5183
|
+
get normalScale(): number;
|
|
5184
|
+
set normalScale(value: number);
|
|
5185
|
+
/** Whether the forward pass composites this surface with an existing color attachment. */
|
|
5186
|
+
get isTransparent(): boolean;
|
|
5187
|
+
/** Whether the forward shader samples the opaque scene-color copy. */
|
|
5188
|
+
get requiresOpaqueSceneTexture(): boolean;
|
|
5189
|
+
/**
|
|
5190
|
+
* Forward renderer queue selected from compositing and pass resource dependencies.
|
|
5191
|
+
*
|
|
5192
|
+
* An unblended transmission surface remains compositionally opaque, but it must execute after
|
|
5193
|
+
* the opaque scene copy exists and therefore belongs to the transparent/after-opaque queue.
|
|
5194
|
+
*/
|
|
5195
|
+
get forwardQueue(): 'opaque' | 'transparent';
|
|
5196
|
+
get lightType(): string;
|
|
5197
|
+
/** Bind data to a slot already declared by the immutable definition. */
|
|
5198
|
+
setTextureSlot(name: string, value: Texture<unknown> | MaterialTextureSlotInput | null): void;
|
|
5199
|
+
getTextureSlot(name: string): MaterialTextureSlotBinding | null;
|
|
5200
|
+
/** @internal Fixed-index lookup used by UBO packing without map iteration. */
|
|
5201
|
+
getTextureSlotByIndex(index: number): MaterialTextureSlotBinding | null;
|
|
5202
|
+
/** @internal Snapshot dirty slot indices for a submission-aware material database. */
|
|
5203
|
+
getDirtyTextureSlots(): readonly number[];
|
|
5204
|
+
/** @internal Clear dirty slots only after a valid submission commits their revision. */
|
|
5205
|
+
commitTextureSlotRevision(revision: number): void;
|
|
5206
|
+
/**
|
|
5207
|
+
* Advance the data revision after mutating a referenced vector, color, matrix, or custom
|
|
5208
|
+
* binding value. Texture-slot and built-in scalar accessors call this automatically.
|
|
5209
|
+
*/
|
|
5210
|
+
invalidateData(): void;
|
|
5211
|
+
protected markDataChanged(): void;
|
|
5212
|
+
protected initializeBindings(): void;
|
|
5213
|
+
protected addBasicAttributes(): void;
|
|
5214
|
+
protected addBasicUniforms(): void;
|
|
5215
|
+
protected addTextureUniforms(textureUniforms: Readonly<Record<string, MaterialTextureSemanticName>>): void;
|
|
5216
|
+
getRenderOption(option?: ShaderOptions): ShaderOptions;
|
|
5217
|
+
getInstancedUniforms(): readonly InstancedUniform[];
|
|
5218
|
+
getUniformData(name: string, mesh: Mesh, programInfo: ProgramBindingInfo): unknown;
|
|
5219
|
+
getAttributeData(name: string, mesh: Mesh, programInfo: ProgramBindingInfo): unknown;
|
|
5220
|
+
getUniformInfo(name: string): MaterialBindingInfo;
|
|
5221
|
+
getAttributeInfo(name: string): MaterialBindingInfo;
|
|
5222
|
+
getTextures(): readonly MaterialTexture[];
|
|
5223
|
+
destroyTextures(): void;
|
|
5224
|
+
protected copyBindings(origin: MaterialBindingMap, data: Readonly<MaterialBindingMap>): void;
|
|
5225
|
+
private getInfo;
|
|
5226
|
+
}
|
|
5227
|
+
|
|
5228
|
+
interface MeshParameters extends NodeParameters {
|
|
5229
|
+
geometry?: Geometry | null;
|
|
5230
|
+
material?: MaterialInstance | null;
|
|
5231
|
+
useInstanced?: boolean;
|
|
5232
|
+
frustumTest?: boolean;
|
|
5233
|
+
renderOrder?: number;
|
|
5234
|
+
castShadows?: boolean;
|
|
5235
|
+
receiveShadows?: boolean;
|
|
5236
|
+
/** Active direct-draw instances when geometry supplies per-instance vertex streams. */
|
|
5237
|
+
instanceCount?: number;
|
|
5238
|
+
}
|
|
5239
|
+
/**
|
|
5240
|
+
* Mesh
|
|
5241
|
+
* @example
|
|
5242
|
+
* ```ts
|
|
5243
|
+
* const mesh = new Hilo3d.Mesh({
|
|
5244
|
+
* geometry: new Hilo3d.BoxGeometry(),
|
|
5245
|
+
* material: new Hilo3d.BasicMaterial({
|
|
5246
|
+
* diffuse: new Hilo3d.Color(0.8, 0, 0)
|
|
5247
|
+
* }),
|
|
5248
|
+
* x:100,
|
|
5249
|
+
* rotationX:30
|
|
5250
|
+
* });
|
|
5251
|
+
* stage.addChild(mesh);
|
|
5252
|
+
* ```
|
|
5253
|
+
*/
|
|
5254
|
+
declare class Mesh extends Node {
|
|
5255
|
+
static readonly typeName: string;
|
|
5256
|
+
protected _isDestroyed: boolean;
|
|
5257
|
+
isMesh: boolean;
|
|
5258
|
+
className: string;
|
|
5259
|
+
geometry: Geometry | null;
|
|
5260
|
+
material: MaterialInstance | null;
|
|
4818
5261
|
/**
|
|
4819
|
-
*
|
|
5262
|
+
* 是否使用 Instanced
|
|
4820
5263
|
*/
|
|
4821
|
-
|
|
5264
|
+
useInstanced: boolean;
|
|
4822
5265
|
/**
|
|
4823
|
-
*
|
|
5266
|
+
* 是否开启视锥体裁剪
|
|
4824
5267
|
*/
|
|
4825
|
-
|
|
5268
|
+
frustumTest: boolean;
|
|
5269
|
+
/** Object ordering policy; it is intentionally independent of material identity. */
|
|
5270
|
+
renderOrder: number;
|
|
5271
|
+
/** Object participation in shadow-caster renderer lists. */
|
|
5272
|
+
castShadows: boolean;
|
|
5273
|
+
/** Whether forward shading consumes scene shadow data for this object. */
|
|
5274
|
+
receiveShadows: boolean;
|
|
5275
|
+
private _instanceCount;
|
|
4826
5276
|
/**
|
|
4827
|
-
*
|
|
5277
|
+
* Active direct-draw instance count.
|
|
5278
|
+
*
|
|
5279
|
+
* Values above one require at least one `GeometryData` input with `stepMode: 'instance'`.
|
|
5280
|
+
* Planner-owned `useInstanced` batching keeps its existing independent contract.
|
|
4828
5281
|
*/
|
|
4829
|
-
|
|
5282
|
+
get instanceCount(): number;
|
|
5283
|
+
set instanceCount(value: number);
|
|
4830
5284
|
/**
|
|
4831
|
-
*
|
|
5285
|
+
* @param params - 初始化参数,所有params都会复制到实例上
|
|
5286
|
+
* - `params.geometry`: 几何体
|
|
5287
|
+
* - `params.material`: 材质
|
|
4832
5288
|
*/
|
|
4833
|
-
|
|
5289
|
+
constructor(params?: MeshParameters);
|
|
4834
5290
|
/**
|
|
4835
|
-
*
|
|
5291
|
+
* clone 当前mesh
|
|
5292
|
+
* @param isChild - 是否子元素
|
|
5293
|
+
* @returns 返回clone的实例
|
|
4836
5294
|
*/
|
|
4837
|
-
|
|
5295
|
+
clone(isChild?: boolean): Mesh;
|
|
4838
5296
|
/**
|
|
4839
|
-
*
|
|
5297
|
+
* raycast
|
|
5298
|
+
* @param ray -
|
|
5299
|
+
* @param sort - 是否按距离排序
|
|
4840
5300
|
*/
|
|
4841
|
-
|
|
5301
|
+
raycast(ray: Ray, sort?: boolean): Vector3[] | null;
|
|
4842
5302
|
/**
|
|
4843
|
-
*
|
|
5303
|
+
* 获取渲染选项值
|
|
5304
|
+
* @param opt - 渲染选项值
|
|
5305
|
+
* @returns 渲染选项值
|
|
4844
5306
|
*/
|
|
4845
|
-
|
|
5307
|
+
getRenderOption(opt?: ShaderOptions): ShaderOptions;
|
|
4846
5308
|
/**
|
|
4847
|
-
*
|
|
5309
|
+
* 是否被销毁
|
|
4848
5310
|
*/
|
|
4849
|
-
|
|
5311
|
+
get isDestroyed(): boolean;
|
|
4850
5312
|
/**
|
|
4851
|
-
*
|
|
5313
|
+
* 销毁 Mesh 资源
|
|
5314
|
+
* @param renderer -
|
|
5315
|
+
* @param needDestroyTextures - 是否销毁材质的贴图,默认不销毁
|
|
5316
|
+
* @returns this
|
|
4852
5317
|
*/
|
|
4853
|
-
|
|
5318
|
+
destroy(renderer?: Renderer, needDestroyTextures?: boolean): this;
|
|
5319
|
+
}
|
|
5320
|
+
|
|
5321
|
+
/** Depth convention used by projection, depth testing, shadows, and picking. */
|
|
5322
|
+
type CameraDepthMode = 'standard' | 'reversed';
|
|
5323
|
+
interface CameraParameters extends NodeParameters {
|
|
4854
5324
|
/**
|
|
4855
|
-
*
|
|
5325
|
+
* Depth convention. `reversed` maps the near plane to 1 and far/infinity to 0, improving
|
|
5326
|
+
* floating-point depth precision. Defaults to `standard` for compatibility.
|
|
4856
5327
|
*/
|
|
4857
|
-
|
|
4858
|
-
private _cullFace;
|
|
5328
|
+
depthMode?: CameraDepthMode;
|
|
4859
5329
|
/**
|
|
4860
|
-
*
|
|
5330
|
+
* Camera visibility bit mask. A renderable node is collected when
|
|
5331
|
+
* `(camera.visibility & node.layer) !== 0`.
|
|
4861
5332
|
*/
|
|
4862
|
-
|
|
5333
|
+
visibility?: number;
|
|
4863
5334
|
/**
|
|
4864
|
-
*
|
|
4865
|
-
|
|
4866
|
-
parallaxMap: Texture | null;
|
|
4867
|
-
emission: MaterialTextureValue;
|
|
4868
|
-
/**
|
|
4869
|
-
* 法线贴图scale
|
|
4870
|
-
*/
|
|
4871
|
-
normalMapScale: number;
|
|
4872
|
-
/**
|
|
4873
|
-
* 是否忽略透明度
|
|
4874
|
-
*/
|
|
4875
|
-
ignoreTransparent: boolean;
|
|
4876
|
-
/**
|
|
4877
|
-
* 是否开启 gamma 矫正
|
|
4878
|
-
*/
|
|
4879
|
-
gammaCorrection: boolean;
|
|
4880
|
-
/**
|
|
4881
|
-
* 是否使用物理灯光
|
|
4882
|
-
*/
|
|
4883
|
-
usePhysicsLight: boolean;
|
|
4884
|
-
/**
|
|
4885
|
-
* 是否环境贴图和环境光同时生效
|
|
4886
|
-
*/
|
|
4887
|
-
isDiffuseEnvAndAmbientLightWorkTogether: boolean;
|
|
4888
|
-
/**
|
|
4889
|
-
* 用户数据
|
|
4890
|
-
*/
|
|
4891
|
-
userData: unknown;
|
|
4892
|
-
/**
|
|
4893
|
-
* 渲染顺序数字小的先渲染(透明物体和不透明在不同的队列)
|
|
4894
|
-
*/
|
|
4895
|
-
renderOrder: number;
|
|
4896
|
-
private _premultiplyAlpha;
|
|
4897
|
-
/**
|
|
4898
|
-
* 是否预乘 alpha
|
|
4899
|
-
*/
|
|
4900
|
-
get premultiplyAlpha(): boolean;
|
|
4901
|
-
/**
|
|
4902
|
-
* 是否预乘 alpha
|
|
4903
|
-
*/
|
|
4904
|
-
set premultiplyAlpha(value: boolean);
|
|
4905
|
-
/**
|
|
4906
|
-
* gamma值
|
|
4907
|
-
*/
|
|
4908
|
-
gammaFactor: number;
|
|
4909
|
-
/**
|
|
4910
|
-
* 是否投射阴影
|
|
4911
|
-
*/
|
|
4912
|
-
castShadows: boolean;
|
|
4913
|
-
/**
|
|
4914
|
-
* 是否接受阴影
|
|
4915
|
-
*/
|
|
4916
|
-
receiveShadows: boolean;
|
|
4917
|
-
/**
|
|
4918
|
-
* uv transform eg:new Matrix3().fromRotationTranslationScale(Math.PI/2, 0, 0, 2, 2)
|
|
4919
|
-
*/
|
|
4920
|
-
uvMatrix: Matrix3 | null;
|
|
4921
|
-
/**
|
|
4922
|
-
* uv1 transform eg:new Matrix3().fromRotationTranslationScale(Math.PI/2, 0, 0, 2, 2)
|
|
4923
|
-
*/
|
|
4924
|
-
uvMatrix1: Matrix3 | null;
|
|
4925
|
-
/**
|
|
4926
|
-
* 是否开启 CullFace
|
|
4927
|
-
*/
|
|
4928
|
-
get cullFace(): boolean;
|
|
4929
|
-
/**
|
|
4930
|
-
* 是否开启 CullFace
|
|
4931
|
-
*/
|
|
4932
|
-
set cullFace(value: boolean);
|
|
4933
|
-
private _cullFaceType;
|
|
4934
|
-
/**
|
|
4935
|
-
* CullFace 类型
|
|
4936
|
-
*/
|
|
4937
|
-
get cullFaceType(): GLenum;
|
|
4938
|
-
/**
|
|
4939
|
-
* CullFace 类型
|
|
4940
|
-
*/
|
|
4941
|
-
set cullFaceType(value: GLenum);
|
|
4942
|
-
private _side;
|
|
4943
|
-
/**
|
|
4944
|
-
* 显示面,可选值 FRONT, BACK, FRONT_AND_BACK
|
|
4945
|
-
*/
|
|
4946
|
-
get side(): GLenum;
|
|
4947
|
-
/**
|
|
4948
|
-
* 显示面,可选值 FRONT, BACK, FRONT_AND_BACK
|
|
4949
|
-
*/
|
|
4950
|
-
set side(value: GLenum);
|
|
4951
|
-
/**
|
|
4952
|
-
* 是否开启颜色混合
|
|
4953
|
-
*/
|
|
4954
|
-
blend: boolean;
|
|
4955
|
-
/**
|
|
4956
|
-
* 颜色混合方式
|
|
4957
|
-
*/
|
|
4958
|
-
blendEquation: number;
|
|
4959
|
-
/**
|
|
4960
|
-
* 透明度混合方式
|
|
4961
|
-
*/
|
|
4962
|
-
blendEquationAlpha: number;
|
|
4963
|
-
/**
|
|
4964
|
-
* 颜色混合来源比例
|
|
4965
|
-
*/
|
|
4966
|
-
blendSrc: number;
|
|
4967
|
-
/**
|
|
4968
|
-
* 颜色混合目标比例
|
|
4969
|
-
*/
|
|
4970
|
-
blendDst: number;
|
|
4971
|
-
/**
|
|
4972
|
-
* 透明度混合来源比例
|
|
4973
|
-
*/
|
|
4974
|
-
blendSrcAlpha: number;
|
|
4975
|
-
/**
|
|
4976
|
-
* 透明度混合目标比例
|
|
4977
|
-
*/
|
|
4978
|
-
blendDstAlpha: number;
|
|
4979
|
-
/**
|
|
4980
|
-
* stencilTest
|
|
4981
|
-
*/
|
|
4982
|
-
stencilTest: boolean;
|
|
4983
|
-
/**
|
|
4984
|
-
* stencilMask
|
|
4985
|
-
*/
|
|
4986
|
-
stencilMask: number;
|
|
4987
|
-
/**
|
|
4988
|
-
* stencilFunc func
|
|
4989
|
-
*/
|
|
4990
|
-
stencilFunc: number;
|
|
4991
|
-
/**
|
|
4992
|
-
* stencilFunc ref
|
|
4993
|
-
*/
|
|
4994
|
-
stencilFuncRef: number;
|
|
4995
|
-
/**
|
|
4996
|
-
* stencilFunc mask
|
|
4997
|
-
*/
|
|
4998
|
-
stencilFuncMask: number;
|
|
4999
|
-
/**
|
|
5000
|
-
* stencilOp fail
|
|
5001
|
-
*/
|
|
5002
|
-
stencilOpFail: number;
|
|
5003
|
-
/**
|
|
5004
|
-
* stencilOp zfail
|
|
5005
|
-
*/
|
|
5006
|
-
stencilOpZFail: number;
|
|
5007
|
-
/**
|
|
5008
|
-
* stencilOp zpass
|
|
5009
|
-
*/
|
|
5010
|
-
stencilOpZPass: number;
|
|
5011
|
-
private _isDirty;
|
|
5012
|
-
private _revision;
|
|
5013
|
-
/** Monotonic material-data revision observed independently by every backend. */
|
|
5014
|
-
get revision(): number;
|
|
5015
|
-
/** 当前是否需要强制更新 */
|
|
5016
|
-
get isDirty(): boolean;
|
|
5017
|
-
set isDirty(value: boolean);
|
|
5018
|
-
/**
|
|
5019
|
-
* 透明度 0~1
|
|
5020
|
-
*/
|
|
5021
|
-
transparency: number | Texture;
|
|
5022
|
-
private _transparent;
|
|
5023
|
-
/**
|
|
5024
|
-
* 是否需要透明
|
|
5025
|
-
*/
|
|
5026
|
-
get transparent(): boolean;
|
|
5027
|
-
/**
|
|
5028
|
-
* 是否需要透明
|
|
5029
|
-
*/
|
|
5030
|
-
set transparent(value: boolean);
|
|
5031
|
-
setDefaultTransparentBlend(): void;
|
|
5032
|
-
/**
|
|
5033
|
-
* 透明度剪裁,如果渲染的颜色透明度大于等于这个值的话渲染为完全不透明,否则渲染为完全透明
|
|
5034
|
-
*/
|
|
5035
|
-
alphaCutoff: number;
|
|
5036
|
-
/**
|
|
5037
|
-
* 是否使用HDR
|
|
5038
|
-
*/
|
|
5039
|
-
useHDR: boolean;
|
|
5040
|
-
/**
|
|
5041
|
-
* 曝光度,仅在 useHDR 为 true 时生效
|
|
5042
|
-
*/
|
|
5043
|
-
exposure: number;
|
|
5044
|
-
/**
|
|
5045
|
-
* 是否开启 texture lod
|
|
5046
|
-
*/
|
|
5047
|
-
enableTextureLod: boolean;
|
|
5048
|
-
/**
|
|
5049
|
-
* 是否开启 drawBuffers
|
|
5050
|
-
*/
|
|
5051
|
-
enableDrawBuffers: boolean;
|
|
5052
|
-
/**
|
|
5053
|
-
* 是否需要加基础 uniforms
|
|
5054
|
-
*/
|
|
5055
|
-
needBasicUniforms: boolean;
|
|
5056
|
-
/**
|
|
5057
|
-
* 是否需要加基础 attributes
|
|
5058
|
-
*/
|
|
5059
|
-
needBasicAttributes: boolean;
|
|
5060
|
-
readonly id: string;
|
|
5061
|
-
/**
|
|
5062
|
-
* Semantic resolvers for canonical block fields and sampler bindings. Program linking rejects
|
|
5063
|
-
* every active classic uniform that is not an opaque sampler.
|
|
5064
|
-
*/
|
|
5065
|
-
uniforms: MaterialBindingMap;
|
|
5066
|
-
attributes: MaterialBindingMap;
|
|
5067
|
-
/** Registered std140 blocks keyed by GLSL block name. */
|
|
5068
|
-
uniformBlocks: Record<string, UniformBuffer>;
|
|
5069
|
-
protected readonly textureOption: TextureOptionBuilder;
|
|
5070
|
-
private _instancedUniforms;
|
|
5071
|
-
private bindingsInitialized;
|
|
5072
|
-
/**
|
|
5073
|
-
* @param params - 初始化参数,所有params都会复制到实例上
|
|
5074
|
-
*/
|
|
5075
|
-
constructor(params?: MaterialParameters, initializeBindings?: boolean);
|
|
5076
|
-
protected initializeBindings(): void;
|
|
5077
|
-
/**
|
|
5078
|
-
* 增加基础 attributes
|
|
5079
|
-
*/
|
|
5080
|
-
addBasicAttributes(): void;
|
|
5081
|
-
/**
|
|
5082
|
-
* 增加基础 uniforms
|
|
5083
|
-
*/
|
|
5084
|
-
addBasicUniforms(): void;
|
|
5085
|
-
/**
|
|
5086
|
-
* 增加贴图 uniforms
|
|
5087
|
-
* @param textureUniforms - textureName:semanticName 键值对
|
|
5088
|
-
*/
|
|
5089
|
-
addTextureUniforms(textureUniforms: Readonly<Record<string, string>>): void;
|
|
5090
|
-
/**
|
|
5091
|
-
* 获取渲染选项值
|
|
5092
|
-
* @param option - 渲染选项值
|
|
5093
|
-
* @returns 渲染选项值
|
|
5094
|
-
*/
|
|
5095
|
-
getRenderOption(option?: ShaderOptions): ShaderOptions;
|
|
5096
|
-
/**
|
|
5097
|
-
* 获取 instanced uniforms
|
|
5098
|
-
*/
|
|
5099
|
-
getInstancedUniforms(): InstancedUniform[];
|
|
5100
|
-
getUniformData(name: string, mesh: Mesh, programInfo: ProgramBindingInfo): unknown;
|
|
5101
|
-
getAttributeData(name: string, mesh: Mesh, programInfo: ProgramBindingInfo): unknown;
|
|
5102
|
-
getUniformInfo(name: string): MaterialBindingInfo;
|
|
5103
|
-
getAttributeInfo(name: string): MaterialBindingInfo;
|
|
5104
|
-
private getInfo;
|
|
5105
|
-
/**
|
|
5106
|
-
* clone 当前Material
|
|
5107
|
-
* @returns 返回clone的Material
|
|
5108
|
-
*/
|
|
5109
|
-
clone(): Material;
|
|
5110
|
-
/**
|
|
5111
|
-
* 销毁贴图
|
|
5112
|
-
* @returns this
|
|
5113
|
-
*/
|
|
5114
|
-
destroyTextures(): void;
|
|
5115
|
-
/**
|
|
5116
|
-
* 获取材质全部贴图
|
|
5117
|
-
*/
|
|
5118
|
-
getTextures(): MaterialTexture[];
|
|
5119
|
-
/**
|
|
5120
|
-
* 复制属性,只有没属性时才会覆盖
|
|
5121
|
-
* @param origin -
|
|
5122
|
-
* @param data -
|
|
5123
|
-
*/
|
|
5124
|
-
protected copyBindings(origin: MaterialBindingMap, data: Readonly<MaterialBindingMap>): void;
|
|
5125
|
-
/**
|
|
5126
|
-
* 获取阴影材质,子类可重写
|
|
5127
|
-
* @param shadowMaterial - 通用阴影材质
|
|
5128
|
-
*/
|
|
5129
|
-
getShadowMaterial(shadowMaterial: Material): Material;
|
|
5130
|
-
}
|
|
5131
|
-
|
|
5132
|
-
interface MeshParameters extends NodeParameters {
|
|
5133
|
-
geometry?: Geometry | null;
|
|
5134
|
-
material?: Material | null;
|
|
5135
|
-
useInstanced?: boolean;
|
|
5136
|
-
frustumTest?: boolean;
|
|
5137
|
-
}
|
|
5138
|
-
/**
|
|
5139
|
-
* Mesh
|
|
5140
|
-
* @example
|
|
5141
|
-
* ```ts
|
|
5142
|
-
* const mesh = new Hilo3d.Mesh({
|
|
5143
|
-
* geometry: new Hilo3d.BoxGeometry(),
|
|
5144
|
-
* material: new Hilo3d.BasicMaterial({
|
|
5145
|
-
* diffuse: new Hilo3d.Color(0.8, 0, 0)
|
|
5146
|
-
* }),
|
|
5147
|
-
* x:100,
|
|
5148
|
-
* rotationX:30
|
|
5149
|
-
* });
|
|
5150
|
-
* stage.addChild(mesh);
|
|
5151
|
-
* ```
|
|
5152
|
-
*/
|
|
5153
|
-
declare class Mesh extends Node {
|
|
5154
|
-
static readonly typeName: string;
|
|
5155
|
-
protected _isDestroyed: boolean;
|
|
5156
|
-
isMesh: boolean;
|
|
5157
|
-
className: string;
|
|
5158
|
-
geometry: Geometry | null;
|
|
5159
|
-
material: Material | null;
|
|
5160
|
-
/**
|
|
5161
|
-
* 是否使用 Instanced
|
|
5162
|
-
*/
|
|
5163
|
-
useInstanced: boolean;
|
|
5164
|
-
/**
|
|
5165
|
-
* 是否开启视锥体裁剪
|
|
5166
|
-
*/
|
|
5167
|
-
frustumTest: boolean;
|
|
5168
|
-
/**
|
|
5169
|
-
* @param params - 初始化参数,所有params都会复制到实例上
|
|
5170
|
-
* - `params.geometry`: 几何体
|
|
5171
|
-
* - `params.material`: 材质
|
|
5172
|
-
*/
|
|
5173
|
-
constructor(params?: MeshParameters);
|
|
5174
|
-
/**
|
|
5175
|
-
* clone 当前mesh
|
|
5176
|
-
* @param isChild - 是否子元素
|
|
5177
|
-
* @returns 返回clone的实例
|
|
5178
|
-
*/
|
|
5179
|
-
clone(isChild?: boolean): Mesh;
|
|
5180
|
-
/**
|
|
5181
|
-
* raycast
|
|
5182
|
-
* @param ray -
|
|
5183
|
-
* @param sort - 是否按距离排序
|
|
5184
|
-
*/
|
|
5185
|
-
raycast(ray: Ray, sort?: boolean): Vector3[] | null;
|
|
5186
|
-
/**
|
|
5187
|
-
* 获取渲染选项值
|
|
5188
|
-
* @param opt - 渲染选项值
|
|
5189
|
-
* @returns 渲染选项值
|
|
5190
|
-
*/
|
|
5191
|
-
getRenderOption(opt?: ShaderOptions): ShaderOptions;
|
|
5192
|
-
/**
|
|
5193
|
-
* 是否被销毁
|
|
5194
|
-
*/
|
|
5195
|
-
get isDestroyed(): boolean;
|
|
5196
|
-
/**
|
|
5197
|
-
* 销毁 Mesh 资源
|
|
5198
|
-
* @param renderer -
|
|
5199
|
-
* @param needDestroyTextures - 是否销毁材质的贴图,默认不销毁
|
|
5200
|
-
* @returns this
|
|
5201
|
-
*/
|
|
5202
|
-
destroy(renderer?: Renderer, needDestroyTextures?: boolean): this;
|
|
5203
|
-
}
|
|
5204
|
-
|
|
5205
|
-
interface CameraParameters extends NodeParameters {
|
|
5206
|
-
/**
|
|
5207
|
-
* Camera visibility bit mask. A renderable node is collected when
|
|
5208
|
-
* `(camera.visibility & node.layer) !== 0`.
|
|
5209
|
-
*/
|
|
5210
|
-
visibility?: number;
|
|
5211
|
-
/**
|
|
5212
|
-
* Clear the current color attachment when this camera follows another camera in the same
|
|
5213
|
-
* application frame. The first camera always clears.
|
|
5335
|
+
* Clear the current color attachment when this camera follows another camera in the same
|
|
5336
|
+
* application frame. The first camera always clears.
|
|
5214
5337
|
*/
|
|
5215
5338
|
clearColor?: boolean;
|
|
5216
5339
|
/** Clear depth before this camera when composing multiple cameras. */
|
|
@@ -5226,8 +5349,14 @@ interface CameraParameters extends NodeParameters {
|
|
|
5226
5349
|
declare class Camera extends Node {
|
|
5227
5350
|
static readonly typeName: string;
|
|
5228
5351
|
readonly viewMatrix: Matrix4;
|
|
5352
|
+
/** Stable non-jittered projection used by CPU culling, picking, and project/unproject. */
|
|
5229
5353
|
readonly projectionMatrix: Matrix4;
|
|
5354
|
+
/** Raster projection with the current sub-pixel clip-space jitter applied. */
|
|
5355
|
+
readonly jitteredProjectionMatrix: Matrix4;
|
|
5356
|
+
/** Stable non-jittered view-projection used by CPU visibility and interaction queries. */
|
|
5230
5357
|
readonly viewProjectionMatrix: Matrix4;
|
|
5358
|
+
/** Raster view-projection with the current sub-pixel clip-space jitter applied. */
|
|
5359
|
+
readonly jitteredViewProjectionMatrix: Matrix4;
|
|
5231
5360
|
protected readonly _frustum: Frustum;
|
|
5232
5361
|
protected _geometry: Geometry | null;
|
|
5233
5362
|
isCamera: boolean;
|
|
@@ -5249,6 +5378,10 @@ declare class Camera extends Node {
|
|
|
5249
5378
|
clearDepth: boolean;
|
|
5250
5379
|
/** Whether this camera clears stencil before drawing. */
|
|
5251
5380
|
clearStencil: boolean;
|
|
5381
|
+
private depthModeValue;
|
|
5382
|
+
/** Active projection/depth-buffer convention. */
|
|
5383
|
+
get depthMode(): CameraDepthMode;
|
|
5384
|
+
set depthMode(value: CameraDepthMode);
|
|
5252
5385
|
private priorityValue;
|
|
5253
5386
|
/** Camera composition priority. Lower values render first and receive pointer input last. */
|
|
5254
5387
|
get priority(): number;
|
|
@@ -5258,6 +5391,8 @@ declare class Camera extends Node {
|
|
|
5258
5391
|
*/
|
|
5259
5392
|
protected _needUpdateProjectionMatrix: boolean;
|
|
5260
5393
|
protected _isGeometryDirty: boolean;
|
|
5394
|
+
private projectionJitterXValue;
|
|
5395
|
+
private projectionJitterYValue;
|
|
5261
5396
|
/**
|
|
5262
5397
|
* @param params - 创建对象的属性参数。可包含此类的所有属性。
|
|
5263
5398
|
*/
|
|
@@ -5276,6 +5411,23 @@ declare class Camera extends Node {
|
|
|
5276
5411
|
* 更新投影矩阵,子类必须重载这个方法
|
|
5277
5412
|
*/
|
|
5278
5413
|
updateProjectionMatrix(): void;
|
|
5414
|
+
/** Horizontal raster jitter in normalized-device coordinates. */
|
|
5415
|
+
get projectionJitterX(): number;
|
|
5416
|
+
/** Vertical raster jitter in normalized-device coordinates. */
|
|
5417
|
+
get projectionJitterY(): number;
|
|
5418
|
+
/**
|
|
5419
|
+
* Apply a sub-pixel raster offset without changing the stable CPU projection.
|
|
5420
|
+
*
|
|
5421
|
+
* Temporal render features use normalized-device coordinates, where one physical pixel is
|
|
5422
|
+
* `2 / attachmentSize`. Culling, picking, project/unproject, and camera helpers continue to
|
|
5423
|
+
* consume `projectionMatrix` and `viewProjectionMatrix`.
|
|
5424
|
+
* @param x - Horizontal normalized-device offset.
|
|
5425
|
+
* @param y - Vertical normalized-device offset.
|
|
5426
|
+
* @returns this
|
|
5427
|
+
*/
|
|
5428
|
+
setProjectionJitter(x: number, y: number): this;
|
|
5429
|
+
/** Clear the raster jitter while preserving transform history. */
|
|
5430
|
+
clearProjectionJitter(): this;
|
|
5279
5431
|
/**
|
|
5280
5432
|
* 获取几何体,子类必须重写
|
|
5281
5433
|
* @param forceUpdate - 是否强制更新
|
|
@@ -5286,6 +5438,8 @@ declare class Camera extends Node {
|
|
|
5286
5438
|
* @returns this
|
|
5287
5439
|
*/
|
|
5288
5440
|
updateViewProjectionMatrix(): this;
|
|
5441
|
+
/** Rebuild the raster projection by translating clip coordinates before perspective divide. */
|
|
5442
|
+
protected updateJitteredProjectionMatrix(): void;
|
|
5289
5443
|
/**
|
|
5290
5444
|
* 获取元素相对于当前Camera的矩阵
|
|
5291
5445
|
* @param node - 目标元素
|
|
@@ -5321,6 +5475,8 @@ declare class Camera extends Node {
|
|
|
5321
5475
|
* @param point -
|
|
5322
5476
|
*/
|
|
5323
5477
|
isPointVisible(point: Vector3): boolean;
|
|
5478
|
+
/** Return whether a world-space bounding sphere intersects the stable camera frustum. */
|
|
5479
|
+
isSphereVisible(sphere: Sphere): boolean;
|
|
5324
5480
|
/**
|
|
5325
5481
|
* mesh 是否摄像机可见
|
|
5326
5482
|
* @param mesh -
|
|
@@ -5334,6 +5490,54 @@ declare class Camera extends Node {
|
|
|
5334
5490
|
updateFrustum(matrix: Matrix4): this;
|
|
5335
5491
|
}
|
|
5336
5492
|
|
|
5493
|
+
/** Native command-pass categories that can receive GPU timestamps. */
|
|
5494
|
+
type RGPassTimestampKind = 'render' | 'compute';
|
|
5495
|
+
/** Availability state for one frame's asynchronous GPU timestamp result. */
|
|
5496
|
+
type RenderGraphGPUTimelineStatus = 'unavailable' | 'pending' | 'ready' | 'failed' | 'saturated';
|
|
5497
|
+
/** Immutable CPU/GPU timing values for one compiled Render Graph pass. */
|
|
5498
|
+
interface RenderGraphPassTimelineSnapshot {
|
|
5499
|
+
/** Stable graph pass label. */
|
|
5500
|
+
readonly name: string;
|
|
5501
|
+
/** Native timestamp category, or null when this pass cannot be profiled. */
|
|
5502
|
+
readonly kind: RGPassTimestampKind | null;
|
|
5503
|
+
/** Synchronous CPU execution duration in milliseconds. */
|
|
5504
|
+
readonly cpuDurationMs: number;
|
|
5505
|
+
/** Asynchronously resolved GPU duration in milliseconds, or null when unavailable. */
|
|
5506
|
+
readonly gpuDurationMs: number | null;
|
|
5507
|
+
}
|
|
5508
|
+
/** Immutable lifetime metadata for one compiled Render Graph resource. */
|
|
5509
|
+
interface RenderGraphResourceLifetimeSnapshot {
|
|
5510
|
+
/** Stable graph resource label. */
|
|
5511
|
+
readonly name: string;
|
|
5512
|
+
/** Logical graph resource category. */
|
|
5513
|
+
readonly kind: 'texture' | 'texture-view' | 'buffer';
|
|
5514
|
+
/** Whether the resource was imported, transiently allocated, or derived as a view. */
|
|
5515
|
+
readonly origin: 'imported' | 'transient' | 'view';
|
|
5516
|
+
/** First compiled pass index using this resource, or null when unused. */
|
|
5517
|
+
readonly firstUse: number | null;
|
|
5518
|
+
/** Last compiled pass index using this resource, or null when unused. */
|
|
5519
|
+
readonly lastUse: number | null;
|
|
5520
|
+
}
|
|
5521
|
+
/** One immutable CPU/GPU view of a compiled and submitted Render Graph frame. */
|
|
5522
|
+
interface RenderGraphTimelineSnapshot {
|
|
5523
|
+
/** Application frame index. */
|
|
5524
|
+
readonly frameIndex: number;
|
|
5525
|
+
/** Pipeline graph-recording CPU duration in milliseconds. */
|
|
5526
|
+
readonly recordDurationMs: number;
|
|
5527
|
+
/** Graph compilation CPU duration in milliseconds. */
|
|
5528
|
+
readonly compileDurationMs: number;
|
|
5529
|
+
/** Resource and pipeline preparation CPU duration in milliseconds. */
|
|
5530
|
+
readonly prepareDurationMs: number;
|
|
5531
|
+
/** Command-emission CPU duration in milliseconds. */
|
|
5532
|
+
readonly executeDurationMs: number;
|
|
5533
|
+
/** Lifecycle state of the asynchronous GPU timestamp result. */
|
|
5534
|
+
readonly gpuStatus: RenderGraphGPUTimelineStatus;
|
|
5535
|
+
/** Compiled pass timing snapshots in execution order. */
|
|
5536
|
+
readonly passes: readonly RenderGraphPassTimelineSnapshot[];
|
|
5537
|
+
/** Compiled logical-resource lifetime snapshots. */
|
|
5538
|
+
readonly resources: readonly RenderGraphResourceLifetimeSnapshot[];
|
|
5539
|
+
}
|
|
5540
|
+
|
|
5337
5541
|
/**
|
|
5338
5542
|
* 渲染信息
|
|
5339
5543
|
*/
|
|
@@ -5374,6 +5578,9 @@ interface RenderGraphFramePlan {
|
|
|
5374
5578
|
readonly shadowLights: ReadonlySet<Light>;
|
|
5375
5579
|
}
|
|
5376
5580
|
|
|
5581
|
+
/** Encoding carried by render-pipeline color values at a presentation boundary. */
|
|
5582
|
+
type RenderColorEncoding = 'linear' | 'srgb';
|
|
5583
|
+
|
|
5377
5584
|
type RenderTargetSampleCount = 1 | 4;
|
|
5378
5585
|
type RenderTargetColorFormat = 'rgba8unorm' | 'rgba8unorm-srgb' | 'rgba16float' | 'rgba32float';
|
|
5379
5586
|
type RenderTargetDepthStencilFormat = 'depth16unorm' | 'depth24plus' | 'depth24plus-stencil8' | 'depth32float' | 'depth32float-stencil8';
|
|
@@ -5398,6 +5605,8 @@ interface RenderTargetDepthStencilAttachmentOptions {
|
|
|
5398
5605
|
readonly format?: RenderTargetDepthStencilFormat;
|
|
5399
5606
|
/** Expose the depth aspect as an engine Texture. Multisampled depth cannot be sampled. */
|
|
5400
5607
|
readonly sampled?: boolean;
|
|
5608
|
+
/** Projection/depth-buffer convention. Defaults to `standard`. */
|
|
5609
|
+
readonly depthMode?: CameraDepthMode;
|
|
5401
5610
|
readonly compare?: RenderTargetCompareFunction;
|
|
5402
5611
|
readonly depthClearValue?: number;
|
|
5403
5612
|
readonly depthLoadOp?: RenderTargetLoadOp;
|
|
@@ -5419,7 +5628,15 @@ interface RenderTargetParameters {
|
|
|
5419
5628
|
readonly sampleCount?: RenderTargetSampleCount;
|
|
5420
5629
|
readonly label?: string;
|
|
5421
5630
|
}
|
|
5422
|
-
|
|
5631
|
+
/** Color contract used when attachment zero is copied to the browser presentation surface. */
|
|
5632
|
+
interface RenderTargetPresentationOptions {
|
|
5633
|
+
/**
|
|
5634
|
+
* Encoding stored in attachment zero. Linear input receives the final sRGB transfer. Defaults
|
|
5635
|
+
* to `linear`; a selection's value is reused by `present()` when that target is implicit.
|
|
5636
|
+
*/
|
|
5637
|
+
readonly colorEncoding?: RenderColorEncoding;
|
|
5638
|
+
}
|
|
5639
|
+
interface RenderTargetSelectionOptions extends RenderTargetPresentationOptions {
|
|
5423
5640
|
/** Present attachment zero after each render. */
|
|
5424
5641
|
readonly present?: boolean;
|
|
5425
5642
|
/** Destroy the target when it is replaced or when the renderer is destroyed. */
|
|
@@ -5561,7 +5778,7 @@ interface RendererFrame {
|
|
|
5561
5778
|
readonly backend: RendererBackend;
|
|
5562
5779
|
render(stage: RendererScene, camera: Camera, fireEvent?: boolean): void;
|
|
5563
5780
|
renderToTarget(target: RenderTarget, stage: RendererScene, camera: Camera, fireEvent?: boolean): void;
|
|
5564
|
-
present(target?: RenderTarget): void;
|
|
5781
|
+
present(target?: RenderTarget, options?: RenderTargetPresentationOptions): void;
|
|
5565
5782
|
}
|
|
5566
5783
|
/** Synchronous frame recorder. Returning a Promise is rejected at runtime. */
|
|
5567
5784
|
type RendererFrameCallback = (frame: RendererFrame) => unknown;
|
|
@@ -5580,7 +5797,9 @@ interface RendererContract {
|
|
|
5580
5797
|
pixelRatio: number;
|
|
5581
5798
|
domElement: HTMLCanvasElement | null;
|
|
5582
5799
|
useInstanced: boolean;
|
|
5583
|
-
|
|
5800
|
+
readonly cameraRelative: boolean;
|
|
5801
|
+
readonly renderingProfile: 'portable' | 'high-end';
|
|
5802
|
+
forceMaterial: MaterialInstance | null;
|
|
5584
5803
|
clearColor: Color;
|
|
5585
5804
|
resize(width: number, height: number, force?: boolean): void;
|
|
5586
5805
|
setOffset(x: number, y: number): void;
|
|
@@ -5595,7 +5814,7 @@ interface RendererContract {
|
|
|
5595
5814
|
createRenderTarget(parameters: RenderTargetParameters): RenderTarget;
|
|
5596
5815
|
setRenderTarget(target: RenderTarget | null, options?: RenderTargetSelectionOptions): this;
|
|
5597
5816
|
/** Present the first color attachment of a renderer-owned target to the canvas. */
|
|
5598
|
-
present(target?: RenderTarget): void;
|
|
5817
|
+
present(target?: RenderTarget, options?: RenderTargetPresentationOptions): void;
|
|
5599
5818
|
renderToTarget(target: RenderTarget, stage: RendererScene, camera: Camera, fireEvent?: boolean): void;
|
|
5600
5819
|
onInit(callback: (renderer: this) => void): void;
|
|
5601
5820
|
/** Resolve after all work submitted before this call has completed. */
|
|
@@ -5665,18 +5884,41 @@ interface RendererListDescriptor {
|
|
|
5665
5884
|
/** Sorting policy applied before draw preparation. */
|
|
5666
5885
|
readonly sorting: RendererListSorting;
|
|
5667
5886
|
/** Optional material used for every selected mesh. */
|
|
5668
|
-
readonly overrideMaterial?:
|
|
5887
|
+
readonly overrideMaterial?: MaterialInstance;
|
|
5888
|
+
/** Semantic material pass compiled for every selected draw. Defaults to `forward`. */
|
|
5889
|
+
readonly materialPass?: MaterialPassRole;
|
|
5669
5890
|
/** Include only meshes whose effective material casts shadows. */
|
|
5670
5891
|
readonly castShadowsOnly?: boolean;
|
|
5892
|
+
/**
|
|
5893
|
+
* Mesh identities omitted from this list after culling. This supports hybrid pipelines that
|
|
5894
|
+
* draw a GPU-managed subset separately while retaining the shared Forward path as a fallback.
|
|
5895
|
+
*/
|
|
5896
|
+
readonly excludeMeshes?: readonly Mesh[];
|
|
5671
5897
|
}
|
|
5672
5898
|
|
|
5899
|
+
/** Physical dimension of a scriptable render-pipeline texture. */
|
|
5900
|
+
type RenderPipelineTextureDimension = '1d' | '2d' | '3d';
|
|
5901
|
+
/** Dimension exposed by one scriptable render-pipeline texture view. */
|
|
5902
|
+
type RenderPipelineTextureViewDimension = '1d' | '2d' | '2d-array' | 'cube' | 'cube-array' | '3d';
|
|
5903
|
+
/** Aspect selected by one scriptable render-pipeline texture view. */
|
|
5904
|
+
type RenderPipelineTextureAspect = 'all' | 'stencil-only' | 'depth-only';
|
|
5905
|
+
/** Portable texture formats accepted by graph, compute, copy, and raster validation. */
|
|
5906
|
+
type RenderPipelineTextureFormat = 'r8unorm' | 'r8snorm' | 'r8uint' | 'r8sint' | 'r16uint' | 'r16sint' | 'r16float' | 'rg8unorm' | 'rg8snorm' | 'rg8uint' | 'rg8sint' | 'r32uint' | 'r32sint' | 'r32float' | 'rg16uint' | 'rg16sint' | 'rg16float' | 'rgba8unorm' | 'rgba8unorm-srgb' | 'rgba8snorm' | 'rgba8uint' | 'rgba8sint' | 'bgra8unorm' | 'bgra8unorm-srgb' | 'rgb10a2unorm' | 'rgb10a2uint' | 'rg11b10ufloat' | 'rgb9e5ufloat' | 'rg32uint' | 'rg32sint' | 'rg32float' | 'rgba16uint' | 'rgba16sint' | 'rgba16float' | 'rgba32uint' | 'rgba32sint' | 'rgba32float' | 'stencil8' | 'depth16unorm' | 'depth24plus' | 'depth24plus-stencil8' | 'depth32float' | 'depth32float-stencil8' | 'bc1-rgba-unorm' | 'bc1-rgba-unorm-srgb' | 'bc2-rgba-unorm' | 'bc2-rgba-unorm-srgb' | 'bc3-rgba-unorm' | 'bc3-rgba-unorm-srgb' | 'etc2-rgb8unorm' | 'etc2-rgb8unorm-srgb' | 'etc2-rgb8a1unorm' | 'etc2-rgb8a1unorm-srgb' | 'etc2-rgba8unorm' | 'etc2-rgba8unorm-srgb' | 'eac-r11unorm' | 'eac-r11snorm' | 'eac-rg11unorm' | 'eac-rg11snorm' | 'astc-4x4-unorm' | 'astc-4x4-unorm-srgb';
|
|
5907
|
+
|
|
5673
5908
|
declare const renderGraphTextureHandleBrand: unique symbol;
|
|
5909
|
+
declare const renderGraphTextureViewHandleBrand: unique symbol;
|
|
5674
5910
|
declare const renderGraphBufferHandleBrand: unique symbol;
|
|
5675
5911
|
declare const renderGraphPassHandleBrand: unique symbol;
|
|
5676
5912
|
/** Opaque texture identity scoped to one scriptable frame. */
|
|
5677
5913
|
type RenderGraphTextureHandle = number & {
|
|
5678
5914
|
readonly [renderGraphTextureHandleBrand]: true;
|
|
5679
5915
|
};
|
|
5916
|
+
/** Opaque view identity selecting subresources from one graph texture. */
|
|
5917
|
+
type RenderGraphTextureViewHandle = number & {
|
|
5918
|
+
readonly [renderGraphTextureViewHandleBrand]: true;
|
|
5919
|
+
};
|
|
5920
|
+
/** A complete graph texture or one explicit mip/layer/aspect view. */
|
|
5921
|
+
type RenderGraphTextureAccessHandle = RenderGraphTextureHandle | RenderGraphTextureViewHandle;
|
|
5680
5922
|
/** Opaque buffer identity scoped to one scriptable frame. */
|
|
5681
5923
|
type RenderGraphBufferHandle = number & {
|
|
5682
5924
|
readonly [renderGraphBufferHandleBrand]: true;
|
|
@@ -5698,13 +5940,40 @@ type RenderPipelineExtent = Readonly<{
|
|
|
5698
5940
|
/** Backend-neutral transient texture descriptor. Usage is inferred from pass declarations. */
|
|
5699
5941
|
interface RenderPipelineTextureDescriptor {
|
|
5700
5942
|
/** Color or depth/stencil format. */
|
|
5701
|
-
readonly format:
|
|
5943
|
+
readonly format: RenderPipelineTextureFormat;
|
|
5702
5944
|
/** Absolute or output-relative dimensions. */
|
|
5703
5945
|
readonly extent: RenderPipelineExtent;
|
|
5704
5946
|
/** Raster sample count, defaulting to one. */
|
|
5705
5947
|
readonly sampleCount?: RenderTargetSampleCount;
|
|
5706
5948
|
/** Mip count, defaulting to one; multisampled textures require one mip. */
|
|
5707
5949
|
readonly mipLevelCount?: number;
|
|
5950
|
+
/** Texture depth or array-layer count, defaulting to one. */
|
|
5951
|
+
readonly depthOrArrayLayers?: number;
|
|
5952
|
+
/** Physical texture dimension, defaulting to `2d`. */
|
|
5953
|
+
readonly dimension?: RenderPipelineTextureDimension;
|
|
5954
|
+
/** Default whole-resource view dimension. */
|
|
5955
|
+
readonly viewDimension?: RenderPipelineTextureViewDimension;
|
|
5956
|
+
/** Compatible formats that explicit views may select. */
|
|
5957
|
+
readonly viewFormats?: readonly RenderPipelineTextureFormat[];
|
|
5958
|
+
}
|
|
5959
|
+
/** Explicit subresource selection into one graph texture. */
|
|
5960
|
+
interface RenderPipelineTextureViewDescriptor {
|
|
5961
|
+
/** Optional diagnostic label. */
|
|
5962
|
+
readonly label?: string;
|
|
5963
|
+
/** Optional compatible format reinterpretation declared by the parent texture. */
|
|
5964
|
+
readonly format?: RenderPipelineTextureFormat;
|
|
5965
|
+
/** View dimensionality. */
|
|
5966
|
+
readonly dimension?: RenderPipelineTextureViewDimension;
|
|
5967
|
+
/** Color, depth, stencil, or all compatible aspects. */
|
|
5968
|
+
readonly aspect?: RenderPipelineTextureAspect;
|
|
5969
|
+
/** First selected mip. */
|
|
5970
|
+
readonly baseMipLevel?: number;
|
|
5971
|
+
/** Number of selected mips. */
|
|
5972
|
+
readonly mipLevelCount?: number;
|
|
5973
|
+
/** First selected array layer. */
|
|
5974
|
+
readonly baseArrayLayer?: number;
|
|
5975
|
+
/** Number of selected array layers. */
|
|
5976
|
+
readonly arrayLayerCount?: number;
|
|
5708
5977
|
}
|
|
5709
5978
|
/** Backend-neutral transient buffer descriptor. Usage is inferred from pass declarations. */
|
|
5710
5979
|
interface RenderPipelineBufferDescriptor {
|
|
@@ -5744,15 +6013,46 @@ interface RenderPipelinePersistentTargetDescriptor {
|
|
|
5744
6013
|
readonly colorFormats: readonly RenderTargetColorFormat[];
|
|
5745
6014
|
/** Optional depth/stencil attachment format. */
|
|
5746
6015
|
readonly depthStencilFormat?: RenderTargetDepthStencilFormat;
|
|
6016
|
+
/** Create a persistent depth-only sampled view for a single-sample depth attachment. */
|
|
6017
|
+
readonly depthStencilSampled?: boolean;
|
|
5747
6018
|
/** Raster sample count, defaulting to one. */
|
|
5748
6019
|
readonly sampleCount?: RenderTargetSampleCount;
|
|
5749
6020
|
}
|
|
6021
|
+
/** Explicit creation roles for a recovery-aware history texture. */
|
|
6022
|
+
type RenderPipelinePersistentTextureUsage = 'sampled' | 'storage' | 'attachment' | 'copy-source' | 'copy-destination';
|
|
6023
|
+
/**
|
|
6024
|
+
* Recovery recipe for a renderer-owned double- or triple-buffered history texture.
|
|
6025
|
+
*
|
|
6026
|
+
* The first release accepts one single-sample 2D color mip and array layer. This fail-closed
|
|
6027
|
+
* boundary ensures any submitted current-slot writer fully initializes the next readable slot.
|
|
6028
|
+
*/
|
|
6029
|
+
interface RenderPipelineHistoryTextureDescriptor extends RenderPipelineTextureDescriptor {
|
|
6030
|
+
/** Optional diagnostic label. */
|
|
6031
|
+
readonly label?: string;
|
|
6032
|
+
/** Complete immutable usage set required by every history slot. */
|
|
6033
|
+
readonly usage: readonly RenderPipelinePersistentTextureUsage[];
|
|
6034
|
+
/** Number of rotating slots, defaulting to two. */
|
|
6035
|
+
readonly bufferCount?: 2 | 3;
|
|
6036
|
+
}
|
|
6037
|
+
/** Frame-scoped handles for one persistent history ring. */
|
|
6038
|
+
interface RenderPipelineHistoryTextureResources {
|
|
6039
|
+
/** Slot that this frame may completely replace. */
|
|
6040
|
+
readonly current: RenderGraphTextureHandle;
|
|
6041
|
+
/** Whether the immediately previous slot contains valid submitted contents. */
|
|
6042
|
+
readonly valid: boolean;
|
|
6043
|
+
/** Invalidation generation for cached temporal state. */
|
|
6044
|
+
readonly generation: number;
|
|
6045
|
+
/** Number of readable history slots. */
|
|
6046
|
+
readonly historyCount: number;
|
|
6047
|
+
/** Return history slot zero (previous frame) through `historyCount - 1`. */
|
|
6048
|
+
history(index?: number): RenderGraphTextureHandle;
|
|
6049
|
+
}
|
|
5750
6050
|
/** One setup-declared color attachment. */
|
|
5751
6051
|
interface RenderPipelineColorAttachment {
|
|
5752
6052
|
/** Attachment source texture. */
|
|
5753
|
-
readonly texture:
|
|
6053
|
+
readonly texture: RenderGraphTextureAccessHandle;
|
|
5754
6054
|
/** Optional single-sample resolve destination. */
|
|
5755
|
-
readonly resolveTarget?:
|
|
6055
|
+
readonly resolveTarget?: RenderGraphTextureAccessHandle;
|
|
5756
6056
|
/** Whether existing contents are loaded or cleared. */
|
|
5757
6057
|
readonly loadOp: RenderTargetLoadOp;
|
|
5758
6058
|
/** Whether resulting contents remain available after the pass. */
|
|
@@ -5763,7 +6063,7 @@ interface RenderPipelineColorAttachment {
|
|
|
5763
6063
|
/** One setup-declared depth/stencil attachment. */
|
|
5764
6064
|
interface RenderPipelineDepthStencilAttachment {
|
|
5765
6065
|
/** Depth/stencil texture handle. */
|
|
5766
|
-
readonly texture:
|
|
6066
|
+
readonly texture: RenderGraphTextureAccessHandle;
|
|
5767
6067
|
/** Depth aspect load operation. */
|
|
5768
6068
|
readonly depthLoadOp?: RenderTargetLoadOp;
|
|
5769
6069
|
/** Depth aspect store operation. */
|
|
@@ -5784,14 +6084,14 @@ interface RenderPipelineDepthStencilAttachment {
|
|
|
5784
6084
|
/** Setup-only dependency declaration surface for one pass. */
|
|
5785
6085
|
interface ScriptableRenderPassBuilder {
|
|
5786
6086
|
/** Declare a sampled texture read. */
|
|
5787
|
-
readTexture(texture:
|
|
6087
|
+
readTexture(texture: RenderGraphTextureAccessHandle): void;
|
|
5788
6088
|
/**
|
|
5789
6089
|
* Declare a write-only storage-texture binding that completely replaces its subresource.
|
|
5790
6090
|
* Partial in-place texture updates are intentionally outside the first public compute ABI.
|
|
5791
6091
|
*/
|
|
5792
|
-
writeStorageTexture(texture:
|
|
5793
|
-
/** Declare one complete
|
|
5794
|
-
copyTexture(source:
|
|
6092
|
+
writeStorageTexture(texture: RenderGraphTextureAccessHandle): void;
|
|
6093
|
+
/** Declare one complete selected-subresource copy and its exact dependency pair. */
|
|
6094
|
+
copyTexture(source: RenderGraphTextureAccessHandle, destination: RenderGraphTextureAccessHandle): void;
|
|
5795
6095
|
/** Declare one initialized buffer read for the given portable role. */
|
|
5796
6096
|
readBuffer(buffer: RenderGraphBufferHandle, use: RenderGraphBufferReadUse): void;
|
|
5797
6097
|
/** Declare a complete buffer replacement for the given portable role. */
|
|
@@ -5823,8 +6123,8 @@ interface ScriptableRenderCommands {
|
|
|
5823
6123
|
setStencilReference(reference: number): void;
|
|
5824
6124
|
/** Draw a renderer list declared during setup. */
|
|
5825
6125
|
drawRendererList(list: RendererListHandle): void;
|
|
5826
|
-
/** Copy the complete single-sample
|
|
5827
|
-
copyTexture(source:
|
|
6126
|
+
/** Copy the complete selected single-sample subresource into the destination. */
|
|
6127
|
+
copyTexture(source: RenderGraphTextureAccessHandle, destination: RenderGraphTextureAccessHandle): void;
|
|
5828
6128
|
/** Copy one complete buffer using a source/destination pair declared during setup. */
|
|
5829
6129
|
copyBuffer(source: RenderGraphBufferHandle, destination: RenderGraphBufferHandle): void;
|
|
5830
6130
|
/** Clear the exact destination byte range declared during setup. */
|
|
@@ -5867,16 +6167,32 @@ interface ScriptableRenderPass<P extends object> {
|
|
|
5867
6167
|
interface ScriptableRenderGraph {
|
|
5868
6168
|
/** Create a logical transient texture whose usage is inferred from live passes. */
|
|
5869
6169
|
createTexture(name: string, descriptor: Readonly<RenderPipelineTextureDescriptor>): RenderGraphTextureHandle;
|
|
6170
|
+
/** Create one explicit mip/layer/aspect view into a graph texture. */
|
|
6171
|
+
createTextureView(name: string, texture: RenderGraphTextureHandle, descriptor?: Readonly<RenderPipelineTextureViewDescriptor>): RenderGraphTextureViewHandle;
|
|
5870
6172
|
/** Create a logical transient buffer whose usage is inferred from live passes. */
|
|
5871
6173
|
createBuffer(name: string, descriptor: Readonly<RenderPipelineBufferDescriptor>): RenderGraphBufferHandle;
|
|
5872
6174
|
/** Import one renderer-owned persistent StorageBuffer into the active graph. */
|
|
5873
6175
|
importStorageBuffer(buffer: StorageBuffer): RenderGraphBufferHandle;
|
|
6176
|
+
/**
|
|
6177
|
+
* Import one engine Texture as a sampled, renderer-owned persistent graph resource.
|
|
6178
|
+
*
|
|
6179
|
+
* The texture upload, sampler-independent image identity, device recovery, and submission
|
|
6180
|
+
* lifetime remain owned by the renderer. Storage and attachment access are intentionally not
|
|
6181
|
+
* exposed through this import.
|
|
6182
|
+
*/
|
|
6183
|
+
importTexture(texture: Texture<unknown>): RenderGraphTextureHandle;
|
|
5874
6184
|
/** Import the current surface or selected RenderTarget output. */
|
|
5875
6185
|
importOutput(): RenderPipelineOutputResources;
|
|
5876
6186
|
/** Import a RenderTarget owned by the current Renderer. */
|
|
5877
6187
|
importRenderTarget(target: RenderTarget): RenderPipelineTargetResources;
|
|
5878
6188
|
/** Acquire a renderer-local persistent target keyed by runtime-owned object identity. */
|
|
5879
6189
|
acquirePersistentTarget(key: object, descriptor: Readonly<RenderPipelinePersistentTargetDescriptor>): RenderPipelineTargetResources;
|
|
6190
|
+
/** Acquire one renderer-owned history ring; it rotates only after a successful write frame. */
|
|
6191
|
+
acquireHistoryTexture(key: object, descriptor: Readonly<RenderPipelineHistoryTextureDescriptor>): RenderPipelineHistoryTextureResources;
|
|
6192
|
+
/** Invalidate submitted history before acquiring it in the active frame. */
|
|
6193
|
+
invalidateHistoryTexture(key: object): boolean;
|
|
6194
|
+
/** Transactionally release one renderer-owned history ring. */
|
|
6195
|
+
releaseHistoryTexture(key: object): boolean;
|
|
5880
6196
|
/**
|
|
5881
6197
|
* Release one persistent target by runtime-owned key.
|
|
5882
6198
|
*
|
|
@@ -5891,6 +6207,162 @@ interface ScriptableRenderGraph {
|
|
|
5891
6207
|
addPass<P extends object>(pass: ScriptableRenderPass<P>, parameters: P): RenderGraphPassHandle;
|
|
5892
6208
|
}
|
|
5893
6209
|
|
|
6210
|
+
/** Sample interpretation supported by whole-subresource compute graph textures. */
|
|
6211
|
+
type ComputeTextureSampleType = 'float' | 'unfilterable-float' | 'depth';
|
|
6212
|
+
/** Compute graph textures currently expose one complete two-dimensional subresource. */
|
|
6213
|
+
type ComputeTextureViewDimension = '2d';
|
|
6214
|
+
/** Compute storage textures currently expose one complete two-dimensional subresource. */
|
|
6215
|
+
type ComputeStorageTextureViewDimension = '2d';
|
|
6216
|
+
/** Sample interpretation supported by storage-aware graphics shaders. */
|
|
6217
|
+
type ShaderTextureSampleType = ComputeTextureSampleType | 'sint' | 'uint';
|
|
6218
|
+
/** Texture views supported by the Material-backed storage graphics path. */
|
|
6219
|
+
type ShaderTextureViewDimension = ComputeTextureViewDimension | '2d-array' | '3d' | 'cube';
|
|
6220
|
+
/** Public color formats that can be requested for a storage-texture binding. */
|
|
6221
|
+
type ComputeStorageTextureFormat = 'r32float' | 'rg32float' | 'rgba8unorm' | 'rgba16float' | 'rgba32float';
|
|
6222
|
+
/** Graph initialization promise for a writable storage-buffer binding. */
|
|
6223
|
+
type ComputeStorageBufferAccess = 'read-write' | 'write-discard';
|
|
6224
|
+
/** Resource binding that a shader may only read. */
|
|
6225
|
+
type ShaderReadBinding = Readonly<{
|
|
6226
|
+
name: string;
|
|
6227
|
+
group: number;
|
|
6228
|
+
binding: number;
|
|
6229
|
+
kind: 'uniform-buffer' | 'read-only-storage-buffer';
|
|
6230
|
+
minBindingSize?: number;
|
|
6231
|
+
dynamicOffset?: boolean;
|
|
6232
|
+
}> | Readonly<{
|
|
6233
|
+
name: string;
|
|
6234
|
+
group: number;
|
|
6235
|
+
binding: number;
|
|
6236
|
+
kind: 'sampled-texture';
|
|
6237
|
+
sampleType: ShaderTextureSampleType;
|
|
6238
|
+
viewDimension?: ShaderTextureViewDimension;
|
|
6239
|
+
}> | Readonly<{
|
|
6240
|
+
name: string;
|
|
6241
|
+
group: number;
|
|
6242
|
+
binding: number;
|
|
6243
|
+
kind: 'sampler' | 'comparison-sampler';
|
|
6244
|
+
}>;
|
|
6245
|
+
/** Explicit binding ABI for one Direct WGSL compute shader. */
|
|
6246
|
+
type ComputeShaderBinding = Readonly<{
|
|
6247
|
+
name: string;
|
|
6248
|
+
group: number;
|
|
6249
|
+
binding: number;
|
|
6250
|
+
kind: 'uniform-buffer' | 'read-only-storage-buffer';
|
|
6251
|
+
minBindingSize?: number;
|
|
6252
|
+
dynamicOffset?: boolean;
|
|
6253
|
+
}> | Readonly<{
|
|
6254
|
+
name: string;
|
|
6255
|
+
group: number;
|
|
6256
|
+
binding: number;
|
|
6257
|
+
kind: 'sampled-texture';
|
|
6258
|
+
sampleType: ComputeTextureSampleType;
|
|
6259
|
+
viewDimension?: ComputeTextureViewDimension;
|
|
6260
|
+
}> | Readonly<{
|
|
6261
|
+
name: string;
|
|
6262
|
+
group: number;
|
|
6263
|
+
binding: number;
|
|
6264
|
+
kind: 'sampler' | 'non-filtering-sampler' | 'comparison-sampler';
|
|
6265
|
+
}> | Readonly<{
|
|
6266
|
+
name: string;
|
|
6267
|
+
group: number;
|
|
6268
|
+
binding: number;
|
|
6269
|
+
kind: 'storage-buffer';
|
|
6270
|
+
/** Graph access promise; both modes use a WGSL `read_write` storage declaration. */
|
|
6271
|
+
access: ComputeStorageBufferAccess;
|
|
6272
|
+
minBindingSize?: number;
|
|
6273
|
+
dynamicOffset?: boolean;
|
|
6274
|
+
}> | Readonly<{
|
|
6275
|
+
name: string;
|
|
6276
|
+
group: number;
|
|
6277
|
+
binding: number;
|
|
6278
|
+
kind: 'storage-texture';
|
|
6279
|
+
/**
|
|
6280
|
+
* WGSL access mode. Declaring this binding also promises that the pass completely
|
|
6281
|
+
* replaces the bound texture subresource before a later graph read.
|
|
6282
|
+
*/
|
|
6283
|
+
access: 'write-only';
|
|
6284
|
+
format: ComputeStorageTextureFormat;
|
|
6285
|
+
viewDimension?: ComputeStorageTextureViewDimension;
|
|
6286
|
+
}>;
|
|
6287
|
+
/** Immutable source, entry point, workgroup size, and binding ABI for {@link ComputeShader}. */
|
|
6288
|
+
interface ComputeShaderDescriptor {
|
|
6289
|
+
/** Optional diagnostic label. */
|
|
6290
|
+
readonly label?: string;
|
|
6291
|
+
/** Direct WGSL source containing exactly the declared compute entry point and resources. */
|
|
6292
|
+
readonly source: string;
|
|
6293
|
+
/** Compute entry-point name. Defaults to `main`. */
|
|
6294
|
+
readonly entryPoint?: string;
|
|
6295
|
+
/** One to three positive literal dimensions, which must match `@workgroup_size`. */
|
|
6296
|
+
readonly workgroupSize: readonly [number, number?, number?];
|
|
6297
|
+
/** Complete explicit resource ABI; entries are snapshotted and sorted by group/binding. */
|
|
6298
|
+
readonly bindings: readonly ComputeShaderBinding[];
|
|
6299
|
+
}
|
|
6300
|
+
/** Normalized three-dimensional compute workgroup size. */
|
|
6301
|
+
type NormalizedComputeWorkgroupSize = readonly [number, number, number];
|
|
6302
|
+
/** Immutable, backend-neutral Direct WGSL compute shader configuration. */
|
|
6303
|
+
declare class ComputeShader {
|
|
6304
|
+
/** Stable diagnostic label, or an empty string. */
|
|
6305
|
+
readonly label: string;
|
|
6306
|
+
/** Validated Direct WGSL source. */
|
|
6307
|
+
readonly source: string;
|
|
6308
|
+
/** Validated compute entry point. */
|
|
6309
|
+
readonly entryPoint: string;
|
|
6310
|
+
/** Normalized workgroup dimensions. */
|
|
6311
|
+
readonly workgroupSize: NormalizedComputeWorkgroupSize;
|
|
6312
|
+
/** Immutable bindings in group/binding order. */
|
|
6313
|
+
readonly bindings: readonly ComputeShaderBinding[];
|
|
6314
|
+
/** Snapshot a Direct WGSL compute shader contract without creating device objects. */
|
|
6315
|
+
constructor(descriptor: Readonly<ComputeShaderDescriptor>);
|
|
6316
|
+
}
|
|
6317
|
+
|
|
6318
|
+
/** Constrained GLSL ES 3.10 graphics source and readonly resource ABI. */
|
|
6319
|
+
interface StorageGraphicsShaderDescriptor {
|
|
6320
|
+
/** Optional diagnostic label. */
|
|
6321
|
+
readonly label?: string;
|
|
6322
|
+
/** GLSL ES 3.10 vertex source; storage blocks must be `readonly` and `std430`. */
|
|
6323
|
+
readonly vertexSource: string;
|
|
6324
|
+
/** GLSL ES 3.10 fragment source; storage blocks must be `readonly` and `std430`. */
|
|
6325
|
+
readonly fragmentSource: string;
|
|
6326
|
+
/** Complete read-only resource ABI shared by the two graphics stages. */
|
|
6327
|
+
readonly bindings: readonly ShaderReadBinding[];
|
|
6328
|
+
}
|
|
6329
|
+
/** Internal adapter for a preprocessed portable shader promoted into the storage-raster dialect. */
|
|
6330
|
+
interface PortableStorageGraphicsShaderDescriptor {
|
|
6331
|
+
readonly label?: string;
|
|
6332
|
+
/** Fully preprocessed GLSL ES 3.00 vertex source. */
|
|
6333
|
+
readonly portableVertexSource: string;
|
|
6334
|
+
/** Fully preprocessed GLSL ES 3.00 fragment source with constrained readonly storage blocks. */
|
|
6335
|
+
readonly portableFragmentSource: string;
|
|
6336
|
+
readonly bindings: readonly ShaderReadBinding[];
|
|
6337
|
+
}
|
|
6338
|
+
/**
|
|
6339
|
+
* Immutable WebGPU-only graphics shader configuration for readonly storage-buffer rendering.
|
|
6340
|
+
*
|
|
6341
|
+
* Sources use the constrained GLSL ES 3.10 contract. Compilation still runs through the shared
|
|
6342
|
+
* engine GLSL preprocessing and Naga translation path; this object never accepts hand-written
|
|
6343
|
+
* graphics WGSL.
|
|
6344
|
+
*/
|
|
6345
|
+
declare class StorageGraphicsShader {
|
|
6346
|
+
/** Stable diagnostic label, or an empty string. */
|
|
6347
|
+
readonly label: string;
|
|
6348
|
+
/** Immutable GLSL ES 3.10 vertex source. */
|
|
6349
|
+
readonly vertexSource: string;
|
|
6350
|
+
/** Immutable GLSL ES 3.10 fragment source. */
|
|
6351
|
+
readonly fragmentSource: string;
|
|
6352
|
+
/** Immutable bindings in group/binding order. */
|
|
6353
|
+
readonly bindings: readonly ShaderReadBinding[];
|
|
6354
|
+
/** Snapshot a WebGPU-only storage-aware graphics shader contract. */
|
|
6355
|
+
constructor(descriptor: Readonly<StorageGraphicsShaderDescriptor>);
|
|
6356
|
+
}
|
|
6357
|
+
/**
|
|
6358
|
+
* Promote fully preprocessed portable raster source at the single storage-graphics boundary.
|
|
6359
|
+
* This keeps dynamic built-in material variants on the same GLSL/Naga path without admitting a
|
|
6360
|
+
* second handwritten WGSL or raster-material tree.
|
|
6361
|
+
*
|
|
6362
|
+
* @internal
|
|
6363
|
+
*/
|
|
6364
|
+
declare function createStorageGraphicsShaderFromPortable(descriptor: Readonly<PortableStorageGraphicsShaderDescriptor>): StorageGraphicsShader;
|
|
6365
|
+
|
|
5894
6366
|
/** Optional renderer capabilities exposed only after their complete SRP/RHI path is available. */
|
|
5895
6367
|
type RenderPipelineCapabilityName = 'storage-buffer' | 'storage-texture' | 'compute-pass' | 'indirect-draw';
|
|
5896
6368
|
/** Portable texture roles available to creation-time requirement validation. */
|
|
@@ -5903,6 +6375,8 @@ interface RenderPipelineLimits {
|
|
|
5903
6375
|
readonly maxColorAttachments: number;
|
|
5904
6376
|
/** Maximum sampled textures visible to one shader stage. */
|
|
5905
6377
|
readonly maxSampledTexturesPerShaderStage: number;
|
|
6378
|
+
/** Maximum samplers visible to one shader stage. */
|
|
6379
|
+
readonly maxSamplersPerShaderStage: number;
|
|
5906
6380
|
/** Maximum bind groups in one pipeline layout. */
|
|
5907
6381
|
readonly maxBindGroups: number;
|
|
5908
6382
|
/** Maximum bindings declared by one bind group. */
|
|
@@ -5931,20 +6405,26 @@ interface RenderPipelineLimits {
|
|
|
5931
6405
|
readonly maxComputeWorkgroupSizeZ?: number;
|
|
5932
6406
|
/** Maximum direct dispatch count in each dimension. */
|
|
5933
6407
|
readonly maxComputeWorkgroupsPerDimension?: number;
|
|
6408
|
+
/** Minimum native subgroup size when the optional subgroups feature is enabled. */
|
|
6409
|
+
readonly subgroupMinSize?: number;
|
|
6410
|
+
/** Maximum native subgroup size when the optional subgroups feature is enabled. */
|
|
6411
|
+
readonly subgroupMaxSize?: number;
|
|
5934
6412
|
}
|
|
5935
6413
|
/** Frozen effective capabilities for one renderer device generation. */
|
|
5936
6414
|
interface RenderPipelineCapabilities {
|
|
5937
6415
|
/** Backend-neutral limit snapshot. */
|
|
5938
6416
|
readonly limits: Readonly<RenderPipelineLimits>;
|
|
6417
|
+
/** Return whether one optional renderer device feature is enabled for this generation. */
|
|
6418
|
+
supportsFeature(feature: RendererFeatureName): boolean;
|
|
5939
6419
|
/** Return whether an optional pipeline capability is fully implemented end to end. */
|
|
5940
6420
|
supportsCapability(capability: RenderPipelineCapabilityName): boolean;
|
|
5941
6421
|
/** Return whether a texture format supports a portable role and sample count. */
|
|
5942
|
-
supportsTextureFormat(format:
|
|
6422
|
+
supportsTextureFormat(format: RenderPipelineTextureFormat, use: RenderPipelineTextureUse, sampleCount?: RenderTargetSampleCount): boolean;
|
|
5943
6423
|
}
|
|
5944
6424
|
/** One texture-format constraint validated before the pipeline runtime is created. */
|
|
5945
6425
|
interface RenderPipelineTextureRequirement {
|
|
5946
6426
|
/** Required portable format. */
|
|
5947
|
-
readonly format:
|
|
6427
|
+
readonly format: RenderPipelineTextureFormat;
|
|
5948
6428
|
/** Required graph or pass role. */
|
|
5949
6429
|
readonly use: RenderPipelineTextureUse;
|
|
5950
6430
|
/** Required sample count, defaulting to one. */
|
|
@@ -5965,6 +6445,16 @@ interface RenderPipelineRequirements {
|
|
|
5965
6445
|
interface RenderPipelineCreateContext {
|
|
5966
6446
|
/** Capabilities for the selected device generation. */
|
|
5967
6447
|
readonly capabilities: RenderPipelineCapabilities;
|
|
6448
|
+
/**
|
|
6449
|
+
* Create a renderer-owned persistent storage buffer during pipeline initialization.
|
|
6450
|
+
*
|
|
6451
|
+
* The returned identity participates in normal device-loss recovery and must be destroyed by
|
|
6452
|
+
* the pipeline runtime. Creation-time allocation keeps fixed GPU databases out of frame
|
|
6453
|
+
* recording while avoiding native backend access.
|
|
6454
|
+
*/
|
|
6455
|
+
createStorageBuffer(descriptor: Readonly<StorageBufferDescriptor>): StorageBuffer;
|
|
6456
|
+
/** Translate and validate storage-aware raster variants before the first application frame. */
|
|
6457
|
+
warmupStorageGraphicsShaders(shaders: readonly StorageGraphicsShader[], batchSize?: number): Promise<void>;
|
|
5968
6458
|
}
|
|
5969
6459
|
/** Attachment operations selected for one physical output color attachment. */
|
|
5970
6460
|
interface RenderPipelineOutputColorAttachment {
|
|
@@ -6016,6 +6506,97 @@ interface RenderPipelineOutput {
|
|
|
6016
6506
|
/** Return the selected load, store, and clear policy for one output color attachment. */
|
|
6017
6507
|
colorAttachment(index: number): Readonly<RenderPipelineOutputColorAttachment>;
|
|
6018
6508
|
}
|
|
6509
|
+
/** Frame-scoped shared shadow-atlas data available to custom and built-in pipelines. */
|
|
6510
|
+
interface RenderPipelineShadowResources {
|
|
6511
|
+
/** Exact graph texture written by the recorded shadow passes. */
|
|
6512
|
+
readonly atlas: RenderGraphTextureHandle;
|
|
6513
|
+
/** Atlas dimensions and reciprocal dimensions as `[width, height, 1/width, 1/height]`. */
|
|
6514
|
+
readonly atlasSize: Float32Array;
|
|
6515
|
+
/** Top-left atlas rectangles as packed `[scaleX, scaleY, offsetX, offsetY]` values. */
|
|
6516
|
+
readonly atlasRects: Float32Array;
|
|
6517
|
+
/** Depth convention used by the atlas texture and comparison sampler. */
|
|
6518
|
+
readonly depthMode: CameraDepthMode;
|
|
6519
|
+
/** Shadow-first directional-light order used by the packed directional arrays. */
|
|
6520
|
+
readonly directionalLights: readonly DirectionalLight[];
|
|
6521
|
+
/** Shadow-first spot-light order used by the packed spot arrays. */
|
|
6522
|
+
readonly spotLights: readonly SpotLight[];
|
|
6523
|
+
/** Shadow-first point-light order used by the packed point arrays. */
|
|
6524
|
+
readonly pointLights: readonly PointLight[];
|
|
6525
|
+
/** Number of leading directional lights with valid packed shadow data. */
|
|
6526
|
+
readonly directionalShadowCount: number;
|
|
6527
|
+
/** Number of leading spot lights with valid packed shadow data. */
|
|
6528
|
+
readonly spotShadowCount: number;
|
|
6529
|
+
/** Number of leading point lights with valid packed shadow data. */
|
|
6530
|
+
readonly pointShadowCount: number;
|
|
6531
|
+
/** Directional minimum/slope bias pairs in shadow-first light order. */
|
|
6532
|
+
readonly directionalBiases: Float32Array;
|
|
6533
|
+
/** Four cascade far distances per directional light. */
|
|
6534
|
+
readonly directionalCascadeSplits: Float32Array;
|
|
6535
|
+
/** Cascade count, blend fraction, and shadow strength per directional light. */
|
|
6536
|
+
readonly directionalCascadeParams: Float32Array;
|
|
6537
|
+
/** View-space-to-shadow-clip matrices for every directional cascade. */
|
|
6538
|
+
readonly directionalCascadeMatrices: Float32Array;
|
|
6539
|
+
/** Spot minimum/slope bias pairs in shadow-first light order. */
|
|
6540
|
+
readonly spotBiases: Float32Array;
|
|
6541
|
+
/** View-space-to-shadow-clip matrices for shadowed spot lights. */
|
|
6542
|
+
readonly spotMatrices: Float32Array;
|
|
6543
|
+
/** Point minimum/slope bias pairs in shadow-first light order. */
|
|
6544
|
+
readonly pointBiases: Float32Array;
|
|
6545
|
+
/** Six view-space-to-shadow-clip face matrices per shadowed point light. */
|
|
6546
|
+
readonly pointMatrices: Float32Array;
|
|
6547
|
+
/** Physical atlas slices in dense render order. Values are valid only for this invocation. */
|
|
6548
|
+
readonly slices: readonly Readonly<RenderPipelineShadowSlice>[];
|
|
6549
|
+
/** Page-granular atlas updates recorded this frame, in render order. */
|
|
6550
|
+
readonly pageRegions: readonly Readonly<RenderPipelineShadowPageRegion>[];
|
|
6551
|
+
}
|
|
6552
|
+
/** One frame-scoped physical page update within a shadow slice. */
|
|
6553
|
+
interface RenderPipelineShadowPageRegion {
|
|
6554
|
+
/** Dense physical slice containing this page. */
|
|
6555
|
+
readonly slicePhysicalIndex: number;
|
|
6556
|
+
/** Zero-based horizontal virtual-page coordinate within the slice. */
|
|
6557
|
+
readonly pageX: number;
|
|
6558
|
+
/** Zero-based vertical virtual-page coordinate within the slice. */
|
|
6559
|
+
readonly pageY: number;
|
|
6560
|
+
/** Physical atlas X origin in pixels. */
|
|
6561
|
+
readonly x: number;
|
|
6562
|
+
/** Physical atlas Y origin in pixels. */
|
|
6563
|
+
readonly y: number;
|
|
6564
|
+
/** Physical page width in pixels; edge pages may be smaller than the page size. */
|
|
6565
|
+
readonly width: number;
|
|
6566
|
+
/** Physical page height in pixels; edge pages may be smaller than the page size. */
|
|
6567
|
+
readonly height: number;
|
|
6568
|
+
}
|
|
6569
|
+
/** One frame-scoped shadow-atlas slice exposed for GPU-driven caster work. */
|
|
6570
|
+
interface RenderPipelineShadowSlice {
|
|
6571
|
+
/** Light projection represented by the slice. */
|
|
6572
|
+
readonly kind: 'directional' | 'spot' | 'point';
|
|
6573
|
+
/** Stable LightBlock ABI index. */
|
|
6574
|
+
readonly sliceIndex: number;
|
|
6575
|
+
/** Dense physical placement index within the atlas. */
|
|
6576
|
+
readonly physicalIndex: number;
|
|
6577
|
+
/** Point-light cube face, or null for planar shadows. */
|
|
6578
|
+
readonly face: number | null;
|
|
6579
|
+
/** Directional cascade index, or null for local lights. */
|
|
6580
|
+
readonly cascade: number | null;
|
|
6581
|
+
/** Atlas viewport as `[x, y, width, height]`. */
|
|
6582
|
+
readonly viewport: RendererViewport;
|
|
6583
|
+
/** World-space to shadow clip-space transform. */
|
|
6584
|
+
readonly viewProjectionMatrix: Float32Array;
|
|
6585
|
+
/** Shadow-camera near plane. */
|
|
6586
|
+
readonly near: number;
|
|
6587
|
+
/** Shadow-camera far plane. */
|
|
6588
|
+
readonly far: number;
|
|
6589
|
+
/** Whether the submission-aware cache scheduled this slice for update. */
|
|
6590
|
+
readonly dirty: boolean;
|
|
6591
|
+
}
|
|
6592
|
+
/** Optional hybrid-shadow selection used by GPU-managed pipelines. */
|
|
6593
|
+
interface RenderPipelineShadowOptions {
|
|
6594
|
+
/**
|
|
6595
|
+
* Mesh identities omitted from CPU shadow draws while remaining part of cache invalidation.
|
|
6596
|
+
* The caller must record equivalent atlas writes for every exposed `pageRegions` entry.
|
|
6597
|
+
*/
|
|
6598
|
+
readonly excludeMeshes?: readonly Mesh[];
|
|
6599
|
+
}
|
|
6019
6600
|
/** Frame-scoped recording context; retaining it after record() returns is an error. */
|
|
6020
6601
|
interface RenderPipelineContext {
|
|
6021
6602
|
/** Monotonic application frame index. */
|
|
@@ -6032,27 +6613,51 @@ interface RenderPipelineContext {
|
|
|
6032
6613
|
readonly output: RenderPipelineOutput;
|
|
6033
6614
|
/** Effective capabilities for the current device generation. */
|
|
6034
6615
|
readonly capabilities: RenderPipelineCapabilities;
|
|
6616
|
+
/** Whether scene depth uses the renderer's logarithmic depth encoding. */
|
|
6617
|
+
readonly useLogDepth: boolean;
|
|
6035
6618
|
/** Backend-neutral graph facade for this invocation. */
|
|
6036
6619
|
readonly graph: ScriptableRenderGraph;
|
|
6620
|
+
/** Update scene world matrices and the active camera without building a CPU render list. */
|
|
6621
|
+
prepareScene(): void;
|
|
6037
6622
|
/** Collect camera-visible scene meshes and lights into a frame-scoped handle. */
|
|
6038
6623
|
cull(options?: Readonly<CullingOptions>): CullingResultsHandle;
|
|
6039
6624
|
/** Select and sort a reusable draw list from current-frame culling results. */
|
|
6040
6625
|
createRendererList(descriptor: Readonly<RendererListDescriptor>): RendererListHandle;
|
|
6041
|
-
/**
|
|
6042
|
-
|
|
6626
|
+
/**
|
|
6627
|
+
* Record the shared directional, spot, and point-light shadow atlas for these results.
|
|
6628
|
+
* Returns the exact graph texture and packed sampling data, or `null` when no shadow slice is
|
|
6629
|
+
* active. The returned arrays are frame-scoped and must not be retained after `record()`.
|
|
6630
|
+
*/
|
|
6631
|
+
recordShadows(cullingResults: CullingResultsHandle, options?: Readonly<RenderPipelineShadowOptions>): Readonly<RenderPipelineShadowResources> | null;
|
|
6043
6632
|
/** Acquire one runtime-owned, high-water reusable parameter slot. */
|
|
6044
6633
|
acquirePassParameters<P extends object>(pool: RenderPassParameterPool<P>): P;
|
|
6634
|
+
/**
|
|
6635
|
+
* Stage a dirty upload to a pipeline-owned storage buffer before importing it into this graph.
|
|
6636
|
+
* Failed frames retain the dirty CPU shadow for a later valid submission.
|
|
6637
|
+
*/
|
|
6638
|
+
writeStorageBuffer(buffer: StorageBuffer, byteOffset: number, data: ArrayBufferView): void;
|
|
6045
6639
|
}
|
|
6046
6640
|
/** Renderer-local runtime created exactly once by a RenderPipelineFactory. */
|
|
6047
6641
|
interface RenderPipeline {
|
|
6048
6642
|
/** Human-readable runtime name used in diagnostics. */
|
|
6049
6643
|
readonly name: string;
|
|
6644
|
+
/** Whether this runtime needs Render Graph timing without external diagnostics. */
|
|
6645
|
+
readonly usesRenderGraphTimeline?: boolean;
|
|
6050
6646
|
/**
|
|
6051
6647
|
* Record one invocation synchronously into the active application Render Graph.
|
|
6052
6648
|
*
|
|
6053
6649
|
* @returns An ignored synchronous value. Promise-like values are rejected before RHI execution.
|
|
6054
6650
|
*/
|
|
6055
6651
|
record(context: RenderPipelineContext): unknown;
|
|
6652
|
+
/** Commit CPU-side temporal state after the frame has submitted successfully. */
|
|
6653
|
+
frameSubmitted?(frameIndex: number): void;
|
|
6654
|
+
/** Roll back staged CPU-side temporal state after recording or submission failure. */
|
|
6655
|
+
frameDiscarded?(frameIndex: number): void;
|
|
6656
|
+
/**
|
|
6657
|
+
* Consume opt-in Render Graph timing snapshots. GPU-ready snapshots arrive asynchronously
|
|
6658
|
+
* after submission completion and may be used by renderer-local adaptive quality controllers.
|
|
6659
|
+
*/
|
|
6660
|
+
recordRenderGraphTimeline?(snapshot: Readonly<RenderGraphTimelineSnapshot>): void;
|
|
6056
6661
|
/** Release runtime-owned state exactly once during Renderer destruction. */
|
|
6057
6662
|
destroy(): void;
|
|
6058
6663
|
}
|
|
@@ -6070,8 +6675,10 @@ interface RenderPipelineFactory {
|
|
|
6070
6675
|
type RendererAdapterPowerPreference = 'low-power' | 'high-performance';
|
|
6071
6676
|
/** Backend-neutral context power policy; `default` is accepted by WebGL2 contexts. */
|
|
6072
6677
|
type RendererContextPowerPreference = 'default' | RendererAdapterPowerPreference;
|
|
6678
|
+
/** Shared renderer policy bundle. `high-end` enables reversed-Z cameras and camera-relative GPU transforms. */
|
|
6679
|
+
type RendererRenderingProfile = 'portable' | 'high-end';
|
|
6073
6680
|
/** Optional device capabilities that the renderer can request through the portable RHI. */
|
|
6074
|
-
type RendererFeatureName = 'texture-compression-bc' | 'texture-compression-etc2' | 'texture-compression-astc' | 'timestamp-query' | 'shader-f16' | 'depth32float-stencil8' | 'float32-filterable' | 'float32-blendable';
|
|
6681
|
+
type RendererFeatureName = 'texture-compression-bc' | 'texture-compression-etc2' | 'texture-compression-astc' | 'timestamp-query' | 'shader-f16' | 'subgroups' | 'depth32float-stencil8' | 'float32-filterable' | 'float32-blendable';
|
|
6075
6682
|
/** Backend-independent construction options. */
|
|
6076
6683
|
interface RendererCommonOptions {
|
|
6077
6684
|
width?: number;
|
|
@@ -6086,12 +6693,19 @@ interface RendererCommonOptions {
|
|
|
6086
6693
|
premultipliedAlpha?: boolean;
|
|
6087
6694
|
failIfMajorPerformanceCaveat?: boolean;
|
|
6088
6695
|
useLogDepth?: boolean;
|
|
6696
|
+
/**
|
|
6697
|
+
* Subtract one frame-wide camera origin from GPU camera/model transforms while preserving CPU
|
|
6698
|
+
* world coordinates. This improves large-world precision and enables stable temporal inputs.
|
|
6699
|
+
*/
|
|
6700
|
+
cameraRelative?: boolean;
|
|
6701
|
+
/** Renderer policy bundle. Defaults to `portable`. */
|
|
6702
|
+
renderingProfile?: RendererRenderingProfile;
|
|
6089
6703
|
vertexPrecision?: ShaderPrecision;
|
|
6090
6704
|
fragmentPrecision?: ShaderPrecision;
|
|
6091
6705
|
fog?: Fog | null;
|
|
6092
6706
|
offsetX?: number;
|
|
6093
6707
|
offsetY?: number;
|
|
6094
|
-
forceMaterial?:
|
|
6708
|
+
forceMaterial?: MaterialInstance | null;
|
|
6095
6709
|
clearColor?: Color;
|
|
6096
6710
|
/** Renderer-local scriptable pipeline factory. Defaults to ForwardRenderPipelineFactory. */
|
|
6097
6711
|
renderPipeline?: RenderPipelineFactory;
|
|
@@ -6147,6 +6761,8 @@ declare class Renderer<Backend extends RendererBackend = RendererBackend> implem
|
|
|
6147
6761
|
readonly lightManager: RendererContract['lightManager'];
|
|
6148
6762
|
readonly resourceManager: RendererContract['resourceManager'];
|
|
6149
6763
|
readonly renderTarget: RendererContract['renderTarget'];
|
|
6764
|
+
readonly cameraRelative: RendererContract['cameraRelative'];
|
|
6765
|
+
readonly renderingProfile: RendererContract['renderingProfile'];
|
|
6150
6766
|
width: RendererContract['width'];
|
|
6151
6767
|
height: RendererContract['height'];
|
|
6152
6768
|
pixelRatio: RendererContract['pixelRatio'];
|
|
@@ -6428,6 +7044,14 @@ declare class Node extends EventDispatcher {
|
|
|
6428
7044
|
* @returns this
|
|
6429
7045
|
*/
|
|
6430
7046
|
removeFromParent(): this;
|
|
7047
|
+
/**
|
|
7048
|
+
* Reset this node's previous-frame transform on its next submitted render.
|
|
7049
|
+
*
|
|
7050
|
+
* Call this after a discontinuous teleport, origin shift, camera cut, or animation reset so
|
|
7051
|
+
* temporal effects receive `previous === current` instead of a false motion vector.
|
|
7052
|
+
* @returns this
|
|
7053
|
+
*/
|
|
7054
|
+
invalidateTransformHistory(): this;
|
|
6431
7055
|
/**
|
|
6432
7056
|
* 更新本地矩阵
|
|
6433
7057
|
* @returns this
|
|
@@ -6807,247 +7431,141 @@ declare class SphericalHarmonics3 {
|
|
|
6807
7431
|
copy(other: SphericalHarmonics3): this;
|
|
6808
7432
|
}
|
|
6809
7433
|
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
|
|
6829
|
-
|
|
6830
|
-
|
|
6831
|
-
|
|
6832
|
-
|
|
6833
|
-
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6837
|
-
|
|
6838
|
-
|
|
6839
|
-
|
|
6840
|
-
|
|
6841
|
-
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
7434
|
+
type PBRMaterialTextureInput = Texture<unknown> | MaterialTextureSlotInput | null;
|
|
7435
|
+
interface PBRMaterialParameters extends MaterialInstanceParameters {
|
|
7436
|
+
/** Compile the standard surface without lighting. */
|
|
7437
|
+
readonly unlit?: boolean;
|
|
7438
|
+
readonly baseColor?: Color;
|
|
7439
|
+
readonly baseColorMap?: PBRMaterialTextureInput;
|
|
7440
|
+
readonly metallic?: number;
|
|
7441
|
+
readonly metallicMap?: PBRMaterialTextureInput;
|
|
7442
|
+
readonly roughness?: number;
|
|
7443
|
+
readonly roughnessMap?: PBRMaterialTextureInput;
|
|
7444
|
+
readonly metallicRoughnessMap?: PBRMaterialTextureInput;
|
|
7445
|
+
readonly occlusionMap?: PBRMaterialTextureInput;
|
|
7446
|
+
readonly occlusionStrength?: number;
|
|
7447
|
+
readonly isOcclusionInMetallicRoughnessMap?: boolean;
|
|
7448
|
+
readonly diffuseEnvMap?: MaterialTexture | MaterialTextureSlotInput | null;
|
|
7449
|
+
readonly diffuseEnvSphereHarmonics3?: SphericalHarmonics3 | null;
|
|
7450
|
+
readonly diffuseEnvIntensity?: number;
|
|
7451
|
+
readonly brdfLUT?: Texture | null;
|
|
7452
|
+
readonly specularEnvIntensity?: number;
|
|
7453
|
+
readonly specularEnvMap?: MaterialTexture | MaterialTextureSlotInput | null;
|
|
7454
|
+
readonly isSpecularEnvMapIncludeMipmaps?: boolean;
|
|
7455
|
+
readonly emission?: MaterialTextureValue | MaterialTextureSlotInput;
|
|
7456
|
+
readonly emissionFactor?: Color;
|
|
7457
|
+
readonly isSpecularGlossiness?: boolean;
|
|
7458
|
+
readonly specular?: Color;
|
|
7459
|
+
readonly glossiness?: number;
|
|
7460
|
+
readonly specularGlossinessMap?: PBRMaterialTextureInput;
|
|
7461
|
+
readonly lightMap?: PBRMaterialTextureInput;
|
|
7462
|
+
readonly clearcoatFactor?: number;
|
|
7463
|
+
readonly clearcoatMap?: PBRMaterialTextureInput;
|
|
7464
|
+
readonly clearcoatRoughnessFactor?: number;
|
|
7465
|
+
readonly clearcoatRoughnessMap?: PBRMaterialTextureInput;
|
|
7466
|
+
readonly clearcoatNormalMap?: PBRMaterialTextureInput;
|
|
7467
|
+
readonly clearcoatNormalScale?: number;
|
|
7468
|
+
readonly anisotropyStrength?: number;
|
|
7469
|
+
readonly anisotropyRotation?: number;
|
|
7470
|
+
readonly anisotropyMap?: PBRMaterialTextureInput;
|
|
7471
|
+
readonly transmissionFactor?: number;
|
|
7472
|
+
readonly transmissionMap?: PBRMaterialTextureInput;
|
|
7473
|
+
readonly thicknessFactor?: number;
|
|
7474
|
+
readonly thicknessMap?: PBRMaterialTextureInput;
|
|
7475
|
+
readonly attenuationDistance?: number;
|
|
7476
|
+
readonly attenuationColor?: Color;
|
|
7477
|
+
readonly ior?: number;
|
|
7478
|
+
readonly iridescenceFactor?: number;
|
|
7479
|
+
readonly iridescenceMap?: PBRMaterialTextureInput;
|
|
7480
|
+
readonly iridescenceIor?: number;
|
|
7481
|
+
readonly iridescenceThicknessMinimum?: number;
|
|
7482
|
+
readonly iridescenceThicknessMaximum?: number;
|
|
7483
|
+
readonly iridescenceThicknessMap?: PBRMaterialTextureInput;
|
|
7484
|
+
readonly frontFace?: MaterialFrontFace;
|
|
7485
|
+
readonly cullMode?: MaterialCullMode;
|
|
7486
|
+
readonly state?: Partial<Readonly<MaterialPipelineState>>;
|
|
7487
|
+
}
|
|
7488
|
+
type MutablePBRMaterialParameters = {
|
|
7489
|
+
-readonly [Name in keyof PBRMaterialParameters]: PBRMaterialParameters[Name];
|
|
7490
|
+
};
|
|
7491
|
+
/** Mutable import-time descriptor. It is finalized into one immutable-topology material instance. */
|
|
7492
|
+
declare class PBRMaterialBuilder {
|
|
7493
|
+
readonly parameters: MutablePBRMaterialParameters;
|
|
7494
|
+
constructor(initial?: Readonly<PBRMaterialParameters>);
|
|
7495
|
+
build(): PBRMaterial;
|
|
7496
|
+
}
|
|
7497
|
+
/** Physically based standard-surface material with immutable shader topology. */
|
|
7498
|
+
declare class PBRMaterial extends MaterialInstance {
|
|
7499
|
+
#private;
|
|
7500
|
+
readonly isPBRMaterial = true;
|
|
6868
7501
|
readonly className: string;
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
roughness: number;
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
*/
|
|
6920
|
-
isOcclusionInMetallicRoughnessMap: boolean;
|
|
6921
|
-
/**
|
|
6922
|
-
* 漫反射辐照(Diffuse IBL)贴图
|
|
6923
|
-
*/
|
|
6924
|
-
diffuseEnvMap: MaterialTexture | null;
|
|
6925
|
-
/**
|
|
6926
|
-
* 漫反射 SphericalHarmonics3
|
|
6927
|
-
*/
|
|
6928
|
-
diffuseEnvSphereHarmonics3: SphericalHarmonics3 | null;
|
|
6929
|
-
/**
|
|
6930
|
-
* 漫反射环境强度
|
|
6931
|
-
*/
|
|
6932
|
-
diffuseEnvIntensity: number;
|
|
6933
|
-
/**
|
|
6934
|
-
* BRDF lookup texture used with an environment reflection map.
|
|
6935
|
-
*/
|
|
6936
|
-
brdfLUT: Texture | null;
|
|
6937
|
-
/**
|
|
6938
|
-
* 环境反射(Specular IBL)贴图强度
|
|
6939
|
-
*/
|
|
6940
|
-
specularEnvIntensity: number;
|
|
6941
|
-
/**
|
|
6942
|
-
* 环境反射(Specular IBL)贴图
|
|
6943
|
-
*/
|
|
6944
|
-
specularEnvMap: MaterialTexture | null;
|
|
6945
|
-
/**
|
|
6946
|
-
* 环境反射是否包含 mipmaps
|
|
6947
|
-
*/
|
|
6948
|
-
isSpecularEnvMapIncludeMipmaps: boolean;
|
|
6949
|
-
/**
|
|
6950
|
-
* 放射光贴图(sRGB 空间)
|
|
6951
|
-
*/
|
|
6952
|
-
emission: MaterialTextureValue;
|
|
6953
|
-
/**
|
|
6954
|
-
* The emissive color of the material.
|
|
6955
|
-
*/
|
|
6956
|
-
emissionFactor: Color;
|
|
6957
|
-
/**
|
|
6958
|
-
* 是否基于反射光泽度的 PBR,具体见 [KHR_materials_pbrSpecularGlossiness]{@link https://github.com/KhronosGroup/glTF/tree/master/extensions/Khronos/KHR_materials_pbrSpecularGlossiness}
|
|
6959
|
-
*/
|
|
6960
|
-
isSpecularGlossiness: boolean;
|
|
6961
|
-
/**
|
|
6962
|
-
* 镜面反射率,针对 isSpecularGlossiness 渲染
|
|
6963
|
-
*/
|
|
6964
|
-
specular: Color;
|
|
6965
|
-
/**
|
|
6966
|
-
* 光泽度,针对 isSpecularGlossiness 渲染,默认PBR无效
|
|
6967
|
-
*/
|
|
6968
|
-
glossiness: number;
|
|
6969
|
-
/**
|
|
6970
|
-
* 镜面反射即光泽度贴图,RGB 通道为镜面反射率,A 通道为光泽度
|
|
6971
|
-
*/
|
|
6972
|
-
specularGlossinessMap: Texture | null;
|
|
6973
|
-
lightMap: Texture | null;
|
|
6974
|
-
/**
|
|
6975
|
-
* The clearcoat layer intensity.
|
|
6976
|
-
*/
|
|
6977
|
-
clearcoatFactor: number;
|
|
6978
|
-
/**
|
|
6979
|
-
* The clearcoat layer intensity texture.
|
|
6980
|
-
*/
|
|
6981
|
-
clearcoatMap: Texture | null;
|
|
6982
|
-
/**
|
|
6983
|
-
* The clearcoat layer roughness.
|
|
6984
|
-
*/
|
|
6985
|
-
clearcoatRoughnessFactor: number;
|
|
6986
|
-
/**
|
|
6987
|
-
* The clearcoat layer roughness texture.
|
|
6988
|
-
*/
|
|
6989
|
-
clearcoatRoughnessMap: Texture | null;
|
|
6990
|
-
/**
|
|
6991
|
-
* The clearcoat normal map texture.
|
|
6992
|
-
*/
|
|
6993
|
-
clearcoatNormalMap: Texture | null;
|
|
6994
|
-
/** Scale applied to the clearcoat normal texture XY channels. */
|
|
6995
|
-
clearcoatNormalScale: number;
|
|
6996
|
-
/** Strength of the anisotropic GGX lobe in the range [0, 1]. */
|
|
6997
|
-
anisotropyStrength: number;
|
|
6998
|
-
/** Counter-clockwise anisotropy direction rotation in tangent space, in radians. */
|
|
6999
|
-
anisotropyRotation: number;
|
|
7000
|
-
/** RG tangent-space direction and B strength texture from KHR_materials_anisotropy. */
|
|
7001
|
-
anisotropyMap: Texture | null;
|
|
7002
|
-
private _transmissionFactor;
|
|
7003
|
-
/** Thin-surface transmission fraction in the range [0, 1]. */
|
|
7502
|
+
readonly baseColor: Color;
|
|
7503
|
+
readonly baseColorMap: Texture<unknown> | null;
|
|
7504
|
+
readonly metallicMap: Texture<unknown> | null;
|
|
7505
|
+
readonly roughnessMap: Texture<unknown> | null;
|
|
7506
|
+
readonly metallicRoughnessMap: Texture<unknown> | null;
|
|
7507
|
+
readonly occlusionMap: Texture<unknown> | null;
|
|
7508
|
+
readonly isOcclusionInMetallicRoughnessMap: boolean;
|
|
7509
|
+
readonly diffuseEnvMap: MaterialTexture | null;
|
|
7510
|
+
readonly diffuseEnvSphereHarmonics3: SphericalHarmonics3 | null;
|
|
7511
|
+
readonly brdfLUT: Texture<unknown> | null;
|
|
7512
|
+
readonly specularEnvMap: MaterialTexture | null;
|
|
7513
|
+
readonly isSpecularEnvMapIncludeMipmaps: boolean;
|
|
7514
|
+
readonly emission: MaterialTextureValue;
|
|
7515
|
+
readonly emissionFactor: Color;
|
|
7516
|
+
readonly isSpecularGlossiness: boolean;
|
|
7517
|
+
readonly specular: Color;
|
|
7518
|
+
readonly specularGlossinessMap: Texture<unknown> | null;
|
|
7519
|
+
readonly lightMap: Texture<unknown> | null;
|
|
7520
|
+
readonly clearcoatMap: Texture<unknown> | null;
|
|
7521
|
+
readonly clearcoatRoughnessMap: Texture<unknown> | null;
|
|
7522
|
+
readonly clearcoatNormalMap: Texture<unknown> | null;
|
|
7523
|
+
readonly anisotropyMap: Texture<unknown> | null;
|
|
7524
|
+
readonly transmissionMap: Texture<unknown> | null;
|
|
7525
|
+
readonly thicknessMap: Texture<unknown> | null;
|
|
7526
|
+
readonly attenuationColor: Color;
|
|
7527
|
+
readonly iridescenceMap: Texture<unknown> | null;
|
|
7528
|
+
readonly iridescenceThicknessMap: Texture<unknown> | null;
|
|
7529
|
+
constructor(params?: Readonly<PBRMaterialParameters>);
|
|
7530
|
+
get metallic(): number;
|
|
7531
|
+
set metallic(value: number);
|
|
7532
|
+
get roughness(): number;
|
|
7533
|
+
set roughness(value: number);
|
|
7534
|
+
get occlusionStrength(): number;
|
|
7535
|
+
set occlusionStrength(value: number);
|
|
7536
|
+
get diffuseEnvIntensity(): number;
|
|
7537
|
+
set diffuseEnvIntensity(value: number);
|
|
7538
|
+
get specularEnvIntensity(): number;
|
|
7539
|
+
set specularEnvIntensity(value: number);
|
|
7540
|
+
get glossiness(): number;
|
|
7541
|
+
set glossiness(value: number);
|
|
7542
|
+
get clearcoatFactor(): number;
|
|
7543
|
+
set clearcoatFactor(value: number);
|
|
7544
|
+
get clearcoatRoughnessFactor(): number;
|
|
7545
|
+
set clearcoatRoughnessFactor(value: number);
|
|
7546
|
+
get clearcoatNormalScale(): number;
|
|
7547
|
+
set clearcoatNormalScale(value: number);
|
|
7548
|
+
get anisotropyStrength(): number;
|
|
7549
|
+
set anisotropyStrength(value: number);
|
|
7550
|
+
get anisotropyRotation(): number;
|
|
7551
|
+
set anisotropyRotation(value: number);
|
|
7004
7552
|
get transmissionFactor(): number;
|
|
7005
7553
|
set transmissionFactor(value: number);
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
iridescenceMap: Texture | null;
|
|
7022
|
-
/** Index of refraction of the thin-film layer. */
|
|
7023
|
-
iridescenceIor: number;
|
|
7024
|
-
/** Thin-film thickness represented by a zero texture sample, in nanometers. */
|
|
7025
|
-
iridescenceThicknessMinimum: number;
|
|
7026
|
-
/** Thin-film thickness represented by a one texture sample, in nanometers. */
|
|
7027
|
-
iridescenceThicknessMaximum: number;
|
|
7028
|
-
/** Linear G-channel thin-film thickness texture. */
|
|
7029
|
-
iridescenceThicknessMap: Texture | null;
|
|
7030
|
-
usedUniformVectors: number;
|
|
7031
|
-
/**
|
|
7032
|
-
* @param params - 初始化参数,所有params都会复制到实例上
|
|
7033
|
-
* - `params.lightType`: 光照类型,只能为 PBR 或 NONE
|
|
7034
|
-
* - `params.baseColor`: 基础颜色
|
|
7035
|
-
* - `params.baseColorMap`: 基础颜色贴图(sRGB空间)
|
|
7036
|
-
* - `params.metallic`: 金属度
|
|
7037
|
-
* - `params.metallicMap`: 金属度贴图
|
|
7038
|
-
* - `params.roughness`: 粗糙度
|
|
7039
|
-
* - `params.roughnessMap`: 粗糙度贴图
|
|
7040
|
-
* - `params.occlusionMap`: 环境光遮蔽贴图
|
|
7041
|
-
* - `params.occlusionStrength`: 环境光遮蔽强度
|
|
7042
|
-
* - `params.emission`: 放射光贴图(sRGB 空间),或颜色
|
|
7043
|
-
* - `params.diffuseEnvMap`: 漫反射辐照(Diffuse IBL)贴图
|
|
7044
|
-
* - `params.diffuseEnvSphereHarmonics3`: 漫反射 SphericalHarmonics3
|
|
7045
|
-
* - `params.diffuseEnvIntensity`: 漫反射强度
|
|
7046
|
-
* - `params.specularEnvMap`: 环境反射(Specular IBL)贴图
|
|
7047
|
-
* - `params.brdfLUT`: BRDF贴图,跟环境反射贴图一起使用
|
|
7048
|
-
* - `params.specularEnvIntensity`: 环境反射(Specular IBL)贴图强度
|
|
7049
|
-
*/
|
|
7050
|
-
constructor(params?: PBRMaterialParameters);
|
|
7554
|
+
get thicknessFactor(): number;
|
|
7555
|
+
set thicknessFactor(value: number);
|
|
7556
|
+
get attenuationDistance(): number;
|
|
7557
|
+
set attenuationDistance(value: number);
|
|
7558
|
+
get ior(): number;
|
|
7559
|
+
set ior(value: number);
|
|
7560
|
+
get iridescenceFactor(): number;
|
|
7561
|
+
set iridescenceFactor(value: number);
|
|
7562
|
+
get iridescenceIor(): number;
|
|
7563
|
+
set iridescenceIor(value: number);
|
|
7564
|
+
get iridescenceThicknessMinimum(): number;
|
|
7565
|
+
set iridescenceThicknessMinimum(value: number);
|
|
7566
|
+
get iridescenceThicknessMaximum(): number;
|
|
7567
|
+
set iridescenceThicknessMaximum(value: number);
|
|
7568
|
+
private assertTopologyFeature;
|
|
7051
7569
|
getRenderOption(option?: ShaderOptions): ShaderOptions;
|
|
7052
7570
|
}
|
|
7053
7571
|
|
|
@@ -7550,7 +8068,7 @@ interface GLTFModel {
|
|
|
7550
8068
|
cameras: Camera[];
|
|
7551
8069
|
lights: Light[];
|
|
7552
8070
|
textures: Texture[];
|
|
7553
|
-
materials:
|
|
8071
|
+
materials: MaterialInstance[];
|
|
7554
8072
|
anim?: Animation;
|
|
7555
8073
|
bounds?: GLTFBounds;
|
|
7556
8074
|
/** Settles when progressive textures and compressed geometry finish. */
|
|
@@ -7619,10 +8137,12 @@ interface GLTFParserParameters {
|
|
|
7619
8137
|
ignoreTextureError?: boolean;
|
|
7620
8138
|
forceCreateNewBuffer?: boolean;
|
|
7621
8139
|
useInstanced?: boolean;
|
|
8140
|
+
/** Defaults copied into every glTF 2 PBR material before asset data and extensions apply. */
|
|
8141
|
+
pbrMaterialDefaults?: Readonly<PBRMaterialParameters>;
|
|
7622
8142
|
preHandlerImageURI?: ((uri: string, image: GLTFImage) => string) | null;
|
|
7623
8143
|
preHandlerBufferURI?: ((uri: string, buffer: GLTFBuffer) => string) | null;
|
|
7624
8144
|
preHandlerShaderURI?: ((uri: string, index: GLTFIndex, shader: unknown) => string) | null;
|
|
7625
|
-
customMaterialCreator?: ((name: string, material: GLTFMaterial, json: GLTFRoot, parser: GLTFParser) =>
|
|
8145
|
+
customMaterialCreator?: ((name: string, material: GLTFMaterial, json: GLTFRoot, parser: GLTFParser) => MaterialInstance | null | undefined) | null;
|
|
7626
8146
|
extensionHandlers?: Readonly<GLTFExtensionHandlerRegistry> | null;
|
|
7627
8147
|
}
|
|
7628
8148
|
type AccessorArray = (number | number[])[];
|
|
@@ -7645,6 +8165,7 @@ declare class GLTFParser {
|
|
|
7645
8165
|
ignoreTextureError: boolean;
|
|
7646
8166
|
forceCreateNewBuffer: boolean;
|
|
7647
8167
|
useInstanced: boolean;
|
|
8168
|
+
pbrMaterialDefaults: Readonly<PBRMaterialParameters>;
|
|
7648
8169
|
preHandlerImageURI: GLTFParserParameters['preHandlerImageURI'];
|
|
7649
8170
|
preHandlerBufferURI: GLTFParserParameters['preHandlerBufferURI'];
|
|
7650
8171
|
preHandlerShaderURI: GLTFParserParameters['preHandlerShaderURI'];
|
|
@@ -7658,7 +8179,7 @@ declare class GLTFParser {
|
|
|
7658
8179
|
buffers: Record<string, ArrayBuffer>;
|
|
7659
8180
|
bufferViews: Record<string, GLTFBufferViewRuntime>;
|
|
7660
8181
|
textures: Record<string, Texture>;
|
|
7661
|
-
materials: Record<string,
|
|
8182
|
+
materials: Record<string, MaterialInstance>;
|
|
7662
8183
|
cameras: Record<string, Camera>;
|
|
7663
8184
|
meshes: Mesh[];
|
|
7664
8185
|
lights: Light[];
|
|
@@ -7705,10 +8226,12 @@ declare class GLTFParser {
|
|
|
7705
8226
|
getBufferView(name: GLTFIndex): GLTFBufferViewRuntime;
|
|
7706
8227
|
getTexture(textureInfo: GLTFTextureInfo): Texture | null;
|
|
7707
8228
|
getColorOrTexture(value: GLTFMaterialValue | undefined): Color | Texture | null;
|
|
7708
|
-
parseMaterialCommonProps
|
|
7709
|
-
createPBRMaterial(materialData: GLTFMaterial):
|
|
7710
|
-
private
|
|
7711
|
-
|
|
8229
|
+
private parseMaterialCommonProps;
|
|
8230
|
+
createPBRMaterial(materialData: GLTFMaterial): PBRMaterialBuilder;
|
|
8231
|
+
private requirePBRMaterialBuilder;
|
|
8232
|
+
getTextureSlot(textureInfo: GLTFTextureInfo): MaterialTextureSlotInput | null;
|
|
8233
|
+
private slotForTexture;
|
|
8234
|
+
private createTextureSlot;
|
|
7712
8235
|
private createKMCMaterial;
|
|
7713
8236
|
parseMaterials(): void;
|
|
7714
8237
|
sparseAccessorHandler(data: GeometryData, sparse: GLTFSparseAccessor): GeometryData;
|
|
@@ -7718,7 +8241,6 @@ declare class GLTFParser {
|
|
|
7718
8241
|
setAccessorDecodeMatrix(data: GeometryData, matrix: readonly number[]): void;
|
|
7719
8242
|
getAccessorDecodeMatrix(data: GeometryData): number[] | undefined;
|
|
7720
8243
|
getArrayByAccessor(name: GLTFIndex, isDecode?: boolean): AccessorArray;
|
|
7721
|
-
parseTechnique(materialData: GLTFMaterial, material: Material): void;
|
|
7722
8244
|
createMorphGeometry(primitive: GLTFPrimitive, weights?: readonly number[]): MorphGeometry;
|
|
7723
8245
|
private geometryTargetName;
|
|
7724
8246
|
handlerGeometry(initial: Geometry | undefined, primitive: GLTFPrimitive): Geometry | Promise<Geometry>;
|
|
@@ -7756,30 +8278,30 @@ declare const ALI_bounding_box: {
|
|
|
7756
8278
|
};
|
|
7757
8279
|
declare const KHR_materials_pbrSpecularGlossiness: {
|
|
7758
8280
|
getUsedTextureNameMap(extensionData: unknown, map: Record<string, true>): void;
|
|
7759
|
-
parse(extensionData: unknown, parser: GLTFParser, result: unknown):
|
|
8281
|
+
parse(extensionData: unknown, parser: GLTFParser, result: unknown): PBRMaterialBuilder;
|
|
7760
8282
|
};
|
|
7761
8283
|
declare const KHR_materials_clearcoat: {
|
|
7762
8284
|
getUsedTextureNameMap(extensionData: unknown, map: Record<string, true>): void;
|
|
7763
|
-
parse(extensionData: unknown, parser: GLTFParser, result: unknown):
|
|
8285
|
+
parse(extensionData: unknown, parser: GLTFParser, result: unknown): PBRMaterialBuilder;
|
|
7764
8286
|
};
|
|
7765
8287
|
declare const KHR_materials_anisotropy: {
|
|
7766
8288
|
getUsedTextureNameMap(extensionData: unknown, map: Record<string, true>): void;
|
|
7767
|
-
parse(extensionData: unknown, parser: GLTFParser, result: unknown):
|
|
8289
|
+
parse(extensionData: unknown, parser: GLTFParser, result: unknown): PBRMaterialBuilder;
|
|
7768
8290
|
};
|
|
7769
8291
|
declare const KHR_materials_transmission: {
|
|
7770
8292
|
getUsedTextureNameMap(extensionData: unknown, map: Record<string, true>): void;
|
|
7771
|
-
parse(extensionData: unknown, parser: GLTFParser, result: unknown):
|
|
8293
|
+
parse(extensionData: unknown, parser: GLTFParser, result: unknown): PBRMaterialBuilder;
|
|
7772
8294
|
};
|
|
7773
8295
|
declare const KHR_materials_volume: {
|
|
7774
8296
|
getUsedTextureNameMap(extensionData: unknown, map: Record<string, true>): void;
|
|
7775
|
-
parse(extensionData: unknown, parser: GLTFParser, result: unknown):
|
|
8297
|
+
parse(extensionData: unknown, parser: GLTFParser, result: unknown): PBRMaterialBuilder;
|
|
7776
8298
|
};
|
|
7777
8299
|
declare const KHR_materials_ior: {
|
|
7778
|
-
parse(extensionData: unknown, _parser: GLTFParser, result: unknown):
|
|
8300
|
+
parse(extensionData: unknown, _parser: GLTFParser, result: unknown): PBRMaterialBuilder;
|
|
7779
8301
|
};
|
|
7780
8302
|
declare const KHR_materials_iridescence: {
|
|
7781
8303
|
getUsedTextureNameMap(extensionData: unknown, map: Record<string, true>): void;
|
|
7782
|
-
parse(extensionData: unknown, parser: GLTFParser, result: unknown):
|
|
8304
|
+
parse(extensionData: unknown, parser: GLTFParser, result: unknown): PBRMaterialBuilder;
|
|
7783
8305
|
};
|
|
7784
8306
|
declare const KHR_lights_punctual: {
|
|
7785
8307
|
parse(extensionData: unknown, parser: GLTFParser, result: unknown): Node;
|
|
@@ -7940,56 +8462,6 @@ declare namespace util_d {
|
|
|
7940
8462
|
export type { util_d_GeometryDataLike as GeometryDataLike, util_d_MutableArrayLike as MutableArrayLike, util_d_TypedArray as TypedArray, util_d_TypedArrayConstructor as TypedArrayConstructor };
|
|
7941
8463
|
}
|
|
7942
8464
|
|
|
7943
|
-
interface SkinnedMeshParameters extends MeshParameters {
|
|
7944
|
-
skeleton?: Skeleton | null;
|
|
7945
|
-
}
|
|
7946
|
-
/**
|
|
7947
|
-
* 蒙皮Mesh
|
|
7948
|
-
*/
|
|
7949
|
-
declare class SkinnedMesh extends Mesh {
|
|
7950
|
-
static readonly typeName: string;
|
|
7951
|
-
private jointMat;
|
|
7952
|
-
private clonedFrom;
|
|
7953
|
-
isSkinnedMesh: boolean;
|
|
7954
|
-
className: string;
|
|
7955
|
-
/**
|
|
7956
|
-
* 是否支持 Instanced
|
|
7957
|
-
*/
|
|
7958
|
-
useInstanced: boolean;
|
|
7959
|
-
/**
|
|
7960
|
-
* 是否开启视锥体裁剪
|
|
7961
|
-
*/
|
|
7962
|
-
frustumTest: boolean;
|
|
7963
|
-
/**
|
|
7964
|
-
* 骨架
|
|
7965
|
-
*/
|
|
7966
|
-
skeleton: Skeleton | null;
|
|
7967
|
-
/**
|
|
7968
|
-
* @param params - 初始化参数,所有params都会复制到实例上
|
|
7969
|
-
* - `params.geometry`: 几何体
|
|
7970
|
-
* - `params.material`: 材质
|
|
7971
|
-
* - `params.skeleton`: 骨骼
|
|
7972
|
-
*/
|
|
7973
|
-
constructor(params?: SkinnedMeshParameters);
|
|
7974
|
-
/**
|
|
7975
|
-
* 获取每个骨骼对应的矩阵数组
|
|
7976
|
-
* @returns 返回矩阵数组
|
|
7977
|
-
*/
|
|
7978
|
-
getJointMat(): Float32Array;
|
|
7979
|
-
/**
|
|
7980
|
-
* 用新骨骼的 node name 重设 jointNames
|
|
7981
|
-
* @param skeleton - 新骨架
|
|
7982
|
-
*/
|
|
7983
|
-
resetJointNamesByNodeName(skeleton: Skeleton): void;
|
|
7984
|
-
/**
|
|
7985
|
-
* 用新骨骼重置skinIndices
|
|
7986
|
-
* @param skeleton -
|
|
7987
|
-
*/
|
|
7988
|
-
resetSkinIndices(skeleton: Skeleton): void;
|
|
7989
|
-
clone(isChild?: boolean): SkinnedMesh;
|
|
7990
|
-
getRenderOption(opt?: ShaderOptions): ShaderOptions;
|
|
7991
|
-
}
|
|
7992
|
-
|
|
7993
8465
|
type DOMViewport = ReturnType<typeof getElementRect>;
|
|
7994
8466
|
interface StageCommonParameters extends NodeParameters {
|
|
7995
8467
|
container?: HTMLElement;
|
|
@@ -8007,6 +8479,8 @@ interface StageCommonParameters extends NodeParameters {
|
|
|
8007
8479
|
clearColor?: Color;
|
|
8008
8480
|
useInstanced?: boolean;
|
|
8009
8481
|
useLogDepth?: boolean;
|
|
8482
|
+
/** Renderer policy bundle. `high-end` enables reversed-Z and camera-relative transforms. */
|
|
8483
|
+
renderingProfile?: RendererRenderingProfile;
|
|
8010
8484
|
alpha?: boolean;
|
|
8011
8485
|
depth?: boolean;
|
|
8012
8486
|
stencil?: boolean;
|
|
@@ -8016,6 +8490,8 @@ interface StageCommonParameters extends NodeParameters {
|
|
|
8016
8490
|
gameMode?: boolean;
|
|
8017
8491
|
/** Renderer-local scriptable pipeline factory snapshotted during Stage.create(). */
|
|
8018
8492
|
renderPipeline?: RenderPipelineFactory;
|
|
8493
|
+
/** Optional Stage Systems initialized transactionally before `Stage.create()` resolves. */
|
|
8494
|
+
systems?: readonly StageSystem[];
|
|
8019
8495
|
}
|
|
8020
8496
|
/** Requested backend policy. `auto` probes WebGPU first and otherwise selects WebGL 2. */
|
|
8021
8497
|
type StageBackend = RendererBackend | 'auto';
|
|
@@ -8073,6 +8549,8 @@ declare class Stage<Backend extends RendererBackend = RendererBackend> extends N
|
|
|
8073
8549
|
* 渲染器
|
|
8074
8550
|
*/
|
|
8075
8551
|
renderer: Renderer<Backend>;
|
|
8552
|
+
/** Per-Stage scheduler and service registry for optional addon Systems. */
|
|
8553
|
+
readonly systems: StageSystemRegistry;
|
|
8076
8554
|
/** Resolves when the selected graphics backend is ready for rendering. */
|
|
8077
8555
|
readonly ready: Promise<void>;
|
|
8078
8556
|
/** Ordered cameras rendered by `tick()`. */
|
|
@@ -8175,6 +8653,11 @@ declare class Stage<Backend extends RendererBackend = RendererBackend> extends N
|
|
|
8175
8653
|
* @returns 舞台本身。链式调用支持。
|
|
8176
8654
|
*/
|
|
8177
8655
|
tick(dt: number): this;
|
|
8656
|
+
/** Install one optional addon after this Stage is ready. */
|
|
8657
|
+
installSystem(system: StageSystem): Promise<this>;
|
|
8658
|
+
/** Remove one leaf addon System. Hard dependants must be removed first. */
|
|
8659
|
+
uninstallSystem(id: string): this;
|
|
8660
|
+
private prepareAddonRendererResources;
|
|
8178
8661
|
/**
|
|
8179
8662
|
* Replace the ordered camera composition.
|
|
8180
8663
|
* @param cameras - Unique Camera instances in back-to-front render order.
|
|
@@ -8186,45 +8669,210 @@ declare class Stage<Backend extends RendererBackend = RendererBackend> extends N
|
|
|
8186
8669
|
*/
|
|
8187
8670
|
addCamera(camera: Camera): this;
|
|
8188
8671
|
/**
|
|
8189
|
-
* Remove a camera from the composition.
|
|
8190
|
-
* @param camera - Camera to remove.
|
|
8672
|
+
* Remove a camera from the composition.
|
|
8673
|
+
* @param camera - Camera to remove.
|
|
8674
|
+
*/
|
|
8675
|
+
removeCamera(camera: Camera): this;
|
|
8676
|
+
/**
|
|
8677
|
+
* 开启/关闭舞台的DOM事件响应。要让舞台上的可视对象响应用户交互,必须先使用此方法开启舞台的相应事件的响应。
|
|
8678
|
+
* @param types - 要开启/关闭的事件名称或数组。
|
|
8679
|
+
* @param enabled - 指定开启还是关闭。如果不传此参数,则默认为开启。
|
|
8680
|
+
* @returns 舞台本身。链式调用支持。
|
|
8681
|
+
*/
|
|
8682
|
+
enableDOMEvent(types: string | readonly string[], enabled?: boolean): this;
|
|
8683
|
+
private updateTouchAction;
|
|
8684
|
+
/**
|
|
8685
|
+
* DOM事件处理函数。此方法会把事件调度到事件的坐标点所对应的可视对象。
|
|
8686
|
+
*/
|
|
8687
|
+
private _onDOMEvent;
|
|
8688
|
+
/**
|
|
8689
|
+
* 更新 DOM viewport
|
|
8690
|
+
* @returns DOM viewport,格式为 `{ left, top, right, bottom }`
|
|
8691
|
+
*/
|
|
8692
|
+
updateDomViewport(): DOMViewport;
|
|
8693
|
+
/**
|
|
8694
|
+
* 获取指定点的 mesh
|
|
8695
|
+
* @param x -
|
|
8696
|
+
* @param y -
|
|
8697
|
+
* @param eventMode -
|
|
8698
|
+
*/
|
|
8699
|
+
getMeshResultAtPoint(x: number, y: number, eventMode?: boolean): NodeRaycastInfo | null;
|
|
8700
|
+
private sortCameras;
|
|
8701
|
+
/**
|
|
8702
|
+
* 释放当前图形后端资源。
|
|
8703
|
+
* @returns this
|
|
8704
|
+
*/
|
|
8705
|
+
releaseGPUResources(): this;
|
|
8706
|
+
/**
|
|
8707
|
+
* 销毁
|
|
8708
|
+
* @returns this
|
|
8709
|
+
*/
|
|
8710
|
+
destroy(): this;
|
|
8711
|
+
}
|
|
8712
|
+
|
|
8713
|
+
/** Stage System ABI implemented by this Hilo3D release. */
|
|
8714
|
+
declare const STAGE_SYSTEM_API_VERSION: 1;
|
|
8715
|
+
/** Typed identity used by systems to publish services without string-key collisions. */
|
|
8716
|
+
declare class StageSystemService<T> {
|
|
8717
|
+
/** Human-readable token name used in diagnostics. */
|
|
8718
|
+
readonly name: string;
|
|
8719
|
+
private readonly serviceType;
|
|
8720
|
+
constructor(name: string);
|
|
8721
|
+
}
|
|
8722
|
+
/** Create a typed service identity shared by a provider and its consumers. */
|
|
8723
|
+
declare function createStageSystemService<T>(name: string): StageSystemService<T>;
|
|
8724
|
+
/** Immutable metadata compiled before System setup begins. */
|
|
8725
|
+
interface StageSystemDescriptor {
|
|
8726
|
+
/** Stable, package-qualified System identity. */
|
|
8727
|
+
readonly id: string;
|
|
8728
|
+
/** System implementation version for diagnostics. */
|
|
8729
|
+
readonly version: string;
|
|
8730
|
+
/** Exact Hilo3D Stage System ABI expected by this System. */
|
|
8731
|
+
readonly apiVersion: typeof STAGE_SYSTEM_API_VERSION;
|
|
8732
|
+
/** System identities that must be present, initialized first, and destroyed last. */
|
|
8733
|
+
readonly requires?: readonly string[];
|
|
8734
|
+
/** Optional System identities that this System runs before when they are present. */
|
|
8735
|
+
readonly before?: readonly string[];
|
|
8736
|
+
/** Optional System identities that this System runs after when they are present. */
|
|
8737
|
+
readonly after?: readonly string[];
|
|
8738
|
+
/** Complete set of typed services published during setup. */
|
|
8739
|
+
readonly provides?: readonly StageSystemService<unknown>[];
|
|
8740
|
+
}
|
|
8741
|
+
/** Context available only while a System factory is being initialized. */
|
|
8742
|
+
interface StageSystemSetupContext {
|
|
8743
|
+
/** Stage that owns this System runtime. */
|
|
8744
|
+
readonly stage: Stage;
|
|
8745
|
+
/** Publish one descriptor-declared service. */
|
|
8746
|
+
provide<T>(service: StageSystemService<T>, value: T): void;
|
|
8747
|
+
/** Read a required service published by an initialized dependency. */
|
|
8748
|
+
get<T>(service: StageSystemService<T>): T;
|
|
8749
|
+
/** Read an optional service published by an initialized dependency. */
|
|
8750
|
+
getOptional<T>(service: StageSystemService<T>): T | undefined;
|
|
8751
|
+
}
|
|
8752
|
+
/** Synchronous phase hooks owned by one initialized Stage System. */
|
|
8753
|
+
interface StageSystemRuntime {
|
|
8754
|
+
/** Run before scene-node updates for a frame. */
|
|
8755
|
+
beforeUpdate?(deltaTimeMilliseconds: number): void;
|
|
8756
|
+
/** Run after scene-node updates for a frame. */
|
|
8757
|
+
afterUpdate?(deltaTimeMilliseconds: number): void;
|
|
8758
|
+
/** Run immediately before rendering a frame. */
|
|
8759
|
+
beforeRender?(): void;
|
|
8760
|
+
/** Run after each render attempt, including a failed render. */
|
|
8761
|
+
afterRender?(): void;
|
|
8762
|
+
/** Release resources owned by this runtime. */
|
|
8763
|
+
destroy?(): void;
|
|
8764
|
+
}
|
|
8765
|
+
/** Reusable factory. Each Stage receives a distinct runtime from `setup()`. */
|
|
8766
|
+
interface StageSystem {
|
|
8767
|
+
/** Versioned identity, ordering, dependency, and service metadata. */
|
|
8768
|
+
readonly descriptor: StageSystemDescriptor;
|
|
8769
|
+
/** Create a fresh runtime for one Stage. */
|
|
8770
|
+
setup(context: StageSystemSetupContext): StageSystemRuntime | Promise<StageSystemRuntime>;
|
|
8771
|
+
}
|
|
8772
|
+
/**
|
|
8773
|
+
* Per-Stage System scheduler and service registry. Ordering is compiled only when the installed set
|
|
8774
|
+
* changes; frame dispatch walks flat phase-specific callback arrays.
|
|
8775
|
+
*/
|
|
8776
|
+
declare class StageSystemRegistry {
|
|
8777
|
+
/** Stage that owns this System registry. */
|
|
8778
|
+
readonly stage: Stage;
|
|
8779
|
+
private readonly installed;
|
|
8780
|
+
private readonly installationOrder;
|
|
8781
|
+
private readonly services;
|
|
8782
|
+
private executionOrder;
|
|
8783
|
+
private beforeUpdateHooks;
|
|
8784
|
+
private afterUpdateHooks;
|
|
8785
|
+
private beforeRenderHooks;
|
|
8786
|
+
private afterRenderHooks;
|
|
8787
|
+
private dispatching;
|
|
8788
|
+
private initializing;
|
|
8789
|
+
private settingUp;
|
|
8790
|
+
private destroyingRuntime;
|
|
8791
|
+
private initialized;
|
|
8792
|
+
private destroyed;
|
|
8793
|
+
constructor(stage: Stage);
|
|
8794
|
+
/** Initialize an entire System set transactionally. Intended for `Stage.create()`. */
|
|
8795
|
+
initialize(systems: readonly StageSystem[]): Promise<void>;
|
|
8796
|
+
/** Install one System and recompile the frame schedule. */
|
|
8797
|
+
install(system: StageSystem): Promise<void>;
|
|
8798
|
+
/** Remove one leaf System. Hard dependants must be removed first. */
|
|
8799
|
+
uninstall(id: string): void;
|
|
8800
|
+
/** Return whether a System identity is currently installed. */
|
|
8801
|
+
has(id: string): boolean;
|
|
8802
|
+
/** Read an installed System runtime for diagnostics or explicit extension APIs. */
|
|
8803
|
+
getRuntime(id: string): StageSystemRuntime | undefined;
|
|
8804
|
+
/** Read a required typed service published by an installed System. */
|
|
8805
|
+
get<T>(service: StageSystemService<T>): T;
|
|
8806
|
+
/** Read a typed service when its provider is optional. */
|
|
8807
|
+
getOptional<T>(service: StageSystemService<T>): T | undefined;
|
|
8808
|
+
/** Dispatch the pre-update phase in compiled order. */
|
|
8809
|
+
runBeforeUpdate(deltaTimeMilliseconds: number): void;
|
|
8810
|
+
/** Dispatch the post-update phase in compiled order. */
|
|
8811
|
+
runAfterUpdate(deltaTimeMilliseconds: number): void;
|
|
8812
|
+
/** Dispatch the pre-render phase in compiled order. */
|
|
8813
|
+
runBeforeRender(): void;
|
|
8814
|
+
/** Dispatch the post-render phase in compiled order. */
|
|
8815
|
+
runAfterRender(): void;
|
|
8816
|
+
/** Destroy every runtime and its services in reverse compiled order. */
|
|
8817
|
+
destroy(): void;
|
|
8818
|
+
private installResolved;
|
|
8819
|
+
private destroyInstalled;
|
|
8820
|
+
private rebuildSchedule;
|
|
8821
|
+
private clearSchedule;
|
|
8822
|
+
private dispatchDelta;
|
|
8823
|
+
private dispatch;
|
|
8824
|
+
private beginDispatch;
|
|
8825
|
+
private requireMutable;
|
|
8826
|
+
}
|
|
8827
|
+
|
|
8828
|
+
interface SkinnedMeshParameters extends MeshParameters {
|
|
8829
|
+
skeleton?: Skeleton | null;
|
|
8830
|
+
}
|
|
8831
|
+
/**
|
|
8832
|
+
* 蒙皮Mesh
|
|
8833
|
+
*/
|
|
8834
|
+
declare class SkinnedMesh extends Mesh {
|
|
8835
|
+
static readonly typeName: string;
|
|
8836
|
+
private jointMat;
|
|
8837
|
+
private clonedFrom;
|
|
8838
|
+
isSkinnedMesh: boolean;
|
|
8839
|
+
className: string;
|
|
8840
|
+
/**
|
|
8841
|
+
* 是否支持 Instanced
|
|
8191
8842
|
*/
|
|
8192
|
-
|
|
8843
|
+
useInstanced: boolean;
|
|
8193
8844
|
/**
|
|
8194
|
-
*
|
|
8195
|
-
* @param types - 要开启/关闭的事件名称或数组。
|
|
8196
|
-
* @param enabled - 指定开启还是关闭。如果不传此参数,则默认为开启。
|
|
8197
|
-
* @returns 舞台本身。链式调用支持。
|
|
8845
|
+
* 是否开启视锥体裁剪
|
|
8198
8846
|
*/
|
|
8199
|
-
|
|
8200
|
-
private updateTouchAction;
|
|
8847
|
+
frustumTest: boolean;
|
|
8201
8848
|
/**
|
|
8202
|
-
*
|
|
8849
|
+
* 骨架
|
|
8203
8850
|
*/
|
|
8204
|
-
|
|
8851
|
+
skeleton: Skeleton | null;
|
|
8205
8852
|
/**
|
|
8206
|
-
*
|
|
8207
|
-
*
|
|
8853
|
+
* @param params - 初始化参数,所有params都会复制到实例上
|
|
8854
|
+
* - `params.geometry`: 几何体
|
|
8855
|
+
* - `params.material`: 材质
|
|
8856
|
+
* - `params.skeleton`: 骨骼
|
|
8208
8857
|
*/
|
|
8209
|
-
|
|
8858
|
+
constructor(params?: SkinnedMeshParameters);
|
|
8210
8859
|
/**
|
|
8211
|
-
*
|
|
8212
|
-
* @
|
|
8213
|
-
* @param y -
|
|
8214
|
-
* @param eventMode -
|
|
8860
|
+
* 获取每个骨骼对应的矩阵数组
|
|
8861
|
+
* @returns 返回矩阵数组
|
|
8215
8862
|
*/
|
|
8216
|
-
|
|
8217
|
-
private sortCameras;
|
|
8863
|
+
getJointMat(): Float32Array;
|
|
8218
8864
|
/**
|
|
8219
|
-
*
|
|
8220
|
-
* @
|
|
8865
|
+
* 用新骨骼的 node name 重设 jointNames
|
|
8866
|
+
* @param skeleton - 新骨架
|
|
8221
8867
|
*/
|
|
8222
|
-
|
|
8868
|
+
resetJointNamesByNodeName(skeleton: Skeleton): void;
|
|
8223
8869
|
/**
|
|
8224
|
-
*
|
|
8225
|
-
* @
|
|
8870
|
+
* 用新骨骼重置skinIndices
|
|
8871
|
+
* @param skeleton -
|
|
8226
8872
|
*/
|
|
8227
|
-
|
|
8873
|
+
resetSkinIndices(skeleton: Skeleton): void;
|
|
8874
|
+
clone(isChild?: boolean): SkinnedMesh;
|
|
8875
|
+
getRenderOption(opt?: ShaderOptions): ShaderOptions;
|
|
8228
8876
|
}
|
|
8229
8877
|
|
|
8230
8878
|
type TweenEaseFunction = (ratio: number) => number;
|
|
@@ -8484,6 +9132,122 @@ declare class PerspectiveCamera extends Camera {
|
|
|
8484
9132
|
getGeometry(forceUpdate?: boolean): Geometry;
|
|
8485
9133
|
}
|
|
8486
9134
|
|
|
9135
|
+
/** Configuration for {@link OrbitControls}. */
|
|
9136
|
+
interface OrbitControlsOptions {
|
|
9137
|
+
/** Perspective camera to control. Defaults to the Stage primary camera. */
|
|
9138
|
+
camera?: PerspectiveCamera;
|
|
9139
|
+
/** Orbit center in the camera parent's coordinate space. */
|
|
9140
|
+
target?: Vector3;
|
|
9141
|
+
/** Whether event listeners are attached immediately. Defaults to `true`. */
|
|
9142
|
+
enabled?: boolean;
|
|
9143
|
+
/** Whether pointer gestures can orbit the camera. Defaults to `true`. */
|
|
9144
|
+
enableRotate?: boolean;
|
|
9145
|
+
/** Whether wheel and pinch gestures can dolly the camera. Defaults to `true`. */
|
|
9146
|
+
enableZoom?: boolean;
|
|
9147
|
+
/** Whether secondary-drag, Shift-drag, and two-finger gestures can pan. Defaults to `true`. */
|
|
9148
|
+
enablePan?: boolean;
|
|
9149
|
+
/** Orbit sensitivity multiplier. Defaults to `1`. */
|
|
9150
|
+
rotateSpeed?: number;
|
|
9151
|
+
/** Dolly sensitivity multiplier. Defaults to `1`. */
|
|
9152
|
+
zoomSpeed?: number;
|
|
9153
|
+
/** Pan sensitivity multiplier. Defaults to `1`. */
|
|
9154
|
+
panSpeed?: number;
|
|
9155
|
+
/** Minimum camera distance from the target. Defaults to the camera near plane. */
|
|
9156
|
+
minDistance?: number;
|
|
9157
|
+
/** Maximum camera distance from the target. Defaults to positive infinity. */
|
|
9158
|
+
maxDistance?: number;
|
|
9159
|
+
/** Minimum polar orbit angle in radians. */
|
|
9160
|
+
minPolarAngle?: number;
|
|
9161
|
+
/** Maximum polar orbit angle in radians. */
|
|
9162
|
+
maxPolarAngle?: number;
|
|
9163
|
+
}
|
|
9164
|
+
/**
|
|
9165
|
+
* Camera-centric orbit, dolly, and pan controls for a {@link PerspectiveCamera}.
|
|
9166
|
+
*
|
|
9167
|
+
* Mouse: drag to orbit, right-drag or Shift-drag to pan, and wheel to dolly.
|
|
9168
|
+
* Touch: drag with one finger to orbit, or use two fingers to pan and pinch-to-dolly.
|
|
9169
|
+
*/
|
|
9170
|
+
declare class OrbitControls {
|
|
9171
|
+
/** Stage that owns the controlled canvas and default camera. */
|
|
9172
|
+
readonly stage: Stage;
|
|
9173
|
+
/** Canvas that receives pointer, wheel, and touch events. */
|
|
9174
|
+
readonly canvas: HTMLCanvasElement;
|
|
9175
|
+
/** Perspective camera manipulated by these controls. */
|
|
9176
|
+
readonly camera: PerspectiveCamera;
|
|
9177
|
+
/** Mutable orbit center in the camera parent's coordinate space. */
|
|
9178
|
+
readonly target: Vector3;
|
|
9179
|
+
/** Whether orbit gestures are accepted. */
|
|
9180
|
+
enableRotate: boolean;
|
|
9181
|
+
/** Whether dolly gestures are accepted. */
|
|
9182
|
+
enableZoom: boolean;
|
|
9183
|
+
/** Whether pan gestures are accepted. */
|
|
9184
|
+
enablePan: boolean;
|
|
9185
|
+
/** Orbit sensitivity multiplier. */
|
|
9186
|
+
rotateSpeed: number;
|
|
9187
|
+
/** Dolly sensitivity multiplier. */
|
|
9188
|
+
zoomSpeed: number;
|
|
9189
|
+
/** Pan sensitivity multiplier. */
|
|
9190
|
+
panSpeed: number;
|
|
9191
|
+
/** Minimum camera distance from the target. */
|
|
9192
|
+
minDistance: number;
|
|
9193
|
+
/** Maximum camera distance from the target. */
|
|
9194
|
+
maxDistance: number;
|
|
9195
|
+
/** Minimum polar orbit angle in radians. */
|
|
9196
|
+
minPolarAngle: number;
|
|
9197
|
+
/** Maximum polar orbit angle in radians. */
|
|
9198
|
+
maxPolarAngle: number;
|
|
9199
|
+
/** Whether browser event listeners are currently attached. */
|
|
9200
|
+
isEnabled: boolean;
|
|
9201
|
+
/** Optional callback invoked after the controls change the camera view. */
|
|
9202
|
+
onChange: (() => void) | undefined;
|
|
9203
|
+
private readonly initialCameraPosition;
|
|
9204
|
+
private readonly initialTarget;
|
|
9205
|
+
private readonly pointers;
|
|
9206
|
+
private readonly offset;
|
|
9207
|
+
private readonly right;
|
|
9208
|
+
private readonly up;
|
|
9209
|
+
private readonly panOffset;
|
|
9210
|
+
private readonly initialTouchAction;
|
|
9211
|
+
/** Create controls for a stage and optionally attach their browser event listeners. */
|
|
9212
|
+
constructor(stage: Stage, options?: OrbitControlsOptions);
|
|
9213
|
+
/** Attach pointer, wheel, touch, and context-menu listeners to the canvas. */
|
|
9214
|
+
enable(): void;
|
|
9215
|
+
/** Detach all listeners and restore the canvas touch-action style. */
|
|
9216
|
+
disable(): void;
|
|
9217
|
+
/** Release the browser event listeners owned by these controls. */
|
|
9218
|
+
dispose(): void;
|
|
9219
|
+
/** Reorient the camera toward the target and enforce the configured orbit limits. */
|
|
9220
|
+
update(): void;
|
|
9221
|
+
/** Replace the orbit center and reorient the camera toward it. */
|
|
9222
|
+
setTarget(target: Vector3): void;
|
|
9223
|
+
/**
|
|
9224
|
+
* Set a complete camera view while applying the configured orbit limits.
|
|
9225
|
+
*
|
|
9226
|
+
* This is useful for scripted tours that should share the same camera contract as pointer
|
|
9227
|
+
* interaction.
|
|
9228
|
+
*/
|
|
9229
|
+
setView(position: Vector3, target: Vector3): void;
|
|
9230
|
+
/** Orbit by a pointer delta measured in CSS pixels. */
|
|
9231
|
+
rotate(deltaX: number, deltaY: number): void;
|
|
9232
|
+
/**
|
|
9233
|
+
* Move the camera toward its target. Values above one zoom in; values below one zoom out.
|
|
9234
|
+
*/
|
|
9235
|
+
dolly(scale: number): void;
|
|
9236
|
+
/** Pan in screen pixels while preserving the camera-to-target offset. */
|
|
9237
|
+
pan(deltaX: number, deltaY: number): void;
|
|
9238
|
+
/** Restore the camera position and target captured at construction time. */
|
|
9239
|
+
reset(): void;
|
|
9240
|
+
private validateLimits;
|
|
9241
|
+
private readSpherical;
|
|
9242
|
+
private applySpherical;
|
|
9243
|
+
private readonly preventContextMenu;
|
|
9244
|
+
private readonly handlePointerDown;
|
|
9245
|
+
private readonly handlePointerMove;
|
|
9246
|
+
private readonly handlePointerEnd;
|
|
9247
|
+
private readonly handleWheel;
|
|
9248
|
+
private readGesture;
|
|
9249
|
+
}
|
|
9250
|
+
|
|
8487
9251
|
interface BoxGeometryParameters extends GeometryParameters {
|
|
8488
9252
|
width?: number;
|
|
8489
9253
|
height?: number;
|
|
@@ -8695,85 +9459,35 @@ declare class SpriteFrame {
|
|
|
8695
9459
|
writeUVRect(target: Float32Array): Float32Array;
|
|
8696
9460
|
}
|
|
8697
9461
|
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
|
|
8702
|
-
|
|
8703
|
-
|
|
8704
|
-
}
|
|
8705
|
-
|
|
8706
|
-
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8714
|
-
|
|
8715
|
-
|
|
8716
|
-
|
|
8717
|
-
|
|
8718
|
-
|
|
8719
|
-
|
|
8720
|
-
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
* uniformBlocks: { EffectBlock: effectBlock },
|
|
8726
|
-
* vs: `#version 300 es
|
|
8727
|
-
* layout(std140) uniform EffectBlock {
|
|
8728
|
-
* vec4 effectColor;
|
|
8729
|
-
* float strength;
|
|
8730
|
-
* };
|
|
8731
|
-
* in vec3 a_position;
|
|
8732
|
-
* out vec4 v_color;
|
|
8733
|
-
* void main() {
|
|
8734
|
-
* v_color = vec4(effectColor.rgb * strength, effectColor.a);
|
|
8735
|
-
* gl_Position = vec4(a_position, 1.0);
|
|
8736
|
-
* }`,
|
|
8737
|
-
* fs: `#version 300 es
|
|
8738
|
-
* precision highp float;
|
|
8739
|
-
* layout(std140) uniform EffectBlock {
|
|
8740
|
-
* vec4 effectColor;
|
|
8741
|
-
* float strength;
|
|
8742
|
-
* };
|
|
8743
|
-
* in vec4 v_color;
|
|
8744
|
-
* layout(location = 0) out vec4 outColor;
|
|
8745
|
-
* void main() {
|
|
8746
|
-
* outColor = v_color;
|
|
8747
|
-
* }`
|
|
8748
|
-
* });
|
|
8749
|
-
*
|
|
8750
|
-
* effectBlock.set('strength', 1);
|
|
8751
|
-
* ```
|
|
8752
|
-
*/
|
|
8753
|
-
declare class ShaderMaterial extends Material {
|
|
8754
|
-
isShaderMaterial: boolean;
|
|
9462
|
+
interface ShaderMaterialRoleSource {
|
|
9463
|
+
readonly role: MaterialPassRole;
|
|
9464
|
+
readonly vertexSource: string;
|
|
9465
|
+
readonly fragmentSource: string;
|
|
9466
|
+
readonly fragmentOutput: MaterialFragmentOutput;
|
|
9467
|
+
readonly fallback?: MaterialPassFallback;
|
|
9468
|
+
}
|
|
9469
|
+
interface ShaderMaterialTextureSlot {
|
|
9470
|
+
readonly definition: Readonly<MaterialTextureSlotDefinition>;
|
|
9471
|
+
readonly binding: MaterialTextureSlotInput;
|
|
9472
|
+
}
|
|
9473
|
+
interface ShaderMaterialParameters extends MaterialInstanceParameters {
|
|
9474
|
+
readonly vs: string;
|
|
9475
|
+
readonly fs: string;
|
|
9476
|
+
readonly sourceRevision?: string;
|
|
9477
|
+
readonly defines?: Readonly<Record<string, number>>;
|
|
9478
|
+
readonly roles?: readonly Readonly<ShaderMaterialRoleSource>[];
|
|
9479
|
+
readonly textureSlots?: readonly Readonly<ShaderMaterialTextureSlot>[];
|
|
9480
|
+
readonly attributes?: Readonly<MaterialBindingMap>;
|
|
9481
|
+
readonly uniforms?: Readonly<MaterialBindingMap>;
|
|
9482
|
+
readonly frontFace?: MaterialFrontFace;
|
|
9483
|
+
readonly cullMode?: MaterialCullMode;
|
|
9484
|
+
readonly state?: Partial<Readonly<MaterialPipelineState>>;
|
|
9485
|
+
}
|
|
9486
|
+
/** Typed GLSL material whose source, roles and layout are immutable after construction. */
|
|
9487
|
+
declare class ShaderMaterial extends MaterialInstance {
|
|
9488
|
+
readonly isShaderMaterial = true;
|
|
8755
9489
|
readonly className: string;
|
|
8756
|
-
|
|
8757
|
-
* vertex shader 代码
|
|
8758
|
-
*/
|
|
8759
|
-
vs: string;
|
|
8760
|
-
/**
|
|
8761
|
-
* fragment shader 代码
|
|
8762
|
-
*/
|
|
8763
|
-
fs: string;
|
|
8764
|
-
/**
|
|
8765
|
-
* 是否使用 header cache shader
|
|
8766
|
-
*/
|
|
8767
|
-
useHeaderCache: boolean;
|
|
8768
|
-
/**
|
|
8769
|
-
* @param params - 初始化参数,所有params都会复制到实例上
|
|
8770
|
-
*/
|
|
8771
|
-
constructor(params?: ShaderMaterialParameters);
|
|
8772
|
-
getRenderOption(option?: ShaderOptions): ShaderOptions;
|
|
8773
|
-
/**
|
|
8774
|
-
* 获取定制的渲染参数
|
|
8775
|
-
*/
|
|
8776
|
-
getCustomRenderOption: CustomRenderOptionProvider | null;
|
|
9490
|
+
constructor(params: Readonly<ShaderMaterialParameters>);
|
|
8777
9491
|
}
|
|
8778
9492
|
|
|
8779
9493
|
interface SpriteMaterialParameters extends Omit<ShaderMaterialParameters, 'attributes' | 'uniforms' | 'uniformBlocks' | 'vs' | 'fs' | 'needBasicAttributes'> {
|
|
@@ -9032,175 +9746,67 @@ declare class Text2D extends Sprite {
|
|
|
9032
9746
|
private readonly textTexture;
|
|
9033
9747
|
constructor(params?: Text2DParameters);
|
|
9034
9748
|
/** Current string, including newline-separated lines. */
|
|
9035
|
-
get text(): string;
|
|
9036
|
-
set text(value: string);
|
|
9037
|
-
/** Immutable snapshot of the active raster style. */
|
|
9038
|
-
get style(): Readonly<Required<Text2DStyle>>;
|
|
9039
|
-
/** Replace text and rerasterize its Canvas 2D texture. */
|
|
9040
|
-
setText(text: string): this;
|
|
9041
|
-
/** Merge style changes and rerasterize. */
|
|
9042
|
-
setStyle(style: Text2DStyle): this;
|
|
9043
|
-
destroy(renderer?: Renderer, _destroyTextures?: boolean): this;
|
|
9044
|
-
private replaceRaster;
|
|
9045
|
-
}
|
|
9046
|
-
|
|
9047
|
-
type UiButtonState = 'up' | 'hover' | 'down' | 'disabled';
|
|
9048
|
-
interface UiButtonFrames {
|
|
9049
|
-
/** Default button frame. */
|
|
9050
|
-
up: SpriteFrame;
|
|
9051
|
-
/** Pointer-hover frame. Defaults to `up`. */
|
|
9052
|
-
hover?: SpriteFrame;
|
|
9053
|
-
/** Pressed frame. Defaults to `hover`. */
|
|
9054
|
-
down?: SpriteFrame;
|
|
9055
|
-
/** Disabled frame. Defaults to `up`. */
|
|
9056
|
-
disabled?: SpriteFrame;
|
|
9057
|
-
}
|
|
9058
|
-
interface UiButtonParameters extends Omit<SlicedSpriteParameters, 'frame' | 'texture'> {
|
|
9059
|
-
/** Per-state nine-slice atlas frames. */
|
|
9060
|
-
frames: UiButtonFrames;
|
|
9061
|
-
/** Optional centered label. */
|
|
9062
|
-
label?: string;
|
|
9063
|
-
/** Canvas text style for the label. */
|
|
9064
|
-
labelStyle?: Text2DStyle;
|
|
9065
|
-
/** Initial enabled state. Defaults to `true`. */
|
|
9066
|
-
enabled?: boolean;
|
|
9067
|
-
}
|
|
9068
|
-
/**
|
|
9069
|
-
* Nine-slice game UI button with hover, press, disabled, label, and click event support.
|
|
9070
|
-
*
|
|
9071
|
-
* Applications enable the desired pointer event types once through `Stage.enableDOMEvent()`.
|
|
9072
|
-
*/
|
|
9073
|
-
declare class UiButton extends SlicedSprite {
|
|
9074
|
-
static readonly typeName: string;
|
|
9075
|
-
readonly isUiButton = true;
|
|
9076
|
-
className: string;
|
|
9077
|
-
readonly label: Text2D;
|
|
9078
|
-
readonly frames: Readonly<UiButtonFrames>;
|
|
9079
|
-
private enabledValue;
|
|
9080
|
-
private stateValue;
|
|
9081
|
-
constructor(params: UiButtonParameters);
|
|
9082
|
-
/** Whether pointer interaction is enabled. */
|
|
9083
|
-
get enabled(): boolean;
|
|
9084
|
-
/** Current visual state. */
|
|
9085
|
-
get state(): UiButtonState;
|
|
9086
|
-
/** Enable or disable interaction and update the visual frame. */
|
|
9087
|
-
setEnabled(enabled: boolean): this;
|
|
9088
|
-
/** Replace the centered label text. */
|
|
9089
|
-
setLabel(text: string): this;
|
|
9090
|
-
setSize(width: number, height: number): this;
|
|
9091
|
-
private readonly handlePointerOver;
|
|
9092
|
-
private readonly handlePointerOut;
|
|
9093
|
-
private readonly handlePointerDown;
|
|
9094
|
-
private readonly handlePointerUp;
|
|
9095
|
-
private updateState;
|
|
9096
|
-
}
|
|
9097
|
-
|
|
9098
|
-
/** Sample interpretation supported by whole-subresource compute graph textures. */
|
|
9099
|
-
type ComputeTextureSampleType = 'float' | 'unfilterable-float' | 'depth';
|
|
9100
|
-
/** Compute graph textures currently expose one complete two-dimensional subresource. */
|
|
9101
|
-
type ComputeTextureViewDimension = '2d';
|
|
9102
|
-
/** Compute storage textures currently expose one complete two-dimensional subresource. */
|
|
9103
|
-
type ComputeStorageTextureViewDimension = '2d';
|
|
9104
|
-
/** Sample interpretation supported by storage-aware graphics shaders. */
|
|
9105
|
-
type ShaderTextureSampleType = ComputeTextureSampleType | 'sint' | 'uint';
|
|
9106
|
-
/** Texture views supported by the Material-backed storage graphics path. */
|
|
9107
|
-
type ShaderTextureViewDimension = ComputeTextureViewDimension | '2d-array' | '3d' | 'cube';
|
|
9108
|
-
/** Public color formats that can be requested for a storage-texture binding. */
|
|
9109
|
-
type ComputeStorageTextureFormat = Exclude<RenderTargetColorFormat, 'rgba8unorm-srgb'>;
|
|
9110
|
-
/** Graph initialization promise for a writable storage-buffer binding. */
|
|
9111
|
-
type ComputeStorageBufferAccess = 'read-write' | 'write-discard';
|
|
9112
|
-
/** Resource binding that a shader may only read. */
|
|
9113
|
-
type ShaderReadBinding = Readonly<{
|
|
9114
|
-
name: string;
|
|
9115
|
-
group: number;
|
|
9116
|
-
binding: number;
|
|
9117
|
-
kind: 'uniform-buffer' | 'read-only-storage-buffer';
|
|
9118
|
-
minBindingSize?: number;
|
|
9119
|
-
dynamicOffset?: boolean;
|
|
9120
|
-
}> | Readonly<{
|
|
9121
|
-
name: string;
|
|
9122
|
-
group: number;
|
|
9123
|
-
binding: number;
|
|
9124
|
-
kind: 'sampled-texture';
|
|
9125
|
-
sampleType: ShaderTextureSampleType;
|
|
9126
|
-
viewDimension?: ShaderTextureViewDimension;
|
|
9127
|
-
}> | Readonly<{
|
|
9128
|
-
name: string;
|
|
9129
|
-
group: number;
|
|
9130
|
-
binding: number;
|
|
9131
|
-
kind: 'sampler' | 'comparison-sampler';
|
|
9132
|
-
}>;
|
|
9133
|
-
/** Explicit binding ABI for one Direct WGSL compute shader. */
|
|
9134
|
-
type ComputeShaderBinding = Readonly<{
|
|
9135
|
-
name: string;
|
|
9136
|
-
group: number;
|
|
9137
|
-
binding: number;
|
|
9138
|
-
kind: 'uniform-buffer' | 'read-only-storage-buffer';
|
|
9139
|
-
minBindingSize?: number;
|
|
9140
|
-
dynamicOffset?: boolean;
|
|
9141
|
-
}> | Readonly<{
|
|
9142
|
-
name: string;
|
|
9143
|
-
group: number;
|
|
9144
|
-
binding: number;
|
|
9145
|
-
kind: 'sampled-texture';
|
|
9146
|
-
sampleType: ComputeTextureSampleType;
|
|
9147
|
-
viewDimension?: ComputeTextureViewDimension;
|
|
9148
|
-
}> | Readonly<{
|
|
9149
|
-
name: string;
|
|
9150
|
-
group: number;
|
|
9151
|
-
binding: number;
|
|
9152
|
-
kind: 'sampler' | 'non-filtering-sampler' | 'comparison-sampler';
|
|
9153
|
-
}> | Readonly<{
|
|
9154
|
-
name: string;
|
|
9155
|
-
group: number;
|
|
9156
|
-
binding: number;
|
|
9157
|
-
kind: 'storage-buffer';
|
|
9158
|
-
/** Graph access promise; both modes use a WGSL `read_write` storage declaration. */
|
|
9159
|
-
access: ComputeStorageBufferAccess;
|
|
9160
|
-
minBindingSize?: number;
|
|
9161
|
-
dynamicOffset?: boolean;
|
|
9162
|
-
}> | Readonly<{
|
|
9163
|
-
name: string;
|
|
9164
|
-
group: number;
|
|
9165
|
-
binding: number;
|
|
9166
|
-
kind: 'storage-texture';
|
|
9167
|
-
/**
|
|
9168
|
-
* WGSL access mode. Declaring this binding also promises that the pass completely
|
|
9169
|
-
* replaces the bound texture subresource before a later graph read.
|
|
9170
|
-
*/
|
|
9171
|
-
access: 'write-only';
|
|
9172
|
-
format: ComputeStorageTextureFormat;
|
|
9173
|
-
viewDimension?: ComputeStorageTextureViewDimension;
|
|
9174
|
-
}>;
|
|
9175
|
-
/** Immutable source, entry point, workgroup size, and binding ABI for {@link ComputeShader}. */
|
|
9176
|
-
interface ComputeShaderDescriptor {
|
|
9177
|
-
/** Optional diagnostic label. */
|
|
9178
|
-
readonly label?: string;
|
|
9179
|
-
/** Direct WGSL source containing exactly the declared compute entry point and resources. */
|
|
9180
|
-
readonly source: string;
|
|
9181
|
-
/** Compute entry-point name. Defaults to `main`. */
|
|
9182
|
-
readonly entryPoint?: string;
|
|
9183
|
-
/** One to three positive literal dimensions, which must match `@workgroup_size`. */
|
|
9184
|
-
readonly workgroupSize: readonly [number, number?, number?];
|
|
9185
|
-
/** Complete explicit resource ABI; entries are snapshotted and sorted by group/binding. */
|
|
9186
|
-
readonly bindings: readonly ComputeShaderBinding[];
|
|
9749
|
+
get text(): string;
|
|
9750
|
+
set text(value: string);
|
|
9751
|
+
/** Immutable snapshot of the active raster style. */
|
|
9752
|
+
get style(): Readonly<Required<Text2DStyle>>;
|
|
9753
|
+
/** Replace text and rerasterize its Canvas 2D texture. */
|
|
9754
|
+
setText(text: string): this;
|
|
9755
|
+
/** Merge style changes and rerasterize. */
|
|
9756
|
+
setStyle(style: Text2DStyle): this;
|
|
9757
|
+
destroy(renderer?: Renderer, _destroyTextures?: boolean): this;
|
|
9758
|
+
private replaceRaster;
|
|
9187
9759
|
}
|
|
9188
|
-
|
|
9189
|
-
type
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
|
|
9202
|
-
|
|
9203
|
-
|
|
9760
|
+
|
|
9761
|
+
type UiButtonState = 'up' | 'hover' | 'down' | 'disabled';
|
|
9762
|
+
interface UiButtonFrames {
|
|
9763
|
+
/** Default button frame. */
|
|
9764
|
+
up: SpriteFrame;
|
|
9765
|
+
/** Pointer-hover frame. Defaults to `up`. */
|
|
9766
|
+
hover?: SpriteFrame;
|
|
9767
|
+
/** Pressed frame. Defaults to `hover`. */
|
|
9768
|
+
down?: SpriteFrame;
|
|
9769
|
+
/** Disabled frame. Defaults to `up`. */
|
|
9770
|
+
disabled?: SpriteFrame;
|
|
9771
|
+
}
|
|
9772
|
+
interface UiButtonParameters extends Omit<SlicedSpriteParameters, 'frame' | 'texture'> {
|
|
9773
|
+
/** Per-state nine-slice atlas frames. */
|
|
9774
|
+
frames: UiButtonFrames;
|
|
9775
|
+
/** Optional centered label. */
|
|
9776
|
+
label?: string;
|
|
9777
|
+
/** Canvas text style for the label. */
|
|
9778
|
+
labelStyle?: Text2DStyle;
|
|
9779
|
+
/** Initial enabled state. Defaults to `true`. */
|
|
9780
|
+
enabled?: boolean;
|
|
9781
|
+
}
|
|
9782
|
+
/**
|
|
9783
|
+
* Nine-slice game UI button with hover, press, disabled, label, and click event support.
|
|
9784
|
+
*
|
|
9785
|
+
* Applications enable the desired pointer event types once through `Stage.enableDOMEvent()`.
|
|
9786
|
+
*/
|
|
9787
|
+
declare class UiButton extends SlicedSprite {
|
|
9788
|
+
static readonly typeName: string;
|
|
9789
|
+
readonly isUiButton = true;
|
|
9790
|
+
className: string;
|
|
9791
|
+
readonly label: Text2D;
|
|
9792
|
+
readonly frames: Readonly<UiButtonFrames>;
|
|
9793
|
+
private enabledValue;
|
|
9794
|
+
private stateValue;
|
|
9795
|
+
constructor(params: UiButtonParameters);
|
|
9796
|
+
/** Whether pointer interaction is enabled. */
|
|
9797
|
+
get enabled(): boolean;
|
|
9798
|
+
/** Current visual state. */
|
|
9799
|
+
get state(): UiButtonState;
|
|
9800
|
+
/** Enable or disable interaction and update the visual frame. */
|
|
9801
|
+
setEnabled(enabled: boolean): this;
|
|
9802
|
+
/** Replace the centered label text. */
|
|
9803
|
+
setLabel(text: string): this;
|
|
9804
|
+
setSize(width: number, height: number): this;
|
|
9805
|
+
private readonly handlePointerOver;
|
|
9806
|
+
private readonly handlePointerOut;
|
|
9807
|
+
private readonly handlePointerDown;
|
|
9808
|
+
private readonly handlePointerUp;
|
|
9809
|
+
private updateState;
|
|
9204
9810
|
}
|
|
9205
9811
|
|
|
9206
9812
|
/** Value accepted by a fixed WGSL pipeline override constant. */
|
|
@@ -9288,37 +9894,6 @@ declare class ComputeSampler {
|
|
|
9288
9894
|
constructor(descriptor?: Readonly<ComputeSamplerDescriptor>);
|
|
9289
9895
|
}
|
|
9290
9896
|
|
|
9291
|
-
/** Constrained GLSL ES 3.10 graphics source and readonly resource ABI. */
|
|
9292
|
-
interface StorageGraphicsShaderDescriptor {
|
|
9293
|
-
/** Optional diagnostic label. */
|
|
9294
|
-
readonly label?: string;
|
|
9295
|
-
/** GLSL ES 3.10 vertex source; storage blocks must be `readonly` and `std430`. */
|
|
9296
|
-
readonly vertexSource: string;
|
|
9297
|
-
/** GLSL ES 3.10 fragment source; storage blocks must be `readonly` and `std430`. */
|
|
9298
|
-
readonly fragmentSource: string;
|
|
9299
|
-
/** Complete read-only resource ABI shared by the two graphics stages. */
|
|
9300
|
-
readonly bindings: readonly ShaderReadBinding[];
|
|
9301
|
-
}
|
|
9302
|
-
/**
|
|
9303
|
-
* Immutable WebGPU-only graphics shader configuration for readonly storage-buffer rendering.
|
|
9304
|
-
*
|
|
9305
|
-
* Sources use the constrained GLSL ES 3.10 contract. Compilation still runs through the shared
|
|
9306
|
-
* engine GLSL preprocessing and Naga translation path; this object never accepts hand-written
|
|
9307
|
-
* graphics WGSL.
|
|
9308
|
-
*/
|
|
9309
|
-
declare class StorageGraphicsShader {
|
|
9310
|
-
/** Stable diagnostic label, or an empty string. */
|
|
9311
|
-
readonly label: string;
|
|
9312
|
-
/** Immutable GLSL ES 3.10 vertex source. */
|
|
9313
|
-
readonly vertexSource: string;
|
|
9314
|
-
/** Immutable GLSL ES 3.10 fragment source. */
|
|
9315
|
-
readonly fragmentSource: string;
|
|
9316
|
-
/** Immutable bindings in group/binding order. */
|
|
9317
|
-
readonly bindings: readonly ShaderReadBinding[];
|
|
9318
|
-
/** Snapshot a WebGPU-only storage-aware graphics shader contract. */
|
|
9319
|
-
constructor(descriptor: Readonly<StorageGraphicsShaderDescriptor>);
|
|
9320
|
-
}
|
|
9321
|
-
|
|
9322
9897
|
/** Scalar WGSL storage-address-space types supported by {@link StorageLayout}. */
|
|
9323
9898
|
type StorageScalarType = 'f32' | 'i32' | 'u32' | 'atomic<i32>' | 'atomic<u32>';
|
|
9324
9899
|
/** Two-, three-, and four-component WGSL storage vector types. */
|
|
@@ -9408,8 +9983,9 @@ declare const UNIFORM_BLOCK_BINDINGS: Readonly<{
|
|
|
9408
9983
|
readonly GeometryBlock: 6;
|
|
9409
9984
|
readonly SkinningBlock: 7;
|
|
9410
9985
|
readonly MorphBlock: 8;
|
|
9986
|
+
readonly MaterialTextureBlock: 9;
|
|
9411
9987
|
}>;
|
|
9412
|
-
declare const BUILTIN_UNIFORM_BLOCK_BINDING_COUNT =
|
|
9988
|
+
declare const BUILTIN_UNIFORM_BLOCK_BINDING_COUNT = 10;
|
|
9413
9989
|
/** Register an application block before linking programs. Binding points must be globally stable. */
|
|
9414
9990
|
declare function registerUniformBlockBinding(name: string, bindingPoint?: number): number;
|
|
9415
9991
|
declare function getUniformBlockBinding(name: string): number;
|
|
@@ -9420,20 +9996,44 @@ type ForwardRenderInjectionPoint = 'before-shadow' | 'after-shadow' | 'before-op
|
|
|
9420
9996
|
interface ForwardRenderFeatureRequirements extends RenderPipelineRequirements {
|
|
9421
9997
|
/** Route scene color through a linearly filterable sampled graph texture. */
|
|
9422
9998
|
readonly sampledSceneColor: boolean;
|
|
9999
|
+
/** Route scene depth through a single-sample graph texture that feature passes may sample. */
|
|
10000
|
+
readonly sampledDepth: boolean;
|
|
10001
|
+
/** Keep opaque and transparent renderer lists distinct even without a scene-color readback. */
|
|
10002
|
+
readonly splitScene?: boolean;
|
|
9423
10003
|
/**
|
|
9424
|
-
*
|
|
9425
|
-
*
|
|
10004
|
+
* Minimum built-in scene color/depth resolution relative to the physical output. A runtime may
|
|
10005
|
+
* return a higher scale through `getSceneScale()`; conflicting static floors are rejected.
|
|
9426
10006
|
*/
|
|
9427
|
-
readonly
|
|
10007
|
+
readonly sceneScale?: number;
|
|
9428
10008
|
}
|
|
9429
10009
|
/** Renderer-local feature state created by a reusable feature configuration. */
|
|
9430
10010
|
interface ForwardRenderPipelineFeatureRuntime {
|
|
10011
|
+
/** Request sampled scene depth for this frame before Forward allocates its attachments. */
|
|
10012
|
+
requiresSampledDepth?(context: RenderPipelineContext): boolean;
|
|
10013
|
+
/**
|
|
10014
|
+
* Request separate opaque and transparent scene passes for this frame. A conditional boundary
|
|
10015
|
+
* feature is not recorded when every split request is inactive.
|
|
10016
|
+
*/
|
|
10017
|
+
requiresSplitScene?(context: RenderPipelineContext): boolean;
|
|
9431
10018
|
/**
|
|
9432
10019
|
* Record this feature at its configured injection point.
|
|
9433
10020
|
*
|
|
9434
10021
|
* @returns An ignored synchronous value. Promise-like values are rejected before RHI execution.
|
|
9435
10022
|
*/
|
|
9436
10023
|
record(context: ForwardRenderFeatureContext): unknown;
|
|
10024
|
+
/** Commit feature-owned temporal CPU state after a valid frame submission. */
|
|
10025
|
+
frameSubmitted?(frameIndex: number): void;
|
|
10026
|
+
/** Roll back feature-owned temporal CPU state when recording or submission is discarded. */
|
|
10027
|
+
frameDiscarded?(frameIndex: number): void;
|
|
10028
|
+
/**
|
|
10029
|
+
* Return this frame's scene scale. The value must stay between the feature's declared
|
|
10030
|
+
* `sceneScale` floor and one. Omit for fixed-resolution features.
|
|
10031
|
+
*/
|
|
10032
|
+
getSceneScale?(): number;
|
|
10033
|
+
/** Consume asynchronous Render Graph CPU/GPU timing snapshots when adaptive work is enabled. */
|
|
10034
|
+
recordRenderGraphTimeline?(snapshot: Readonly<RenderGraphTimelineSnapshot>): void;
|
|
10035
|
+
/** Enable internal Render Graph timing when this feature actively consumes it. */
|
|
10036
|
+
readonly usesRenderGraphTimeline?: boolean;
|
|
9437
10037
|
/** Release renderer-local feature state exactly once. */
|
|
9438
10038
|
destroy(): void;
|
|
9439
10039
|
}
|
|
@@ -9455,10 +10055,34 @@ interface ForwardRenderPipelineFeature {
|
|
|
9455
10055
|
interface ForwardRenderPipelineResources {
|
|
9456
10056
|
/** Current attachment-zero scene color, or null for a depth-only output. */
|
|
9457
10057
|
readonly color: RenderGraphTextureHandle | null;
|
|
10058
|
+
/** Encoding of the current scene color. Lighting and HDR effects require `linear`. */
|
|
10059
|
+
readonly colorEncoding: RenderColorEncoding;
|
|
9458
10060
|
/** Current scene depth, or null when no depth resource was requested or configured. */
|
|
9459
10061
|
readonly depth: RenderGraphTextureHandle | null;
|
|
10062
|
+
/** Effective opaque render scale relative to the physical output. */
|
|
10063
|
+
readonly sceneScale: number;
|
|
10064
|
+
/** Reusable opaque motion/log-depth texture produced by an earlier feature, if any. */
|
|
10065
|
+
readonly motionDepth: RenderGraphTextureHandle | null;
|
|
10066
|
+
/** Reusable opaque view-normal/material texture produced by an earlier feature, if any. */
|
|
10067
|
+
readonly materialAttributes: RenderGraphTextureHandle | null;
|
|
10068
|
+
/**
|
|
10069
|
+
* Declare that a feature has completely initialized the current opaque depth attachment.
|
|
10070
|
+
* The built-in opaque pass will preserve it instead of clearing it.
|
|
10071
|
+
*/
|
|
10072
|
+
markDepthPrepassed(): void;
|
|
10073
|
+
/**
|
|
10074
|
+
* Bind a full-resolution GTAO visibility texture to the following built-in opaque PBR pass.
|
|
10075
|
+
* May only be called from a `before-opaque` feature after depth has been initialized.
|
|
10076
|
+
*/
|
|
10077
|
+
setAmbientOcclusionTexture(texture: RenderGraphTextureHandle): void;
|
|
10078
|
+
/** Publish opaque motion/log-depth data for later temporal features in this frame. */
|
|
10079
|
+
setMotionDepth(texture: RenderGraphTextureHandle): void;
|
|
10080
|
+
/** Publish opaque view-normal/material data for later screen-space features in this frame. */
|
|
10081
|
+
setMaterialAttributes(texture: RenderGraphTextureHandle): void;
|
|
9460
10082
|
/** Replace attachment-zero scene color for subsequent features and final output. */
|
|
9461
|
-
replaceColor(texture: RenderGraphTextureHandle): void;
|
|
10083
|
+
replaceColor(texture: RenderGraphTextureHandle, encoding: RenderColorEncoding): void;
|
|
10084
|
+
/** Replace scene depth for subsequent scene passes, for example after temporal upscaling. */
|
|
10085
|
+
replaceDepth(texture: RenderGraphTextureHandle): void;
|
|
9462
10086
|
}
|
|
9463
10087
|
/** Callback-scoped inputs passed to one forward feature runtime. */
|
|
9464
10088
|
interface ForwardRenderFeatureContext {
|
|
@@ -9484,8 +10108,9 @@ interface ForwardRenderPipelineFactoryOptions {
|
|
|
9484
10108
|
*/
|
|
9485
10109
|
readonly opaqueTexture?: boolean;
|
|
9486
10110
|
}
|
|
9487
|
-
/** Default forward pipeline factory
|
|
10111
|
+
/** Default forward pipeline factory with a shared linear scene and final surface transfer. */
|
|
9488
10112
|
declare class ForwardRenderPipelineFactory implements RenderPipelineFactory {
|
|
10113
|
+
#private;
|
|
9489
10114
|
/** Stable factory name. */
|
|
9490
10115
|
readonly name = "forward";
|
|
9491
10116
|
/** Merged static requirements from every feature configuration. */
|
|
@@ -9501,6 +10126,724 @@ declare class ForwardRenderPipelineFactory implements RenderPipelineFactory {
|
|
|
9501
10126
|
create(context: RenderPipelineCreateContext): RenderPipeline;
|
|
9502
10127
|
}
|
|
9503
10128
|
|
|
10129
|
+
/** GPU-time-driven dynamic-resolution controls. */
|
|
10130
|
+
interface DynamicResolutionOptions {
|
|
10131
|
+
/** Lowest internal resolution scale. Defaults to 0.5. */
|
|
10132
|
+
readonly minScale?: number;
|
|
10133
|
+
/** Highest internal resolution scale. Defaults to 1. */
|
|
10134
|
+
readonly maxScale?: number;
|
|
10135
|
+
/** Initial scale before enough GPU samples are available. Defaults to `maxScale`. */
|
|
10136
|
+
readonly initialScale?: number;
|
|
10137
|
+
/** Target summed profiled Render Graph render/compute duration in milliseconds. Defaults to 16.667. */
|
|
10138
|
+
readonly targetFrameTimeMs?: number;
|
|
10139
|
+
/** Symmetric no-change band around the target, as a ratio. Defaults to 0.1. */
|
|
10140
|
+
readonly hysteresis?: number;
|
|
10141
|
+
/** EWMA contribution of the newest GPU sample. Defaults to 0.2. */
|
|
10142
|
+
readonly response?: number;
|
|
10143
|
+
/** Quantized scale adjustment applied at each decision. Defaults to 0.05. */
|
|
10144
|
+
readonly scaleStep?: number;
|
|
10145
|
+
/** Successful GPU samples required before the first decision. Defaults to 6. */
|
|
10146
|
+
readonly warmupFrames?: number;
|
|
10147
|
+
/** Minimum GPU samples between scale changes. Defaults to 8. */
|
|
10148
|
+
readonly settlingFrames?: number;
|
|
10149
|
+
}
|
|
10150
|
+
/** Temporal anti-aliasing, temporal upscaling, and optional dynamic-resolution controls. */
|
|
10151
|
+
interface TemporalAAOptions {
|
|
10152
|
+
/**
|
|
10153
|
+
* Internal scene resolution relative to the output. Values below one enable TAAU. When
|
|
10154
|
+
* `dynamicResolution` is present this overrides that object's initial scale.
|
|
10155
|
+
* Defaults to 1 and is constrained to the inclusive range 0.5–1.
|
|
10156
|
+
*/
|
|
10157
|
+
readonly renderScale?: number;
|
|
10158
|
+
/** GPU timestamp driven dynamic resolution. Omit or use false for a fixed render scale. */
|
|
10159
|
+
readonly dynamicResolution?: Readonly<DynamicResolutionOptions> | false;
|
|
10160
|
+
/** Maximum accepted history contribution after rejection. Defaults to 0.92. */
|
|
10161
|
+
readonly historyWeight?: number;
|
|
10162
|
+
/** Maximum relative previous-view-depth error. Defaults to 0.02. */
|
|
10163
|
+
readonly depthThreshold?: number;
|
|
10164
|
+
/** Standard-deviation extent used by YCoCg variance clipping. Defaults to 1.25. */
|
|
10165
|
+
readonly varianceGamma?: number;
|
|
10166
|
+
/** Resolve-only contrast restoration; history remains unsharpened. Defaults to 0.08. */
|
|
10167
|
+
readonly sharpness?: number;
|
|
10168
|
+
}
|
|
10169
|
+
/** Stable adaptive-resolution telemetry for renderer diagnostics. */
|
|
10170
|
+
interface DynamicResolutionDiagnostics {
|
|
10171
|
+
/** Current internal scene resolution relative to the output. */
|
|
10172
|
+
readonly renderScale: number;
|
|
10173
|
+
/** EWMA of accepted profiled Render Graph GPU work, or null before the first sample. */
|
|
10174
|
+
readonly smoothedGPUFrameTimeMs: number | null;
|
|
10175
|
+
/** Number of distinct ready GPU timeline samples accepted by this controller. */
|
|
10176
|
+
readonly sampledFrameCount: number;
|
|
10177
|
+
}
|
|
10178
|
+
/**
|
|
10179
|
+
* Temporal anti-aliasing, temporal upscaling, and GPU-time dynamic-resolution feature.
|
|
10180
|
+
*
|
|
10181
|
+
* The feature records built-in opaque/masked motion and logarithmic view-depth data after opaque
|
|
10182
|
+
* shading, resolves only opaque scene color, then lets transparent rendering and Bloom compose
|
|
10183
|
+
* afterward. History uses submission-aware double buffers and is reset by camera cuts, resize,
|
|
10184
|
+
* projection discontinuities, visibility gaps, or device recovery.
|
|
10185
|
+
*/
|
|
10186
|
+
declare class TemporalAA implements ForwardRenderPipelineFeature {
|
|
10187
|
+
#private;
|
|
10188
|
+
readonly name = "temporal-aa";
|
|
10189
|
+
readonly injectionPoint: "after-opaque";
|
|
10190
|
+
readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
|
|
10191
|
+
constructor(options?: Readonly<TemporalAAOptions>);
|
|
10192
|
+
create(): ForwardRenderPipelineFeatureRuntime;
|
|
10193
|
+
/** Read adaptive-resolution state when this feature is attached to exactly one live Renderer. */
|
|
10194
|
+
readDynamicResolutionDiagnostics(): Readonly<DynamicResolutionDiagnostics>;
|
|
10195
|
+
}
|
|
10196
|
+
|
|
10197
|
+
/** Production controls for the WebGPU high-end hierarchical screen-space reflection path. */
|
|
10198
|
+
interface ScreenSpaceReflectionsOptions {
|
|
10199
|
+
/** Reflection trace resolution relative to the internal scene. Defaults to 0.5. */
|
|
10200
|
+
readonly resolutionScale?: number;
|
|
10201
|
+
/** Maximum view-space ray length. Defaults to 80. */
|
|
10202
|
+
readonly maxRayDistance?: number;
|
|
10203
|
+
/** View-space surface thickness accepted as a hit. Defaults to 0.2. */
|
|
10204
|
+
readonly thickness?: number;
|
|
10205
|
+
/** Minimum view-space distance advanced by the finest hierarchy level. Defaults to 0.12. */
|
|
10206
|
+
readonly stride?: number;
|
|
10207
|
+
/** Maximum hierarchical iterations per reflected pixel. Defaults to 64. */
|
|
10208
|
+
readonly maxSteps?: number;
|
|
10209
|
+
/** Surfaces at or above this perceptual roughness stop tracing. Defaults to 0.85. */
|
|
10210
|
+
readonly roughnessCutoff?: number;
|
|
10211
|
+
/** Width of the screen-edge confidence fade in normalized coordinates. Defaults to 0.08. */
|
|
10212
|
+
readonly edgeFade?: number;
|
|
10213
|
+
/** Maximum accepted temporal history contribution. Defaults to 0.9. */
|
|
10214
|
+
readonly historyWeight?: number;
|
|
10215
|
+
/** Maximum relative reprojected view-depth error. Defaults to 0.03. */
|
|
10216
|
+
readonly depthThreshold?: number;
|
|
10217
|
+
/** Linear HDR multiplier applied to SSR radiance, without scaling fallback removal. Defaults to 1. */
|
|
10218
|
+
readonly intensity?: number;
|
|
10219
|
+
}
|
|
10220
|
+
|
|
10221
|
+
/** Quality preset used when an individual GTAO sampling control is omitted. */
|
|
10222
|
+
type GroundTruthAmbientOcclusionQuality = 'low' | 'medium' | 'high' | 'ultra';
|
|
10223
|
+
/** Normal source used for GTAO horizon integration and edge rejection. */
|
|
10224
|
+
type GroundTruthAmbientOcclusionNormalSource = 'material' | 'geometry' | 'hybrid';
|
|
10225
|
+
/** Production controls for ground-truth ambient occlusion. */
|
|
10226
|
+
interface GroundTruthAmbientOcclusionOptions {
|
|
10227
|
+
/** Sampling preset. Individual resolution/direction/step controls override it. Defaults to high. */
|
|
10228
|
+
readonly quality?: GroundTruthAmbientOcclusionQuality;
|
|
10229
|
+
/** Internal AO resolution relative to opaque rendering. Defaults to the quality preset. */
|
|
10230
|
+
readonly resolutionScale?: number;
|
|
10231
|
+
/** View-space horizon-search radius. Defaults to 2. */
|
|
10232
|
+
readonly radius?: number;
|
|
10233
|
+
/** Fraction of the radius at which distance falloff begins. Defaults to 0.6. */
|
|
10234
|
+
readonly falloffStart?: number;
|
|
10235
|
+
/** View-space self-intersection rejection distance. Defaults to 0.05. */
|
|
10236
|
+
readonly thickness?: number;
|
|
10237
|
+
/** Blend between a thin depth field and a solid occluder. Defaults to 0.5. */
|
|
10238
|
+
readonly thicknessBlend?: number;
|
|
10239
|
+
/** Number of rotated horizon slices per pixel. Defaults to the quality preset. */
|
|
10240
|
+
readonly directionCount?: 2 | 3 | 4 | 6 | 8;
|
|
10241
|
+
/** Samples evaluated on each side of a horizon slice. Defaults to the quality preset. */
|
|
10242
|
+
readonly stepCount?: 3 | 4 | 5 | 6 | 8 | 10 | 12;
|
|
10243
|
+
/** Contrast applied to the physically normalized visibility. Defaults to 1.2. */
|
|
10244
|
+
readonly power?: number;
|
|
10245
|
+
/** Occlusion intensity before contrast. Defaults to 1. */
|
|
10246
|
+
readonly intensity?: number;
|
|
10247
|
+
/** Angular self-occlusion bias in radians. Defaults to 0.035. */
|
|
10248
|
+
readonly bias?: number;
|
|
10249
|
+
/** Radius of the additional contact-occlusion lobe, relative to radius. Defaults to 0.2. */
|
|
10250
|
+
readonly contactRadiusScale?: number;
|
|
10251
|
+
/** Strength of the contact-occlusion lobe. Defaults to 0.35. */
|
|
10252
|
+
readonly contactStrength?: number;
|
|
10253
|
+
/** Normal source used by the horizon search. Defaults to hybrid. */
|
|
10254
|
+
readonly normalSource?: GroundTruthAmbientOcclusionNormalSource;
|
|
10255
|
+
/** Geometric-normal contribution in hybrid mode. Defaults to 0.65. */
|
|
10256
|
+
readonly geometricNormalWeight?: number;
|
|
10257
|
+
/** Strength of bent-normal redirection. Defaults to 1. */
|
|
10258
|
+
readonly bentNormalStrength?: number;
|
|
10259
|
+
/** Strength of color-aware multi-bounce diffuse AO. Defaults to 1. */
|
|
10260
|
+
readonly multiBounce?: number;
|
|
10261
|
+
/** View distance where AO starts fading. Defaults to 100. */
|
|
10262
|
+
readonly distanceFadeStart?: number;
|
|
10263
|
+
/** View distance where AO is fully disabled. Defaults to 200. */
|
|
10264
|
+
readonly distanceFadeEnd?: number;
|
|
10265
|
+
/** Screen-edge fade width in AO pixels. Defaults to 2. */
|
|
10266
|
+
readonly edgeFadePixels?: number;
|
|
10267
|
+
/** Maximum accepted temporal contribution. Defaults to 0.9. */
|
|
10268
|
+
readonly historyWeight?: number;
|
|
10269
|
+
/** Maximum relative reprojected view-depth error. Defaults to 0.03. */
|
|
10270
|
+
readonly depthThreshold?: number;
|
|
10271
|
+
/** Minimum normal agreement accepted by temporal reprojection. Defaults to 0.82. */
|
|
10272
|
+
readonly normalThreshold?: number;
|
|
10273
|
+
}
|
|
10274
|
+
/**
|
|
10275
|
+
* Portable production GTAO for the shared Forward pipeline.
|
|
10276
|
+
*
|
|
10277
|
+
* The feature records opaque depth, material attributes, and motion before shading, evaluates
|
|
10278
|
+
* rotated horizon visibility at configurable resolution, applies submission-aware temporal
|
|
10279
|
+
* rejection and edge-aware filtering, and binds the full-resolution result only to indirect PBR
|
|
10280
|
+
* lighting. Direct lights and emission remain unoccluded.
|
|
10281
|
+
*/
|
|
10282
|
+
declare class GroundTruthAmbientOcclusion implements ForwardRenderPipelineFeature {
|
|
10283
|
+
#private;
|
|
10284
|
+
readonly name = "ground-truth-ambient-occlusion";
|
|
10285
|
+
readonly injectionPoint: "before-opaque";
|
|
10286
|
+
readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
|
|
10287
|
+
constructor(options?: Readonly<GroundTruthAmbientOcclusionOptions>);
|
|
10288
|
+
create(): ForwardRenderPipelineFeatureRuntime;
|
|
10289
|
+
}
|
|
10290
|
+
|
|
10291
|
+
/** Production controls for portable screen-space diffuse global illumination. */
|
|
10292
|
+
interface ScreenSpaceGlobalIlluminationOptions {
|
|
10293
|
+
/** Internal tracing resolution relative to opaque rendering. Defaults to 0.5. */
|
|
10294
|
+
readonly resolutionScale?: number;
|
|
10295
|
+
/** Stochastic hemisphere rays traced per pixel. Defaults to 8. */
|
|
10296
|
+
readonly rayCount?: 4 | 6 | 8 | 12;
|
|
10297
|
+
/** Depth tests performed along each ray. Defaults to 8. */
|
|
10298
|
+
readonly stepCount?: 6 | 8 | 10 | 12;
|
|
10299
|
+
/** Maximum view-space ray distance. Defaults to 4. */
|
|
10300
|
+
readonly maxRayDistance?: number;
|
|
10301
|
+
/** View-space hit thickness used by ray/depth intersection. Defaults to 0.18. */
|
|
10302
|
+
readonly thickness?: number;
|
|
10303
|
+
/** Fraction of the trace distance at which contribution fading begins. Defaults to 0.72. */
|
|
10304
|
+
readonly distanceFadeStart?: number;
|
|
10305
|
+
/** Strength of the diffuse bounce added to linear scene color. Defaults to 1. */
|
|
10306
|
+
readonly intensity?: number;
|
|
10307
|
+
/** Saturation of transported radiance. Defaults to 1.1. */
|
|
10308
|
+
readonly saturation?: number;
|
|
10309
|
+
/** Firefly clamp for transported linear radiance. Defaults to 8. */
|
|
10310
|
+
readonly maxRadiance?: number;
|
|
10311
|
+
/** Maximum accepted temporal contribution. Defaults to 0.92. */
|
|
10312
|
+
readonly historyWeight?: number;
|
|
10313
|
+
/** Maximum relative reprojected view-depth error. Defaults to 0.025. */
|
|
10314
|
+
readonly depthThreshold?: number;
|
|
10315
|
+
/** Minimum normal similarity accepted by reprojection. Defaults to 0.82. */
|
|
10316
|
+
readonly normalThreshold?: number;
|
|
10317
|
+
/** Number of edge-aware a-trous denoise passes. Defaults to 3. */
|
|
10318
|
+
readonly denoisePasses?: 1 | 2 | 3;
|
|
10319
|
+
}
|
|
10320
|
+
/**
|
|
10321
|
+
* Portable production screen-space diffuse global illumination for the shared Forward pipeline.
|
|
10322
|
+
*
|
|
10323
|
+
* The feature traces stochastic view-space rays against opaque depth, transports linear HDR scene
|
|
10324
|
+
* radiance, rejects invalid history using motion/depth/normal data, applies variance clipping and
|
|
10325
|
+
* edge-aware a-trous filtering, then composites the result before transparent rendering.
|
|
10326
|
+
*/
|
|
10327
|
+
declare class ScreenSpaceGlobalIllumination implements ForwardRenderPipelineFeature {
|
|
10328
|
+
#private;
|
|
10329
|
+
readonly name = "screen-space-global-illumination";
|
|
10330
|
+
readonly injectionPoint: "after-opaque";
|
|
10331
|
+
readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
|
|
10332
|
+
constructor(options?: Readonly<ScreenSpaceGlobalIlluminationOptions>);
|
|
10333
|
+
create(): ForwardRenderPipelineFeatureRuntime;
|
|
10334
|
+
}
|
|
10335
|
+
|
|
10336
|
+
/** Named performance/quality presets for froxel reconstruction and light visibility. */
|
|
10337
|
+
type VolumetricLightingQuality = 'low' | 'medium' | 'high' | 'ultra';
|
|
10338
|
+
/** Optional integrated-volume diagnostic shown in place of the composited HDR scene. */
|
|
10339
|
+
type VolumetricLightingDebugView = 'none' | 'radiance' | 'transmittance';
|
|
10340
|
+
/** One world-space spherical local fog-density volume. */
|
|
10341
|
+
interface VolumetricSphereFogVolume {
|
|
10342
|
+
/** Discriminant selecting spherical density evaluation. */
|
|
10343
|
+
readonly shape: 'sphere';
|
|
10344
|
+
/** Mutable world-space center sampled at frame-record time. */
|
|
10345
|
+
readonly center: Readonly<Vector3>;
|
|
10346
|
+
/** Outer sphere radius in world units. */
|
|
10347
|
+
readonly radius: number;
|
|
10348
|
+
/** Density added inside the volume. */
|
|
10349
|
+
readonly density: number;
|
|
10350
|
+
/** Single-scattering albedo tint. Defaults to the global fog albedo. */
|
|
10351
|
+
readonly albedo?: Readonly<Color>;
|
|
10352
|
+
/** Fraction of the radius used for a smooth edge. Defaults to 0.2. */
|
|
10353
|
+
readonly edgeFalloff?: number;
|
|
10354
|
+
}
|
|
10355
|
+
/** One axis-aligned world-space box local fog-density volume. */
|
|
10356
|
+
interface VolumetricBoxFogVolume {
|
|
10357
|
+
/** Discriminant selecting axis-aligned box density evaluation. */
|
|
10358
|
+
readonly shape: 'box';
|
|
10359
|
+
/** Mutable world-space center sampled at frame-record time. */
|
|
10360
|
+
readonly center: Readonly<Vector3>;
|
|
10361
|
+
/** Mutable positive half extent sampled at frame-record time. */
|
|
10362
|
+
readonly halfExtents: Readonly<Vector3>;
|
|
10363
|
+
/** Density added inside the volume. */
|
|
10364
|
+
readonly density: number;
|
|
10365
|
+
/** Single-scattering albedo tint. Defaults to the global fog albedo. */
|
|
10366
|
+
readonly albedo?: Readonly<Color>;
|
|
10367
|
+
/** Fraction of the smallest half extent used for a smooth edge. Defaults to 0.2. */
|
|
10368
|
+
readonly edgeFalloff?: number;
|
|
10369
|
+
}
|
|
10370
|
+
/** Local fog shapes injected into the camera-aligned froxel volume. */
|
|
10371
|
+
type VolumetricFogVolume = VolumetricSphereFogVolume | VolumetricBoxFogVolume;
|
|
10372
|
+
/** Production controls for WebGPU Clustered Forward+ froxel volumetric lighting. */
|
|
10373
|
+
interface VolumetricLightingOptions {
|
|
10374
|
+
/** Preset used for unspecified reconstruction and shadow budgets. Defaults to high. */
|
|
10375
|
+
readonly quality?: VolumetricLightingQuality;
|
|
10376
|
+
/** Froxel XY and reconstruction resolution relative to the internal scene. Defaults to the preset. */
|
|
10377
|
+
readonly resolutionScale?: number;
|
|
10378
|
+
/** Depth-aware screen-space light visibility samples in [0, 8]. Defaults to the preset. */
|
|
10379
|
+
readonly shadowSteps?: number;
|
|
10380
|
+
/** Global extinction density in inverse world units. Defaults to 0.025. */
|
|
10381
|
+
readonly density?: number;
|
|
10382
|
+
/** World-space height at and below which global density is constant. Defaults to 0. */
|
|
10383
|
+
readonly baseHeight?: number;
|
|
10384
|
+
/** Exponential density falloff above baseHeight. Defaults to 0.12. */
|
|
10385
|
+
readonly heightFalloff?: number;
|
|
10386
|
+
/** Maximum integrated view distance in world units. Defaults to 120. */
|
|
10387
|
+
readonly maxDistance?: number;
|
|
10388
|
+
/** Global single-scattering albedo. Defaults to a cool neutral white. */
|
|
10389
|
+
readonly albedo?: Readonly<Color>;
|
|
10390
|
+
/** Henyey-Greenstein anisotropy in [-0.9, 0.9]. Positive values emphasize forward scatter. */
|
|
10391
|
+
readonly anisotropy?: number;
|
|
10392
|
+
/** Ambient light injected into the medium. Defaults to 0.12. */
|
|
10393
|
+
readonly ambientStrength?: number;
|
|
10394
|
+
/** Sub-froxel stochastic sample offset strength in [0, 1]. Defaults to 1. */
|
|
10395
|
+
readonly jitterStrength?: number;
|
|
10396
|
+
/** Maximum temporal history contribution in [0, 0.98]. Defaults to 0.9. */
|
|
10397
|
+
readonly historyWeight?: number;
|
|
10398
|
+
/** Maximum relative scene-depth disagreement accepted during reprojection. Defaults to 0.04. */
|
|
10399
|
+
readonly depthThreshold?: number;
|
|
10400
|
+
/** Optional world-space local fog volumes, limited to 32. */
|
|
10401
|
+
readonly localVolumes?: readonly VolumetricFogVolume[];
|
|
10402
|
+
/** Replace normal composition with an integrated radiance or extinction diagnostic. */
|
|
10403
|
+
readonly debugView?: VolumetricLightingDebugView;
|
|
10404
|
+
}
|
|
10405
|
+
|
|
10406
|
+
/** Luminance-metering pattern used by {@link AutoExposure}. */
|
|
10407
|
+
type AutoExposureMeteringMode = 'average' | 'center-weighted';
|
|
10408
|
+
/** GPU histogram, percentile metering, and eye-adaptation controls. */
|
|
10409
|
+
interface AutoExposureOptions {
|
|
10410
|
+
/** Lowest log2 luminance represented by the histogram. Defaults to -12. */
|
|
10411
|
+
readonly minimumLogLuminance?: number;
|
|
10412
|
+
/** Highest log2 luminance represented by the histogram. Defaults to 16. */
|
|
10413
|
+
readonly maximumLogLuminance?: number;
|
|
10414
|
+
/** Dark-tail percentile excluded from metering in [0, 0.49]. Defaults to 0.02. */
|
|
10415
|
+
readonly lowPercentile?: number;
|
|
10416
|
+
/** Bright-tail percentile retained by metering in [0.51, 1]. Defaults to 0.98. */
|
|
10417
|
+
readonly highPercentile?: number;
|
|
10418
|
+
/** Minimum automatically selected EV in [-15, 15]. Defaults to -8. */
|
|
10419
|
+
readonly minimumEV?: number;
|
|
10420
|
+
/** Maximum automatically selected EV in [-15, 15]. Defaults to 8. */
|
|
10421
|
+
readonly maximumEV?: number;
|
|
10422
|
+
/** Exposure compensation in EV stops. Defaults to 0. */
|
|
10423
|
+
readonly compensation?: number;
|
|
10424
|
+
/** Middle-gray target luminance in [0.01, 0.5]. Defaults to 0.18. */
|
|
10425
|
+
readonly keyValue?: number;
|
|
10426
|
+
/** Adaptation speed when exposure increases, in inverse seconds. Defaults to 1.5. */
|
|
10427
|
+
readonly speedUp?: number;
|
|
10428
|
+
/** Adaptation speed when exposure decreases, in inverse seconds. Defaults to 3. */
|
|
10429
|
+
readonly speedDown?: number;
|
|
10430
|
+
/** Histogram sampling stride in pixels. Defaults to 2. */
|
|
10431
|
+
readonly sampleStride?: number;
|
|
10432
|
+
/** Metering pattern. Defaults to center-weighted. */
|
|
10433
|
+
readonly metering?: AutoExposureMeteringMode;
|
|
10434
|
+
}
|
|
10435
|
+
/** On-demand values written by the latest submitted exposure reduction. */
|
|
10436
|
+
interface AutoExposureDiagnostics {
|
|
10437
|
+
/** Adapted exposure in EV stops. */
|
|
10438
|
+
readonly actualEV: number;
|
|
10439
|
+
/** Histogram-derived target exposure in EV stops. */
|
|
10440
|
+
readonly targetEV: number;
|
|
10441
|
+
/** Percentile-clipped geometric mean luminance. */
|
|
10442
|
+
readonly averageLuminance: number;
|
|
10443
|
+
/** Weighted histogram sample count. */
|
|
10444
|
+
readonly sampleCount: number;
|
|
10445
|
+
}
|
|
10446
|
+
/**
|
|
10447
|
+
* WebGPU histogram auto exposure with percentile clipping and submission-aware eye adaptation.
|
|
10448
|
+
*
|
|
10449
|
+
* The feature records after HDR post-processing and before the display transform, so Bloom and
|
|
10450
|
+
* authored emissive energy share one exposure. It performs no per-frame CPU readback.
|
|
10451
|
+
*/
|
|
10452
|
+
declare class AutoExposure implements ForwardRenderPipelineFeature {
|
|
10453
|
+
#private;
|
|
10454
|
+
readonly name = "auto-exposure";
|
|
10455
|
+
readonly injectionPoint: "after-post-process";
|
|
10456
|
+
readonly requirements: Readonly<{
|
|
10457
|
+
sampledSceneColor: true;
|
|
10458
|
+
sampledDepth: false;
|
|
10459
|
+
requiredCapabilities: readonly ("compute-pass" | "storage-buffer" | "storage-texture")[];
|
|
10460
|
+
requiredTextureFormats: readonly (Readonly<{
|
|
10461
|
+
format: "rgba16float";
|
|
10462
|
+
use: "filterable-sampled";
|
|
10463
|
+
}> | Readonly<{
|
|
10464
|
+
format: "rgba16float";
|
|
10465
|
+
use: "storage";
|
|
10466
|
+
}> | Readonly<{
|
|
10467
|
+
format: "rgba16float";
|
|
10468
|
+
use: "color-attachment";
|
|
10469
|
+
}>)[];
|
|
10470
|
+
requiredLimits: Readonly<{
|
|
10471
|
+
maxBindingsPerBindGroup: 5;
|
|
10472
|
+
maxStorageBuffersPerShaderStage: 3;
|
|
10473
|
+
maxStorageTexturesPerShaderStage: 1;
|
|
10474
|
+
maxSampledTexturesPerShaderStage: 1;
|
|
10475
|
+
maxComputeInvocationsPerWorkgroup: number;
|
|
10476
|
+
}>;
|
|
10477
|
+
}>;
|
|
10478
|
+
constructor(options?: Readonly<AutoExposureOptions>);
|
|
10479
|
+
create(context: RenderPipelineCreateContext): ForwardRenderPipelineFeatureRuntime;
|
|
10480
|
+
/** Read the latest adapted values when attached to exactly one live renderer. */
|
|
10481
|
+
readDiagnostics(): Promise<Readonly<AutoExposureDiagnostics>>;
|
|
10482
|
+
}
|
|
10483
|
+
|
|
10484
|
+
/** GPU receiver-driven shadow-page allocation and directional clipmap controls. */
|
|
10485
|
+
interface VirtualShadowMapOptions {
|
|
10486
|
+
/** Square virtual resolution for every directional clipmap level. Defaults to 4096. */
|
|
10487
|
+
readonly virtualResolution?: number;
|
|
10488
|
+
/** Square physical page edge in pixels. Defaults to 128. */
|
|
10489
|
+
readonly pageSize?: number;
|
|
10490
|
+
/** Shared physical depth-page capacity. Defaults to 32. */
|
|
10491
|
+
readonly physicalPageCount?: number;
|
|
10492
|
+
/** Maximum missing or invalidated pages rendered by one frame. Defaults to 16. */
|
|
10493
|
+
readonly maxPageUpdatesPerFrame?: number;
|
|
10494
|
+
/** Camera-centered directional clipmap levels. Defaults to 4. */
|
|
10495
|
+
readonly directionalClipmapLevels?: number;
|
|
10496
|
+
/** Full world-space width covered by the finest clipmap. Defaults to 64. */
|
|
10497
|
+
readonly firstDirectionalClipmapExtent?: number;
|
|
10498
|
+
}
|
|
10499
|
+
/** On-demand counters copied only when diagnostics are explicitly requested. */
|
|
10500
|
+
interface VirtualShadowMapDiagnostics {
|
|
10501
|
+
/** Unique logical pages requested by the latest submitted receiver pass. */
|
|
10502
|
+
readonly requestedPageCount: number;
|
|
10503
|
+
/** Physical pages whose depth contents were refreshed by the latest submitted frame. */
|
|
10504
|
+
readonly renderedPageCount: number;
|
|
10505
|
+
/** Requested or dirty pages postponed by the configured update/physical-page budgets. */
|
|
10506
|
+
readonly deferredPageCount: number;
|
|
10507
|
+
/** Valid physical residency records retained after the latest submitted allocation. */
|
|
10508
|
+
readonly residentPageCount: number;
|
|
10509
|
+
/** Resident physical pages remapped to another logical identity. */
|
|
10510
|
+
readonly evictionCount: number;
|
|
10511
|
+
/** Unique logical pages touched by changed caster coverage. */
|
|
10512
|
+
readonly invalidatedPageCount: number;
|
|
10513
|
+
/** Configured physical depth-page capacity. */
|
|
10514
|
+
readonly physicalPageCapacity: number;
|
|
10515
|
+
/** Configured camera-centered clipmap levels per directional light. */
|
|
10516
|
+
readonly directionalClipmapLevelCount: number;
|
|
10517
|
+
}
|
|
10518
|
+
|
|
10519
|
+
/** Rendering budgets for the physical atmosphere and volumetric clouds. */
|
|
10520
|
+
type AtmosphereWeatherQuality = 'low' | 'medium' | 'high' | 'ultra';
|
|
10521
|
+
/** Optional diagnostic texture shown in place of the weather composition. */
|
|
10522
|
+
type AtmosphereWeatherDebugView = 'none' | 'transmittance' | 'multi-scattering' | 'sky-view' | 'weather-map' | 'cloud-radiance' | 'cloud-transmittance' | 'cloud-shadow';
|
|
10523
|
+
/**
|
|
10524
|
+
* Mutable state sampled by the weather renderer at frame-record time.
|
|
10525
|
+
*
|
|
10526
|
+
* Updating these values does not recreate pipelines. Call `invalidateHistory()` after a
|
|
10527
|
+
* discontinuous preset or time-of-day jump; continuous animation may update `timeSeconds` and
|
|
10528
|
+
* `sunDirection` every frame without resetting history.
|
|
10529
|
+
*/
|
|
10530
|
+
declare class AtmosphereWeatherState {
|
|
10531
|
+
#private;
|
|
10532
|
+
/** Normalized world-space direction from the scene toward the sun. */
|
|
10533
|
+
readonly sunDirection: Vector3;
|
|
10534
|
+
/** Procedural weather animation time in seconds. */
|
|
10535
|
+
timeSeconds: number;
|
|
10536
|
+
/** Fractional cloud coverage in [0, 1]. */
|
|
10537
|
+
cloudCoverage: number;
|
|
10538
|
+
/** Cloud optical-density multiplier in [0, 4]. */
|
|
10539
|
+
cloudDensity: number;
|
|
10540
|
+
/** Cumulonimbus/storm shaping in [0, 1]. */
|
|
10541
|
+
storminess: number;
|
|
10542
|
+
/** Horizontal wind direction; Y is ignored. */
|
|
10543
|
+
readonly windDirection: Vector3;
|
|
10544
|
+
/** Wind speed in world units per second. */
|
|
10545
|
+
windSpeed: number;
|
|
10546
|
+
/** Monotonic discontinuity revision consumed by temporal cloud history. */
|
|
10547
|
+
get historyRevision(): number;
|
|
10548
|
+
/** Reset cloud temporal history after a discontinuous authored state change. */
|
|
10549
|
+
invalidateHistory(): this;
|
|
10550
|
+
}
|
|
10551
|
+
/** Rayleigh, Mie, ozone, sun, and aerial-perspective configuration. */
|
|
10552
|
+
interface PhysicalAtmosphereOptions {
|
|
10553
|
+
/** Planet radius in world units. Defaults to 6,360,000. */
|
|
10554
|
+
readonly planetRadius?: number;
|
|
10555
|
+
/** Atmosphere height above the planet surface. Defaults to 100,000. */
|
|
10556
|
+
readonly atmosphereHeight?: number;
|
|
10557
|
+
/** World-space planet center. Defaults to `(0, -planetRadius, 0)`. */
|
|
10558
|
+
readonly planetCenter?: Readonly<Vector3>;
|
|
10559
|
+
/** Rayleigh density scale height. Defaults to 8,000. */
|
|
10560
|
+
readonly rayleighScaleHeight?: number;
|
|
10561
|
+
/** Mie density scale height. Defaults to 1,200. */
|
|
10562
|
+
readonly mieScaleHeight?: number;
|
|
10563
|
+
/** Mie phase anisotropy in [0, 0.95]. Defaults to 0.8. */
|
|
10564
|
+
readonly mieAnisotropy?: number;
|
|
10565
|
+
/** Ozone layer center altitude. Defaults to 25,000. */
|
|
10566
|
+
readonly ozoneCenterHeight?: number;
|
|
10567
|
+
/** Ozone triangular half-width. Defaults to 15,000. */
|
|
10568
|
+
readonly ozoneWidth?: number;
|
|
10569
|
+
/** Solar illuminance multiplier. Defaults to 20. */
|
|
10570
|
+
readonly sunIlluminance?: number;
|
|
10571
|
+
/** Linear sun tint. Defaults to warm white. */
|
|
10572
|
+
readonly sunColor?: Readonly<Color>;
|
|
10573
|
+
/** Angular sun-disc radius in degrees. Defaults to 0.27. */
|
|
10574
|
+
readonly sunAngularRadius?: number;
|
|
10575
|
+
/** Maximum aerial-perspective distance. Defaults to 160,000. */
|
|
10576
|
+
readonly aerialPerspectiveDistance?: number;
|
|
10577
|
+
/** Ground albedo used by the multi-scattering approximation. */
|
|
10578
|
+
readonly groundAlbedo?: Readonly<Color>;
|
|
10579
|
+
}
|
|
10580
|
+
/** Procedural weather map, cloud shell, ray-march, lighting, and temporal controls. */
|
|
10581
|
+
interface VolumetricCloudOptions {
|
|
10582
|
+
/** Cloud-base altitude above the planet surface. Defaults to 1,500. */
|
|
10583
|
+
readonly baseHeight?: number;
|
|
10584
|
+
/** Cloud-layer thickness. Defaults to 8,500. */
|
|
10585
|
+
readonly thickness?: number;
|
|
10586
|
+
/** Horizontal weather-map scale in world units. Defaults to 120,000. */
|
|
10587
|
+
readonly weatherScale?: number;
|
|
10588
|
+
/** Detail-noise scale in world units. Defaults to 7,000. */
|
|
10589
|
+
readonly detailScale?: number;
|
|
10590
|
+
/** Cloud-light forward-scattering anisotropy. Defaults to 0.72. */
|
|
10591
|
+
readonly anisotropy?: number;
|
|
10592
|
+
/** Silver-lining strength in [0, 4]. Defaults to 1.25. */
|
|
10593
|
+
readonly silverLining?: number;
|
|
10594
|
+
/** Ambient sky-light strength in [0, 4]. Defaults to 0.65. */
|
|
10595
|
+
readonly ambientStrength?: number;
|
|
10596
|
+
/** Temporal history contribution in [0, 0.98]. Defaults to 0.92. */
|
|
10597
|
+
readonly historyWeight?: number;
|
|
10598
|
+
/** Screen-space cloud-shadow coverage in world units. Defaults to 80,000. */
|
|
10599
|
+
readonly shadowDistance?: number;
|
|
10600
|
+
}
|
|
10601
|
+
/** Complete physical atmosphere, cloud, and mutable weather-state configuration. */
|
|
10602
|
+
interface AtmosphereWeatherOptions {
|
|
10603
|
+
/** Named sampling and reconstruction budget. Defaults to high. */
|
|
10604
|
+
readonly quality?: AtmosphereWeatherQuality;
|
|
10605
|
+
/** Mutable sun, cloud, wind, and time state. */
|
|
10606
|
+
readonly state?: AtmosphereWeatherState;
|
|
10607
|
+
/** Physical atmosphere constants. */
|
|
10608
|
+
readonly atmosphere?: Readonly<PhysicalAtmosphereOptions>;
|
|
10609
|
+
/** Volumetric clouds, or false to render atmosphere only. */
|
|
10610
|
+
readonly clouds?: Readonly<VolumetricCloudOptions> | false;
|
|
10611
|
+
/** Replace normal composition with one intermediate diagnostic. */
|
|
10612
|
+
readonly debugView?: AtmosphereWeatherDebugView;
|
|
10613
|
+
}
|
|
10614
|
+
|
|
10615
|
+
/** One lower-detail geometry selected when its projected bounding radius is small enough. */
|
|
10616
|
+
interface GPUSceneLOD {
|
|
10617
|
+
/** Indexed triangle geometry with float32 position/normal and any material-required UV/tangent streams. */
|
|
10618
|
+
readonly geometry: Geometry;
|
|
10619
|
+
/** Maximum projected radius in physical pixels at which this LOD is selected. */
|
|
10620
|
+
readonly maximumProjectedRadius: number;
|
|
10621
|
+
}
|
|
10622
|
+
/** One material/geometry family consumed by the GPU Scene fixed-bucket indirect path. */
|
|
10623
|
+
interface GPUSceneBucket {
|
|
10624
|
+
/** Highest-detail indexed triangle geometry. */
|
|
10625
|
+
readonly geometry: Geometry;
|
|
10626
|
+
/**
|
|
10627
|
+
* Opaque or alpha-masked built-in metallic/roughness PBR material evaluated by the shared
|
|
10628
|
+
* surface/BRDF contract. Base-color, opacity, metallic, roughness, combined
|
|
10629
|
+
* metallic-roughness, occlusion, emission, and normal maps support UV0/UV1 and material UV
|
|
10630
|
+
* matrices. Layered extensions, custom compilation, parallax/environment inputs, blending,
|
|
10631
|
+
* alpha-to-coverage, and non-default depth modes fail closed.
|
|
10632
|
+
*/
|
|
10633
|
+
readonly material: PBRMaterial;
|
|
10634
|
+
/** Optional coarse levels ordered from smallest to largest projected-radius threshold. */
|
|
10635
|
+
readonly lods?: readonly GPUSceneLOD[];
|
|
10636
|
+
}
|
|
10637
|
+
/** One concrete scene shader topology requested before the first application frame. */
|
|
10638
|
+
interface ClusteredMaterialVariantManifestEntry {
|
|
10639
|
+
/** Exemplar carrying the exact geometry deformation and PBR material topology. */
|
|
10640
|
+
readonly mesh: Mesh;
|
|
10641
|
+
/** Also warm the receive-shadow variant. Defaults to the exemplar's current setting. */
|
|
10642
|
+
readonly shadowed?: boolean;
|
|
10643
|
+
}
|
|
10644
|
+
/** Bounded startup manifest for clustered scene shader translation and diagnostics. */
|
|
10645
|
+
interface ClusteredMaterialVariantManifest {
|
|
10646
|
+
/** Exact mesh/material exemplars whose native clustered variants are required at startup. */
|
|
10647
|
+
readonly entries: readonly Readonly<ClusteredMaterialVariantManifestEntry>[];
|
|
10648
|
+
/** Maximum unique native scene variants, including runtime discoveries. Defaults to 64. */
|
|
10649
|
+
readonly maxVariants?: number;
|
|
10650
|
+
/** Variants translated before yielding back to renderer initialization. Defaults to 4. */
|
|
10651
|
+
readonly warmupBatchSize?: number;
|
|
10652
|
+
}
|
|
10653
|
+
/** Construction options for the WebGPU high-end GPU Scene and Clustered Forward+ pipeline. */
|
|
10654
|
+
interface ClusteredForwardPlusPipelineOptions {
|
|
10655
|
+
/**
|
|
10656
|
+
* GPU Scene bucket families. Compatible opaque and alpha-masked meshes match by identity;
|
|
10657
|
+
* other scene meshes remain renderable through the shared Forward compatibility path.
|
|
10658
|
+
*/
|
|
10659
|
+
readonly buckets: readonly GPUSceneBucket[];
|
|
10660
|
+
/**
|
|
10661
|
+
* Stable fixed-bucket GPU Scene object capacity. Compatible excess PBR uses the direct native
|
|
10662
|
+
* clustered lane; unsupported content uses Forward compatibility. Defaults to 16,384.
|
|
10663
|
+
*/
|
|
10664
|
+
readonly maxObjects?: number;
|
|
10665
|
+
/** GPU light-database capacity. Extra traversal-order lights are deterministically dropped. */
|
|
10666
|
+
readonly maxLights?: number;
|
|
10667
|
+
/** Global cluster light-index budget. Defaults to 1,048,576 indices. */
|
|
10668
|
+
readonly maxLightIndices?: number;
|
|
10669
|
+
/** Per-cluster allocation ceiling. Defaults to 96. */
|
|
10670
|
+
readonly maxLightsPerCluster?: number;
|
|
10671
|
+
/** Cluster tile width and height in physical pixels. Defaults to 32. */
|
|
10672
|
+
readonly tileSize?: number;
|
|
10673
|
+
/** Logarithmic view-depth slice count. Defaults to 24. */
|
|
10674
|
+
readonly zSlices?: number;
|
|
10675
|
+
/** Largest supported physical output width. Defaults to 2560. */
|
|
10676
|
+
readonly maxViewportWidth?: number;
|
|
10677
|
+
/** Largest supported physical output height. Defaults to 1440. */
|
|
10678
|
+
readonly maxViewportHeight?: number;
|
|
10679
|
+
/** Enable previous-frame Hi-Z occlusion. Defaults to true. */
|
|
10680
|
+
readonly hiZ?: boolean;
|
|
10681
|
+
/**
|
|
10682
|
+
* GPU receiver-driven virtual directional shadows with arbitrary page-table remapping and
|
|
10683
|
+
* camera-centered clipmaps. Requires `hiZ`; disabled by default.
|
|
10684
|
+
*/
|
|
10685
|
+
readonly virtualShadows?: Readonly<VirtualShadowMapOptions> | false;
|
|
10686
|
+
/** Bloom contribution mixed into the final display transform. Defaults to 0.7. */
|
|
10687
|
+
readonly bloomStrength?: number;
|
|
10688
|
+
/** Exposure multiplier applied before the ACES display transform. Defaults to 1. */
|
|
10689
|
+
readonly exposure?: number;
|
|
10690
|
+
/** HDR display curve. Defaults to ACES; filmic preserves a softer storm-sky shoulder. */
|
|
10691
|
+
readonly toneMapping?: 'aces' | 'filmic';
|
|
10692
|
+
/** GPU luminance histogram and temporal eye adaptation. Disabled by default. */
|
|
10693
|
+
readonly autoExposure?: Readonly<AutoExposureOptions> | false;
|
|
10694
|
+
/**
|
|
10695
|
+
* Physical Rayleigh/Mie/ozone atmosphere, aerial perspective, procedural volumetric clouds,
|
|
10696
|
+
* and cloud shadows. Disabled by default.
|
|
10697
|
+
*/
|
|
10698
|
+
readonly atmosphere?: Readonly<AtmosphereWeatherOptions> | false;
|
|
10699
|
+
/** Integrated temporal AA/TAAU. Disabled by default; `false` explicitly disables it. */
|
|
10700
|
+
readonly temporalAA?: Readonly<TemporalAAOptions> | false;
|
|
10701
|
+
/**
|
|
10702
|
+
* Integrated ground-truth ambient occlusion. Disabled by default. The GPU Scene path reuses
|
|
10703
|
+
* temporal motion data and therefore requires `temporalAA` when enabled.
|
|
10704
|
+
*/
|
|
10705
|
+
readonly groundTruthAmbientOcclusion?: Readonly<GroundTruthAmbientOcclusionOptions> | false;
|
|
10706
|
+
/**
|
|
10707
|
+
* Temporally accumulated screen-space diffuse global illumination. Disabled by default.
|
|
10708
|
+
* The GPU Scene path reuses motion and material attributes and therefore requires `temporalAA`.
|
|
10709
|
+
*/
|
|
10710
|
+
readonly screenSpaceGlobalIllumination?: Readonly<ScreenSpaceGlobalIlluminationOptions> | false;
|
|
10711
|
+
/**
|
|
10712
|
+
* Hierarchical, temporally accumulated screen-space reflections. Disabled by default.
|
|
10713
|
+
* Enabling this production path requires both `hiZ` and `temporalAA`.
|
|
10714
|
+
*/
|
|
10715
|
+
readonly screenSpaceReflections?: Readonly<ScreenSpaceReflectionsOptions> | false;
|
|
10716
|
+
/**
|
|
10717
|
+
* Camera-aligned froxel fog and volumetric local-light scattering. Disabled by default.
|
|
10718
|
+
* This WebGPU path uses the complete 3D cluster light grid and submission-aware history.
|
|
10719
|
+
*/
|
|
10720
|
+
readonly volumetricLighting?: Readonly<VolumetricLightingOptions> | false;
|
|
10721
|
+
/** Optional bounded material/deformation topology manifest translated during async creation. */
|
|
10722
|
+
readonly variantManifest?: Readonly<ClusteredMaterialVariantManifest>;
|
|
10723
|
+
}
|
|
10724
|
+
/** On-demand GPU counters plus current CPU database occupancy. */
|
|
10725
|
+
interface ClusteredForwardPlusDiagnostics {
|
|
10726
|
+
/** Ordinary registered meshes currently occupying stable GPU Scene slots. */
|
|
10727
|
+
readonly objectCount: number;
|
|
10728
|
+
/** Visible-layer meshes routed through the shared Forward compatibility fallback. */
|
|
10729
|
+
readonly fallbackObjectCount: number;
|
|
10730
|
+
/** Alpha-blended PBR meshes shaded from the Clustered Forward+ light database. */
|
|
10731
|
+
readonly clusteredTransparentObjectCount: number;
|
|
10732
|
+
/** Non-bucket opaque PBR meshes using native clustered lighting with shared deformation. */
|
|
10733
|
+
readonly clusteredDeformedObjectCount: number;
|
|
10734
|
+
/** Enabled supported lights uploaded to the current GPU light database. */
|
|
10735
|
+
readonly lightCount: number;
|
|
10736
|
+
/** Enabled supported lights rejected by the configured light capacity. */
|
|
10737
|
+
readonly droppedLightCount: number;
|
|
10738
|
+
/** Objects written to a fixed visible bucket by the most recent submitted cull. */
|
|
10739
|
+
readonly visibleObjectCount: number;
|
|
10740
|
+
/** Objects rejected by conservative previous-frame Hi-Z occlusion. */
|
|
10741
|
+
readonly occludedObjectCount: number;
|
|
10742
|
+
/** Visible objects that selected a lower-detail geometry bucket. */
|
|
10743
|
+
readonly lodObjectCount: number;
|
|
10744
|
+
/** Light indices retained by the bounded cluster allocator. */
|
|
10745
|
+
readonly clusterLightIndexCount: number;
|
|
10746
|
+
/** Light-index entries truncated by per-cluster or global allocation limits. */
|
|
10747
|
+
readonly clusterOverflowCount: number;
|
|
10748
|
+
/** Whether conservative occlusion used a valid previous-frame Hi-Z pyramid. */
|
|
10749
|
+
readonly hiZValid: boolean;
|
|
10750
|
+
/** Current internal scene scale selected by fixed or dynamic temporal rendering. */
|
|
10751
|
+
readonly renderScale: number;
|
|
10752
|
+
/** Smoothed profiled Render Graph render/compute GPU time, or null before samples are ready. */
|
|
10753
|
+
readonly smoothedGPUFrameTimeMs: number | null;
|
|
10754
|
+
/** Number of camera-aligned froxels injected by the latest submitted volumetric frame. */
|
|
10755
|
+
readonly volumetricFroxelCount: number;
|
|
10756
|
+
/** Whether the latest submitted volumetric resolve consumed temporal history. */
|
|
10757
|
+
readonly volumetricHistoryUsed: boolean;
|
|
10758
|
+
/** Eight-by-eight SSR trace tiles containing at least one eligible receiver. */
|
|
10759
|
+
readonly screenSpaceReflectionActiveTileCount: number;
|
|
10760
|
+
/** Eligible SSR receiver pixels classified by the latest submitted frame. */
|
|
10761
|
+
readonly screenSpaceReflectionActivePixelCount: number;
|
|
10762
|
+
/** Eligible SSR receiver pixels that produced a valid screen-space hit. */
|
|
10763
|
+
readonly screenSpaceReflectionHitPixelCount: number;
|
|
10764
|
+
/** Eligible SSR receiver pixels that missed or left the screen. */
|
|
10765
|
+
readonly screenSpaceReflectionMissPixelCount: number;
|
|
10766
|
+
/** SSR misses whose hierarchy crossing could not be validated precisely. */
|
|
10767
|
+
readonly screenSpaceReflectionUncertainPixelCount: number;
|
|
10768
|
+
/** SSR candidates rejected because the hit surface faced away from the ray. */
|
|
10769
|
+
readonly screenSpaceReflectionBackfaceRejectedPixelCount: number;
|
|
10770
|
+
/** SSR temporal pixels that consumed valid surface- or hit-domain history. */
|
|
10771
|
+
readonly screenSpaceReflectionHistoryAcceptedPixelCount: number;
|
|
10772
|
+
/** SSR temporal pixels that rejected every available history candidate. */
|
|
10773
|
+
readonly screenSpaceReflectionHistoryRejectedPixelCount: number;
|
|
10774
|
+
/** Latest adapted exposure in EV stops, or zero when auto exposure is disabled. */
|
|
10775
|
+
readonly autoExposureEV: number;
|
|
10776
|
+
/** Latest histogram-derived target exposure in EV stops, or zero when disabled. */
|
|
10777
|
+
readonly autoExposureTargetEV: number;
|
|
10778
|
+
/** Unique manifest variants translated before renderer creation completed. */
|
|
10779
|
+
readonly warmedMaterialVariantCount: number;
|
|
10780
|
+
/** Unique native variants admitted by the configured runtime budget. */
|
|
10781
|
+
readonly activeMaterialVariantCount: number;
|
|
10782
|
+
/** Runtime candidates rejected after the unique variant budget was exhausted. */
|
|
10783
|
+
readonly materialVariantBudgetExceededCount: number;
|
|
10784
|
+
/** Configured unique clustered scene-variant ceiling. */
|
|
10785
|
+
readonly materialVariantBudget: number;
|
|
10786
|
+
/** CPU translation wall time spent in asynchronous warmup. */
|
|
10787
|
+
readonly materialVariantWarmupTimeMs: number;
|
|
10788
|
+
/** Latest on-demand virtual-shadow counters, or null when virtual shadows are disabled. */
|
|
10789
|
+
readonly virtualShadows: Readonly<VirtualShadowMapDiagnostics> | null;
|
|
10790
|
+
}
|
|
10791
|
+
/**
|
|
10792
|
+
* WebGPU-only high-end factory combining G0 GPU Scene/Hi-Z and L0 Clustered Forward+.
|
|
10793
|
+
*
|
|
10794
|
+
* Compatible registered bucket meshes bypass CPU frustum sorting and ordinary PreparedDraw
|
|
10795
|
+
* creation. Fixed indirect buckets accept opaque, unskinned, indexed triangle PBR geometry;
|
|
10796
|
+
* eligible deformed, layered, and globally sorted transparent PBR meshes use the native direct
|
|
10797
|
+
* storage-lighting lane. Material surface evaluation and the BRDF are shared with ordinary Forward
|
|
10798
|
+
* PBR; clustered variants replace only light-list selection and iteration. Unregistered meshes,
|
|
10799
|
+
* runtime-incompatible state, mixed compatibility-transparent queues, and object-capacity overflow
|
|
10800
|
+
* use the shared Forward path in the same frame.
|
|
10801
|
+
* Invalid initial bucket declarations and unsupported devices still fail closed.
|
|
10802
|
+
*/
|
|
10803
|
+
declare class ClusteredForwardPlusPipelineFactory implements RenderPipelineFactory {
|
|
10804
|
+
#private;
|
|
10805
|
+
/** Stable diagnostic label for renderer initialization and graph tooling. */
|
|
10806
|
+
readonly name = "GPU Scene + Clustered Forward+";
|
|
10807
|
+
/** Fail-closed WebGPU capabilities, limits, and texture formats required by this profile. */
|
|
10808
|
+
readonly requirements: Readonly<RenderPipelineRequirements>;
|
|
10809
|
+
constructor(options: Readonly<ClusteredForwardPlusPipelineOptions>);
|
|
10810
|
+
/** Create one independent renderer-local GPU Scene and clustered-lighting runtime. */
|
|
10811
|
+
create(context: RenderPipelineCreateContext): Promise<RenderPipeline>;
|
|
10812
|
+
/** Read on-demand GPU counters when this factory is attached to exactly one live Renderer. */
|
|
10813
|
+
readDiagnostics(): Promise<Readonly<ClusteredForwardPlusDiagnostics>>;
|
|
10814
|
+
}
|
|
10815
|
+
|
|
10816
|
+
/** Process-global symbol used by optional addons to attach renderer behavior across package copies. */
|
|
10817
|
+
declare const RENDER_NODE_EXTENSION: unique symbol;
|
|
10818
|
+
/** GPU graph contribution owned by an optional scene-node addon. */
|
|
10819
|
+
interface RenderNodeGPUExtension {
|
|
10820
|
+
/** Whether this contribution has an opaque or alpha-masked phase. */
|
|
10821
|
+
readonly hasOpaqueRenderers: boolean;
|
|
10822
|
+
/** Whether simulation or raster needs the current sampled scene depth. */
|
|
10823
|
+
readonly requiresSampledDepth: boolean;
|
|
10824
|
+
/** Whether graph work must run even when the contribution is outside the camera. */
|
|
10825
|
+
readonly hasPendingWork: boolean;
|
|
10826
|
+
/** Test view visibility without issuing render commands. */
|
|
10827
|
+
isVisible(camera: Camera): boolean;
|
|
10828
|
+
/** Record one opaque or transparent contribution through the active Render Graph. */
|
|
10829
|
+
record(context: RenderPipelineContext, color: RenderGraphTextureHandle, depth: RenderGraphTextureHandle | null, drawVisible: boolean, phase: 'opaque' | 'transparent'): void;
|
|
10830
|
+
/** Commit staged state only after the enclosing frame submission succeeds. */
|
|
10831
|
+
frameSubmitted(frameIndex: number): void;
|
|
10832
|
+
/** Roll back staged state after recording or submission is discarded. */
|
|
10833
|
+
frameDiscarded(frameIndex: number): void;
|
|
10834
|
+
}
|
|
10835
|
+
/** Optional render lifecycle implemented by addon-owned scene nodes. */
|
|
10836
|
+
interface RenderNodeExtension {
|
|
10837
|
+
/** Allocate or recover renderer-local resources before node updates and graph recording. */
|
|
10838
|
+
prepareRenderer?(renderer: RendererContract): void;
|
|
10839
|
+
/** Refresh camera-dependent streams before scene collection. */
|
|
10840
|
+
prepareView?(camera: Camera): void;
|
|
10841
|
+
/** Active GPU contribution, or `null` when this node uses ordinary scene rendering only. */
|
|
10842
|
+
readonly gpu: RenderNodeGPUExtension | null;
|
|
10843
|
+
}
|
|
10844
|
+
/** Read and validate an optional render-node extension without importing its addon package. */
|
|
10845
|
+
declare function getRenderNodeExtension(node: Node): RenderNodeExtension | null;
|
|
10846
|
+
|
|
9504
10847
|
/** One graph-buffer range consumed by a storage binding. */
|
|
9505
10848
|
interface ComputeBufferBinding {
|
|
9506
10849
|
/** Frame-scoped graph buffer handle. */
|
|
@@ -9513,7 +10856,7 @@ interface ComputeBufferBinding {
|
|
|
9513
10856
|
/** One graph texture consumed by a sampled- or storage-texture binding. */
|
|
9514
10857
|
interface ComputeTextureBinding {
|
|
9515
10858
|
/** Complete single-sample two-dimensional graph texture subresource. */
|
|
9516
|
-
readonly texture:
|
|
10859
|
+
readonly texture: RenderGraphTextureAccessHandle;
|
|
9517
10860
|
}
|
|
9518
10861
|
/** A whole std140 uniform buffer or one explicitly selected range. */
|
|
9519
10862
|
type ComputeUniformBufferBinding = UniformBuffer | UniformBufferRange;
|
|
@@ -9634,7 +10977,7 @@ declare class Shader {
|
|
|
9634
10977
|
* @param fog - fog
|
|
9635
10978
|
* @param useLogDepth - 是否使用对数深度
|
|
9636
10979
|
*/
|
|
9637
|
-
static getHeaderKey(mesh: Mesh, material:
|
|
10980
|
+
static getHeaderKey(mesh: Mesh, material: MaterialInstance, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, role?: MaterialPassRole): string;
|
|
9638
10981
|
/**
|
|
9639
10982
|
* 获取header
|
|
9640
10983
|
* @param mesh -
|
|
@@ -9642,7 +10985,7 @@ declare class Shader {
|
|
|
9642
10985
|
* @param lightManager -
|
|
9643
10986
|
* @param fog -
|
|
9644
10987
|
*/
|
|
9645
|
-
static getHeader(mesh: Mesh, material:
|
|
10988
|
+
static getHeader(mesh: Mesh, material: MaterialInstance, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, role?: MaterialPassRole): string;
|
|
9646
10989
|
private static getHeaderVariant;
|
|
9647
10990
|
private static trackHeaderVariantKey;
|
|
9648
10991
|
private static trackShaderVariant;
|
|
@@ -9657,15 +11000,16 @@ declare class Shader {
|
|
|
9657
11000
|
* @param useLogDepth -
|
|
9658
11001
|
* @param renderer - Renderer precision provider used to build the portable shader preamble.
|
|
9659
11002
|
* @param linearOutput - Keep lighting in linear HDR space for floating-point scene targets.
|
|
11003
|
+
* @param groundTruthAmbientOcclusion - Sample the pass-global GTAO visibility in PBR shading.
|
|
9660
11004
|
*/
|
|
9661
|
-
static getShader(mesh: Mesh, material:
|
|
11005
|
+
static getShader(mesh: Mesh, material: MaterialInstance, isUseInstance: boolean, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, renderer?: ShaderPrecisionProvider, linearOutput?: boolean, role?: MaterialPassRole, groundTruthAmbientOcclusion?: boolean): Shader | null;
|
|
9662
11006
|
/**
|
|
9663
11007
|
* 获取基础 shader
|
|
9664
11008
|
* @param material -
|
|
9665
11009
|
* @param isUseInstance -
|
|
9666
11010
|
* @param header - 已生成的 shader 宏定义
|
|
9667
11011
|
*/
|
|
9668
|
-
static getBasicShader(material:
|
|
11012
|
+
static getBasicShader(material: MaterialInstance, isUseInstance: boolean, header: string, renderer?: ShaderPrecisionProvider, role?: MaterialPassRole): Shader;
|
|
9669
11013
|
private static getNumericId;
|
|
9670
11014
|
/**
|
|
9671
11015
|
* 获取自定义shader
|
|
@@ -9705,14 +11049,14 @@ interface FullscreenRenderPassOptions {
|
|
|
9705
11049
|
/** GLSL ES 3.00 shader with no vertex attributes. */
|
|
9706
11050
|
readonly shader: Shader;
|
|
9707
11051
|
/** Fixed raster, depth, blend, and culling state. */
|
|
9708
|
-
readonly
|
|
11052
|
+
readonly pipelineState: Readonly<MaterialPipelineState>;
|
|
9709
11053
|
/** std140 buffers in reflected uniform-block order. */
|
|
9710
11054
|
readonly uniformBuffers?: readonly UniformBuffer[];
|
|
9711
11055
|
}
|
|
9712
11056
|
/** Frame-scoped graph resources and dynamic state for one fullscreen draw. */
|
|
9713
11057
|
interface FullscreenRenderPassParameters {
|
|
9714
|
-
/**
|
|
9715
|
-
readonly inputTextures: readonly
|
|
11058
|
+
/** Sampled textures in reflected sampler order; numeric depth uses nearest sampling. */
|
|
11059
|
+
readonly inputTextures: readonly RenderGraphTextureAccessHandle[];
|
|
9716
11060
|
/** Color attachments in fragment-output location order. */
|
|
9717
11061
|
readonly colorAttachments: readonly Readonly<RenderPipelineColorAttachment>[];
|
|
9718
11062
|
/** Optional depth/stencil attachment. */
|
|
@@ -9728,8 +11072,9 @@ interface FullscreenRenderPassParameters {
|
|
|
9728
11072
|
* Draws a `gl_VertexID` fullscreen triangle with graph textures resolved during prepare.
|
|
9729
11073
|
*
|
|
9730
11074
|
* The vertex shader must declare no vertex attributes. GLSL samplers and registered std140
|
|
9731
|
-
* blocks are matched to the fixed arrays captured by this pass instance.
|
|
9732
|
-
*
|
|
11075
|
+
* blocks are matched to the fixed arrays captured by this pass instance. Color inputs use the
|
|
11076
|
+
* shared linear sampler; ordinary depth inputs are specialized to numeric depth and use the
|
|
11077
|
+
* shared non-filtering sampler on both rendering backends.
|
|
9733
11078
|
*/
|
|
9734
11079
|
declare class FullscreenRenderPass implements ScriptableRenderPass<FullscreenRenderPassParameters> {
|
|
9735
11080
|
/** Stable diagnostic pass name. */
|
|
@@ -9737,7 +11082,7 @@ declare class FullscreenRenderPass implements ScriptableRenderPass<FullscreenRen
|
|
|
9737
11082
|
/** Shader compiled through the shared GLSL-to-backend pipeline. */
|
|
9738
11083
|
readonly shader: Shader;
|
|
9739
11084
|
/** Fixed material state for the fullscreen triangle. */
|
|
9740
|
-
readonly
|
|
11085
|
+
readonly pipelineState: Readonly<MaterialPipelineState>;
|
|
9741
11086
|
/** Uniform buffers in reflected block order. */
|
|
9742
11087
|
readonly uniformBuffers: readonly UniformBuffer[];
|
|
9743
11088
|
constructor(options: Readonly<FullscreenRenderPassOptions>);
|
|
@@ -9794,7 +11139,7 @@ interface GPUDrivenRenderPassOptions {
|
|
|
9794
11139
|
/** WebGPU storage-aware GLSL ES 3.10 graphics shader. */
|
|
9795
11140
|
readonly shader: StorageGraphicsShader;
|
|
9796
11141
|
/** Raster/depth/blend state only; resource bindings come from pass parameters. */
|
|
9797
|
-
readonly
|
|
11142
|
+
readonly pipelineState: Readonly<MaterialPipelineState>;
|
|
9798
11143
|
/** Immutable positional vertex-buffer ABI; omit for vertex pulling. */
|
|
9799
11144
|
readonly vertexLayouts?: readonly GPUDrivenVertexBufferLayout[];
|
|
9800
11145
|
/** Index format required by indexed indirect draws. */
|
|
@@ -9839,7 +11184,7 @@ declare class GPUDrivenRenderPass implements ScriptableRenderPass<GPUDrivenRende
|
|
|
9839
11184
|
/** Immutable storage-aware graphics shader. */
|
|
9840
11185
|
readonly shader: StorageGraphicsShader;
|
|
9841
11186
|
/** Material supplying raster, depth, stencil, and blend state. */
|
|
9842
|
-
readonly
|
|
11187
|
+
readonly pipelineState: Readonly<MaterialPipelineState>;
|
|
9843
11188
|
/** Snapshotted positional vertex-buffer ABI. */
|
|
9844
11189
|
readonly vertexLayouts: readonly Readonly<GPUDrivenVertexBufferLayout>[];
|
|
9845
11190
|
/** Index format for indexed indirect draws, when configured. */
|
|
@@ -9871,8 +11216,15 @@ interface SceneStorageBufferBinding {
|
|
|
9871
11216
|
* explicit: it does not automatically rewrite built-in Basic/PBR shader source.
|
|
9872
11217
|
*/
|
|
9873
11218
|
interface SceneStorageShaderVariant {
|
|
9874
|
-
/**
|
|
11219
|
+
/** Default storage-aware shader and the canonical pass-global storage ABI. */
|
|
9875
11220
|
readonly shader: StorageGraphicsShader;
|
|
11221
|
+
/**
|
|
11222
|
+
* Optional exact per-mesh variants applied without splitting the renderer list. This preserves
|
|
11223
|
+
* global transparent sorting while allowing geometry/material topology to select its compiled
|
|
11224
|
+
* shader. Every mapped shader must expose the same group-three readonly-storage ABI as
|
|
11225
|
+
* the default shader.
|
|
11226
|
+
*/
|
|
11227
|
+
readonly shaderByMesh?: ReadonlyMap<Mesh, StorageGraphicsShader>;
|
|
9876
11228
|
/** Positional ranges matching the shader's sorted readonly-storage binding order. */
|
|
9877
11229
|
readonly buffers: readonly Readonly<SceneStorageBufferBinding>[];
|
|
9878
11230
|
}
|
|
@@ -9894,7 +11246,13 @@ interface SceneRenderPassParameters {
|
|
|
9894
11246
|
* Opaque scene color sampled by transmission/volume materials in this pass. The graph keeps
|
|
9895
11247
|
* this input distinct from the active color attachment, preventing raster feedback.
|
|
9896
11248
|
*/
|
|
9897
|
-
readonly opaqueTexture?:
|
|
11249
|
+
readonly opaqueTexture?: RenderGraphTextureAccessHandle;
|
|
11250
|
+
/**
|
|
11251
|
+
* Screen-space ambient visibility sampled by built-in opaque PBR materials in this pass.
|
|
11252
|
+
* This pass-global input is mutually exclusive with `opaqueTexture`; opaque shading
|
|
11253
|
+
* consumes GTAO while later transmission shading consumes the captured opaque color.
|
|
11254
|
+
*/
|
|
11255
|
+
readonly ambientOcclusionTexture?: RenderGraphTextureAccessHandle;
|
|
9898
11256
|
/** Optional WebGPU-only storage-aware shader variant for the ordinary renderer-list path. */
|
|
9899
11257
|
readonly storageShaderVariant?: Readonly<SceneStorageShaderVariant>;
|
|
9900
11258
|
}
|
|
@@ -9933,14 +11291,14 @@ declare class ShadowRenderPass {
|
|
|
9933
11291
|
record(context: RenderPipelineContext, parameters: Readonly<ShadowRenderPassParameters>): void;
|
|
9934
11292
|
}
|
|
9935
11293
|
|
|
9936
|
-
/** Full-subresource
|
|
11294
|
+
/** Full selected-subresource copy parameters. Views may have different parent descriptors. */
|
|
9937
11295
|
interface TextureCopyPassParameters {
|
|
9938
11296
|
/** Initialized single-sample copy source. */
|
|
9939
|
-
readonly source:
|
|
11297
|
+
readonly source: RenderGraphTextureAccessHandle;
|
|
9940
11298
|
/** Same-format, same-extent single-sample copy destination. */
|
|
9941
|
-
readonly destination:
|
|
11299
|
+
readonly destination: RenderGraphTextureAccessHandle;
|
|
9942
11300
|
}
|
|
9943
|
-
/** Portable full-
|
|
11301
|
+
/** Portable full selected-subresource copy pass emitted through the selected RHI backend. */
|
|
9944
11302
|
declare class TextureCopyPass implements ScriptableRenderPass<TextureCopyPassParameters> {
|
|
9945
11303
|
/** Stable diagnostic pass name. */
|
|
9946
11304
|
readonly name: string;
|
|
@@ -9997,7 +11355,7 @@ declare class Bloom implements ForwardRenderPipelineFeature {
|
|
|
9997
11355
|
}
|
|
9998
11356
|
|
|
9999
11357
|
/** Display tone-mapping operator used by {@link ColorUber}. */
|
|
10000
|
-
type ToneMappingMode = 'pbr-neutral' | 'aces' | 'reinhard' | 'none';
|
|
11358
|
+
type ToneMappingMode = 'pbr-neutral' | 'aces' | 'reinhard' | 'filmic' | 'none';
|
|
10001
11359
|
/** Linear-HDR color grading and display transform settings. */
|
|
10002
11360
|
interface ColorUberOptions {
|
|
10003
11361
|
/** Exposure compensation in EV stops. */
|
|
@@ -10023,6 +11381,16 @@ interface ColorUberOptions {
|
|
|
10023
11381
|
readonly vignetteIntensity?: number;
|
|
10024
11382
|
readonly vignetteSmoothness?: number;
|
|
10025
11383
|
readonly toneMapping?: ToneMappingMode;
|
|
11384
|
+
/** Filmic mid-tone slope multiplier in [0.01, 4]. */
|
|
11385
|
+
readonly filmicSlope?: number;
|
|
11386
|
+
/** Filmic toe strength in [0, 1]. */
|
|
11387
|
+
readonly filmicToe?: number;
|
|
11388
|
+
/** Filmic shoulder strength in [0, 1]. */
|
|
11389
|
+
readonly filmicShoulder?: number;
|
|
11390
|
+
/** Filmic black clipping offset in [0, 0.25]. */
|
|
11391
|
+
readonly filmicBlackClip?: number;
|
|
11392
|
+
/** Filmic white clipping amount in [0, 0.25]. */
|
|
11393
|
+
readonly filmicWhiteClip?: number;
|
|
10026
11394
|
readonly dithering?: boolean;
|
|
10027
11395
|
}
|
|
10028
11396
|
/**
|
|
@@ -10053,8 +11421,16 @@ declare class ColorUber implements ForwardRenderPipelineFeature {
|
|
|
10053
11421
|
|
|
10054
11422
|
/** Turnkey HDR forward/post-processing pipeline configuration. */
|
|
10055
11423
|
interface PostProcessRenderPipelineOptions {
|
|
11424
|
+
/** Ground-truth ambient occlusion settings, or false to omit GTAO. */
|
|
11425
|
+
readonly groundTruthAmbientOcclusion?: Readonly<GroundTruthAmbientOcclusionOptions> | false;
|
|
11426
|
+
/** Screen-space diffuse global illumination settings, or false to omit SSGI. */
|
|
11427
|
+
readonly screenSpaceGlobalIllumination?: Readonly<ScreenSpaceGlobalIlluminationOptions> | false;
|
|
11428
|
+
/** Temporal anti-aliasing/upscaling settings, or false to omit the temporal pass. */
|
|
11429
|
+
readonly temporalAA?: Readonly<TemporalAAOptions> | false;
|
|
10056
11430
|
/** Bloom settings, or false to omit bloom. Bloom is enabled by default. */
|
|
10057
11431
|
readonly bloom?: Readonly<BloomOptions> | false;
|
|
11432
|
+
/** GPU histogram eye adaptation, or false to keep manual exposure. */
|
|
11433
|
+
readonly autoExposure?: Readonly<AutoExposureOptions> | false;
|
|
10058
11434
|
/** Final color grading/tone mapping settings. */
|
|
10059
11435
|
readonly colorUber?: Readonly<ColorUberOptions>;
|
|
10060
11436
|
/** Capture opaque scene color for transmission and volume. Defaults to true. */
|
|
@@ -10063,7 +11439,8 @@ interface PostProcessRenderPipelineOptions {
|
|
|
10063
11439
|
readonly features?: readonly ForwardRenderPipelineFeature[];
|
|
10064
11440
|
}
|
|
10065
11441
|
/**
|
|
10066
|
-
* Turnkey linear-HDR forward pipeline with high-quality bloom, Color Uber,
|
|
11442
|
+
* Turnkey linear-HDR forward pipeline with optional GTAO/TAA, high-quality bloom, Color Uber,
|
|
11443
|
+
* and opaque scene color.
|
|
10067
11444
|
*/
|
|
10068
11445
|
declare class PostProcessRenderPipelineFactory implements RenderPipelineFactory {
|
|
10069
11446
|
#private;
|
|
@@ -10327,91 +11704,43 @@ declare class LazyTexture extends Texture {
|
|
|
10327
11704
|
}
|
|
10328
11705
|
|
|
10329
11706
|
type BasicLightType = 'NONE' | 'PHONG' | 'BLINN-PHONG' | 'LAMBERT';
|
|
10330
|
-
|
|
10331
|
-
|
|
10332
|
-
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
|
|
10337
|
-
|
|
10338
|
-
|
|
10339
|
-
|
|
10340
|
-
|
|
10341
|
-
|
|
10342
|
-
|
|
10343
|
-
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
|
|
10347
|
-
|
|
10348
|
-
|
|
10349
|
-
|
|
10350
|
-
|
|
10351
|
-
*/
|
|
10352
|
-
declare class BasicMaterial extends Material {
|
|
10353
|
-
isBasicMaterial: boolean;
|
|
11707
|
+
type MaterialColorOrTextureInput = Color | Texture<unknown> | MaterialTextureSlotInput | null;
|
|
11708
|
+
interface BasicMaterialParameters extends MaterialInstanceParameters {
|
|
11709
|
+
readonly lightType?: BasicLightType;
|
|
11710
|
+
readonly diffuse?: MaterialColorOrTextureInput;
|
|
11711
|
+
readonly ambient?: MaterialColorOrTextureInput;
|
|
11712
|
+
readonly specular?: MaterialColorOrTextureInput;
|
|
11713
|
+
readonly emission?: MaterialColorOrTextureInput;
|
|
11714
|
+
readonly specularEnvMap?: MaterialTexture | MaterialTextureSlotInput | null;
|
|
11715
|
+
readonly specularEnvMatrix?: Matrix4 | null;
|
|
11716
|
+
readonly reflectivity?: number;
|
|
11717
|
+
readonly refractRatio?: number;
|
|
11718
|
+
readonly refractivity?: number;
|
|
11719
|
+
readonly shininess?: number;
|
|
11720
|
+
readonly frontFace?: MaterialFrontFace;
|
|
11721
|
+
readonly cullMode?: MaterialCullMode;
|
|
11722
|
+
readonly state?: Partial<Readonly<MaterialPipelineState>>;
|
|
11723
|
+
}
|
|
11724
|
+
/** Built-in Blinn/Phong/Lambert or unlit material instance. */
|
|
11725
|
+
declare class BasicMaterial extends MaterialInstance {
|
|
11726
|
+
#private;
|
|
11727
|
+
readonly isBasicMaterial = true;
|
|
10354
11728
|
readonly className: string;
|
|
10355
|
-
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
|
|
10360
|
-
|
|
10361
|
-
|
|
10362
|
-
|
|
10363
|
-
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10370
|
-
specular: MaterialTextureValue;
|
|
10371
|
-
/**
|
|
10372
|
-
* 放射光贴图,或颜色
|
|
10373
|
-
*/
|
|
10374
|
-
emission: MaterialTextureValue;
|
|
10375
|
-
/**
|
|
10376
|
-
* 环境贴图
|
|
10377
|
-
*/
|
|
10378
|
-
specularEnvMap: MaterialTexture | null;
|
|
10379
|
-
/**
|
|
10380
|
-
* 环境贴图变化矩阵,如旋转等
|
|
10381
|
-
*/
|
|
10382
|
-
specularEnvMatrix: Matrix4 | null;
|
|
10383
|
-
/**
|
|
10384
|
-
* 反射率
|
|
10385
|
-
*/
|
|
10386
|
-
reflectivity: number;
|
|
10387
|
-
/**
|
|
10388
|
-
* 折射比率
|
|
10389
|
-
*/
|
|
10390
|
-
refractRatio: number;
|
|
10391
|
-
/**
|
|
10392
|
-
* 折射率
|
|
10393
|
-
*/
|
|
10394
|
-
refractivity: number;
|
|
10395
|
-
/**
|
|
10396
|
-
* 高光发光值
|
|
10397
|
-
*/
|
|
10398
|
-
shininess: number;
|
|
10399
|
-
usedUniformVectors: number;
|
|
10400
|
-
/**
|
|
10401
|
-
* @param params - 初始化参数,所有params都会复制到实例上
|
|
10402
|
-
* - `params.lightType`: 光照类型,支持: NONE, PHONG, BLINN-PHONG, LAMBERT
|
|
10403
|
-
* - `params.diffuse`: 漫反射贴图,或颜色
|
|
10404
|
-
* - `params.ambient`: 环境光贴图,或颜色
|
|
10405
|
-
* - `params.specular`: 镜面贴图,或颜色
|
|
10406
|
-
* - `params.emission`: 放射光贴图,或颜色
|
|
10407
|
-
* - `params.specularEnvMap`: 环境贴图
|
|
10408
|
-
* - `params.specularEnvMatrix`: 环境贴图变化矩阵,如旋转等
|
|
10409
|
-
* - `params.reflectivity`: 反射率
|
|
10410
|
-
* - `params.refractRatio`: 折射比率
|
|
10411
|
-
* - `params.refractivity`: 折射率
|
|
10412
|
-
* - `params.shininess`: 高光发光值
|
|
10413
|
-
*/
|
|
10414
|
-
constructor(params?: BasicMaterialParameters);
|
|
11729
|
+
readonly diffuse: MaterialTextureValue;
|
|
11730
|
+
readonly ambient: MaterialTextureValue;
|
|
11731
|
+
readonly specular: MaterialTextureValue;
|
|
11732
|
+
readonly emission: MaterialTextureValue;
|
|
11733
|
+
readonly specularEnvMap: MaterialTexture | null;
|
|
11734
|
+
readonly specularEnvMatrix: Matrix4 | null;
|
|
11735
|
+
constructor(params?: Readonly<BasicMaterialParameters>);
|
|
11736
|
+
get reflectivity(): number;
|
|
11737
|
+
set reflectivity(value: number);
|
|
11738
|
+
get refractRatio(): number;
|
|
11739
|
+
set refractRatio(value: number);
|
|
11740
|
+
get refractivity(): number;
|
|
11741
|
+
set refractivity(value: number);
|
|
11742
|
+
get shininess(): number;
|
|
11743
|
+
set shininess(value: number);
|
|
10415
11744
|
protected initializeBasicMaterialBindings(): void;
|
|
10416
11745
|
getRenderOption(option?: ShaderOptions): ShaderOptions;
|
|
10417
11746
|
}
|
|
@@ -10434,38 +11763,90 @@ declare namespace Hilo {
|
|
|
10434
11763
|
}
|
|
10435
11764
|
|
|
10436
11765
|
type GeometryVertexType = typeof POSITION | typeof NORMAL | typeof DEPTH$1 | typeof DISTANCE;
|
|
10437
|
-
interface GeometryMaterialParameters extends
|
|
10438
|
-
vertexType?: GeometryVertexType;
|
|
10439
|
-
writeOriginData?: boolean;
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
declare class GeometryMaterial extends BasicMaterial {
|
|
10451
|
-
isGeometryMaterial: boolean;
|
|
10452
|
-
readonly className: string;
|
|
10453
|
-
/**
|
|
10454
|
-
* 顶点类型 POSITION, NORMAL, DEPTH, DISTANCE
|
|
10455
|
-
*/
|
|
10456
|
-
vertexType: GeometryVertexType;
|
|
10457
|
-
lightType: "NONE";
|
|
10458
|
-
/**
|
|
10459
|
-
* 是否直接存储
|
|
10460
|
-
*/
|
|
10461
|
-
writeOriginData: boolean;
|
|
10462
|
-
/**
|
|
10463
|
-
* @param params - 初始化参数,所有params都会复制到实例上
|
|
10464
|
-
*/
|
|
10465
|
-
constructor(params?: GeometryMaterialParameters);
|
|
11766
|
+
interface GeometryMaterialParameters extends MaterialInstanceParameters {
|
|
11767
|
+
readonly vertexType?: GeometryVertexType;
|
|
11768
|
+
readonly writeOriginData?: boolean;
|
|
11769
|
+
readonly frontFace?: MaterialFrontFace;
|
|
11770
|
+
readonly cullMode?: MaterialCullMode;
|
|
11771
|
+
}
|
|
11772
|
+
/** Immutable-topology material for position, normal, depth and distance outputs. */
|
|
11773
|
+
declare class GeometryMaterial extends MaterialInstance {
|
|
11774
|
+
readonly isGeometryMaterial = true;
|
|
11775
|
+
readonly className = "GeometryMaterial";
|
|
11776
|
+
readonly vertexType: GeometryVertexType;
|
|
11777
|
+
readonly writeOriginData: boolean;
|
|
11778
|
+
constructor(params?: Readonly<GeometryMaterialParameters>);
|
|
10466
11779
|
getRenderOption(option?: ShaderOptions): ShaderOptions;
|
|
10467
11780
|
}
|
|
10468
11781
|
|
|
11782
|
+
/** Stable MaterialBlock texture-slot indices shared by built-in families and shader source. */
|
|
11783
|
+
declare const MATERIAL_TEXTURE_SLOT_COUNT = 24;
|
|
11784
|
+
declare const MaterialTextureSlot: Readonly<{
|
|
11785
|
+
readonly NORMAL: 0;
|
|
11786
|
+
readonly PARALLAX: 1;
|
|
11787
|
+
readonly EMISSION: 2;
|
|
11788
|
+
readonly OPACITY: 3;
|
|
11789
|
+
readonly DIFFUSE: 4;
|
|
11790
|
+
readonly SPECULAR: 5;
|
|
11791
|
+
readonly AMBIENT: 6;
|
|
11792
|
+
readonly BASE_COLOR: 7;
|
|
11793
|
+
readonly METALLIC: 8;
|
|
11794
|
+
readonly ROUGHNESS: 9;
|
|
11795
|
+
readonly METALLIC_ROUGHNESS: 10;
|
|
11796
|
+
readonly OCCLUSION: 11;
|
|
11797
|
+
readonly SPECULAR_GLOSSINESS: 12;
|
|
11798
|
+
readonly LIGHT: 13;
|
|
11799
|
+
readonly CLEARCOAT: 14;
|
|
11800
|
+
readonly CLEARCOAT_ROUGHNESS: 15;
|
|
11801
|
+
readonly CLEARCOAT_NORMAL: 16;
|
|
11802
|
+
readonly ANISOTROPY: 17;
|
|
11803
|
+
readonly TRANSMISSION: 18;
|
|
11804
|
+
readonly THICKNESS: 19;
|
|
11805
|
+
readonly IRIDESCENCE: 20;
|
|
11806
|
+
readonly IRIDESCENCE_THICKNESS: 21;
|
|
11807
|
+
readonly DIFFUSE_ENVIRONMENT: 22;
|
|
11808
|
+
readonly SPECULAR_ENVIRONMENT: 23;
|
|
11809
|
+
}>;
|
|
11810
|
+
type BuiltInMaterialTextureSlotName = keyof typeof MaterialTextureSlot;
|
|
11811
|
+
|
|
11812
|
+
interface MaterialTargetSignature {
|
|
11813
|
+
readonly colorFormats: readonly (string | null)[];
|
|
11814
|
+
readonly depthStencilFormat: string | null;
|
|
11815
|
+
readonly sampleCount: number;
|
|
11816
|
+
}
|
|
11817
|
+
interface MaterialCompileRequest {
|
|
11818
|
+
readonly instance: MaterialInstance;
|
|
11819
|
+
readonly role: MaterialPassRole;
|
|
11820
|
+
readonly target: Readonly<MaterialTargetSignature>;
|
|
11821
|
+
readonly vertexLayoutClass: string;
|
|
11822
|
+
readonly renderingProfile: MaterialRenderingProfile;
|
|
11823
|
+
readonly backend: RendererBackend;
|
|
11824
|
+
}
|
|
11825
|
+
interface PreparedMaterialVariant {
|
|
11826
|
+
readonly definitionId: string;
|
|
11827
|
+
readonly materialId: number;
|
|
11828
|
+
readonly role: MaterialPassRole;
|
|
11829
|
+
readonly shader: MaterialShaderModule;
|
|
11830
|
+
readonly fragmentOutput: MaterialFragmentOutput;
|
|
11831
|
+
readonly state: Readonly<MaterialPipelineState>;
|
|
11832
|
+
readonly key: string;
|
|
11833
|
+
}
|
|
11834
|
+
/** Canonical immutable blend equations shared by materials and low-level render passes. */
|
|
11835
|
+
declare const MaterialBlendPreset: Readonly<{
|
|
11836
|
+
PREMULTIPLIED_ALPHA: Readonly<MaterialBlendState>;
|
|
11837
|
+
STRAIGHT_ALPHA: Readonly<MaterialBlendState>;
|
|
11838
|
+
PREMULTIPLIED_ADDITIVE: Readonly<MaterialBlendState>;
|
|
11839
|
+
STRAIGHT_ALPHA_ADDITIVE: Readonly<MaterialBlendState>;
|
|
11840
|
+
}>;
|
|
11841
|
+
/** Resolve the backend-neutral state for a material role before RHI descriptor mapping. */
|
|
11842
|
+
declare function resolveMaterialPassState(instance: MaterialInstance, role: MaterialPassRole): Readonly<MaterialPipelineState> | null;
|
|
11843
|
+
/** Resolve a declared semantic pass or an explicitly safe depth/shadow fallback. */
|
|
11844
|
+
declare function resolveMaterialPassDefinition(instance: MaterialInstance, role: MaterialPassRole): MaterialPassDefinition | null;
|
|
11845
|
+
/** Compiles immutable definition structure and one semantic role into a stable draw variant. */
|
|
11846
|
+
declare class MaterialCompiler {
|
|
11847
|
+
compile(request: Readonly<MaterialCompileRequest>): PreparedMaterialVariant | null;
|
|
11848
|
+
}
|
|
11849
|
+
|
|
10469
11850
|
interface SemanticRenderer {
|
|
10470
11851
|
width: number;
|
|
10471
11852
|
height: number;
|
|
@@ -10476,7 +11857,7 @@ interface SemanticMesh extends Mesh {
|
|
|
10476
11857
|
isSkinnedMesh: boolean;
|
|
10477
11858
|
getJointMat(): Float32Array;
|
|
10478
11859
|
}
|
|
10479
|
-
interface SemanticMaterial extends
|
|
11860
|
+
interface SemanticMaterial extends MaterialInstance {
|
|
10480
11861
|
baseColor: Color;
|
|
10481
11862
|
baseColorMap: Texture | null;
|
|
10482
11863
|
brdfLUT: Texture | null;
|
|
@@ -10584,12 +11965,15 @@ declare const semantic: {
|
|
|
10584
11965
|
TEXCOORD_1: {
|
|
10585
11966
|
get(mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10586
11967
|
};
|
|
10587
|
-
|
|
10588
|
-
get(
|
|
11968
|
+
MATERIALTEXTURETRANSFORMS: {
|
|
11969
|
+
get(_mesh: SemanticMesh, material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10589
11970
|
};
|
|
10590
|
-
|
|
11971
|
+
MATERIALTEXTUREINFO: {
|
|
10591
11972
|
get(mesh: SemanticMesh, material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10592
11973
|
};
|
|
11974
|
+
MATERIALTEXTURECHANNELS: {
|
|
11975
|
+
get(_mesh: SemanticMesh, material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
11976
|
+
};
|
|
10593
11977
|
CAMERAFAR: {
|
|
10594
11978
|
get(_mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10595
11979
|
};
|
|
@@ -10634,6 +12018,11 @@ declare const semantic: {
|
|
|
10634
12018
|
isDependMesh: boolean;
|
|
10635
12019
|
notSupportInstanced: boolean;
|
|
10636
12020
|
};
|
|
12021
|
+
MODELLAYERPARAMS: {
|
|
12022
|
+
get(mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): Uint32Array;
|
|
12023
|
+
isDependMesh: boolean;
|
|
12024
|
+
notSupportInstanced: boolean;
|
|
12025
|
+
};
|
|
10637
12026
|
VIEW: {
|
|
10638
12027
|
get(_mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10639
12028
|
};
|
|
@@ -10882,11 +12271,14 @@ declare const semantic: {
|
|
|
10882
12271
|
ALPHACUTOFF: {
|
|
10883
12272
|
get(mesh: SemanticMesh, material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10884
12273
|
};
|
|
12274
|
+
TEMPORALREACTIVEFACTOR: {
|
|
12275
|
+
get(_mesh: SemanticMesh, material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
12276
|
+
};
|
|
10885
12277
|
EXPOSURE: {
|
|
10886
|
-
get(
|
|
12278
|
+
get(_mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10887
12279
|
};
|
|
10888
12280
|
GAMMAFACTOR: {
|
|
10889
|
-
get(
|
|
12281
|
+
get(_mesh: SemanticMesh, _material: SemanticMaterial, _programInfo: ProgramBindingInfo): unknown;
|
|
10890
12282
|
};
|
|
10891
12283
|
MORPHWEIGHTS: {
|
|
10892
12284
|
isDependMesh: boolean;
|
|
@@ -10942,6 +12334,9 @@ declare const semantic: {
|
|
|
10942
12334
|
OPAQUETEXTURE: {
|
|
10943
12335
|
get(): unknown;
|
|
10944
12336
|
};
|
|
12337
|
+
GTAOTEXTURE: {
|
|
12338
|
+
get(): unknown;
|
|
12339
|
+
};
|
|
10945
12340
|
};
|
|
10946
12341
|
|
|
10947
12342
|
interface AxisHelperParameters extends NodeParameters {
|
|
@@ -11092,6 +12487,7 @@ declare class MeshPicker {
|
|
|
11092
12487
|
/** Active renderer owned by this picker's Stage. */
|
|
11093
12488
|
readonly renderer: Renderer;
|
|
11094
12489
|
private renderTarget;
|
|
12490
|
+
private renderTargetDepthMode;
|
|
11095
12491
|
private readonly idMeshMap;
|
|
11096
12492
|
private operation;
|
|
11097
12493
|
private destroyed;
|
|
@@ -13612,6 +15008,6 @@ declare const math: {
|
|
|
13612
15008
|
nextPowerOfTwo(value: number): number;
|
|
13613
15009
|
};
|
|
13614
15010
|
|
|
13615
|
-
export { AmbientLight, Animation, AnimationStates, AreaLight, AxisHelper, AxisNetHelper, BUILTIN_UNIFORM_BLOCK_BINDING_COUNT, BasicLoader, BasicMaterial, Bloom, BoxGeometry, Cache, Camera, Camera2D, CameraHelper, Color, ColorUber, ComputeKernel, ComputeRenderPass, ComputeSampler, ComputeShader, CubeTexture, CubeTextureLoader, DEFAULT_2D_LAYER, DataTexture, DirectionalLight, Euler, EulerNotifier, EventDispatcher, Fog, ForwardRenderPipelineFactory, Frustum, FullscreenRenderPass, GLTFExtensions_d as GLTFExtensions, GLTFLoader, GLTFParser, GPUDrivenRenderPass, Geometry, GeometryData, GeometryMaterial, HDRLoader, HiloEvent, KTXLoader, LazyTexture, Light, LightManager, LoadCache, LoadQueue, LoadState, Loader, LogLevel, Logger,
|
|
13616
|
-
export type { AccessorArray, AmbientLightParameters, AnimationClip, AnimationInterpolationType, AnimationParameters, AnimationStateHandler, AnimationStateType, AnimationStatesParameters, AnimationTimeRange, AreaLightInfo, AreaLightParameters, AxisAlignedBox, AxisHelperParameters, AxisNetHelperParameters, BackEaseObject, BasicLightType, BasicLoadRequest, BasicLoaderResource, BasicMaterialParameters, BasicResource, BasicResourceType, BloomOptions, Bounds, BoxGeometryParameters, BrowserFeatures, BuiltInAnimationStateType, Camera2DParameters, CameraHelperParameters, CameraParameters, ColorUberOptions, ComputeBufferBinding, ComputeDispatch, ComputeKernelDescriptor, ComputePipelineConstant, ComputeRenderPassParameters, ComputeSamplerAddressMode, ComputeSamplerDescriptor, ComputeSamplerFilterMode, ComputeShaderBinding, ComputeShaderDescriptor, ComputeStorageBufferAccess, ComputeStorageTextureFormat, ComputeStorageTextureViewDimension, ComputeTextureBinding, ComputeTextureSampleType, ComputeTextureViewDimension, ComputeUniformBufferBinding, CubeTextureImage, CubeTextureLoadRequest, CubeTextureParameters, CullingOptions, CullingResultsHandle, CustomRenderOptionProvider, DataTextureParameters, DirectionalLightInfo, DirectionalLightParameters, DispatchEvent, ElasticEaseObject, EulerOrder, EventListener, FogMode, FogParameters, ForwardRenderFeatureContext, ForwardRenderFeatureRequirements, ForwardRenderInjectionPoint, ForwardRenderPipelineFactoryOptions, ForwardRenderPipelineFeature, ForwardRenderPipelineFeatureRuntime, ForwardRenderPipelineResources, FullscreenRenderPassOptions, FullscreenRenderPassParameters, GLTFAccessor, GLTFAccessorResult, GLTFAccessorType, GLTFAnimation, GLTFAnimationChannel, GLTFAnimationClipsExtension, GLTFAnimationSampler, GLTFAnimationTarget, GLTFAnisotropyExtension, GLTFAsset, GLTFBoundingBoxExtension, GLTFBounds, GLTFBuffer, GLTFBufferView, GLTFBufferViewRuntime, GLTFCamera, GLTFClearcoatExtension, GLTFCollection, GLTFComponentType, GLTFExtensionHandler, GLTFExtensionHandlerRegistry, GLTFExtensionMap, GLTFExtensionMethodName, GLTFExtensionOptions, GLTFImage, GLTFIndex, GLTFIorExtension, GLTFIridescenceExtension, GLTFLoadRequest, GLTFMaterial, GLTFMaterialValue, GLTFMaterialsCommonExtension, GLTFMesh, GLTFModel, GLTFMorphTarget, GLTFNode, GLTFOrthographicCamera, GLTFPBRMetallicRoughness, GLTFPBRSpecularGlossinessExtension, GLTFParserParameters, GLTFPerspectiveCamera, GLTFPrimitive, GLTFProgram, GLTFProgressivePrimitiveState, GLTFProperty, GLTFPunctualLight, GLTFPunctualLightNodeExtension, GLTFPunctualLightsExtension, GLTFPunctualSpotLight, GLTFQuantizedAttributesExtension, GLTFResourceLoader, GLTFRoot, GLTFSampler, GLTFScene, GLTFShader, GLTFSkin, GLTFSparseAccessor, GLTFSparseIndices, GLTFSparseValues, GLTFTechnique, GLTFTechniqueBinding, GLTFTechniqueStates, GLTFTexture, GLTFTextureInfo, GLTFTextureTransformExtension, GLTFTransmissionExtension, GLTFVolumeExtension, GPUDrivenDraw, GPUDrivenRenderPassOptions, GPUDrivenRenderPassParameters, GPUDrivenVertexAttribute, GPUDrivenVertexBufferLayout, GPUDrivenVertexFormat, GeometryAttributeValue, GeometryComponentSize, GeometryDataComponentCallback, GeometryDataLike, GeometryDataParameters, GeometryDataTraverseCallback, GeometryMaterialParameters, GeometryParameters, GeometryVertexType, HDRLoadRequest, ImageCrossOrigin, InstancedUniform, InterpolatedValue, InterpolationFunction, JsonPrimitive, JsonValue, KTXLoadRequest, KTXTextureOptions, LazyTextureParameters, LightGroupName, LightInfo, LightManagerParameters, LightParameters, LightShadowOptions, ListenerEntry, ListenerMap, LoadCacheFile, LoadQueueItem, LoadQueueSource, LoadStateValue, LoaderRequest, LoaderTextureOptions, LogLevelValue, MaterialBeforeCompile, MaterialBinding, MaterialBindingInfo, MaterialBindingMap, MaterialParameters, MaterialShaderSource, MaterialTexture, MaterialTextureValue, MeshParameters, MeshPickerParameters, MorphGeometryParameters, MorphTargets, MutableArrayLike, MutableNumberArray, NetworkResourceType, NodeGetChildByCallback, NodeParameters, NodePointerEvent, NodeRaycastInfo, NodeTraverseCallback, NodeTraverseResult, NormalizedComputeWorkgroupSize, OrthographicCameraParameters, PBRMaterialParameters, PerspectiveCameraParameters, PlaneGeometryParameters, Point2, Point3, PointLightInfo, PointLightParameters, PointLightShadowOptions, PointShadowCameraParameters, PostProcessRenderPipelineOptions, ProgramBindingInfo, RadianceHDRImage, RayCamera, RayParameters, RenderGraphBufferHandle, RenderGraphBufferReadUse, RenderGraphBufferWriteUse, RenderGraphFramePlan, RenderGraphPassHandle, RenderGraphTextureHandle, RenderPassParameterFactory, RenderPassParameterReset, RenderPipeline, RenderPipelineBufferDescriptor, RenderPipelineCapabilities, RenderPipelineCapabilityName, RenderPipelineColorAttachment, RenderPipelineContext, RenderPipelineCreateContext, RenderPipelineDepthStencilAttachment, RenderPipelineExtent, RenderPipelineFactory, RenderPipelineLimits, RenderPipelineOutput, RenderPipelineOutputColorAttachment, RenderPipelineOutputDepthStencilAttachment, RenderPipelineOutputResources, RenderPipelinePersistentTargetDescriptor, RenderPipelineRequirements, RenderPipelineTargetResources, RenderPipelineTextureDescriptor, RenderPipelineTextureRequirement, RenderPipelineTextureUse, RenderTarget, RenderTargetColor, RenderTargetColorAttachmentOptions, RenderTargetColorAttachmentReadback, RenderTargetColorFormat, RenderTargetCompareFunction, RenderTargetDepthStencilAttachmentOptions, RenderTargetDepthStencilFormat, RenderTargetLoadOp, RenderTargetParameters, RenderTargetReadColorAttachmentOptions, RenderTargetSampleCount, RenderTargetSelectionOptions, RenderTargetStoreOp, RendererAdapterPowerPreference, RendererAutoOptions, RendererBackend, RendererCommonOptions, RendererContextPowerPreference, RendererContract, RendererCreateOptions, RendererExplicitOptions, RendererFeatureName, RendererFrame, RendererFrameCallback, RendererListDescriptor, RendererListHandle, RendererListQueue, RendererListSorting, RendererOptions, RendererOptionsMap, RendererResourceDiagnostics, RendererResourceManager, RendererScene, RendererSupportOptions, RendererViewport, RendererWebGL2Options, RendererWebGPUOptions, ResizableTextureImage, Resource, ResourceLoader, ResourceLoaderConstructor, ResourceRequestOptions, SceneRenderPassParameters, SceneStorageBufferBinding, SceneStorageShaderVariant, ScriptableRenderCommands, ScriptableRenderGraph, ScriptableRenderPass, ScriptableRenderPassBuilder, ScriptableRenderPassContext, ScriptableRenderPrepareContext, SemanticMaterial, SemanticMesh, SemanticRenderer, ShaderDefineValue, ShaderMaterialLoadRequest, ShaderMaterialParameters, ShaderOptions, ShaderParameters, ShaderPrecision, ShaderPrecisionProvider, ShaderReadBinding, ShaderRenderer, ShaderTextureSampleType, ShaderTextureViewDimension, ShadowCameraParameters, ShadowCastingLightParameters, ShadowRenderPassParameters, Size, SkeletonParameters, SkinnedMeshParameters, SlicedSpriteInsets, SlicedSpriteParameters, SphereGeometryParameters, SpotLightInfo, SpotLightParameters, SpriteFrameParameters, SpriteFrameUpdateOptions, SpriteFramesUpdateOptions, SpriteMaterialParameters, SpriteParameters, StageBackend, StageBackendParameters, StageCommonParameters, StageParameters, StagePointerEvent, Std140ArrayValue, Std140FieldDefinition, Std140FieldLayout, Std140FieldValue, Std140MatrixType, Std140ScalarType, Std140Schema, Std140Type, Std140Value, Std140Values, Std140VectorType, StorageArrayDefinition, StorageBuffer, StorageBufferDescriptor, StorageBufferRange, StorageBufferReadback, StorageBufferRecoveryPolicy, StorageBufferUsage, StorageFieldLayout, StorageGraphicsShaderDescriptor, StorageMatrixType, StoragePrimitiveType, StoragePrimitiveValue, StorageScalarType, StorageSchema, StorageStructDefinition, StorageType, StorageValue, StorageValues, StorageVectorType, StorageWriteResult, SubDataUpdate, Text2DParameters, Text2DStyle, TextureBinding, TextureCompressionFormat, TextureCopyPassParameters, TextureCubeFace, TextureImageSource, TextureLoadRequest, TextureMipmap, TextureParameters, TexturePixelData, TextureSource, TextureSubImage, TextureUVChannel, TextureUpdateSnapshot, Tickable, ToneMappingMode, Triangle, TweenCompleteCallback, TweenEaseCollection, TweenEaseFunction, TweenEaseNoneObject, TweenEaseObject, TweenParameters, TweenProperties, TweenStartCallback, TweenUpdateCallback, TypedArray$1 as TypedArray, TypedArrayConstructor$1 as TypedArrayConstructor, UV, UiButtonFrames, UiButtonParameters, UiButtonState, UniformBufferDirtyRange, UniformBufferRange, XYZObject };
|
|
15011
|
+
export { AmbientLight, Animation, AnimationStates, AreaLight, AtmosphereWeatherState, AutoExposure, AxisHelper, AxisNetHelper, BUILTIN_UNIFORM_BLOCK_BINDING_COUNT, BasicLoader, BasicMaterial, Bloom, BoxGeometry, Cache, Camera, Camera2D, CameraHelper, ClusteredForwardPlusPipelineFactory, Color, ColorUber, ComputeKernel, ComputeRenderPass, ComputeSampler, ComputeShader, CubeTexture, CubeTextureLoader, DEFAULT_2D_LAYER, DEFAULT_MATERIAL_PIPELINE_STATE, DEFAULT_MATERIAL_TEXTURE_CHANNELS, DataTexture, DirectionalLight, Euler, EulerNotifier, EventDispatcher, Fog, ForwardRenderPipelineFactory, Frustum, FullscreenRenderPass, GLTFExtensions_d as GLTFExtensions, GLTFLoader, GLTFParser, GPUDrivenRenderPass, Geometry, GeometryData, GeometryMaterial, GroundTruthAmbientOcclusion, HDRLoader, HiloEvent, KTXLoader, LazyTexture, Light, LightManager, LoadCache, LoadQueue, LoadState, Loader, LogLevel, Logger, MATERIAL_TEXTURE_SLOT_COUNT, MaterialAttributeSemantic, MaterialBlendPreset, MaterialCompiler, MaterialDefinition, MaterialInstance, MaterialTextureSemantic, MaterialTextureSlot, MaterialUniformSemantic, Matrix3, Matrix4, Matrix4Notifier, Mesh, MeshPicker, MorphGeometry, Node, OrbitControls, OrthographicCamera, PBRMaterial, PBRMaterialBuilder, PerspectiveCamera, Plane, PlaneGeometry, PointLight, PostProcessRenderPipelineFactory, PresentRenderPass, Quaternion, QuaternionNotifier, RENDER_NODE_EXTENSION, Ray, RenderInfo, RenderPassParameterPool, Renderer, SCENE_STORAGE_BIND_GROUP, STAGE_SYSTEM_API_VERSION, STATE_TYPES, SceneRenderPass, ScreenSpaceGlobalIllumination, Shader, ShaderMaterial, ShaderMaterialLoader, ShadowRenderPass, Skeleton, SkinnedMesh, SlicedSprite, Sphere, SphereGeometry, SphericalHarmonics3, SpotLight, Sprite, SpriteFrame, SpriteMaterial, Stage, StageSystemRegistry, StageSystemService, Std140Layout, StorageGraphicsShader, StorageLayout, TRIANGLES, TemporalAA, Text2D, Texture, TextureCopyPass, TextureLoader, Ticker, Tween, UNIFORM_BLOCK_BINDINGS, UiButton, UniformBuffer, Vector2, Vector3, Vector3Notifier, Vector4, WebGLSupport, browser, collectionEntries, constants, createEmptyGLTFRoot, createStageSystemService, createStd140Layout, createStorageGraphicsShaderFromPortable, createStorageLayout, detectBrowserFeatures, detectWebGLSupport, Hilo as engineConstants, getCollectionItem, getRenderNodeExtension, getUniformBlockBinding, isArrayCollection, isGLTFRoot, log, math, parseRadianceHDR, registerUniformBlockBinding, resolveMaterialPassDefinition, resolveMaterialPassState, semantic, util_d as util, version, webgl2 as webgl2Constants, webgl as webglConstants, webglExtensions as webglExtensionConstants };
|
|
15012
|
+
export type { AccessorArray, AmbientLightParameters, AnimationClip, AnimationInterpolationType, AnimationParameters, AnimationStateHandler, AnimationStateType, AnimationStatesParameters, AnimationTimeRange, AreaLightInfo, AreaLightParameters, AtmosphereWeatherDebugView, AtmosphereWeatherOptions, AtmosphereWeatherQuality, AutoExposureDiagnostics, AutoExposureMeteringMode, AutoExposureOptions, AxisAlignedBox, AxisHelperParameters, AxisNetHelperParameters, BackEaseObject, BasicLightType, BasicLoadRequest, BasicLoaderResource, BasicMaterialParameters, BasicResource, BasicResourceType, BloomOptions, Bounds, BoxGeometryParameters, BrowserFeatures, BuiltInAnimationStateType, BuiltInMaterialTextureSlotName, Camera2DParameters, CameraDepthMode, CameraHelperParameters, CameraParameters, ClusteredForwardPlusDiagnostics, ClusteredForwardPlusPipelineOptions, ClusteredMaterialVariantManifest, ClusteredMaterialVariantManifestEntry, ColorUberOptions, ComputeBufferBinding, ComputeDispatch, ComputeKernelDescriptor, ComputePipelineConstant, ComputeRenderPassParameters, ComputeSamplerAddressMode, ComputeSamplerDescriptor, ComputeSamplerFilterMode, ComputeShaderBinding, ComputeShaderDescriptor, ComputeStorageBufferAccess, ComputeStorageTextureFormat, ComputeStorageTextureViewDimension, ComputeTextureBinding, ComputeTextureSampleType, ComputeTextureViewDimension, ComputeUniformBufferBinding, CubeTextureImage, CubeTextureLoadRequest, CubeTextureParameters, CullingOptions, CullingResultsHandle, DataTextureParameters, DirectionalLightInfo, DirectionalLightParameters, DirectionalLightShadowOptions, DispatchEvent, DynamicResolutionDiagnostics, DynamicResolutionOptions, ElasticEaseObject, EulerOrder, EventListener, FogMode, FogParameters, ForwardRenderFeatureContext, ForwardRenderFeatureRequirements, ForwardRenderInjectionPoint, ForwardRenderPipelineFactoryOptions, ForwardRenderPipelineFeature, ForwardRenderPipelineFeatureRuntime, ForwardRenderPipelineResources, FullscreenRenderPassOptions, FullscreenRenderPassParameters, GLTFAccessor, GLTFAccessorResult, GLTFAccessorType, GLTFAnimation, GLTFAnimationChannel, GLTFAnimationClipsExtension, GLTFAnimationSampler, GLTFAnimationTarget, GLTFAnisotropyExtension, GLTFAsset, GLTFBoundingBoxExtension, GLTFBounds, GLTFBuffer, GLTFBufferView, GLTFBufferViewRuntime, GLTFCamera, GLTFClearcoatExtension, GLTFCollection, GLTFComponentType, GLTFExtensionHandler, GLTFExtensionHandlerRegistry, GLTFExtensionMap, GLTFExtensionMethodName, GLTFExtensionOptions, GLTFImage, GLTFIndex, GLTFIorExtension, GLTFIridescenceExtension, GLTFLoadRequest, GLTFMaterial, GLTFMaterialValue, GLTFMaterialsCommonExtension, GLTFMesh, GLTFModel, GLTFMorphTarget, GLTFNode, GLTFOrthographicCamera, GLTFPBRMetallicRoughness, GLTFPBRSpecularGlossinessExtension, GLTFParserParameters, GLTFPerspectiveCamera, GLTFPrimitive, GLTFProgram, GLTFProgressivePrimitiveState, GLTFProperty, GLTFPunctualLight, GLTFPunctualLightNodeExtension, GLTFPunctualLightsExtension, GLTFPunctualSpotLight, GLTFQuantizedAttributesExtension, GLTFResourceLoader, GLTFRoot, GLTFSampler, GLTFScene, GLTFShader, GLTFSkin, GLTFSparseAccessor, GLTFSparseIndices, GLTFSparseValues, GLTFTechnique, GLTFTechniqueBinding, GLTFTechniqueStates, GLTFTexture, GLTFTextureInfo, GLTFTextureTransformExtension, GLTFTransmissionExtension, GLTFVolumeExtension, GPUDrivenDraw, GPUDrivenRenderPassOptions, GPUDrivenRenderPassParameters, GPUDrivenVertexAttribute, GPUDrivenVertexBufferLayout, GPUDrivenVertexFormat, GPUSceneBucket, GPUSceneLOD, GeometryAttributeValue, GeometryComponentSize, GeometryDataComponentCallback, GeometryDataLike, GeometryDataParameters, GeometryDataTraverseCallback, GeometryMaterialParameters, GeometryParameters, GeometryVertexType, GroundTruthAmbientOcclusionNormalSource, GroundTruthAmbientOcclusionOptions, GroundTruthAmbientOcclusionQuality, HDRLoadRequest, ImageCrossOrigin, InstancedUniform, InterpolatedValue, InterpolationFunction, JsonPrimitive, JsonValue, KTXLoadRequest, KTXTextureOptions, LazyTextureParameters, LightGroupName, LightInfo, LightManagerParameters, LightParameters, LightShadowOptions, ListenerEntry, ListenerMap, LoadCacheFile, LoadQueueItem, LoadQueueSource, LoadStateValue, LoaderRequest, LoaderTextureOptions, LogLevelValue, MaterialAttributeSemanticName, MaterialBinding, MaterialBindingInfo, MaterialBindingMap, MaterialBlendComponent, MaterialBlendFactor, MaterialBlendOperation, MaterialBlendState, MaterialColorOrTextureInput, MaterialCompareFunction, MaterialCompileRequest, MaterialCompositing, MaterialCoverage, MaterialCullMode, MaterialDefinitionParameters, MaterialFamily, MaterialFragmentOutput, MaterialFrontFace, MaterialInstanceParameters, MaterialPassDefinition, MaterialPassFallback, MaterialPassRole, MaterialPipelineState, MaterialRenderingProfile, MaterialSemanticName, MaterialShaderModule, MaterialStencilFaceState, MaterialStencilOperation, MaterialStencilState, MaterialSurfaceDomain, MaterialTargetSignature, MaterialTexture, MaterialTextureChannel, MaterialTextureEncoding, MaterialTextureSemanticName, MaterialTextureSlotBinding, MaterialTextureSlotDefinition, MaterialTextureSlotInput, MaterialTextureValue, MaterialUniformSemanticName, MeshParameters, MeshPickerParameters, MorphGeometryParameters, MorphTargets, MutableArrayLike, MutableNumberArray, MutablePBRMaterialParameters, NetworkResourceType, NodeGetChildByCallback, NodeParameters, NodePointerEvent, NodeRaycastInfo, NodeTraverseCallback, NodeTraverseResult, NormalizedComputeWorkgroupSize, OrbitControlsOptions, OrthographicCameraParameters, PBRMaterialParameters, PBRMaterialTextureInput, PerspectiveCameraParameters, PhysicalAtmosphereOptions, PlaneGeometryParameters, Point2, Point3, PointLightInfo, PointLightParameters, PointLightShadowOptions, PointShadowCameraParameters, PostProcessRenderPipelineOptions, PreparedMaterialVariant, ProgramBindingInfo, RGPassTimestampKind, RadianceHDRImage, RayCamera, RayParameters, RenderColorEncoding, RenderGraphBufferHandle, RenderGraphBufferReadUse, RenderGraphBufferWriteUse, RenderGraphFramePlan, RenderGraphGPUTimelineStatus, RenderGraphPassHandle, RenderGraphPassTimelineSnapshot, RenderGraphResourceLifetimeSnapshot, RenderGraphTextureAccessHandle, RenderGraphTextureHandle, RenderGraphTextureViewHandle, RenderGraphTimelineSnapshot, RenderNodeExtension, RenderNodeGPUExtension, RenderPassParameterFactory, RenderPassParameterReset, RenderPipeline, RenderPipelineBufferDescriptor, RenderPipelineCapabilities, RenderPipelineCapabilityName, RenderPipelineColorAttachment, RenderPipelineContext, RenderPipelineCreateContext, RenderPipelineDepthStencilAttachment, RenderPipelineExtent, RenderPipelineFactory, RenderPipelineHistoryTextureDescriptor, RenderPipelineHistoryTextureResources, RenderPipelineLimits, RenderPipelineOutput, RenderPipelineOutputColorAttachment, RenderPipelineOutputDepthStencilAttachment, RenderPipelineOutputResources, RenderPipelinePersistentTargetDescriptor, RenderPipelinePersistentTextureUsage, RenderPipelineRequirements, RenderPipelineShadowOptions, RenderPipelineShadowPageRegion, RenderPipelineShadowResources, RenderPipelineShadowSlice, RenderPipelineTargetResources, RenderPipelineTextureAspect, RenderPipelineTextureDescriptor, RenderPipelineTextureDimension, RenderPipelineTextureFormat, RenderPipelineTextureRequirement, RenderPipelineTextureUse, RenderPipelineTextureViewDescriptor, RenderPipelineTextureViewDimension, RenderTarget, RenderTargetColor, RenderTargetColorAttachmentOptions, RenderTargetColorAttachmentReadback, RenderTargetColorFormat, RenderTargetCompareFunction, RenderTargetDepthStencilAttachmentOptions, RenderTargetDepthStencilFormat, RenderTargetLoadOp, RenderTargetParameters, RenderTargetPresentationOptions, RenderTargetReadColorAttachmentOptions, RenderTargetSampleCount, RenderTargetSelectionOptions, RenderTargetStoreOp, RendererAdapterPowerPreference, RendererAutoOptions, RendererBackend, RendererCommonOptions, RendererContextPowerPreference, RendererContract, RendererCreateOptions, RendererExplicitOptions, RendererFeatureName, RendererFrame, RendererFrameCallback, RendererListDescriptor, RendererListHandle, RendererListQueue, RendererListSorting, RendererOptions, RendererOptionsMap, RendererRenderingProfile, RendererResourceDiagnostics, RendererResourceManager, RendererScene, RendererSupportOptions, RendererViewport, RendererWebGL2Options, RendererWebGPUOptions, ResizableTextureImage, Resource, ResourceLoader, ResourceLoaderConstructor, ResourceRequestOptions, SceneRenderPassParameters, SceneStorageBufferBinding, SceneStorageShaderVariant, ScreenSpaceGlobalIlluminationOptions, ScreenSpaceReflectionsOptions, ScriptableRenderCommands, ScriptableRenderGraph, ScriptableRenderPass, ScriptableRenderPassBuilder, ScriptableRenderPassContext, ScriptableRenderPrepareContext, SemanticMaterial, SemanticMesh, SemanticRenderer, ShaderDefineValue, ShaderMaterialLoadRequest, ShaderMaterialParameters, ShaderMaterialRoleSource, ShaderMaterialTextureSlot, ShaderOptions, ShaderParameters, ShaderPrecision, ShaderPrecisionProvider, ShaderReadBinding, ShaderRenderer, ShaderTextureSampleType, ShaderTextureViewDimension, ShadowCameraParameters, ShadowCastingLightParameters, ShadowRenderPassParameters, Size, SkeletonParameters, SkinnedMeshParameters, SlicedSpriteInsets, SlicedSpriteParameters, SphereGeometryParameters, SpotLightCookie, SpotLightIESProfile, SpotLightInfo, SpotLightParameters, SpriteFrameParameters, SpriteFrameUpdateOptions, SpriteFramesUpdateOptions, SpriteMaterialParameters, SpriteParameters, StageBackend, StageBackendParameters, StageCommonParameters, StageParameters, StagePointerEvent, StageSystem, StageSystemDescriptor, StageSystemRuntime, StageSystemSetupContext, Std140ArrayValue, Std140FieldDefinition, Std140FieldLayout, Std140FieldValue, Std140MatrixType, Std140ScalarType, Std140Schema, Std140Type, Std140Value, Std140Values, Std140VectorType, StorageArrayDefinition, StorageBuffer, StorageBufferDescriptor, StorageBufferRange, StorageBufferReadback, StorageBufferRecoveryPolicy, StorageBufferUsage, StorageFieldLayout, StorageGraphicsShaderDescriptor, StorageMatrixType, StoragePrimitiveType, StoragePrimitiveValue, StorageScalarType, StorageSchema, StorageStructDefinition, StorageType, StorageValue, StorageValues, StorageVectorType, StorageWriteResult, SubDataUpdate, TemporalAAOptions, Text2DParameters, Text2DStyle, TextureBinding, TextureCompressionFormat, TextureCopyPassParameters, TextureCubeFace, TextureImageSource, TextureLoadRequest, TextureMipmap, TextureParameters, TexturePixelData, TextureSource, TextureSubImage, TextureUVChannel, TextureUpdateSnapshot, Tickable, ToneMappingMode, Triangle, TweenCompleteCallback, TweenEaseCollection, TweenEaseFunction, TweenEaseNoneObject, TweenEaseObject, TweenParameters, TweenProperties, TweenStartCallback, TweenUpdateCallback, TypedArray$1 as TypedArray, TypedArrayConstructor$1 as TypedArrayConstructor, UV, UiButtonFrames, UiButtonParameters, UiButtonState, UniformBufferDirtyRange, UniformBufferRange, VirtualShadowMapDiagnostics, VirtualShadowMapOptions, VolumetricBoxFogVolume, VolumetricCloudOptions, VolumetricFogVolume, VolumetricLightingDebugView, VolumetricLightingOptions, VolumetricLightingQuality, VolumetricSphereFogVolume, XYZObject };
|
|
13617
15013
|
//# sourceMappingURL=Hilo3d.d.ts.map
|