[core] fix overscaled line patterns and re-enable render tests

fix #3489
fix #2648
This commit is contained in:
Ansis Brammanis
2016-01-13 16:32:40 -08:00
parent f7acc91d21
commit 5119ce8155
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@
],
"devDependencies": {
"aws-sdk": "^2.2.21",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#c8982f16ef5d39164b2e4f33bc3f993f9ac17502",
"mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#0fea16f7d1e0e0922f00da793e21a2420f6b8748",
"node-gyp": "^3.2.1",
"request": "^2.67.0",
"tape": "^4.2.2"

View File

@@ -51,7 +51,7 @@ void Painter::renderLine(LineBucket& bucket, const LineLayer& layer, const TileI
color[2] *= properties.opacity;
color[3] *= properties.opacity;
float ratio = state.getScale() / std::pow(2, id.z) / 8.0 * id.overscaling;
float ratio = state.getScale() / std::pow(2, id.z) / (4096.0 / (512.0 * id.overscaling));
mat2 antialiasingMatrix;
matrix::identity(antialiasingMatrix);
@@ -109,7 +109,7 @@ void Painter::renderLine(LineBucket& bucket, const LineLayer& layer, const TileI
if (!imagePosA || !imagePosB)
return;
float factor = 8.0 / std::pow(2, state.getIntegerZoom() - id.z) * id.overscaling;
float factor = 4096.0 / (512 * id.overscaling) / std::pow(2, state.getIntegerZoom() - id.z);
config.program = linepatternShader->program;