demotool/dof.hh
2017-10-15 09:34:03 +02:00

43 lines
800 B
C++

#pragma once
#include "rendertarget.hh"
#include "shaders.hh"
#include "control.hh"
struct T_SyncData;
struct T_DoFPass
{
T_DoFPass( ) = delete;
T_DoFPass( T_DoFPass const& ) = delete;
T_DoFPass( T_DoFPass&& ) = delete;
T_DoFPass( __rw__ T_Texture& imageInput ,
__rw__ T_Texture& depthInput );
void render(
__rd__ const float position ,
__rd__ T_SyncData const& sync );
void makeUI( );
T_Texture& output( ) { return txOutput_; }
private:
T_Texture& imageInput_;
T_Texture& depthInput_;
T_ShaderPipeline spPass1_;
T_ShaderPipeline spPass2_;
T_Texture txPass1_ , txOutput_;
T_Rendertarget rtPass1_ , rtPass2_;
// SharpDist/SharpRange/Falloff/MaxBlur
float filterParams_[ 4 ];
int nSamples_;
// XXX experimenting with control system
cops::T_Operations ops_;
};