diff --git a/demo.cc b/demo.cc index bad302b..3c62500 100644 --- a/demo.cc +++ b/demo.cc @@ -57,7 +57,7 @@ void T_Demo::render( ) playingPrevious = playing; raymarcher->render( ); - dof->render( ); + dof->render( position , sync ); bloom->render( ); combine->render( ); fxaa->render( ); diff --git a/dof.cc b/dof.cc index 50d8479..86aab82 100644 --- a/dof.cc +++ b/dof.cc @@ -37,7 +37,9 @@ T_DoFPass::T_DoFPass( "fullscreen.v.glsl" , "dof-pass2.f.glsl" }); } -void T_DoFPass::render( ) +void T_DoFPass::render( + __rd__ const float position , + __rd__ T_SyncData const& ) { PSTART( ); enum { @@ -77,7 +79,7 @@ void T_DoFPass::render( ) glProgramUniform3f( id , U_RES_TIME , imageInput_.width( ) , imageInput_.height( ) , - 0 ); + position ); tm.bind( 0 , txPass1_ , *tm.sampler( "linear-edge" ) ); diff --git a/dof.hh b/dof.hh index c6ad87f..5dcfc3e 100644 --- a/dof.hh +++ b/dof.hh @@ -3,6 +3,9 @@ #include "shaders.hh" +struct T_SyncData; + + struct T_DoFPass { T_DoFPass( ) = delete; @@ -12,7 +15,9 @@ struct T_DoFPass T_DoFPass( __rw__ T_Texture& imageInput , __rw__ T_Texture& depthInput ); - void render( ); + void render( + __rd__ const float position , + __rd__ T_SyncData const& sync ); void makeUI( ); T_Texture& output( ) { return txOutput_; }