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
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.
@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.
Activity
jfirebaugh commentedon Oct 23, 2014
@peterqliu Can you supply a test case style please?
peterqliu commentedon Oct 23, 2014
check out the jaggies
mourner commentedon Oct 30, 2014
Hmm, it throws
Uncaught SyntaxError: Unexpected token ]inmapbox-gl.jsfor me — @jfirebaugh any idea why?jfirebaugh commentedon Oct 30, 2014
The style is invalid JSON. @peterqliu looks like it was broken in the last commit.
mourner commentedon Oct 30, 2014
Hmm, why does it report
mapbox-gl.jserror? We probably should have a better error thrown when Mapbox GL fails to parse the JSON.peterqliu commentedon Oct 30, 2014
@jfirebaugh @mourner my bad, now fixed
ansis commentedon Mar 29, 2016
We need a new patterned outline shader to fix this. The shader would be similar to the
outlineshader but would read the correct color value from a texture just like thepatternshader.peterqliu commentedon Mar 29, 2016
Updated example at https://api.mapbox.com/styles/v1/peterqliu/cimdq8c4j00gk9lm1aeon9bay.html?title=true&access_token=pk.eyJ1IjoicGV0ZXJxbGl1IiwiYSI6ImpvZmV0UEEifQ._D4bRmVcGfJvo1wjuOpA1g#14.95732842875686/31.394041930859558/-81.27884342612008/0
ansis commentedon Mar 29, 2016
osx has a useful feature that lets you zoom in and magnify pixels that could be useful for this.
You should now be able to use
control+ scrolling to zoom in on pixels.ansis commentedon Mar 30, 2016
@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:
shaders/outline.*.glsland set it up injs/render/painter/use_program.jsjs/render/draw_fill.jsso that it uses the new pattern outline program to render a solid red outline for all fill patterns. much of this anddrawStrokemight need to be duplicatedjs/render/painter/use_program.js, and then set it up in/js/render/draw_fill.js.mollymerp commentedon Mar 31, 2016
working on this in #2372
ansis commentedon Apr 22, 2016
merged in #2372