demotool/bloom.hh
Emmanuel BENOîT aabf8949a8 Got rid of old texture binding code
Also this fixes the DoF texture wrapping bullshit
2017-10-02 14:48:16 +02:00

40 lines
762 B
C++

#pragma once
#ifndef REAL_BUILD
# include "externals.hh"
#endif
#include "rendertarget.hh"
#include "programs.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_FilesWatcher& watcher ,
__rw__ T_Texture& input );
void render( );
void makeUI( );
T_Texture& output( ) { return txBlur0_; }
private:
T_Texture& input_;
T_ShaderProgram spHighpass_;
T_ShaderProgram spDownsample_;
T_ShaderProgram spBlur_;
T_TextureSampler sampler_;
T_Texture txBlur0_ , txBlur1_;
std::vector< T_Rendertarget > rtBlur0_ , rtBlur1_;
float filterParams_[ 3 ];
float blurWeights_[ 4 ];
float blurSize_;
};