home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3492 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: TMapping again!
  5. Date: 21 Feb 1996 13:08:54 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4gf5h6$7bd@maureen.teleport.com>
  8. References: <38232371@kone.fipnet.fi> <4fntd3$g56@sunsystem5.informatik.tu-muenchen.de> <38232442@kone.fipnet.fi> <4fvnjb$gdm@oreig.uji.es> <4g147q$sit@maureen.teleport.com> <4ga6lr$rp8@brachio.zrz.TU-Berlin.DE> <4gc5ur$brr@maureen.teleport.com>
  9. NNTP-Posting-Host: linda.teleport.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12.  I'm trying to improve what I got so far... but I cant seem to
  13.  remove those anyone shifted pixels :(
  14.  I tested the quality of the code by rotating a cube with a gride
  15.  texture... 4*4 pixel per face.
  16.  what happen is that some scan line sonner or latter have a 1
  17.  pixel offset. this show as non 'smooth' lines.
  18.  
  19.  All the book I know, and code I saw on the net do dirty mapping
  20.  like this. but descent for example as pretty clean mapping (Not
  21.  perfect, you can still see that effect).
  22.  
  23.  My question is (I'm having a hell of time try to correct this) how
  24.  do you make sure each scanline light and texture position is alway
  25.  correct . (I'm not even talking about perpective correction here).
  26.  
  27.  My guess is that it as something do do with the round of of X1, and 
  28.  the roundoff as an effect on the texture/lighting . my guess was
  29.  to compansate usign this (in the YLoop)
  30.  
  31.  light -= ((x1 & 0xFFFF) * lightstep ) / x1step 
  32.  
  33.  but this doesn't do the trick, and I'm just confused now :)
  34.  
  35.  Stephan
  36.