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

  1. Path: easy.in-chemnitz.de!mkmk!floh
  2. From: floh@mkmk.in-chemnitz.de (Andre Weissflog)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: TMapping again!
  5. Message-ID: <mq2Xx*aB0@mkmk.in-chemnitz.de>
  6. Date: Sun, 14 Jan 1996 02:08:22 CET
  7. Reply-To: floh@mkmk.in-chemnitz.de
  8. References: <4d0ou6$835@astfgl.idb.hist.no> <Z31Wx*zA0@mkmk.in-chemnitz.de>
  9.  <38231990@kone.fipnet.fi> <SRGWx*+A0@mkmk.in-chemnitz.de> <38232018@kone.fipnet.fi>
  10. Distribution: world
  11. Organization: private uucp site
  12. X-Newsreader: Arn V 1.04
  13.  
  14. In article <38232018@kone.fipnet.fi>, "Jyrki Saarinen" writes:
  15.  
  16. > > Yes, good old subdivision, currently at 16 pixels resolution,
  17. > > always horizontal. I've had a 32 pixel version and
  18. > > vertical/horizontal span drawers for some time, but trashed
  19. > > it for the sake of simplicity. I'm quite happy with it now,
  20. > > but "the last word has not been spoken yet" :-)
  21. > Yep. Do you use the triangle feature that horizontal linear
  22. > steps are constant, so they have to calculated just once?
  23. > (u/z, v/z and 1/z) 
  24. No. After clipping (in viewer space) a triangle may consist
  25. of up to 6 vertices, so I would have to triangulate it
  26. first anyway. My current renderer works directly on
  27. 'trapezoids'. I'll have to chew the idea to optimize
  28. the whole low level rendering to triangles
  29. a while first, and then decide, whether it's worth
  30. it or not.
  31.  
  32. > Do you use fixed-point? When doing 1/z quite many bits
  33. > must be used for fraction. Also, using divs.w for
  34. > the two divides between every 16 pixel would give
  35. > a little speedup compared to divs.l
  36. Yes, fixed point, almost each value has another number of fraction
  37. bits. I'm using numbers with 28, 24, 20, 16 and 8 fraction bits, so
  38. that they provide the most accuracy with the greates number range just
  39. as they are needed (it took me a week to find a good solution). The
  40. current mapper chokes on z-values less then 16, but this can be solved
  41. by placing the front clipping plane at 17 :-)
  42.  
  43. Instead of 2 divs, one can also use 1 div and 2 muls:
  44.  
  45.     z' = 1 / one_div_z
  46.     u  = u_div_z * z'
  47.     v  = v_div_z * z'
  48.  
  49. I don't have the m68k cycles in my head at the moment, but
  50. this would make sense on a 486dx4/100 for instance, with
  51. a 1 cycle integer multiplier. But this may be a bit
  52. esoteric. (I must admit that I didn't do work on
  53. the m68k versions for quite a while, shame on me).
  54.  
  55. Bye,
  56. -Floh
  57.  
  58. ====//=== Andre Weissflog <floh@mkmk.in-chemnitz.de> =======
  59. ...// Sep'95: Return Of The Living Death...................
  60. \\// 90% of everything is crap (Sturgeon's Law)...........
  61. =\\===============================================Amiga!=
  62.  
  63.