How to make the offset of an image shader align with the position of the polygon #2646
Unanswered
pauldendulk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Problem
In Mapsui we use an image as fill pattern for a polygon. The offset of this pattern is relative to the canvas and not to the polygon. The result is that it seems like the pattern is not part of the polygon, it seems to be a hole in the polygon. How to make it align with the polygon?
How it was implemented
We create a shader from an image like this:
And we draw with
Workaround
One workaround is to use a different translation of the shader matrix for every location where we draw but that is inconsistent with our rendering architecture.
Request
What we would need is some way to tell the shader it should be offset relative to the path. Is this possible somehow?
Issue in Mapsui:
Mapsui/Mapsui#371
Beta Was this translation helpful? Give feedback.
All reactions