Protected constructorProtected aerialProtected multiReadonly pipelinesReadonly resourcesProtected skyProtected transmittanceReadonly usesUsed to encode rendering of the lookup table. The encoder is not end()ed by 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.
Used to encode rendering of the lookup tables. The encoder is not end()ed by this function.
Optional atmosphere: AtmosphereIf this is defined, updateAtmosphere is called before rendering the lookup tables.
Renders the sky view and aerial perspective lookup tables.
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.
Used to encode rendering of the lookup tables. The encoder is not end()ed by this function.
Optional uniforms: UniformsIf this is defined, updateUniforms is called before rendering the lookup tables.
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.
A GPUComputePassEncoder to encode passes with. The encoder is not end()ed by this function.
Optional uniforms: UniformsUniforms to use for this frame. If this is given, the internal uniform buffer will be updated using updateUniforms.
Optional atmosphere: AtmosphereAtmosphere 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: booleanIf this is true, the sky view and aerial perspective lookup tables will not be rendered. Defaults to skipDynamicLutRendering.
Optional forceConstantLutRendering: booleanIf 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: booleanIf this is true, the sky view lookup table will be rendered, even if skipDynamicLutRendering is true. Defaults to false.
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.
Used to encode rendering of the lookup table. The encoder is not end()ed by this function.
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.
Used to encode rendering of the lookup table. The encoder is not end()ed by 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.
Used to encode rendering of the lookup table. The encoder is not end()ed by this function.
updateAtmosphere: To write Atmosphere parameters to the internal uniform buffer, call this function.
Updates the renderer's internal uniform buffer containing the Atmosphere parameters as well as its host-side copy of Atmosphere parameters.
The new Atmosphere to override the current parameters.
SkyAtmosphereResources.updateAtmosphere: Updates the host-side Atmosphere parameters as well as the corresponding uniform buffer.
Updates the renderer's internal uniform buffer containing the Uniforms as well as its host-side copy of Uniforms.
The new Uniforms to override the current parameters.
If custom uniform buffers are used, this does nothing (see CustomUniformsSourceConfig).
SkyAtmosphereResources.updateUniforms: Update the Uniforms uniform buffers.
Static createCreates a SkyAtmosphereLutRenderer.
The GPUDevice used to create internal resources (textures, pipelines, etc.).
A SkyAtmosphereRendererConfig used to configure internal resources and behavior.
Optional existingPipelines: SkyAtmospherePipelinesIf this is defined, no new pipelines for rendering the internal lookup tables will be created. Instead, the existing pipelines given will be reused. The existing pipelines must be compatible with the SkyAtmosphereRendererConfig. Especially, SkyAtmosphereRendererConfig.lookUpTables and SkyAtmosphereRendererConfig.shadow should be the same.
Optional existingResources: SkyAtmosphereResourcesIf this is defined, no new resources (buffers, textures, samplers) will be created. Instead, the existing resources given will be used.
Static createAsynchronously creates a SkyAtmosphereLutRenderer.
All pipelines used by this renderer are created asynchronously.
The GPUDevice used to create internal resources (textures, pipelines, etc.).
A SkyAtmosphereRendererConfig used to configure internal resources and behavior.
Optional existingPipelines: SkyAtmospherePipelinesIf this is defined, no new pipelines for rendering the internal lookup tables will be created. Instead, the existing pipelines given will be reused. The existing pipelines must be compatible with the SkyAtmosphereRendererConfig. Especially, SkyAtmosphereRendererConfig.lookUpTables and SkyAtmosphereRendererConfig.shadow should be the same.
Optional existingResources: SkyAtmosphereResourcesIf this is defined, no new resources (buffers, textures, samplers) will be created. Instead, the existing resources given will be used.
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.