@babylonjs/inspector 8.41.1-preview → 8.41.2-preview
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/lib/index.d.ts +284 -111
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -14491,6 +14491,84 @@ declare class ImageProcessingConfiguration {
|
|
|
14491
14491
|
static get VIGNETTEMODE_OPAQUE(): number;
|
|
14492
14492
|
}
|
|
14493
14493
|
|
|
14494
|
+
/**
|
|
14495
|
+
* Effect Render Options
|
|
14496
|
+
*/
|
|
14497
|
+
interface IEffectRendererOptions {
|
|
14498
|
+
/**
|
|
14499
|
+
* Defines the vertices positions.
|
|
14500
|
+
*/
|
|
14501
|
+
positions?: number[];
|
|
14502
|
+
/**
|
|
14503
|
+
* Defines the indices.
|
|
14504
|
+
*/
|
|
14505
|
+
indices?: number[];
|
|
14506
|
+
}
|
|
14507
|
+
/**
|
|
14508
|
+
* Helper class to render one or more effects.
|
|
14509
|
+
* You can access the previous rendering in your shader by declaring a sampler named textureSampler
|
|
14510
|
+
*/
|
|
14511
|
+
declare class EffectRenderer {
|
|
14512
|
+
/**
|
|
14513
|
+
* The engine the effect renderer has been created for.
|
|
14514
|
+
*/
|
|
14515
|
+
readonly engine: AbstractEngine;
|
|
14516
|
+
private _vertexBuffers;
|
|
14517
|
+
private _indexBuffer;
|
|
14518
|
+
private _indexBufferLength;
|
|
14519
|
+
private _fullscreenViewport;
|
|
14520
|
+
private _onContextRestoredObserver;
|
|
14521
|
+
private _savedStateDepthTest;
|
|
14522
|
+
private _savedStateStencilTest;
|
|
14523
|
+
/**
|
|
14524
|
+
* Creates an effect renderer
|
|
14525
|
+
* @param engine the engine to use for rendering
|
|
14526
|
+
* @param options defines the options of the effect renderer
|
|
14527
|
+
*/
|
|
14528
|
+
constructor(engine: AbstractEngine, options?: IEffectRendererOptions);
|
|
14529
|
+
/**
|
|
14530
|
+
* Sets the current viewport in normalized coordinates 0-1
|
|
14531
|
+
* @param viewport Defines the viewport to set (defaults to 0 0 1 1)
|
|
14532
|
+
*/
|
|
14533
|
+
setViewport(viewport?: Viewport): void;
|
|
14534
|
+
/**
|
|
14535
|
+
* Binds the embedded attributes buffer to the effect.
|
|
14536
|
+
* @param effect Defines the effect to bind the attributes for
|
|
14537
|
+
*/
|
|
14538
|
+
bindBuffers(effect: Effect): void;
|
|
14539
|
+
/**
|
|
14540
|
+
* Sets the current effect wrapper to use during draw.
|
|
14541
|
+
* The effect needs to be ready before calling this api.
|
|
14542
|
+
* This also sets the default full screen position attribute.
|
|
14543
|
+
* @param effectWrapper Defines the effect to draw with
|
|
14544
|
+
* @param depthTest Whether to enable depth testing (default: false)
|
|
14545
|
+
* @param stencilTest Whether to enable stencil testing (default: false)
|
|
14546
|
+
*/
|
|
14547
|
+
applyEffectWrapper(effectWrapper: EffectWrapper, depthTest?: boolean, stencilTest?: boolean): void;
|
|
14548
|
+
/**
|
|
14549
|
+
* Saves engine states
|
|
14550
|
+
*/
|
|
14551
|
+
saveStates(): void;
|
|
14552
|
+
/**
|
|
14553
|
+
* Restores engine states
|
|
14554
|
+
*/
|
|
14555
|
+
restoreStates(): void;
|
|
14556
|
+
/**
|
|
14557
|
+
* Draws a full screen quad.
|
|
14558
|
+
*/
|
|
14559
|
+
draw(): void;
|
|
14560
|
+
private _isRenderTargetTexture;
|
|
14561
|
+
/**
|
|
14562
|
+
* renders one or more effects to a specified texture
|
|
14563
|
+
* @param effectWrapper the effect to renderer
|
|
14564
|
+
* @param outputTexture texture to draw to, if null it will render to the currently bound frame buffer
|
|
14565
|
+
*/
|
|
14566
|
+
render(effectWrapper: EffectWrapper, outputTexture?: Nullable<RenderTargetWrapper | IRenderTargetTexture>): void;
|
|
14567
|
+
/**
|
|
14568
|
+
* Disposes of the effect renderer
|
|
14569
|
+
*/
|
|
14570
|
+
dispose(): void;
|
|
14571
|
+
}
|
|
14494
14572
|
/**
|
|
14495
14573
|
* Allows for custom processing of the shader code used by an effect wrapper
|
|
14496
14574
|
*/
|
|
@@ -26344,7 +26422,8 @@ declare class RenderingGroup {
|
|
|
26344
26422
|
private static _ZeroVector;
|
|
26345
26423
|
private _scene;
|
|
26346
26424
|
private _opaqueSubMeshes;
|
|
26347
|
-
|
|
26425
|
+
/** @internal */
|
|
26426
|
+
_transparentSubMeshes: SmartArray<SubMesh>;
|
|
26348
26427
|
private _alphaTestSubMeshes;
|
|
26349
26428
|
private _depthOnlySubMeshes;
|
|
26350
26429
|
private _particleSystems;
|
|
@@ -26354,7 +26433,8 @@ declare class RenderingGroup {
|
|
|
26354
26433
|
private _transparentSortCompareFn;
|
|
26355
26434
|
private _renderOpaque;
|
|
26356
26435
|
private _renderAlphaTest;
|
|
26357
|
-
|
|
26436
|
+
/** @internal */
|
|
26437
|
+
_renderTransparent: (subMeshes: SmartArray<SubMesh>) => void;
|
|
26358
26438
|
/** @internal */
|
|
26359
26439
|
_empty: boolean;
|
|
26360
26440
|
/** @internal */
|
|
@@ -26391,8 +26471,13 @@ declare class RenderingGroup {
|
|
|
26391
26471
|
* @param renderSprites
|
|
26392
26472
|
* @param renderParticles
|
|
26393
26473
|
* @param activeMeshes
|
|
26474
|
+
* @param renderDepthOnlyMeshes
|
|
26475
|
+
* @param renderOpaqueMeshes
|
|
26476
|
+
* @param renderAlphaTestMeshes
|
|
26477
|
+
* @param renderTransparentMeshes
|
|
26478
|
+
* @param customRenderTransparentSubMeshes
|
|
26394
26479
|
*/
|
|
26395
|
-
render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, renderSprites: boolean, renderParticles: boolean, activeMeshes: Nullable<AbstractMesh[]>): void;
|
|
26480
|
+
render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, renderSprites: boolean, renderParticles: boolean, activeMeshes: Nullable<AbstractMesh[]>, renderDepthOnlyMeshes?: boolean, renderOpaqueMeshes?: boolean, renderAlphaTestMeshes?: boolean, renderTransparentMeshes?: boolean, customRenderTransparentSubMeshes?: (transparentSubMeshes: SmartArray<SubMesh>) => void): void;
|
|
26396
26481
|
/**
|
|
26397
26482
|
* Renders the opaque submeshes in the order from the opaqueSortCompareFn.
|
|
26398
26483
|
* @param subMeshes The submeshes to render
|
|
@@ -26568,6 +26653,10 @@ declare class RenderingManager {
|
|
|
26568
26653
|
* @param scene Defines the scene the groups belongs to
|
|
26569
26654
|
*/
|
|
26570
26655
|
constructor(scene: Scene);
|
|
26656
|
+
/**
|
|
26657
|
+
* @returns the list of rendering groups managed by the manager.
|
|
26658
|
+
*/
|
|
26659
|
+
get renderingGroups(): Immutable<RenderingGroup[]>;
|
|
26571
26660
|
/**
|
|
26572
26661
|
* @returns the rendering group with the specified id.
|
|
26573
26662
|
* @param id the id of the rendering group (0 by default)
|
|
@@ -26578,7 +26667,7 @@ declare class RenderingManager {
|
|
|
26578
26667
|
* Renders the entire managed groups. This is used by the scene or the different render targets.
|
|
26579
26668
|
* @internal
|
|
26580
26669
|
*/
|
|
26581
|
-
render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, activeMeshes: Nullable<AbstractMesh[]>, renderParticles: boolean, renderSprites: boolean): void;
|
|
26670
|
+
render(customRenderFunction: Nullable<(opaqueSubMeshes: SmartArray<SubMesh>, transparentSubMeshes: SmartArray<SubMesh>, alphaTestSubMeshes: SmartArray<SubMesh>, depthOnlySubMeshes: SmartArray<SubMesh>) => void>, activeMeshes: Nullable<AbstractMesh[]>, renderParticles: boolean, renderSprites: boolean, renderDepthOnlyMeshes?: boolean, renderOpaqueMeshes?: boolean, renderAlphaTestMeshes?: boolean, renderTransparentMeshes?: boolean, customRenderTransparentSubMeshes?: (transparentSubMeshes: SmartArray<SubMesh>) => void): void;
|
|
26582
26671
|
/**
|
|
26583
26672
|
* Resets the different information of the group to prepare a new frame
|
|
26584
26673
|
* @internal
|
|
@@ -26705,6 +26794,26 @@ declare class ObjectRenderer {
|
|
|
26705
26794
|
* Define if meshes should be rendered (default is true).
|
|
26706
26795
|
*/
|
|
26707
26796
|
renderMeshes: boolean;
|
|
26797
|
+
/**
|
|
26798
|
+
* Define if depth only meshes should be rendered (default is true). No effect if renderMeshes is false.
|
|
26799
|
+
*/
|
|
26800
|
+
renderDepthOnlyMeshes: boolean;
|
|
26801
|
+
/**
|
|
26802
|
+
* Define if opaque meshes should be rendered (default is true). No effect if renderMeshes is false.
|
|
26803
|
+
*/
|
|
26804
|
+
renderOpaqueMeshes: boolean;
|
|
26805
|
+
/**
|
|
26806
|
+
* Define if alpha test meshes should be rendered (default is true). No effect if renderMeshes is false.
|
|
26807
|
+
*/
|
|
26808
|
+
renderAlphaTestMeshes: boolean;
|
|
26809
|
+
/**
|
|
26810
|
+
* Define if transparent meshes should be rendered (default is true). No effect if renderMeshes is false.
|
|
26811
|
+
*/
|
|
26812
|
+
renderTransparentMeshes: boolean;
|
|
26813
|
+
/**
|
|
26814
|
+
* Custom render function for transparent submeshes.
|
|
26815
|
+
*/
|
|
26816
|
+
customRenderTransparentSubMeshes?: (transparentSubMeshes: SmartArray<SubMesh>) => void;
|
|
26708
26817
|
/**
|
|
26709
26818
|
* Define if particles should be rendered (default is true).
|
|
26710
26819
|
*/
|
|
@@ -49060,6 +49169,8 @@ declare abstract class FrameGraphTask {
|
|
|
49060
49169
|
_checkTask(): void;
|
|
49061
49170
|
/** @internal */
|
|
49062
49171
|
_execute(): void;
|
|
49172
|
+
/** @internal */
|
|
49173
|
+
_initializePasses(): void;
|
|
49063
49174
|
private _checkSameRenderTarget;
|
|
49064
49175
|
}
|
|
49065
49176
|
|
|
@@ -49111,6 +49222,7 @@ declare class FrameGraphPass<T extends FrameGraphContext> implements IFrameGraph
|
|
|
49111
49222
|
protected readonly _parentTask: FrameGraphTask;
|
|
49112
49223
|
protected readonly _context: T;
|
|
49113
49224
|
private _executeFunc;
|
|
49225
|
+
private _initFunc?;
|
|
49114
49226
|
/**
|
|
49115
49227
|
* Whether the pass is disabled. Disabled passes will be skipped during execution.
|
|
49116
49228
|
*/
|
|
@@ -49118,13 +49230,21 @@ declare class FrameGraphPass<T extends FrameGraphContext> implements IFrameGraph
|
|
|
49118
49230
|
/** @internal */
|
|
49119
49231
|
constructor(name: string, _parentTask: FrameGraphTask, _context: T);
|
|
49120
49232
|
/**
|
|
49121
|
-
*
|
|
49122
|
-
*
|
|
49233
|
+
* Initializes the pass.
|
|
49234
|
+
* This function is called once after the frame graph has been built
|
|
49235
|
+
* @param func The function to initialize the pass.
|
|
49236
|
+
*/
|
|
49237
|
+
setInitializeFunc(func: (context: T) => void): void;
|
|
49238
|
+
/**
|
|
49239
|
+
* Sets the function to execute when the pass is executed
|
|
49240
|
+
* @param func The function to execute when the pass is executed
|
|
49123
49241
|
*/
|
|
49124
49242
|
setExecuteFunc(func: (context: T) => void): void;
|
|
49125
49243
|
/** @internal */
|
|
49126
49244
|
_execute(): void;
|
|
49127
49245
|
/** @internal */
|
|
49246
|
+
_initialize(): void;
|
|
49247
|
+
/** @internal */
|
|
49128
49248
|
_isValid(): Nullable<string>;
|
|
49129
49249
|
/** @internal */
|
|
49130
49250
|
_dispose(): void;
|
|
@@ -49137,7 +49257,7 @@ declare class FrameGraphRenderPass extends FrameGraphPass<FrameGraphRenderContex
|
|
|
49137
49257
|
protected readonly _engine: AbstractEngine;
|
|
49138
49258
|
protected _renderTarget: FrameGraphTextureHandle | FrameGraphTextureHandle[] | undefined;
|
|
49139
49259
|
protected _renderTargetDepth: FrameGraphTextureHandle | undefined;
|
|
49140
|
-
protected _frameGraphRenderTarget: FrameGraphRenderTarget
|
|
49260
|
+
protected _frameGraphRenderTarget: FrameGraphRenderTarget;
|
|
49141
49261
|
protected _dependencies: Set<FrameGraphTextureHandle>;
|
|
49142
49262
|
/**
|
|
49143
49263
|
* Checks if a pass is a render pass.
|
|
@@ -49156,7 +49276,7 @@ declare class FrameGraphRenderPass extends FrameGraphPass<FrameGraphRenderContex
|
|
|
49156
49276
|
/**
|
|
49157
49277
|
* Gets the frame graph render target used by the render pass.
|
|
49158
49278
|
*/
|
|
49159
|
-
get frameGraphRenderTarget(): FrameGraphRenderTarget
|
|
49279
|
+
get frameGraphRenderTarget(): FrameGraphRenderTarget;
|
|
49160
49280
|
/**
|
|
49161
49281
|
* If true, the depth attachment will be read-only (may allow some optimizations in WebGPU)
|
|
49162
49282
|
*/
|
|
@@ -49188,6 +49308,8 @@ declare class FrameGraphRenderPass extends FrameGraphPass<FrameGraphRenderContex
|
|
|
49188
49308
|
*/
|
|
49189
49309
|
collectDependencies(dependencies: Set<FrameGraphTextureHandle>): void;
|
|
49190
49310
|
/** @internal */
|
|
49311
|
+
_initialize(): void;
|
|
49312
|
+
/** @internal */
|
|
49191
49313
|
_execute(): void;
|
|
49192
49314
|
/** @internal */
|
|
49193
49315
|
_isValid(): Nullable<string>;
|
|
@@ -50148,6 +50270,112 @@ declare class ThinGlowLayer extends ThinEffectLayer {
|
|
|
50148
50270
|
_disposeMesh(mesh: Mesh): void;
|
|
50149
50271
|
}
|
|
50150
50272
|
|
|
50273
|
+
/**
|
|
50274
|
+
* @internal
|
|
50275
|
+
*/
|
|
50276
|
+
declare class ThinDepthPeelingRenderer {
|
|
50277
|
+
protected _scene: Scene;
|
|
50278
|
+
protected _engine: AbstractEngine;
|
|
50279
|
+
protected _depthMrts: MultiRenderTarget[];
|
|
50280
|
+
protected _thinTextures: ThinTexture[];
|
|
50281
|
+
protected _colorMrts: MultiRenderTarget[];
|
|
50282
|
+
protected _blendBackMrt: MultiRenderTarget;
|
|
50283
|
+
protected _blendBackEffectWrapper: EffectWrapper;
|
|
50284
|
+
protected _blendBackEffectWrapperPingPong: EffectWrapper;
|
|
50285
|
+
protected _finalEffectWrapper: EffectWrapper;
|
|
50286
|
+
protected _effectRenderer: EffectRenderer;
|
|
50287
|
+
protected _currentPingPongState: number;
|
|
50288
|
+
protected _layoutCacheFormat: boolean[][];
|
|
50289
|
+
protected _layoutCache: number[][];
|
|
50290
|
+
protected _renderPassIds: number[];
|
|
50291
|
+
protected _candidateSubMeshes: SmartArray<SubMesh>;
|
|
50292
|
+
protected _excludedSubMeshes: SmartArray<SubMesh>;
|
|
50293
|
+
protected _excludedMeshes: number[];
|
|
50294
|
+
protected static _DEPTH_CLEAR_VALUE: number;
|
|
50295
|
+
protected static _MIN_DEPTH: number;
|
|
50296
|
+
protected static _MAX_DEPTH: number;
|
|
50297
|
+
protected _colorCache: Color4[];
|
|
50298
|
+
protected _passCount: number;
|
|
50299
|
+
/**
|
|
50300
|
+
* Number of depth peeling passes. As we are using dual depth peeling, each pass two levels of transparency are processed.
|
|
50301
|
+
*/
|
|
50302
|
+
get passCount(): number;
|
|
50303
|
+
set passCount(count: number);
|
|
50304
|
+
protected _useRenderPasses: boolean;
|
|
50305
|
+
/**
|
|
50306
|
+
* Instructs the renderer to use render passes. It is an optimization that makes the rendering faster for some engines (like WebGPU) but that consumes more memory, so it is disabled by default.
|
|
50307
|
+
*/
|
|
50308
|
+
get useRenderPasses(): boolean;
|
|
50309
|
+
set useRenderPasses(usePasses: boolean);
|
|
50310
|
+
/**
|
|
50311
|
+
* Add a mesh in the exclusion list to prevent it to be handled by the depth peeling renderer
|
|
50312
|
+
* @param mesh The mesh to exclude from the depth peeling renderer
|
|
50313
|
+
*/
|
|
50314
|
+
addExcludedMesh(mesh: AbstractMesh): void;
|
|
50315
|
+
/**
|
|
50316
|
+
* Remove a mesh from the exclusion list of the depth peeling renderer
|
|
50317
|
+
* @param mesh The mesh to remove
|
|
50318
|
+
*/
|
|
50319
|
+
removeExcludedMesh(mesh: AbstractMesh): void;
|
|
50320
|
+
/** Shader language used by the renderer */
|
|
50321
|
+
protected _shaderLanguage: ShaderLanguage;
|
|
50322
|
+
/**
|
|
50323
|
+
* Gets the shader language used in this renderer
|
|
50324
|
+
*/
|
|
50325
|
+
get shaderLanguage(): ShaderLanguage;
|
|
50326
|
+
private _blendOutput;
|
|
50327
|
+
/**
|
|
50328
|
+
* Sets the render target wrapper we will blend the transparent objects onto
|
|
50329
|
+
*/
|
|
50330
|
+
get blendOutput(): Nullable<RenderTargetWrapper>;
|
|
50331
|
+
set blendOutput(blendOutput: Nullable<RenderTargetWrapper>);
|
|
50332
|
+
/**
|
|
50333
|
+
* Instanciates the depth peeling renderer
|
|
50334
|
+
* @param scene Scene to attach to
|
|
50335
|
+
* @param passCount Number of depth layers to peel
|
|
50336
|
+
* @returns The depth peeling renderer
|
|
50337
|
+
*/
|
|
50338
|
+
constructor(scene: Scene, passCount?: number);
|
|
50339
|
+
private _createRenderPassIds;
|
|
50340
|
+
private _releaseRenderPassIds;
|
|
50341
|
+
protected _getTextureSize(): {
|
|
50342
|
+
width: number;
|
|
50343
|
+
height: number;
|
|
50344
|
+
};
|
|
50345
|
+
protected _createTextures(): void;
|
|
50346
|
+
protected _disposeTextures(): void;
|
|
50347
|
+
protected _createEffects(finalEffectFragmentShaderName: string, finalEffectSamplerNames: string[]): void;
|
|
50348
|
+
/**
|
|
50349
|
+
* Links to the prepass renderer
|
|
50350
|
+
* @param _prePassRenderer The scene PrePassRenderer
|
|
50351
|
+
*/
|
|
50352
|
+
setPrePassRenderer(_prePassRenderer: PrePassRenderer): void;
|
|
50353
|
+
/**
|
|
50354
|
+
* Binds depth peeling textures on an effect
|
|
50355
|
+
* @param effect The effect to bind textures on
|
|
50356
|
+
*/
|
|
50357
|
+
bind(effect: Effect): void;
|
|
50358
|
+
private _renderSubMeshes;
|
|
50359
|
+
protected _finalCompose(writeId: number): void;
|
|
50360
|
+
/**
|
|
50361
|
+
* Checks if the depth peeling renderer is ready to render transparent meshes
|
|
50362
|
+
* @returns true if the depth peeling renderer is ready to render the transparent meshes
|
|
50363
|
+
*/
|
|
50364
|
+
isReady(): boolean;
|
|
50365
|
+
protected _beforeRender(): void;
|
|
50366
|
+
protected _afterRender(): void;
|
|
50367
|
+
/**
|
|
50368
|
+
* Renders transparent submeshes with depth peeling
|
|
50369
|
+
* @param transparentSubMeshes List of transparent meshes to render
|
|
50370
|
+
* @returns The array of submeshes that could not be handled by this renderer
|
|
50371
|
+
*/
|
|
50372
|
+
render(transparentSubMeshes: SmartArray<SubMesh>): SmartArray<SubMesh>;
|
|
50373
|
+
/**
|
|
50374
|
+
* Disposes the depth peeling renderer and associated resources
|
|
50375
|
+
*/
|
|
50376
|
+
dispose(): void;
|
|
50377
|
+
}
|
|
50378
|
+
|
|
50151
50379
|
/**
|
|
50152
50380
|
* Task used to render objects to a texture.
|
|
50153
50381
|
*/
|
|
@@ -50206,6 +50434,41 @@ declare class FrameGraphObjectRendererTask extends FrameGraphTask {
|
|
|
50206
50434
|
*/
|
|
50207
50435
|
get renderMeshes(): boolean;
|
|
50208
50436
|
set renderMeshes(value: boolean);
|
|
50437
|
+
private _renderDepthOnlyMeshes;
|
|
50438
|
+
/**
|
|
50439
|
+
* Defines if depth only meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
|
|
50440
|
+
*/
|
|
50441
|
+
get renderDepthOnlyMeshes(): boolean;
|
|
50442
|
+
set renderDepthOnlyMeshes(value: boolean);
|
|
50443
|
+
private _renderOpaqueMeshes;
|
|
50444
|
+
/**
|
|
50445
|
+
* Defines if opaque meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
|
|
50446
|
+
*/
|
|
50447
|
+
get renderOpaqueMeshes(): boolean;
|
|
50448
|
+
set renderOpaqueMeshes(value: boolean);
|
|
50449
|
+
private _renderAlphaTestMeshes;
|
|
50450
|
+
/**
|
|
50451
|
+
* Defines if alpha test meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
|
|
50452
|
+
*/
|
|
50453
|
+
get renderAlphaTestMeshes(): boolean;
|
|
50454
|
+
set renderAlphaTestMeshes(value: boolean);
|
|
50455
|
+
private _renderTransparentMeshes;
|
|
50456
|
+
/**
|
|
50457
|
+
* Defines if transparent meshes should be rendered (default is true). Always subject to the renderMeshes property, though.
|
|
50458
|
+
*/
|
|
50459
|
+
get renderTransparentMeshes(): boolean;
|
|
50460
|
+
set renderTransparentMeshes(value: boolean);
|
|
50461
|
+
private _useOITForTransparentMeshes;
|
|
50462
|
+
/**
|
|
50463
|
+
* Defines if Order Independent Transparency should be used for transparent meshes (default is false).
|
|
50464
|
+
*/
|
|
50465
|
+
get useOITForTransparentMeshes(): boolean;
|
|
50466
|
+
set useOITForTransparentMeshes(value: boolean);
|
|
50467
|
+
/**
|
|
50468
|
+
* Defines the number of passes to use for Order Independent Transparency (default is 5).
|
|
50469
|
+
*/
|
|
50470
|
+
get oitPassCount(): number;
|
|
50471
|
+
set oitPassCount(value: number);
|
|
50209
50472
|
private _renderParticles;
|
|
50210
50473
|
/**
|
|
50211
50474
|
* Defines if particles should be rendered (default is true).
|
|
@@ -50265,11 +50528,13 @@ declare class FrameGraphObjectRendererTask extends FrameGraphTask {
|
|
|
50265
50528
|
protected readonly _engine: AbstractEngine;
|
|
50266
50529
|
protected readonly _scene: Scene;
|
|
50267
50530
|
protected readonly _renderer: ObjectRenderer;
|
|
50531
|
+
protected readonly _oitRenderer: ThinDepthPeelingRenderer;
|
|
50268
50532
|
protected _textureWidth: number;
|
|
50269
50533
|
protected _textureHeight: number;
|
|
50270
50534
|
protected _onBeforeRenderObservable: Nullable<Observer<number>>;
|
|
50271
50535
|
protected _onAfterRenderObservable: Nullable<Observer<number>>;
|
|
50272
50536
|
protected _externalObjectRenderer: boolean;
|
|
50537
|
+
protected _rtForOrderIndependentTransparency: FrameGraphRenderTarget;
|
|
50273
50538
|
/**
|
|
50274
50539
|
* Constructs a new object renderer task.
|
|
50275
50540
|
* @param name The name of the task.
|
|
@@ -50289,6 +50554,7 @@ declare class FrameGraphObjectRendererTask extends FrameGraphTask {
|
|
|
50289
50554
|
protected _getTargetHandles(): FrameGraphTextureHandle[];
|
|
50290
50555
|
protected _prepareRendering(context: FrameGraphRenderContext, depthEnabled: boolean): void;
|
|
50291
50556
|
protected _setLightsForShadow(): void;
|
|
50557
|
+
protected _renderTransparentMeshesWithOIT(transparentSubMeshes: SmartArray<SubMesh>): void;
|
|
50292
50558
|
}
|
|
50293
50559
|
|
|
50294
50560
|
/**
|
|
@@ -50888,12 +51154,20 @@ interface IFrameGraphPass {
|
|
|
50888
51154
|
* Whether the pass is disabled.
|
|
50889
51155
|
*/
|
|
50890
51156
|
disabled: boolean;
|
|
51157
|
+
/**
|
|
51158
|
+
* Initializes the pass.
|
|
51159
|
+
* This function is called once before the first execution of the pass.
|
|
51160
|
+
* @param func The function to initialize the pass.
|
|
51161
|
+
*/
|
|
51162
|
+
setInitializeFunc(func: (context: FrameGraphContext) => void): void;
|
|
50891
51163
|
/**
|
|
50892
51164
|
* Sets the function to execute when the pass is executed
|
|
50893
51165
|
* @param func The function to execute when the pass is executed
|
|
50894
51166
|
*/
|
|
50895
51167
|
setExecuteFunc(func: (context: FrameGraphContext) => void): void;
|
|
50896
51168
|
/** @internal */
|
|
51169
|
+
_initialize(): void;
|
|
51170
|
+
/** @internal */
|
|
50897
51171
|
_execute(): void;
|
|
50898
51172
|
/** @internal */
|
|
50899
51173
|
_isValid(): Nullable<string>;
|
|
@@ -55936,115 +56210,14 @@ declare module "../scene" {
|
|
|
55936
56210
|
}
|
|
55937
56211
|
}
|
|
55938
56212
|
|
|
55939
|
-
/**
|
|
55940
|
-
* The depth peeling renderer that performs
|
|
55941
|
-
* Order independant transparency (OIT).
|
|
55942
|
-
* This should not be instanciated directly, as it is part of a scene component
|
|
55943
|
-
*/
|
|
55944
|
-
declare class DepthPeelingRenderer {
|
|
55945
|
-
private _scene;
|
|
55946
|
-
private _engine;
|
|
55947
|
-
private _depthMrts;
|
|
55948
|
-
private _thinTextures;
|
|
55949
|
-
private _colorMrts;
|
|
55950
|
-
private _blendBackMrt;
|
|
55951
|
-
private _outputRT;
|
|
55952
|
-
private _blendBackEffectWrapper;
|
|
55953
|
-
private _blendBackEffectWrapperPingPong;
|
|
55954
|
-
private _finalEffectWrapper;
|
|
55955
|
-
private _effectRenderer;
|
|
55956
|
-
private _currentPingPongState;
|
|
55957
|
-
private _prePassEffectConfiguration;
|
|
55958
|
-
private _blendBackTexture;
|
|
55959
|
-
private _layoutCacheFormat;
|
|
55960
|
-
private _layoutCache;
|
|
55961
|
-
private _renderPassIds;
|
|
55962
|
-
private _candidateSubMeshes;
|
|
55963
|
-
private _excludedSubMeshes;
|
|
55964
|
-
private _excludedMeshes;
|
|
55965
|
-
private static _DEPTH_CLEAR_VALUE;
|
|
55966
|
-
private static _MIN_DEPTH;
|
|
55967
|
-
private static _MAX_DEPTH;
|
|
55968
|
-
private _colorCache;
|
|
55969
|
-
private _passCount;
|
|
55970
|
-
/**
|
|
55971
|
-
* Number of depth peeling passes. As we are using dual depth peeling, each pass two levels of transparency are processed.
|
|
55972
|
-
*/
|
|
55973
|
-
get passCount(): number;
|
|
55974
|
-
set passCount(count: number);
|
|
55975
|
-
private _useRenderPasses;
|
|
55976
|
-
/**
|
|
55977
|
-
* Instructs the renderer to use render passes. It is an optimization that makes the rendering faster for some engines (like WebGPU) but that consumes more memory, so it is disabled by default.
|
|
55978
|
-
*/
|
|
55979
|
-
get useRenderPasses(): boolean;
|
|
55980
|
-
set useRenderPasses(usePasses: boolean);
|
|
55981
|
-
/**
|
|
55982
|
-
* Add a mesh in the exclusion list to prevent it to be handled by the depth peeling renderer
|
|
55983
|
-
* @param mesh The mesh to exclude from the depth peeling renderer
|
|
55984
|
-
*/
|
|
55985
|
-
addExcludedMesh(mesh: AbstractMesh): void;
|
|
55986
|
-
/**
|
|
55987
|
-
* Remove a mesh from the exclusion list of the depth peeling renderer
|
|
55988
|
-
* @param mesh The mesh to remove
|
|
55989
|
-
*/
|
|
55990
|
-
removeExcludedMesh(mesh: AbstractMesh): void;
|
|
55991
|
-
/** Shader language used by the renderer */
|
|
55992
|
-
protected _shaderLanguage: ShaderLanguage;
|
|
55993
|
-
/**
|
|
55994
|
-
* Gets the shader language used in this renderer
|
|
55995
|
-
*/
|
|
55996
|
-
get shaderLanguage(): ShaderLanguage;
|
|
55997
|
-
/**
|
|
55998
|
-
* Instanciates the depth peeling renderer
|
|
55999
|
-
* @param scene Scene to attach to
|
|
56000
|
-
* @param passCount Number of depth layers to peel
|
|
56001
|
-
* @returns The depth peeling renderer
|
|
56002
|
-
*/
|
|
56003
|
-
constructor(scene: Scene, passCount?: number);
|
|
56004
|
-
private _createRenderPassIds;
|
|
56005
|
-
private _releaseRenderPassIds;
|
|
56006
|
-
private _createTextures;
|
|
56007
|
-
private _disposeTextures;
|
|
56008
|
-
private _updateTextures;
|
|
56009
|
-
private _updateTextureReferences;
|
|
56010
|
-
private _createEffects;
|
|
56011
|
-
/**
|
|
56012
|
-
* Links to the prepass renderer
|
|
56013
|
-
* @param prePassRenderer The scene PrePassRenderer
|
|
56014
|
-
*/
|
|
56015
|
-
setPrePassRenderer(prePassRenderer: PrePassRenderer): void;
|
|
56016
|
-
/**
|
|
56017
|
-
* Binds depth peeling textures on an effect
|
|
56018
|
-
* @param effect The effect to bind textures on
|
|
56019
|
-
*/
|
|
56020
|
-
bind(effect: Effect): void;
|
|
56021
|
-
private _renderSubMeshes;
|
|
56022
|
-
private _finalCompose;
|
|
56023
|
-
/**
|
|
56024
|
-
* Checks if the depth peeling renderer is ready to render transparent meshes
|
|
56025
|
-
* @returns true if the depth peeling renderer is ready to render the transparent meshes
|
|
56026
|
-
*/
|
|
56027
|
-
isReady(): boolean;
|
|
56028
|
-
/**
|
|
56029
|
-
* Renders transparent submeshes with depth peeling
|
|
56030
|
-
* @param transparentSubMeshes List of transparent meshes to render
|
|
56031
|
-
* @returns The array of submeshes that could not be handled by this renderer
|
|
56032
|
-
*/
|
|
56033
|
-
render(transparentSubMeshes: SmartArray<SubMesh>): SmartArray<SubMesh>;
|
|
56034
|
-
/**
|
|
56035
|
-
* Disposes the depth peeling renderer and associated resources
|
|
56036
|
-
*/
|
|
56037
|
-
dispose(): void;
|
|
56038
|
-
}
|
|
56039
|
-
|
|
56040
56213
|
declare module "../scene" {
|
|
56041
56214
|
interface Scene {
|
|
56042
56215
|
/**
|
|
56043
56216
|
* The depth peeling renderer
|
|
56044
56217
|
*/
|
|
56045
|
-
depthPeelingRenderer: Nullable<
|
|
56218
|
+
depthPeelingRenderer: Nullable<ThinDepthPeelingRenderer>;
|
|
56046
56219
|
/** @internal (Backing field) */
|
|
56047
|
-
_depthPeelingRenderer: Nullable<
|
|
56220
|
+
_depthPeelingRenderer: Nullable<ThinDepthPeelingRenderer>;
|
|
56048
56221
|
/**
|
|
56049
56222
|
* Flag to indicate if we want to use order independent transparency, despite the performance hit
|
|
56050
56223
|
*/
|