render quad texture to arbitrary quadrilateral

43 views
Skip to first unread message

Tom Pollok

unread,
Oct 27, 2020, 6:58:06 PM10/27/20
to OpenSceneGraph Users
Hello,

im trying to render a texture to an quadrilateral. The  quadrilateral is the calculated by the intersection view frustum with aplane. So the image basically a perspective projection of the original image.


Unfortunately the texture coordinates are not interpolated correctly such that the triangles look wrong.

I know that is is a very basic computer graphics problem. But i have some trouble solving it.
Does anyone have solved this problem already for arbitrary quadrilaterals? My guess would be using fragment shaders, but im not experienced in with GLSL. Another option is transforming the texture using a homography and then rendering a quad, but it feels like this the brute force solution.

Id be very thankful if somebody could help me. Ideally of somebody knows where this problem has been solved already with openscenegraph.

Alexandre Vaillancourt

unread,
Oct 28, 2020, 7:57:23 AM10/28/20
to OpenSceneGraph Users
Hello Tom!

Looks like there was an issue in uploading the screenshot?

Could you post a minimal/complete/reproducible example of the code that you use? Maybe someone will be able to spot the issue just by looking at the code.

-- Vaillancourt

Reply all
Reply to author
Forward
0 new messages