Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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

Closed

Description

@jfirebaugh

Actual:
image

Expected:
image

Activity

  1. 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
  2. jfirebaugh commented on May 19, 2015

    @jfirebaugh
    ContributorAuthor

    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:

    image

    And this result on linux:

    image

    Fiddling with the line width on linux doesn't seem to produce any better results. E.g., here line width = 10:

    image

    glGet reports GL_LINE_WIDTH_RANGE = 1 - 10 and GL_LINE_WIDTH_GRANULARITY = 0.1.

    @kkaefer Any ideas?

  3. jfirebaugh commented on May 19, 2015

    @jfirebaugh
    ContributorAuthor

    Here's a hint: if I remove the multiplication by alpha here, it looks like this:

    image

    It looks like perhaps every other segment is simply not being drawn.

  4. kkaefer commented on May 20, 2015

    @kkaefer
    Member

    I can reproduce this behavior on Ubuntu 15.05, but my output looks different:

    actual

  5. kkaefer commented on May 20, 2015

    @kkaefer
    Member

    Playing with this a bit further, I'm seeing only mostly horizontal lines:

    image

  6. kkaefer commented on May 21, 2015

    @kkaefer
    Member

    Looks like our shader fails for lines that are more than 45 degrees off horizontally (y-major):

    Ubuntu OS X
    ubuntu osx
  7. kkaefer commented on May 21, 2015

    @kkaefer
    Member

    Further investigation shows that line rasterization seems fundamentally different on mesa compared to my (OS X) implementation:

    Ubuntu OS X
    ubuntu osx

    diff

    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.

  8. kkaefer commented on May 21, 2015

    @kkaefer
    Member

    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_integer

  9. kkaefer commented on May 21, 2015

    @kkaefer
    Member

    for reference, the above images were created with

    OpenGL vendor string: VMware, Inc.
    OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;  
    OpenGL version string: 2.1 Mesa 10.5.2
    
  10. jfirebaugh commented on May 21, 2015

    @jfirebaugh
    ContributorAuthor

    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.

  11. jfirebaugh commented on Dec 3, 2015

    @jfirebaugh
    ContributorAuthor

    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.

  12. brunoabinader commented on Jun 15, 2016

    @brunoabinader
    Contributor

    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.

  13. mikemorris commented on Jun 15, 2016

    @mikemorris
    Contributor

    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.

  14. brunoabinader commented on Nov 4, 2016

    @brunoabinader
    Contributor

    Fixed in #6899.

  15. kkaefer commented on Nov 4, 2016

    @kkaefer
    Member

    🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions