Message-ID: <3ABDDBA9.B937780E@free.fr> From: Kirill Pankratiev Organization: MICROWARE X-Mailer: Mozilla 4.05 [en] (Win95; I) MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: please help with Texture coordinates! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 29 Date: Sun, 25 Mar 2001 11:52:22 GMT NNTP-Posting-Host: 213.228.19.109 X-Complaints-To: abuse AT proxad DOT net X-Trace: nnrp1.proxad.net 985521142 213.228.19.109 (Sun, 25 Mar 2001 13:52:22 MEST) NNTP-Posting-Date: Sun, 25 Mar 2001 13:52:22 MEST To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hello All! I would like to know how to use texture coordinates for perspective texture mapping. So far i 've always used the 'magic vectors' to transform points from screen space to texture space . ie (u,v) = T * invP * invV *(Sx, Sy, 1) where invV is the inverse viewport transformation and invP is the inverse Projection and T is the "Magic matrix" Here we suppose that texture coordinates are (0,0) (1,0) (0,1) (1,1) What i want to do is to have U V associated with each vertex so that i can start at say (0,5,0.5) and end at (0.8, 0.8 ) of the texture for exempla. When i use linear interpolation it works but it gives very poor quality because it doesn' t take into account perspective deformation. Can somebody please explain what i should do from the stage where i project the polygon? Thanks.