You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
headless tests on travis don't antialias fills #1555
changed the title [-]headless tests on travis doesn't antialias zoomed-fill/default[/-][+]headless tests on travis don't antialias fills[/+]on May 14, 2015
Further investigation shows that line rasterization seems fundamentally different on mesa compared to my (OS X) implementation:
Ubuntu
OS X
I couldn't figure out a correct offsetting that gives (nearly) identical results on Mesa and OS X. My hunch is that Mesa has a different default layout qualifier than OS X, since offsetting the glFragCoord by half a pixel in both directions yields a better result (see above). Yet, the lines don't quite match in terms of intensity.
We could alleviate this issue by either 1) switching node bot to macOS on Travis or 2) forcefully disabling antialias in both -js and -native and update expectations.
Should have noted this earlier, but FWIW Travis CI is rendering with Mesa's software rasterizer (with llvmpipe), not a hardware GPU, but given @kkaefer's comment in #1555 (comment) this could just be an issue with Mesa that isn't specific to the software rasterizer.
Activity
[-]headless tests on travis doesn't antialias zoomed-fill/default[/-][+]headless tests on travis don't antialias fills[/+]jfirebaugh commentedon May 19, 2015
This appears to be an issue with
glLineWidth/GL_LINES. If I switch this test case to just draw the outline, I get the following result locally:And this result on linux:
Fiddling with the line width on linux doesn't seem to produce any better results. E.g., here line width = 10:
glGetreportsGL_LINE_WIDTH_RANGE= 1 - 10 andGL_LINE_WIDTH_GRANULARITY= 0.1.@kkaefer Any ideas?
jfirebaugh commentedon May 19, 2015
Here's a hint: if I remove the multiplication by
alphahere, it looks like this:It looks like perhaps every other segment is simply not being drawn.
kkaefer commentedon May 20, 2015
I can reproduce this behavior on Ubuntu 15.05, but my output looks different:
kkaefer commentedon May 20, 2015
Playing with this a bit further, I'm seeing only mostly horizontal lines:
kkaefer commentedon May 21, 2015
Looks like our shader fails for lines that are more than 45 degrees off horizontally (y-major):
kkaefer commentedon May 21, 2015
Further investigation shows that line rasterization seems fundamentally different on mesa compared to my (OS X) implementation:
I couldn't figure out a correct offsetting that gives (nearly) identical results on Mesa and OS X. My hunch is that Mesa has a different default layout qualifier than OS X, since offsetting the glFragCoord by half a pixel in both directions yields a better result (see above). Yet, the lines don't quite match in terms of intensity.
kkaefer commentedon May 21, 2015
Not sure if this is related: https://www.opengl.org/sdk/docs/man/html/gl_FragCoord.xhtml specifies the ability to change the pixel center to integers with
pixel_center_integerkkaefer commentedon May 21, 2015
for reference, the above images were created with
jfirebaugh commentedon May 21, 2015
Let's check if this affects server-side rendering with node-mbgl. If so, we definitely need to find a fix or switch to triangulated outlines.
jfirebaugh commentedon Dec 3, 2015
This is apparently no longer an issue in gl-js, now that it's using headless-gl 2.0. It's still a problem in gl-native.
Ignore 'regressions/mapbox-gl-js#{2477,2533} on native
[native] Ignore regressions/mapbox-gl-js#{2477,2533}
brunoabinader commentedon Jun 15, 2016
We could alleviate this issue by either 1) switching node bot to macOS on Travis or 2) forcefully disabling antialias in both -js and -native and update expectations.
mikemorris commentedon Jun 15, 2016
Should have noted this earlier, but FWIW Travis CI is rendering with Mesa's software rasterizer (with llvmpipe), not a hardware GPU, but given @kkaefer's comment in #1555 (comment) this could just be an issue with Mesa that isn't specific to the software rasterizer.
Work around mapbox/mapbox-gl-native#1555
Work around mapbox/mapbox-gl-native#1555
Work around mapbox/mapbox-gl-native#1555
brunoabinader commentedon Nov 4, 2016
Fixed in #6899.
kkaefer commentedon Nov 4, 2016
🎉