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

  1. Path: hell.team17.com!news
  2. From: boberg@team17.com (Stefan Boberg)
  3. Newsgroups: comp.sys.amiga.programmer,comp.sys.amiga.games,alt.sys.amiga.demos,comp.sys.amiga.misc
  4. Subject: Re: AB3D II beats Quake....
  5. Date: Wed, 03 Apr 1996 15:25:40 GMT
  6. Organization: Team 17 Software Ltd.
  7. Message-ID: <4ju1qf$k4@hell.team17.com>
  8. References: <DosA8o.17B@info.uucp> <6538.6658T1031T2526@mbox.vol.it> <4jgn4o$l2b@hell.team17.com> <4jk515$q3l@nadine.teleport.com> <4jkdpu$1o6@hell.team17.com> <4joj14$ghj@nadine.teleport.com> <4js275$98s@hell.team17.com> <4jt8bh$a70@nadine.teleport.com>
  9. NNTP-Posting-Host: zonk.team17.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. sschaem@teleport.com (Stephan Schaem) wrote:
  13. >Stefan Boberg (boberg@team17.com) wrote:
  14.  
  15. >: > I think they should do more then just the scan conversion...
  16.  
  17. >:   Such as?
  18.  
  19. > Clipping, geometry transform, bsp tree traversal, visibility test
  20.  
  21.   BSP tree traversal? I have to disagree. That's the type of thing
  22. compilers are good at optimizing.
  23.  
  24.   Clipping/geometry transform: Possibly, although as far as I can see
  25. from my experiments, the gain is quite small.
  26.  
  27. >:   I'm not sure about that. In DOOM, very little was in ASM.
  28.  
  29. > This just mean Doom pass most of its time in very little code.
  30.  
  31.   So does any game.
  32.  
  33. >:   Yes you can do that. You simply use in-line assembly macros for
  34. >: fixed-point multiplies / divides etc. I have such a system and it
  35. >: works fine. Just change a switch (such as '-DFIXED_MATH') on the
  36. >: command line and all code will use fixed-point.
  37.  
  38. > Do you get good performance from this? 
  39.  
  40.   Yes. Watcom is very good at allocating registers for inline ASM.
  41. BTW, Id used the same approach in Doom.
  42.  
  43. > Also I often find myself
  44. > otimizjng the fix point setting. not alway 16:16 or 8:8, but maybe
  45. > 8:24, 4:28 ... 
  46.  
  47.   You can do this with macros too, if you really need to. It gets less
  48. manageable though.
  49.  
  50. >:   It's not bad practice. It's clever - on the Pentium, at least. Can
  51. >: you figure out why it's done?
  52.  
  53. > Nope... because the scanline loop use no MUL. and FPU add are slower
  54. > and also you cant use FPU register directly as index or else
  55. > so FPU make sense in the setup when fmul are faster then imul and you 
  56. > dont need to convert from ftoi all the time, otherwise not.
  57.  
  58.   You've missed it completely. You can use floats in scan conversion,
  59. and it's faster than fixed-point on the Pentium (about twice as fast,
  60. as a matter of fact). I'm sure if you just think about it, you'll see
  61. why. But you're right, it's NOT in the core pixel-drawing loop.
  62.  
  63. >:   Taking polygon structures (vertices and edges) and turning them into
  64. >: pixels.
  65.  
  66. > does the edge include slope information? if so no reason to see a float
  67. > operation in the 'scan-conversion' loop.
  68.  
  69.   No. In my case, an edge is a reference to two vertices. It could
  70. include slope information though, as a further optimization.
  71.  
  72.   I should add that I focus most of my attention on
  73. perspective-correct texture mapping. But the same optimization
  74. strategies (involving floats) can be applied to affine tmapping.
  75.  
  76. > Stephan
  77.  
  78.  
  79. ===============================================================
  80.  Stefan Boberg                               boberg@team17.com
  81.   "This, like, sucks in ways that we've never seen stuff suck
  82.     before, so it's kinda cool!" - B&B
  83.  
  84.