PDA

View Full Version : Sprite Skewing Problem



Aare1
02-05-2012, 05:58 PM
Hi,

I created a square consisting of two rectangles and I want to be able to set any values to the corners of that rectangle, so it could look like trapezium, diamond or anything else (in 2D coordinates, I have orthographic camera applied to this scene), the problem is that the mapped texture behave wrong, producing artefacts. The problem and solution is described in this article http://www.xyzw.us/~cass/qcoord/ , I succesfully implemented it btw., but it covers only the case when only two vertex are moved horizontally. As I said before, I want to be able to set any walues to the vertex, and has properly mapped texture, is there a way to achieve that?