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 has been archived by the owner on Apr 10, 2018. It is now read-only.
Currently we specify fill outlines with stroke color property (which are always 1px width), and we use the same fill buffers used for fills to draw outlines (with line strips).
In the proposed spec, we would have the ability to specify both fill and line renderer types for one layer, and customize line width too. But that means that we will have to handle fill buckets very differently — buffers will be much bigger because outlines should be tessellated — triangles and not just vertex coords, we'll handle stuff like line joins, draw as triangles and not line strips etc., which should degrade performance significantly, particularly in building-dense areas.
As we have a script that processes user-friendly styles into renderer-friendly styles, we could make things easier by looking at widths of lines through different classes for each layer and whether they're accompanied by fills, and generate different bucket types for renderer consumption to optimize rendering and buffer sizes, e.g.:
just <=1px line — outline (line strips, will make all lines faster)
fill with <=1px line — fill (the same as we handle fills now)
just >1px line — line (tesselated buffer, same as we handle lines now)
=1px line with fill — strokedfill (special bucket that shares tesselated line with fill coords?)
I suppose the last one should be a special case and not just 2 independent buckets because line width would affect fill area coords.
The text was updated successfully, but these errors were encountered:
Fills with wide strokes still need to be created as separate layers. I think we've decided this is more honest about how the renderer works.
1px lines drawn with lines aren't possible right now, but I think this is ok. The performance difference shouldn't be that big, and 1px lines are pretty uncommon in styles.
Another issue previously discussed in mapbox/mapbox-gl-js#244 and GL chat, cc @kkaefer @ansis @edenh
Currently we specify fill outlines with
stroke
color property (which are always 1px width), and we use the same fill buffers used for fills to draw outlines (with line strips).In the proposed spec, we would have the ability to specify both
fill
andline
renderer types for one layer, and customize line width too. But that means that we will have to handle fill buckets very differently — buffers will be much bigger because outlines should be tessellated — triangles and not just vertex coords, we'll handle stuff like line joins, draw as triangles and not line strips etc., which should degrade performance significantly, particularly in building-dense areas.As we have a script that processes user-friendly styles into renderer-friendly styles, we could make things easier by looking at widths of lines through different classes for each layer and whether they're accompanied by fills, and generate different bucket types for renderer consumption to optimize rendering and buffer sizes, e.g.:
I suppose the last one should be a special case and not just 2 independent buckets because line width would affect fill area coords.
The text was updated successfully, but these errors were encountered: