载入中...
搜索中...
未找到
eve::graphics::Bloom类 参考

Linear-HDR bloom pyramid with selectable Karis/tent or Gaussian/scatter reconstruction. 更多...

#include <Bloom.h>

Public 成员函数

 Bloom (Graphics *gfx)
 Create the cross-backend bloom shaders.
 
Result< void > configureFilter (const BloomFilterSettings &settings)
 Select a reconstruction filter for subsequent builds.
 
BloomFilterSettings filterSettings () const
 Return a value snapshot. Render thread only; retains no references.
 
Texture * build (Texture *source, float threshold, float scatter=1.f)
 Build the selected bloom pyramid from an HDR source.
 
Texture * apply (Texture *source, float intensity, float threshold, float scatter=1.f)
 Add the reconstructed bloom to the HDR source in a full-size target.
 

详细描述

Linear-HDR bloom pyramid with selectable Karis/tent or Gaussian/scatter reconstruction.

The returned texture remains owned by Graphics and is valid until the source dimensions change or Graphics is destroyed.

在文件 Bloom.h 第 42 行定义.

构造及析构函数说明

◆ Bloom()

eve::graphics::Bloom::Bloom ( Graphics *  gfx)
explicit

Create the cross-backend bloom shaders.

在文件 Bloom.cpp 第 35 行定义.

引用了 eve::graphics::Shader::declareFloat(), eve::graphics::shaders::kBloomDownsample , 以及 eve::graphics::shaders::kBloomUpsample.

成员函数说明

◆ apply()

Texture * eve::graphics::Bloom::apply ( Texture *  source,
float  intensity,
float  threshold,
float  scatter = 1.f 
)

Add the reconstructed bloom to the HDR source in a full-size target.

参数
sourceLinear HDR source texture.
intensityBloom contribution multiplier.
thresholdLinear soft-knee threshold.
scatterTent reconstruction radius.
返回
Full-resolution linear HDR source plus bloom. @lifetime The returned texture is owned by this Bloom and remains valid until its targets resize.

在文件 Bloom.cpp 第 118 行定义.

引用了 eve::Additive, build(), eve::graphics::Canvas::clear(), eve::graphics::Graphics::drawTexturedRectShaderUV(), eve::graphics::BloomFilterSettings::filter, eve::graphics::Graphics::getCanvas(), eve::graphics::Canvas::getTexture(), eve::graphics::KarisTent, eve::Opaque, previous, eve::graphics::Graphics::setCanvas() , 以及 source.

◆ build()

Texture * eve::graphics::Bloom::build ( Texture *  source,
float  threshold,
float  scatter = 1.f 
)

Build the selected bloom pyramid from an HDR source.

参数
sourceLinear HDR source texture.
thresholdLinear soft-knee threshold.
scatterTent reconstruction radius in source texels; Gaussian uses filterSettings().scatter.
返回
Reconstructed half-resolution linear HDR bloom texture. @lifetime The returned texture is owned by this Bloom and remains valid until its targets resize.

在文件 Bloom.cpp 第 85 行定义.

引用了 eve::Additive, eve::graphics::Graphics::drawTexturedRectShaderUV(), eve::graphics::BloomFilterSettings::filter, eve::graphics::Graphics::getCanvas(), eve::graphics::Canvas::getHeight(), eve::graphics::Canvas::getWidth(), input, eve::graphics::KarisTent, eve::Opaque, previous, eve::graphics::Graphics::setCanvas(), source , 以及 target.

被这些函数引用 apply().

◆ configureFilter()

Result< void > eve::graphics::Bloom::configureFilter ( const BloomFilterSettings &  settings)

Select a reconstruction filter for subsequent builds.

返回
InvalidArgument without mutation for invalid settings, success otherwise. @ownership Copies settings; GPU targets remain owned by Graphics.
  • @thread Render thread only; invokes no callbacks. Target allocation is deferred to build.

在文件 BloomGaussian.cpp 第 27 行定义.

引用了 eve::Result< T >::failure(), settings, eve::Result< T >::success(), valid , 以及 eve::graphics::validateBloomFilterSettings().

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().

◆ filterSettings()

BloomFilterSettings eve::graphics::Bloom::filterSettings ( ) const
inline

Return a value snapshot. Render thread only; retains no references.

在文件 Bloom.h 第 56 行定义.

被这些函数引用 eve::graphics::detail::exposeShaderResourceBindings().


该类的文档由以下文件生成: