EnvironmentMap constructor.
Renderer or GPUCurtains class object used to create this EnvironmentMap.
parameters use to create this EnvironmentMap. Defines the various textures options.
The Renderer used.
Readonly
uuidThe universal unique id of the EnvironmentMap.
The Sampler used in both the ComputePass and in IBL
shading from the getPBRFragmentShaderCode utility function.
HDRLoader used to load the .hdr file.
Options used to generate the lutTexture, specularTexture and diffuseTexture.
Define the default environment maps rotation Mat3.
BRDF GGX LUT Texture used for IBL shading.
Diffuse environment cube map Texture.
Specular environment cube map Texture.
function assigned to the onRotationAxisChanged callback
Set or reset this EnvironmentMap renderer.
New Renderer or GPUCurtains instance to use.
Create our lutTexture eagerly.
Create our specularTexture and diffuseTexture eagerly. They could be resized later when calling the computeFromHDR method.
Create the BRDF GGX LUT texture using the provided LUT texture options and a ComputePass that runs once.
Create the specular cube map texture from a loaded HDRImageData using the provided specular texture options and a ComputePass that runs once.
parsed HDRImageData loaded by the hdrLoader.
Compute the diffuse cube map texture from the specular cube map texture using the provided diffuse texture options and a ComputePass that runs once.
Load an HDR environment map and then generate the specularTexture and diffuseTexture using two separate ComputePass.
The url of the .hdr file to load.
Generate the specularTexture and diffuseTexture using two separate ComputePass.
Destroy the EnvironmentMap and its associated textures.
Utility to create environment maps specular, diffuse and LUT textures using an HDR file.
Create a LUT texture on init using a ComputePass. Can load an HDR file and then create the specular and diffuse textures using two separate ComputePass.
Especially useful for IBL shading with LitMesh.
Example