home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 3608 < prev    next >
Encoding:
Text File  |  1996-08-05  |  3.7 KB  |  91 lines

  1. Path: nntp.teleport.com!sschaem
  2. From: sschaem@teleport.com (Stephan Schaem)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Bitfieldinsert?
  5. Date: 22 Feb 1996 05:55:41 GMT
  6. Organization: Teleport - Portland's Public Access (503) 220-1016
  7. Message-ID: <4gh0gt$6ll@maureen.teleport.com>
  8. References: <38232461@kone.fipnet.fi> <4g8gje$oov@maureen.teleport.com> <38232552@kone.fipnet.fi>
  9. NNTP-Posting-Host: kelly.teleport.com
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Jyrki Saarinen (jsaarinen@kone.fipnet.fi) wrote:
  13.  
  14. : > : >     REPEAT 16
  15. : > : >     move.l    (a0)+,(a1)+        ;draw 8 pixels
  16. : > : >     ENDR
  17. : > : > 
  18. : > : >  a0 is a pointer in a lighting cube ... Think of it as tmapping a
  19. : > : >  X*1 texture and having all the texture size prescaled so you only
  20. : > : >  have intereg part when steping in the texture.
  21. : > : >  in 8bit its the same but you map only 4 pixels at a time.
  22. : > 
  23. : > : Hey, finally a place for doing some c2p pass(es) in the inner
  24. : > : loop..?  Have you done this code, btw?
  25. : > 
  26. : >  Nope, I'm just thinking about it... I will probably create a dithered
  27.  
  28. : Damn.. ;)
  29.  
  30.  Trying to find correct gouraud shading code (Wich 'nobody' seem to do)
  31.  I saw a post saying that he can do gouraud on a PC at .25 cycle per pixel.
  32.  So I guess this as been done already , and you can probably get the source
  33.  code .. but then its for the x86 :)
  34.  
  35. : >  gouraud lighting cube, and render in 12bit (rgb buffer) and render
  36. : >  in ham6 in 256*300 (interleaved componant).12bit dithered should look
  37. : >  pretty good. My guess a full true color scene can be rendred and c2p at
  38.  
  39. : A word chunky buffer? Explain more, please..
  40.  
  41.  Well, it would be a ham6 screen... the rendering is done in interleaved
  42.  componant: line only 4bit red, line 1 only 4bit of green, line 2 4bit
  43.  blue, line 3 4bit red etc... then this is c2p in the lower 4planne of
  44.  a 256x300 interlaced screen (only 256x150 4bit is c2p per feild.)
  45.  c2p a 256x150 screen 4bit take ~11ms on a 030 (cpu only).
  46.  
  47.  Have you seen Transgression2 on the PC? they use vertical componant
  48.  interleave ... ok they have 64shade per componant, OCS only as 16.
  49.  But you can get dithering for free.
  50.  
  51.  The c2p part is strait forward, you could use the blitter on 25mhz 030
  52.  and under.(The upper 2 bit are preset for the interleaved componant.)
  53.  The rendering loop of the funtions just need to get the right source
  54.  pointer according to the line number. (texture, color cube are separate
  55.  and dithered.)
  56.  
  57. : >  I use it... You dont alway have to texture, gouraud light small
  58. : >  triangle.
  59.  
  60. : Can this method be used in Gouraud, too?
  61.  
  62.  I think I was talking about bfset and small triangle for flat shading.
  63.  You would need bfins on each plane to copy the gouraud data, I think 
  64.  it would be dead slow. But a solution using and/or and moves with a
  65.  plannar version of the lighting cube would work better (Just thinking)
  66.  basicly 'blitting' triangles, where the mask is dynamicly created. 
  67.  
  68. : >รก so if you have some object with small metalic surfaces you can use this
  69. : >  methode to fill triangle, also this can be aplied on 'far away'
  70. : >  objects.
  71.  
  72. : It is just a pain in the ass to check "if a poly is small enough
  73. : or if a object is enough far etc." Many routines, not very
  74. : cache friendly.
  75.  
  76.  It really depand if you have an 'even' load , and its worth the time.
  77.  Maybe in the case of 2 fighter that are alway pretty much in front so
  78.  you wont gain from that... but a model of a city , you have 'alway'
  79.  something far enought to have the cmp/Bcc worth doing.
  80.  
  81. : >  but 32x16 poly are actually 'huge in lores.
  82.  
  83. : A good point. But no good for a game for example.
  84.  
  85.  Why not? flat shading is not accepted anymore? You can alway use
  86.  a 'chunky' background and render flat shaded object with sprites
  87.  over that ?
  88.  
  89.  Stephan
  90.  
  91.