-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow a non truncated linesofar (overall line distance) for line shader (feature request) #3883
Comments
Well, I just saw in the line_bucket that you limit the size of linesofar to 15 bits. Could it be possible to add a parameter that would allow more bits for the storing of the line distance so it is not truncated to zero when reaching max distance (like add a float uniform)? I know this would affect performance, but otherwise it would not be possible to use gradients or fades on line, isn't it? |
@kaligrafy I'd rather track this as a request for a specific feature, rather than presupposing specific implementation details like shader parameters. Does mapbox/mapbox-gl-style-spec#349 describe what you're trying to accomplish? |
Yes, as long as the linesofar is provided as a float representing the location on the line between 0.0 (start of the line) and 1.0 (end of the line) |
Ok, let's centralize discussion at mapbox/mapbox-gl-style-spec#349. |
Would it be possible to access the overall length of a line in the line shader so we can create fading or gradient lines (like getting a value between 0.0 and 1.0 that represents the linesofar in percentage of total)? Also, it would allow a better dasharray rendering when using polygons as input to create lines (right now, the dash line is too short or to long at the location where the stroke start and end).
The text was updated successfully, but these errors were encountered: