[gameprogrammer] Re: perspective correction
- From: Bob Pendleton <bob@xxxxxxxxxxxxx>
- To: Gameprogrammer Mailing List <gameprogrammer@xxxxxxxxxxxxx>
- Date: Thu, 07 Apr 2005 14:11:52 -0500
On Thu, 2005-04-07 at 16:26 +0300, Szasz Pal wrote:
> Hi!
> I'm working on some simple 3d engine for symbian phones.
> I made a very simple method to draw a textured triangle, however it's
> ugly due to the need of perspective correction.
>
> What is the best way to implement it?
>
> I think in the old days I read that quake implemented perspective
> correction only for the n-th pixel. That means that when rendering a
> scan line from the triangle it recalculated the texture coordinates at
> every n-th pixel, and for teh rest it interpollated?
That works pretty well. You compute the perspective correct coordinates
for the first pixel and the nth pixel and then interpolate between the
two points. 'tis best to compute the correct texture coordinates for the
first and last points on the scan line and for some set of points in
between.
OTOH, depending on the phone, the number of tris and so on you might
want to just do perspective correct rendering all the time. If you are
doing something like an interior walk around kind of game you might just
want to use some of the tricks from the original DOOM.
Bob Pendleton
>
> Thanks in advance for the info!
>
--
+--------------------------------------+
+ Bob Pendleton: writer and programmer +
+ email: Bob@xxxxxxxxxxxxx +
+ web: www.GameProgrammer.com +
+ www.Wise2Food.com +
+ nutrient info on 6,000+ common foods +
+--------------------------------------+
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: perspective correction
- From: Szasz Pal
- [gameprogrammer] Re: perspective correction
- From: Scott Harper
- References:
- [gameprogrammer] OpenGL and mouse click location
- From: tobias . langner
- [gameprogrammer] Re: OpenGL and mouse click location
- From: Stephane Marchesin
- [gameprogrammer] Re: OpenGL and mouse click location
- From: iso8859-1
- [gameprogrammer] perspective correction
- From: Szasz Pal
Other related posts:
- » [gameprogrammer] perspective correction
- » [gameprogrammer] Re: perspective correction
- » [gameprogrammer] Re: perspective correction
- » [gameprogrammer] Re: perspective correction
- [gameprogrammer] Re: perspective correction
- From: Szasz Pal
- [gameprogrammer] Re: perspective correction
- From: Scott Harper
- [gameprogrammer] OpenGL and mouse click location
- From: tobias . langner
- [gameprogrammer] Re: OpenGL and mouse click location
- From: Stephane Marchesin
- [gameprogrammer] Re: OpenGL and mouse click location
- From: iso8859-1
- [gameprogrammer] perspective correction
- From: Szasz Pal