From 88f1ecfb5d7f235ff143f585d44e45d56bd3065c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= <tseeker@nocternity.net>
Date: Sat, 7 Oct 2017 19:10:47 +0200
Subject: [PATCH] DoF gets proper time value (but it's fucking useless)

---
 demo.cc | 2 +-
 dof.cc  | 6 ++++--
 dof.hh  | 7 ++++++-
 3 files changed, 11 insertions(+), 4 deletions(-)

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_; }