diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-15 18:01:02 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-06-15 18:53:05 +0300 |
commit | a56f65a4d81b2ee7e1b76816b125c3a7516ceb2a (patch) | |
tree | 87752da19c8724d36fcf65a48516e22401eeb375 /src | |
parent | fc0f4edef3bc333e4a6d2cdbdb89b2836186cb7f (diff) | |
download | qtlocation-mapboxgl-a56f65a4d81b2ee7e1b76816b125c3a7516ceb2a.tar.gz |
[core] Removed duplicated code in circle shader blur
Antialiased blur calculation now happens inside the vertex shader code.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/renderer/painter_circle.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mbgl/renderer/painter_circle.cpp b/src/mbgl/renderer/painter_circle.cpp index 9953921954..24cc9806e9 100644 --- a/src/mbgl/renderer/painter_circle.cpp +++ b/src/mbgl/renderer/painter_circle.cpp @@ -27,12 +27,6 @@ void Painter::renderCircle(CircleBucket& bucket, mat4 vtxMatrix = translatedMatrix(matrix, properties.circleTranslate, tileID, properties.circleTranslateAnchor); - // Antialiasing factor: this is a minimum blur distance that serves as - // a faux-antialiasing for the circle. since blur is a ratio of the circle's - // size and the intent is to keep the blur at roughly 1px, the two - // are inversely related. - float antialiasing = 1 / frame.pixelRatio / properties.circleRadius; - config.program = circleShader->getID(); circleShader->u_matrix = vtxMatrix; @@ -40,7 +34,7 @@ void Painter::renderCircle(CircleBucket& bucket, circleShader->u_devicepixelratio = frame.pixelRatio; circleShader->u_color = properties.circleColor; circleShader->u_radius = properties.circleRadius; - circleShader->u_blur = std::max<float>(properties.circleBlur, antialiasing); + circleShader->u_blur = properties.circleBlur; circleShader->u_opacity = properties.circleOpacity; bucket.drawCircles(*circleShader, store); |