Trying to draw a textured polygon
Posted: Sat Jun 23, 2018 8:19 am
I'm trying to have a perspective effect on an image, a reto grid tunnel like this one: https://www.youtube.com/watch?v=IlKsfV2mRR8.
Using a quad I can manage to get the texture repeating, but not the distortion to make the perspective effect.
I was using a shader for this, but the device the app will run on doesn't seem able to display it correctly, so I'm looking for alternatives. Googling a bit, I've seen there was a different way to draw quads before LÖVE 0.9.0, which might have been handy for waht I want to achieve:
love.graphics.quad( mode, x1, y1, x2, y2, x3, y3, x4, y4 )
This was removed in 0.9.0 and now it's recommended to use "polygon" instead. However, polygons don't allow to set a texture like quads (afaik).
Does anyone have any idea on how to achieve this without using shaders? My last option is to draw a looped video, but I'd rather not, as it would make the project so big.
Using a quad I can manage to get the texture repeating, but not the distortion to make the perspective effect.
I was using a shader for this, but the device the app will run on doesn't seem able to display it correctly, so I'm looking for alternatives. Googling a bit, I've seen there was a different way to draw quads before LÖVE 0.9.0, which might have been handy for waht I want to achieve:
love.graphics.quad( mode, x1, y1, x2, y2, x3, y3, x4, y4 )
This was removed in 0.9.0 and now it's recommended to use "polygon" instead. However, polygons don't allow to set a texture like quads (afaik).
Does anyone have any idea on how to achieve this without using shaders? My last option is to draw a looped video, but I'd rather not, as it would make the project so big.