VsmShadowOptions

View-level options for VSM (Variance Shadow Maps) shadowing.

Warning: This API is still experimental and subject to change.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

Number of anisotropic samples to use when sampling a VSM shadow map. If greater than 0, mipmaps will automatically be generated each frame for all lights. The number of anisotropic samples = 2 ^ anisotropy. Default: 0.

Link copied to clipboard

Whether to use a 32-bits or 16-bits texture format for VSM shadow maps. 32-bits precision is rarely needed, but it does reduce light leaks as well as "fading" of the shadows. Setting this to true for a single shadow map will double the memory usage of all shadow maps. This may not be supported on all mobile devices. Default: false.

Link copied to clipboard

VSM light bleeding reduction amount, between 0 and 1. Default: 0.15.

Link copied to clipboard

Whether to generate mipmaps for all VSM shadow maps. Default: false.

Link copied to clipboard

The number of MSAA samples to use when rendering VSM shadow maps. Must be a power-of-two and greater than or equal to 1. A value of 1 effectively turns off MSAA. Higher values may not be available depending on the underlying hardware. Default: 1.