Constructors

Properties

#atmosphere: Atmosphere

Atmosphere parameters.

Set using updateAtmosphere.

aerialPerspectiveLut: LookUpTable

The aerial perspective look up table. Stores the aerial perspective in a volume fit to the view frustum.

Parameterized by x and y corresponding to the image plane and z being the view depth (range: [0, AerialPerspectiveLutConfig.size[2] * AerialPerspectiveLutConfig.distancePerSlice]).

atmosphereBuffer: GPUBuffer

A uniform buffer of size ATMOSPHERE_BUFFER_SIZE storing the Atmosphere's parameters.

device: GPUDevice

The WebGPU device the resources are allocated from.

label: string

A name that is propagated to the WebGPU resources.

lutSampler: GPUSampler

A linear sampler used to sample the look up tables.

multiScatteringLut: LookUpTable

The multiple scattering look up table. Stores multiple scattering contribution.

Paramterized by the sun / zenith angle in x (range: [π, 0]) and the altitude in y (range: [0, top], where top is the height of the atmosphere).

skyViewLut: LookUpTable

The sky view lookup table. Stores the distant sky around the camera with respect to its altitude within the atmosphere.

The lookup table is parameterized by a longitude mapping along the X-axis and a latitude mapping along the Y-axis. The latitude range is always [-π/2, π/2], where 0 represents the horizon. There are two supported longitude mappings:

  • Default (Sun-centric): Longitude is mapped with respect to the sun direction, assuming symmetric contributions. This mapping uses a range of [0, π], where 0 is directly toward the sun and π is directly opposite. This mode is optimized for scenes with a single dominant light source.
  • Uniform: Longitude is uniformly mapped around the zenith with a full range of [0, 2π]. This mode supports multiple light sources but comes at the cost of angular resolution.

To enable the uniform longitude mapping, SkyViewLutConfig.uniformParameterizationConfig must be defined. Note that this mapping assumes that light and view directions are given in a right-handed Y-up coordinate system. This is configured by SkyViewUniformParameterizationConfig.isYUp and SkyViewUniformParameterizationConfig.isRightHanded.

transmittanceLut: LookUpTable

The transmittance look up table. Stores the medium transmittance toward the sun.

Parameterized by the view / zenith angle in x and the altitude in y.

uniformsBuffer?: GPUBuffer

A uniform buffer of size UNIFORMS_BUFFER_SIZE storing parameters set through Uniforms.

If custom uniform buffers are used, this is undefined (see CustomUniformsSourceConfig).

Accessors

Methods