API / geotoolkit3d / postprocessing / DepthPeelingPass / DepthPeelingPass
postprocessing.DepthPeelingPass.DepthPeelingPass
A render pass class that can be used as the first pass in the rendering pipeline.
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.
Additionally, this render pass allow Super-Resolution Anti-Aliasing.
This antialiasing solution produce a good result for a decent performance cost.
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.
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.
↳
DepthPeelingPass
Constructors
Methods
▸ dispose(): void
Dispose resources in this pass
void
▸ getClassName(): string
string
▸ getOptions(): Required<Omit<Options, "clearcolor" | "clearcoloralpha">>
Get the DepthPeelingPass options
Required<Omit<Options, "clearcolor" | "clearcoloralpha">>
▸ getType(): string
Get the type of the class
Deprecated
since 4.1. Use getClassName() instead.
string
▸ isDisposed(): boolean
Return whether this pass has been disposed or not.
boolean
▸ isEnabled(): boolean
Return true if this pass is enabled.
boolean
▸ render(renderer, writeBuffer?, readBuffer?, deltaTime?, maskActive?): void
This render function will be called every time in animation loop.
| Name | Type | Description |
|---|---|---|
renderer | WebGLRenderer | the WebGLRenderer |
Optional writeBuffer | WebGLRenderTarget<Texture> | the WebGL render target to write |
Optional readBuffer | WebGLRenderTarget<Texture> | the WebGL render target to read |
Optional deltaTime | number | delta time |
Optional maskActive | boolean | the flag for stencil buffer in renderer |
void
▸ setOptions(options?): DepthPeelingPass
Set the DepthPeelingPass options.
| Name | Type |
|---|---|
Optional options | OptionsBase |
▸ setSize(width, height): DepthPeelingPass
Set size for render target
| Name | Type |
|---|---|
width | number |
height | number |
▸ Static getClassName(): string
string