From 8b0e6e2143b0502575d5ac7e0e8098d46c02ee07 Mon Sep 17 00:00:00 2001 From: Emmanuel Benoit Date: Sat, 30 Sep 2017 21:30:31 +0200 Subject: [PATCH] Removed useless parameters --- bloom.cc | 6 ++---- bloom.hh | 4 +--- main.cc | 8 ++++---- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/bloom.cc b/bloom.cc index 2bd717b..6159d8e 100644 --- a/bloom.cc +++ b/bloom.cc @@ -6,8 +6,6 @@ T_BloomPass::T_BloomPass( - __rd__ const uint32_t width , - __rd__ const uint32_t height , __rw__ T_FilesWatcher& watcher , __rw__ T_Texture& input ) : input_( input ) , @@ -16,8 +14,8 @@ T_BloomPass::T_BloomPass( spBlur_( GL_FRAGMENT_SHADER , watcher ) , spCombine_( GL_FRAGMENT_SHADER , watcher ) , // - txBlur0_( width , height , E_TexType::RGB16F , BloomLevels ) , - txBlur1_( width , height , E_TexType::RGB16F , BloomLevels ) , + txBlur0_( input.width( ) , input.height( ) , E_TexType::RGB16F , BloomLevels ) , + txBlur1_( input.width( ) , input.height( ) , E_TexType::RGB16F , BloomLevels ) , // filterParams_{ 1.6 , 1.2 , .95 } , blurWeights_{ 0.324 , 0.232 , 0.0855 , 0.0205 } , diff --git a/bloom.hh b/bloom.hh index 42ea3ff..4f1cef1 100644 --- a/bloom.hh +++ b/bloom.hh @@ -17,9 +17,7 @@ struct T_BloomPass T_BloomPass( T_BloomPass const& ) = delete; T_BloomPass( T_BloomPass&& ) = delete; - T_BloomPass( __rd__ const uint32_t width , - __rd__ const uint32_t height , - __rw__ T_FilesWatcher& watcher , + T_BloomPass( __rw__ T_FilesWatcher& watcher , __rw__ T_Texture& input ); void render( ); diff --git a/main.cc b/main.cc index dad8395..f994cdb 100644 --- a/main.cc +++ b/main.cc @@ -74,8 +74,7 @@ T_Main::T_Main( ) rtRaymarchOutput = std::make_unique < T_Rendertarget >( T_RendertargetSetup( ).add( *txRaymarchOutput ).create( ) ); - bloomPass = std::make_unique< T_BloomPass >( - 1280 , 720 , watcher , *txRaymarchOutput ); + bloomPass = std::make_unique< T_BloomPass >( watcher , *txRaymarchOutput ); } void T_Main::mainLoop( ) @@ -186,7 +185,7 @@ void T_Main::render( ) U_CAM_UP = 4 , U_NEAR_PLANE = 5 , U_LIGHT_DIR = 6 , - U_RENDER = 7 , + U_RAYMARCHER = 7 , }; glUniform1f( U_TIME , 0 ); @@ -198,7 +197,8 @@ void T_Main::render( ) glUniform1f( U_NEAR_PLANE , camera.np ); glUniform3f( U_LIGHT_DIR , 0 , 1 , 1 ); - glUniform4f( U_RENDER , 128 , 0.9 , 0.001 , 100 ); + + glUniform4f( U_RAYMARCHER , 128 , 0.9 , 0.001 , 100 ); glRectf( -1, -1 , 1 , 1 ); }