The constructor for MSAARenderPass
. It builds an internal scene with a camera looking at a
quad.
The sampling level determines the number of samples that will be performed per frame.
Renders will happen 2 ^ samplingLevel
time(s). samplingLevel
stands between 0
and 5
.
Therefore there can be between 1 and 32 samples.
The list of offsets to apply to the camera, per sampling level, adapted from :
Releases all used resources.
The render function of MSAARenderPass
.
The ThreeJS WebGLRenderer instance to render the scene with.
The ThreeJS Scene instance to render the scene with.
The ThreeJS Camera instance to render the scene with.
A ThreeJS WebGLRenderTarget instance to render the scene to.
A ThreeJS WebGLRenderTarget instance to render the scene.
Resize the internal render target to match the new size specified.
New width to apply to the render target.
New height to apply to the render target.
Generated using TypeDoc
MapView's MSAA implementation.
MSAA stands for Multi Sampling Anti-Aliasing, and its concept is to provide a rendering engine with additional color values for each pixel, so they can include the missing bits between them on a screen. WebGL already comes with a native MSAA implementation with four samples. Because of its native nature, it is more efficient and one may not want to use MapView's MSAA implementation when these four samples are satisfying. However in some situations they are not: on low devices, MSAA can impact the framerate and we may desire to reduce the number of samples at runtime. On the other hand, when the interaction stops, the engine also stops rendering the map, and because a map relies on many line-like patterns, aliasing can then turn very noticeable. In such static renders, the number of samples could be dramatically increased on a last frame to render.