42 lines
836 B
C++
42 lines
836 B
C++
#pragma once
|
|
#ifndef REAL_BUILD
|
|
# define REAL_BUILD
|
|
# include "externals.hh"
|
|
# include "texture.hh"
|
|
# include "rendertarget.hh"
|
|
# include "utilities.hh"
|
|
# undef REAL_BUILD
|
|
#endif
|
|
|
|
|
|
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_FilesWatcher& watcher ,
|
|
__rw__ T_Texture& input );
|
|
|
|
void render( );
|
|
void makeUI( );
|
|
|
|
private:
|
|
T_Texture& input_;
|
|
|
|
T_ShaderProgram spHighpass_;
|
|
T_ShaderProgram spDownsample_;
|
|
T_ShaderProgram spBlur_;
|
|
T_ShaderProgram spCombine_;
|
|
|
|
T_Texture txBlur0_ , txBlur1_;
|
|
std::vector< T_Rendertarget > rtBlur0_ , rtBlur1_;
|
|
|
|
float filterParams_[ 3 ];
|
|
float blurWeights_[ 4 ];
|
|
float blurSize_;
|
|
float combineStrength_;
|
|
float combineAttenuation_;
|
|
};
|