class
render::IBLUtility
Helper class that handles generation and processing of textures used for image based lighting.
Public
Methods
FilterCubemapForSpecular
Performs filtering on the cubemap, populating its mip-maps with filtered values that can be used for evaluating specular reflections.
- commandBuffer
- Command buffer to execute on.
- cubemap
- Cubemap to filter. Its mip level 0 will be read, filtered and written into other mip levels.
- scratch
- Temporary cubemap texture to use for the filtering process. Must match the size of the source cubemap. Provide null to automatically create a scratch cubemap.
FilterCubemapForIrradiance
Performs filtering on the cubemap, populating the output cubemap with values that can be used for evaluating irradiance for use in diffuse lighting.
Uses order-5 SH (25 coefficients) and outputs the values in the form of a cubemap.
- commandBuffer
- Command buffer to execute on.
- cubemap
- Cubemap to filter. Its mip level 0 will be used as source.
- output
- Output cubemap to store the irradiance data in.
FilterCubemapForIrradiance
Performs filtering on the cubemap, populating the output texture with values that can be used for evaluating irradiance for use in diffuse lighting.
Uses order-3 SH (9 coefficients) and outputs the values in the form of SH coefficients.
- commandBuffer
- Command buffer to execute on.
- cubemap
- Cubemap to filter. Its mip level 0 will be used as source.
- output
- Output texture in which to place the results. Must be allocated using IrradianceReduceMat::createOutputTexture();
- outputIdx
- Index in the output buffer at which to write the output coefficients to.
ScaleCubemap
Scales a cubemap and outputs it in the destination texture, using hardware acceleration.
If both textures are the same size, performs a copy instead.
- commandBuffer
- Command buffer to execute on.
- src
- Source cubemap to scale.
- srcMip
- Determines which mip level of the source texture to scale.
- dst
- Desination texture to output the scaled data to. Must be usable as a render target.
- dstMip
- Determines which mip level of the destination texture to scale.
staticGetShCoeffTextureSize
Returns the size of the texture required to store the provided number of SH coefficient sets.
staticGetShCoeffXyFromIdx
Determines the position of a set of coefficients in the coefficient texture, depending on the coefficient index.
staticInstance
Returns a reference to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticInstancePtr
Returns a pointer to the module instance.
Module has to have been started up first otherwise an exception will be thrown.
staticShutDown
Shuts down this module and frees any resources it is using.
staticIsStarted
Query if the module has been started.
Protected
Methods
~Module<T>
OnStartUp
Override if you want your module to be notified once it has been constructed and started.
OnShutDown
Override if you want your module to be notified just before it is deleted.
staticInstanceInternal
Returns a singleton instance of this module.