2017-09-30 19:13:06 +02:00
|
|
|
#pragma once
|
|
|
|
#ifndef REAL_BUILD
|
|
|
|
# include "externals.hh"
|
|
|
|
#endif
|
|
|
|
|
2017-10-02 09:40:36 +02:00
|
|
|
#include "rendertarget.hh"
|
|
|
|
#include "programs.hh"
|
|
|
|
|
2017-09-30 19:13:06 +02:00
|
|
|
|
|
|
|
struct T_BloomPass
|
|
|
|
{
|
2017-09-30 21:27:50 +02:00
|
|
|
static constexpr uint32_t BloomLevels = 6;
|
2017-09-30 19:13:06 +02:00
|
|
|
|
|
|
|
T_BloomPass( ) = delete;
|
|
|
|
T_BloomPass( T_BloomPass const& ) = delete;
|
|
|
|
T_BloomPass( T_BloomPass&& ) = delete;
|
|
|
|
|
2017-09-30 21:30:31 +02:00
|
|
|
T_BloomPass( __rw__ T_FilesWatcher& watcher ,
|
2017-09-30 19:13:06 +02:00
|
|
|
__rw__ T_Texture& input );
|
|
|
|
|
|
|
|
void render( );
|
2017-09-30 19:41:45 +02:00
|
|
|
void makeUI( );
|
2017-09-30 19:13:06 +02:00
|
|
|
|
2017-10-01 18:51:02 +02:00
|
|
|
T_Texture& output( ) { return txBlur0_; }
|
|
|
|
|
2017-09-30 19:13:06 +02:00
|
|
|
private:
|
|
|
|
T_Texture& input_;
|
|
|
|
|
|
|
|
T_ShaderProgram spHighpass_;
|
2017-09-30 21:22:38 +02:00
|
|
|
T_ShaderProgram spDownsample_;
|
2017-09-30 19:13:06 +02:00
|
|
|
T_ShaderProgram spBlur_;
|
|
|
|
|
|
|
|
T_Texture txBlur0_ , txBlur1_;
|
|
|
|
std::vector< T_Rendertarget > rtBlur0_ , rtBlur1_;
|
2017-09-30 19:41:45 +02:00
|
|
|
|
|
|
|
float filterParams_[ 3 ];
|
|
|
|
float blurWeights_[ 4 ];
|
|
|
|
float blurSize_;
|
2017-09-30 19:13:06 +02:00
|
|
|
};
|