39 lines
742 B
C++
39 lines
742 B
C++
#pragma once
|
|
#ifndef REAL_BUILD
|
|
# include "externals.hh"
|
|
#endif
|
|
|
|
#include "rendertarget.hh"
|
|
#include "shaders.hh"
|
|
|
|
|
|
struct T_BloomPass
|
|
{
|
|
static constexpr uint32_t BloomLevels = 6;
|
|
|
|
T_BloomPass( ) = delete;
|
|
T_BloomPass( T_BloomPass const& ) = delete;
|
|
T_BloomPass( T_BloomPass&& ) = delete;
|
|
|
|
T_BloomPass( __rw__ T_Texture& input );
|
|
|
|
void render( );
|
|
void makeUI( );
|
|
|
|
T_Texture& output( ) { return txBlur0_; }
|
|
|
|
private:
|
|
T_Texture& input_;
|
|
|
|
T_ShaderPipeline spHighpass_;
|
|
T_ShaderPipeline spDownsample_;
|
|
T_ShaderPipeline spBlur_;
|
|
|
|
T_TextureSampler sampler_;
|
|
T_Texture txBlur0_ , txBlur1_;
|
|
T_AutoArray< T_Rendertarget , BloomLevels > rtBlur0_ , rtBlur1_;
|
|
|
|
float filterParams_[ 3 ];
|
|
float blurWeights_[ 4 ];
|
|
float blurSize_;
|
|
};
|