Skip to content

Anti-aliasing fails with fill-image #768

Closed

Description

@peterqliu

Vis-a-vis solid-color polygons. Most apparent at coastlines.

Activity

  1. jfirebaugh commented on Oct 23, 2014

    @jfirebaugh
    Contributor

    @peterqliu Can you supply a test case style please?

  2. peterqliu commented on Oct 23, 2014

    @peterqliu
    ContributorAuthor
  3. mourner commented on Oct 30, 2014

    @mourner
    Member

    Hmm, it throws Uncaught SyntaxError: Unexpected token ] in mapbox-gl.js for me — @jfirebaugh any idea why?

  4. jfirebaugh commented on Oct 30, 2014

    @jfirebaugh
    Contributor

    The style is invalid JSON. @peterqliu looks like it was broken in the last commit.

  5. mourner commented on Oct 30, 2014

    @mourner
    Member

    Hmm, why does it report mapbox-gl.js error? We probably should have a better error thrown when Mapbox GL fails to parse the JSON.

  6. peterqliu commented on Oct 30, 2014

    @peterqliu
    ContributorAuthor
  7. ansis commented on Mar 29, 2016

    @ansis
    Contributor

    We need a new patterned outline shader to fix this. The shader would be similar to the outline shader but would read the correct color value from a texture just like the pattern shader.

  8. ansis commented on Mar 29, 2016

    @ansis
    Contributor

    osx has a useful feature that lets you zoom in and magnify pixels that could be useful for this.

    • open the Accessibility system preferences
    • check Use scroll gesture with modifier keys to zoom
    • uncheck Smooth images

    You should now be able to use control + scrolling to zoom in on pixels.

  9. self-assigned this
    on Mar 30, 2016
  10. ansis commented on Mar 30, 2016

    @ansis
    Contributor

    @mollymerp It's sounds like you already have a good idea about how to approach this. In case it helps, this is how I'd break it down:

    • I'd duplicate the outline shader shaders/outline.*.glsl and set it up in js/render/painter/use_program.js
    • modify js/render/draw_fill.js so that it uses the new pattern outline program to render a solid red outline for all fill patterns. much of this and drawStroke might need to be duplicated
    • the red outline should now show up when you render your test case
    • switch the test case to a pattern with a lot of sharp color variation
    • copy the relevant parts of the pattern shader to the pattern outline shader, update js/render/painter/use_program.js, and then set it up in /js/render/draw_fill.js.
  11. mollymerp commented on Mar 31, 2016

    @mollymerp
    Contributor

    working on this in #2372

  12. ansis commented on Apr 22, 2016

    @ansis
    Contributor

    merged in #2372

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions