Convolves an environment cubemap into a diffuse irradiance map for IBL. More...
#include <IrradiancePass.h>
Public Member Functions | |
| FRAMEWORK_API void | Init () |
| Allocates the irradiance cubemap, per-face framebuffers, pipeline, and quad geometry. | |
| FRAMEWORK_API void | Shutdown () |
| Releases all GPU resources owned by this pass. | |
| FRAMEWORK_API void | BakeIrradianceMap (Ref< TextureCube > activeCubemap) |
Convolves activeCubemap and writes the result into the internal irradiance map. | |
| Ref< Pipeline > | GetPipeline () |
| Returns the convolution pipeline. | |
| Ref< TextureCube > | GetIrradianceMap () |
| Returns the irradiance cubemap produced by the most recent BakeIrradianceMap call. | |
Convolves an environment cubemap into a diffuse irradiance map for IBL.
Renders a fullscreen quad into each of the six faces of a cubemap using a hemisphere-integration convolution shader. The resulting irradiance map is consumed by GeometryPass for the ambient IBL lighting term.
BakeIrradianceMap is called by SceneRenderer whenever the active environment cubemap changes (e.g. when a SkylightComponent assigns a new texture). The bake is synchronous with respect to the GPU frame boundary.
| void Raven::IrradiancePass::BakeIrradianceMap | ( | Ref< TextureCube > | activeCubemap | ) |
Convolves activeCubemap and writes the result into the internal irradiance map.
Renders all six cubemap faces. Skips re-baking if the same cubemap is passed consecutively (tracked by the m_IrradianceBaked flag).
| activeCubemap | Source environment cubemap to convolve. |
|
inline |
Returns the irradiance cubemap produced by the most recent BakeIrradianceMap call.
| void Raven::IrradiancePass::Init | ( | ) |
Allocates the irradiance cubemap, per-face framebuffers, pipeline, and quad geometry.
| void Raven::IrradiancePass::Shutdown | ( | ) |
Releases all GPU resources owned by this pass.