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.
The Sampler used in both the ComputePass and in IBL
shading from the buildShaders utility function.
HDRLoader used to load the .hdr file.
Options used to generate the lutTexture, specularTexture and diffuseTexture.
Define the default environment maps rotation.
BRDF GGX LUT Texture used for IBL shading.
Diffuse environment cube map Texture.
Specular environment cube map Texture.
Private
#copyPrivate
Once the given ComputePass has written to a temporary storage Texture, copy it into our permanent Texture.
The GPU command encoder to use.
Temporary storage Texture used in the ComputePass.
Permanent Texture (either the lutTexture, specularTexture or diffuseTexture) to copy onto.
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.
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 generates the specularTexture and diffuseTexture using two separate ComputePass.
The url of the .hdr file to load.
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 glTF.
Example