From 9027938648b78411c5dca2c607e088779976678b Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Wed, 14 Dec 2016 11:56:41 +0300 Subject: [PATCH] Tuned route renderer --- drape/shaders/route_fragment_shader.fsh | 4 ++-- drape_frontend/route_renderer.cpp | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drape/shaders/route_fragment_shader.fsh b/drape/shaders/route_fragment_shader.fsh index 3ff455a17d..6431bf1367 100644 --- a/drape/shaders/route_fragment_shader.fsh +++ b/drape/shaders/route_fragment_shader.fsh @@ -11,8 +11,8 @@ uniform vec4 u_routeParams; const float kAntialiasingThreshold = 0.92; -const float kOutlineThreshold1 = 0.4; -const float kOutlineThreshold2 = 0.3; +const float kOutlineThreshold1 = 0.6; +const float kOutlineThreshold2 = 0.5; void main(void) { diff --git a/drape_frontend/route_renderer.cpp b/drape_frontend/route_renderer.cpp index 094d8542d6..7ccb2a84ec 100644 --- a/drape_frontend/route_renderer.cpp +++ b/drape_frontend/route_renderer.cpp @@ -22,9 +22,9 @@ namespace float const kHalfWidthInPixel[] = { // 1 2 3 4 5 6 7 8 9 10 - 2.0f, 2.0f, 3.0f, 3.0f, 3.0f, 4.0f, 4.0f, 4.0f, 5.0f, 5.0f, - //11 12 13 14 15 16 17 18 19 20 - 6.0f, 6.0f, 7.0f, 7.0f, 7.0f, 7.0f, 8.0f, 10.0f, 24.0f, 36.0f + 1.0f, 1.0f, 1.5f, 1.5f, 1.5f, 2.0f, 2.0f, 2.0f, 2.5f, 2.5f, + //11 12 13 14 15 16 17 18 19 20 + 3.0f, 3.0f, 4.0f, 5.0f, 6.0, 8.0f, 10.0f, 10.0f, 18.0f, 27.0f }; int const kArrowAppearingZoomLevel = 14; @@ -131,6 +131,8 @@ void RouteRenderer::InterpolateByZoom(ScreenBase const & screen, float & halfWid halfWidth = kHalfWidthInPixel[index] + lerpCoef * (kHalfWidthInPixel[index + 1] - kHalfWidthInPixel[index]); else halfWidth = kHalfWidthInPixel[scales::UPPER_STYLE_SCALE]; + + halfWidth *= df::VisualParams::Instance().GetVisualScale(); } void RouteRenderer::UpdateRoute(ScreenBase const & screen, TCacheRouteArrowsCallback const & callback)