From 7d7af4380804b4b6c9e5d491c1dc784e07ba615f Mon Sep 17 00:00:00 2001 From: yvt Date: Sat, 1 Feb 2014 21:33:16 +0900 Subject: [PATCH] stronger global blur --- Resources/Scripts/Gui/MainScreen.as | 5 ++++- Sources/Draw/GLDepthOfFieldFilter.cpp | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Resources/Scripts/Gui/MainScreen.as b/Resources/Scripts/Gui/MainScreen.as index da7bbcdf..1d443e2b 100644 --- a/Resources/Scripts/Gui/MainScreen.as +++ b/Resources/Scripts/Gui/MainScreen.as @@ -134,7 +134,10 @@ namespace spades { // fade the map float fade = Clamp((time - 1.f) / 2.2f, 0.f, 1.f); - sceneDef.globalBlur = 1.f - fade; + sceneDef.globalBlur = Clamp((1.f - (time - 1.f) / 2.5f) * 4.f, 0.f, 1.f); + if(!mainMenu.IsEnabled) { + sceneDef.globalBlur = Max(sceneDef.globalBlur, 0.5f); + } renderer.StartScene(sceneDef); renderer.EndScene(); diff --git a/Sources/Draw/GLDepthOfFieldFilter.cpp b/Sources/Draw/GLDepthOfFieldFilter.cpp index cc098af3..e11ed1ed 100644 --- a/Sources/Draw/GLDepthOfFieldFilter.cpp +++ b/Sources/Draw/GLDepthOfFieldFilter.cpp @@ -397,6 +397,8 @@ namespace spades { float sin60 = sinf(static_cast(M_PI) / 3.f); maxCoc *= .7f + vignetteBlur * 0.5f; + maxCoc += 1.f + 5.f * globalBlur; + globalBlur = std::min(globalBlur * 5.f, 1.f); // reduce resolution to make it faster int divide = 1;