Date: Sun, 25 Mar 2001 18:19:12 +0530 (IST) From: Mridul Muralidharan To: kirill AT free DOT fr cc: Djgpp mailing list Subject: Re: please help with Texture coordinates! In-Reply-To: <3ABDDBA9.B937780E@free.fr> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk hi, check out allegro docs for info on perspective projection and perspective corrected projection.allegro even supports them both. for more info, get some book on 3d games/graphics programming (offhand - game programming in C++ by ,De Gaus - spelling may be wrong ! ) anyway do not think this is the right newsgroup for this question . hope this helped Mridul Muralidharan S8 Electronics and Communication Regional Engineering College Calicut India ------------------------------------------------------------------------------ If the code and the comments disagree, then both are probably wrong. -- Norm Schryer All generalizations are false, including this one. -- Mark Twain /earth is 98% full ... please delete anyone you can. - fortune On Sun, 25 Mar 2001, Kirill Pankratiev wrote: > 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. > >