-
Notifications
You must be signed in to change notification settings - Fork 12
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
Labels on landuse pattern getting cut off #31
Comments
@bcamper Did this change recently? |
Not intentionally :) But could see it having been a casualty of either some optimizations we made to shader rendering (maybe a state change is being missed) or fixes to alpha blending. I'll look into it. |
@patriciogonzalezvivo I haven't looked at this yet, but for the bottom example, with text over the dot pattern: do you think the alpha is interacting weirdly with the shader perhaps? Could you see what alpha is output from the shader? |
Weird... all this dot patterns don't have alpha: https://github.com/tangrams/refill-style/blob/gh-pages/refill-style.yaml#L1126-L1194 ... @sensescape do you know what |
My apologize, @bcamper point that alpha is affected in this line https://github.com/tangrams/refill-style/blob/gh-pages/refill-style.yaml#L1141 color: |
color.rgb = mix(COLOR1, COLOR2, circle(tile(getTileCoords(),PATTERN_SCALE), DOT_SIZE)); The Also as @bcamper point we should use a texture here... Happy to introduce any of those changes: a. simplify the shader as is... b. replace it for a texture Note: I feel that using a shader will be only justifiable if we want to apply a hill-shade effect using the dot size, like we did in TRON2.0 Also switching to tangram blocks will solve more of this kind of issues... some of the shader in this style are quite old. For example the above code have been improved before here http://tangrams.github.io/blocks/#polygons-dots |
Another example of dots for hill-shading https://tangrams.github.io/tangram-sandbox/tangram.html?styles/callejas#16.764280621970464/37.79126/-122.46361 |
So... I fix the bug by avoiding using the alpha channel... this was the effect of making the dots a little bigger, because the alpha was "eating" the texture more than is colorated (alpha interpolation is different). Any how now Once that's done, and we have parameters we are happy with I can make texture of them : ) |
@sensescape: @patriciogonzalezvivo put the fix on the gh-pages branch, so you should see it once this gets merged there (or you could merge it back here but may just make things more complicated): |
thanks! and sorry for that |
@sensescape I want to look into the issue with the California label (the original issue): can you show me the commit where you added the stroke, so I can compare before/after? |
@bcamper sure, it's here on this branch: |
this is the default text stroke that fixed it: |
thanks! @patriciogonzalezvivo |
Actually it looks like the original problem was the same thing with weird alpha on the underlying dots shader, so it should also be fixed (if you want to remove the stroke later) by the same fix for that. |
ok! thanks : ) |
Closing original issue, added #32 to optimize dot shaders to use textures instead as follow-up (which @patriciogonzalezvivo and I discussed). |
http://tangrams.github.io/refill-style/#8/36.671/-117.922
The text was updated successfully, but these errors were encountered: