Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 713605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:58:48+00:00 2026-05-14T04:58:48+00:00

I am rendering textured quads from an orthographic perspective and would like to simulate

  • 0

I am rendering textured quads from an orthographic perspective and would like to simulate ‘depth’ by modifying UVs and the vertex positions of the quads four points (top left, top right, bottom left, bottom right).

I’ve found if I make the top left and bottom right corners y position be the same I don’t get a linear ‘skew’ but rather a warped one where the texture covering the top triangle (which makes up the quad) seems to get squashed while the bottom triangles texture looks normal.

I can change UVs, any of the four points on the quad (but only in 2D space, it’s orthographic projection anyway so 3D space won’t matter much). So basically I’m trying to simulate perspective on a two dimensional quad in orthographic projection, any ideas? Is it even mathematically possible/feasible?

ideally what I’d like is a situation where I can set an x/y rotation as well as a virtual z ‘position’ (which simulates z depth) through a function and see it internally calclate the positions/uvs to create the 3D effect. It seems like this should all be mathematical where a set of 2D transforms can be applied to each corner of the quad to simulate depth, I just don’t know how to make it happen. I’d guess it requires trigonometry or something, I’m trying to crunch the math but not making much progress.

here’s what I mean:

alt text

Top left is just the card, center is the card with a y rotation of X degrees and right most is a card with an x and y rotation of different degrees.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T04:58:48+00:00Added an answer on May 14, 2026 at 4:58 am

    To compute the 2D coordinates of the corners, just choose the coordinates in 3D and apply the 3D perspective equations :

    Original card corner (x,y,z)

    Apply a rotation ( by matrix multiplication ) you get ( x’,y’,z’)

    Apply a perspective projection ( choose some camera origin, direction and field of view )
    For the most simple case it’s :

    • x” = x’ / z
    • y” = y’ / z

    The bigger problem now is the texturing used to get the texture coordinates from pixel coordinates :

    The correct way for you is to use an homographic transformation of the form :

    • U(x,y) = ( ax + cy + e ) / (gx + hy + 1)
    • V(x,y) = ( bx + dy + f ) / (gx + hy + 1)

    Which is fact is the result of the perpective equations applied to a plane.

    a,b,c,d,e,f,g,h are computed so that ( with U,V in [0..1] ) :

    • U(top”,left”) = (0,0)
    • U(top”,right”) = (0,1)
    • U(bottom”,left”) = (1,0)
    • U(bottom”,right”) = (1,1)

    But your 2D rendering framework probably uses instead a bilinear interpolation :

    • U( x , y ) = a + b * x + c * y + d * ( x * y )
    • V( x , y ) = e + f * x + g * y + h * ( x * y )

    In that case you get a bad looking result.

    And it is even worse if the renderer splits the quad in two triangles !

    So I see only two options :

    • use a 3D renderer
    • compute the texturing yourself if you only need a few images and not a realtime animation.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm rendering a form. I would like to put a mark next to all
Using DirectX I'm rendering textured polygons (orthographically) so they act as HUD sprites. Now
I'm trying to, in JOGL, pick from a large set of rendered quads (several
I'm rendering my scene to a texture. This works fine except that depth testing
I'm trying to get my rendering-to-texture working. So far, it does all the necessary
MRT allows for rendering to multiple texture targets in the pixel shader, but I'm
I'm doing 2-pass rendering, where for the first pass I'm rendering to a texture
I've googled around everywhere, but cannot find much for rendering strings to textures and
While rendering the view page, based on some condition in the controller action I
What underlying rendering system does the Qt GUI toolkit use on Windows? (I'm assuming

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.