This looks like the fairly well-known non-planar texture coordinate problem.
Your vertex coordinates don't occupy the same 2D space as your texture
coordinates.

It's been discussed on this list a few times. In this situation, there are a
number of ways the hardware could interpolate the st values. However, the
hardware can't read your mind. :-)

You could draw a mesh to have finer control over the interpolation of the st
coordinate values. You could also use a shader to "perspective correct" the
coordinates according to the warping you are attempting to create.

Paul Martz
Skew Matrix Software LLC
http://www.skew-matrix.com
+1 303 859 9466

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Can Hosgor
Sent: Friday, May 22, 2009 9:04 AM
To: [email protected]
Subject: Re: [osg-users] texture mapping to trapezoid

Hi Shayne, 

Thank you for the quick response :)

A screen shot of quad is available here:
http://img36.imageshack.us/img36/5741/problem2009052217560820.jpg

I left my texture attributes as default. Also didn't change anything at a
parent stateset (in other words, i gave the node returned by
createBillboard() directly to osgViewer::setSceneData)

my texture is a 256x256 bmp file which is available here:
http://img40.imageshack.us/img40/981/spot.png

Thanks,
Can

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=12768#12768





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to