Skip to main content
gamedev.net
🔒 Locked

Texturing a non rectangular quad

Started by megatron242 Sep 27, 2008 at 5:26 PM 2 replies 850+ views
Original Post
megatron242
megatron242
Hi All, When I simply try to apply a texture on a non rectangular quad, the image is distort, in a non natural manner. Further more, when viewing in differnt angles, the texture simply "flips" in some areas. Is there any simple way fix this strange behaviour? thanks in advance, Vince
purpledog
purpledog
I guess what you are calling flip is a change in the tessellation. To avoid that you need to draw two triangles instead of one quad.

if you don't want distortion, one way is to make the grid finer: instead of a quad (which is a 1x1 grid), draw a nxn grid. Remember to draw triangles and not quad to avoid the flip.
zedz
zedz
what u see is normal, youre applying a quad onto something that is not a quad, it doesnt work, just like trying to wrap a quad texture around a sphere

https://developer.sonyericsson.com/site/global/techsupport/tipstrickscode/java/p_java_0801.jsp

http://www.opengl.org/resources/code/samples/mjktips/projtex/distortion.txt

http://www.r3.nu/~cass/qcoord/

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.