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

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: 90 degree rotation
  5. Date: 9 Feb 1996 08:02:49 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4fev39$jid@maureen.teleport.com>
  8. References: <DMEpMn.Cvs.0.-s@cs.vu.nl>
  9. NNTP-Posting-Host: kelly.teleport.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Irmen de Jong (irmen@cs.vu.nl) wrote:
  13. : Regarding texturemapping (doom like):
  14. : Wouldn't it be wise to write the walls in a 90 degree rotated fashion?
  15. : I mean, not vertically, but horizontally. It might then be possible to write
  16. : whole longs at once, which is much faster than writing single bytes.
  17.  
  18.  Much faster, the following is basic wall tmaping? 
  19.  
  20.  REPEAT 16
  21.  move.b    (a0,d0.w),(a1)
  22.  addx.l    d1,d0
  23.  adda.l    a2,a1
  24.  ENDR
  25.  
  26.  Even if you trandform this to write long (Would be slower) how do you
  27.  handle your chunky buffer? Do you tmap 1 line and c2p it? 
  28.  
  29. : Is 90 degree rotation in the C2P phase easy to do? Or do I miss something
  30. : here?
  31.  
  32.  In your c2p loop you want to read 32bit from your chunky buffer and
  33.  write 32bit to chipram... You do this when the chunky buffer is 
  34.  rendered, not a few pixels at a time.
  35.  But lets say you just wrote a Vline of 32pixel on the stack, now
  36.  if you c2p this you will only write 1 pixel Hline in the chunky
  37.  buffer. So 8*32*1 read+And+Or+write. What you want really is
  38.  8 write... So this would be more then 64 time slower....
  39.  
  40. : I recall that the "PicCon" program can save 90 degree rotated chunky
  41. : textures. What other use might this have?
  42.  
  43.  You would use rotated tmap for walls only.... because you step verticaly
  44.  in your display buffer, and horizontaly in your texture buffer.(Just
  45.  a speedup for the inner mapping loop)
  46.  
  47.  Stephan
  48.