[core] fix overscaled line patterns and re-enable render tests
fix #3489 fix #2648
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user