Advertisement Jump to content
Sign in to follow this  
qxsl2000

How does trapezoid drawing with perspective correct works?

This topic is 765 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Recently I've read a few articles about drawing trapezoid on the Internet, which it solved the problem of  wrong  perspective over texture mapping between two triangles by using homogeneous coordinate  stq (leave r zero).

 

It's said that the default 2d uv(0,0) ==> 3d (0,0,width)  homogeneous coordinate,  and 2d uv(0,1) ==> (0, width,width), which the width is length that the texture to be mapped, it 's clear that after divide by the the w(or q) the interpolated texture coordinate  is the same as  the original uv coordinate.  i need to know why is it? how does it works? cause i can't figure out the subtle difference in between, or math behind it.

 

Could your guys explain in detail. i really appreciate it! thank you!

Edited by qxsl2000

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!