Skip to content

API / geotoolkit3d / postprocessing / DepthPeelingPass / DepthPeelingPass

Class: DepthPeelingPass

postprocessing.DepthPeelingPass.DepthPeelingPass

A render pass class that can be used as the first pass in the rendering pipeline.<br> This class is able to render a scene with correct transparency, To be precise, depth peeling offer correct transparency at the fragment level, up to a certain number of consecutive transparency on each fragment. For example, depth peeling with N passes will allow up to N transparent fragment to render and blend properly on the same pixel element.<br>

Additionally, this render pass allow Super-Resolution Anti-Aliasing.<br> This antialiasing solution produce a good result for a decent performance cost.<br> It works by rendering the entire image at x2 scale (both horizontally and vertically) then scale down the result to fit in the desired plot view.<br> The benefit of this technique is it's simplicity, and compatibility with DepthPeeling rendering.

This render pass require WebGL2, a version check is included in the shader code below.

Deprecated

since 4.1, this class is not meant to be public.

Hierarchy

Table of contents

Constructors
  • [new DepthPeelingPass(options)](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit3d.postprocessing.depthpeelingpass.depthpeelingpass.md#new depthpeelingpass(options))
Methods

Contents

Constructors

new DepthPeelingPass(options)

• new DepthPeelingPass(options)

Parameters

Name Type
optionsOptions

Overrides

AbstractPass.constructor

Methods

dispose

▸ dispose(): void

Dispose resources in this pass

Returns

void

Inherited from

AbstractPass.dispose


getClassName

▸ getClassName(): string

Returns

string

Inherited from

AbstractPass.getClassName


getOptions

▸ getOptions(): Required<Omit<Options, "clearcolor" | "clearcoloralpha"&gt;&gt;

Get the DepthPeelingPass options

Returns

Required<Omit<Options, "clearcolor" | "clearcoloralpha"&gt;&gt;


getType

▸ getType(): string

Get the type of the class

Deprecated

since 4.1. Use getClassName() instead.

Returns

string

Inherited from

AbstractPass.getType


isDisposed

▸ isDisposed(): boolean

Return whether this pass has been disposed or not.

Returns

boolean

Inherited from

AbstractPass.isDisposed


isEnabled

▸ isEnabled(): boolean

Return true if this pass is enabled.

Returns

boolean

Inherited from

AbstractPass.isEnabled


render

▸ render(renderer, writeBuffer?, readBuffer?, deltaTime?, maskActive?): void

This render function will be called every time in animation loop.

Parameters

Name Type Description
rendererWebGLRendererthe WebGLRenderer
Optional writeBufferWebGLRenderTarget<Texture&gt;the WebGL render target to write
Optional readBufferWebGLRenderTarget<Texture&gt;the WebGL render target to read
Optional deltaTimenumberdelta time
Optional maskActivebooleanthe flag for stencil buffer in renderer

Returns

void

Overrides

AbstractPass.render


setOptions

▸ setOptions(options?): DepthPeelingPass

Set the DepthPeelingPass options.

Parameters

Name Type
Optional optionsOptionsBase

Returns

DepthPeelingPass

Overrides

AbstractPass.setOptions


setSize

▸ setSize(width, height): DepthPeelingPass

Set size for render target

Parameters

Name Type
widthnumber
heightnumber

Returns

DepthPeelingPass

Overrides

AbstractPass.setSize


getClassName

▸ Static getClassName(): string

Returns

string

Inherited from

AbstractPass.getClassName