Class SkyAtmosphereLutRenderer

Implements

Constructors

Properties

aerialPerspectiveLutPass: ComputePass
multiScatteringLutPass: ComputePass
pipelines: SkyAtmospherePipelines
skipDynamicLutRendering: boolean
skyViewLutPass: ComputePass
transmittanceLutPass: ComputePass
usesCustomUniforms: boolean

Methods

  • Renders the aerial perspective lookup table.

    To produce meaningful results, this requires the transmittance and multiple scattering lookup tables, as well as the uniform buffers containing the Atmosphere and Uniforms parameters to hold valid data. Call renderConstantLuts and updateUniforms to ensure this is the case.

    If (a) user-defined shadow map(s) is used (see SkyAtmosphereRendererConfig.shadow), make sure to encode any updates of the shadow map(s) before encoding this pass.

    Parameters

    • passEncoder: GPUComputePassEncoder

      Used to encode rendering of the lookup table. The encoder is not end()ed by this function.

    Returns void

    See

    • renderConstantLuts: To initialize the transmittance and multiple scattering lookup tables, as well as the internal uniform buffer storing the Atmosphere parameters, call this function.
    • updateUniforms: To write Uniforms to the internal uniform buffer, call this function.
  • Renders the transmittance and multiple scattering lookup tables.

    To produce meaningful results, this requires the internal uniform buffer containing the Atmosphere parameters to hold valid data. Use the atmosphere parameter to implicitly update the Atmosphere parameters or call updateAtmosphere to ensure this is the case.

    Since the transmittance and multiple scattering lookup tables are not view or light souce dependent, this only needs to be called if the Atmosphere parameters change.

    Parameters

    • passEncoder: GPUComputePassEncoder

      Used to encode rendering of the lookup tables. The encoder is not end()ed by this function.

    • Optional atmosphere: Atmosphere

      If this is defined, updateAtmosphere is called before rendering the lookup tables.

    Returns void

    See

  • Renders the lookup tables required for rendering the sky / atmosphere.

    To initialize or update the transmittance and multiple scattering lookup tables, pass new Atmosphere paramters to this function or use the forceConstantLutRendering parameter.

    Parameters

    • passEncoder: GPUComputePassEncoder

      A GPUComputePassEncoder to encode passes with. The encoder is not end()ed by this function.

    • Optional uniforms: Uniforms

      Uniforms to use for this frame. If this is given, the internal uniform buffer will be updated using updateUniforms.

    • Optional atmosphere: Atmosphere

      Atmosphere parameters to use for this frame. If this is given, the internal uniform buffer storing the Atmosphere parameters will be updated and the transmittance and multiple scattering lookup tables will be rendered.

    • Optional skipDynamicLutRendering: boolean

      If this is true, the sky view and aerial perspective lookup tables will not be rendered. Defaults to skipDynamicLutRendering.

    • Optional forceConstantLutRendering: boolean

      If this is true, the transmittance and multiple scattering lookup tables will be rendered regardless of whether the atmosphere parameter is undefined or not.

    • Optional forceSkyViewLutRendering: boolean

      If this is true, the sky view lookup table will be rendered, even if skipDynamicLutRendering is true. Defaults to false.

    Returns void

    See

  • Renders the multiple scattering lookup table.

    To produce meaningful results, this requires the internal uniform buffer containing the Atmosphere parameters to hold valid data. Call updateAtmosphere to ensure this is the case.

    Since the multiple scattering lookup table is not view or light souce dependent, this only needs to be called if the Atmosphere parameters change.

    Parameters

    • passEncoder: GPUComputePassEncoder

      Used to encode rendering of the lookup table. The encoder is not end()ed by this function.

    Returns void

    See

    updateAtmosphere: To write Atmosphere parameters to the internal uniform buffer, call this function.

  • Renders the sky view table.

    To produce meaningful results, this requires the transmittance and multiple scattering lookup tables, as well as the uniform buffers containing the Atmosphere and Uniforms parameters to hold valid data. Call renderConstantLuts and updateUniforms to ensure this is the case.

    Parameters

    • passEncoder: GPUComputePassEncoder

      Used to encode rendering of the lookup table. The encoder is not end()ed by this function.

    Returns void

    See

    • renderConstantLuts: To initialize the transmittance and multiple scattering lookup tables, as well as the internal uniform buffer storing the Atmosphere parameters, call this function.
    • updateUniforms: To write Uniforms to the internal uniform buffer, call this function.
  • Renders the transmittance lookup table.

    To produce meaningful results, this requires the internal uniform buffer containing the Atmosphere parameters to hold valid data. Call updateAtmosphere to ensure this is the case.

    Since the transmittance lookup table is not view or light souce dependent, this only needs to be called if the Atmosphere parameters change.

    Parameters

    • passEncoder: GPUComputePassEncoder

      Used to encode rendering of the lookup table. The encoder is not end()ed by this function.

    Returns void

    See

    updateAtmosphere: To write Atmosphere parameters to the internal uniform buffer, call this function.