Mapping textures to non-rectangular shapes properly

23 views
Skip to first unread message

Isaac Smith

unread,
Apr 17, 2016, 12:17:45 AM4/17/16
to Kivy users support
I'm trying to render textures to canvases using a non-rectangular Quad, but am stumped when trying to figure out how to get textures to render with the correct perspective. Here's an example of what I mean: https://stackoverflow.com/questions/15242507/perspective-correct-texturing-of-trapezoid-in-opengl-es-2-0

I have a general idea that some matrix math and shader magic is required, but have no idea how to proceed. I've found a few examples for raw GL and WebGL, but none for Kivy. Can anyone point me in the right direction? (Or better yet hand me some code :D )

Here's a link to my current code that demonstrates the issue.
Reply all
Reply to author
Forward
0 new messages