GPU percentile metering, eye adaptation, and linear HDR pre-exposure. 更多...
#include <Exposure.h>
Public 成员函数 | |
| Exposure (Graphics *gfx) | |
| Create cross-backend exposure shaders and 1x1 history targets. | |
| Texture * | apply (Texture *source, float manualExposure, bool automatic, float minEV, float maxEV, const glm::vec3 &colorFilter, const glm::vec3 &lift, const glm::vec3 &inverseGamma, const glm::vec3 &gain, float vignette, float vignetteSmoothness, float lensDistortion, float lensScale, Texture *meterSource=nullptr, float deltaSeconds=1.f/60.f) |
| Apply manual and optional automatic exposure to a linear HDR source. | |
| void | invalidateHistory () |
| Invalidate eye-adaptation history, for camera cuts and mode changes. | |
详细描述
GPU percentile metering, eye adaptation, and linear HDR pre-exposure.
在文件 Exposure.h 第 13 行定义.
构造及析构函数说明
◆ Exposure()
|
explicit |
Create cross-backend exposure shaders and 1x1 history targets.
在文件 Exposure.cpp 第 37 行定义.
引用了 eve::graphics::Shader::declareFloat(), eve::graphics::shaders::kExposureAdapt, eve::graphics::shaders::kExposureApply , 以及 eve::graphics::shaders::kExposureMeter.
成员函数说明
◆ apply()
| Texture * eve::graphics::Exposure::apply | ( | Texture * | source, |
| float | manualExposure, | ||
| bool | automatic, | ||
| float | minEV, | ||
| float | maxEV, | ||
| const glm::vec3 & | colorFilter, | ||
| const glm::vec3 & | lift, | ||
| const glm::vec3 & | inverseGamma, | ||
| const glm::vec3 & | gain, | ||
| float | vignette, | ||
| float | vignetteSmoothness, | ||
| float | lensDistortion, | ||
| float | lensScale, | ||
| Texture * | meterSource = nullptr, |
||
| float | deltaSeconds = 1.f / 60.f |
||
| ) |
Apply manual and optional automatic exposure to a linear HDR source.
- 参数
-
source Linear HDR source texture. manualExposure Linear manual exposure multiplier. automatic Enable percentile metering and eye adaptation. minEV Minimum automatic exposure EV. maxEV Maximum automatic exposure EV. colorFilter Non-negative linear RGB multiplier applied after exposure. lift HDR shadow offsets applied before the signed gamma operation. inverseGamma Positive HDR midtone exponents. gain HDR highlight multipliers applied before lift. vignette Normalized radial edge-darkening strength. vignetteSmoothness Classic vignette border smoothness in [0.01,1]. lensDistortion Normalized radial UV-distortion strength. lensScale Global lens image scale in [0.01,5]. meterSource Optional pre-bloom HDR source used for luminance metering. deltaSeconds Frame delta used by eye adaptation.
- 返回
- Full-resolution pre-exposed linear HDR texture. @lifetime The returned texture is owned by this Exposure until the next target resize.
在文件 Exposure.cpp 第 93 行定义.
引用了 eve::graphics::Canvas::clear(), eve::graphics::Graphics::drawTexturedRectShaderDepthMotion(), eve::graphics::Graphics::drawTexturedRectShaderUV(), eve::graphics::Graphics::getCanvas(), eve::graphics::Canvas::getTexture(), eve::Opaque, eve::graphics::Shader::sendFloat(), eve::graphics::Graphics::setCanvas() , 以及 source.
◆ invalidateHistory()
|
inline |
Invalidate eye-adaptation history, for camera cuts and mode changes.
在文件 Exposure.h 第 46 行定义.
被这些函数引用 eve::graphics::AntiAliasing::invalidateTemporalHistory() , 以及 eve::graphics::AntiAliasing::setTemporalCamera().
该类的文档由以下文件生成:
- src/modules/graphics/Exposure.h
- src/modules/graphics/Exposure.cpp