home *** CD-ROM | disk | FTP | other *** search
- Path: informatik.tu-muenchen.de!fischerj
- From: fischerj@informatik.tu-muenchen.de (Juergen "Rally" Fischer)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: TMapping again!
- Date: 29 Feb 1996 12:17:08 GMT
- Organization: Technische Universitaet Muenchen, Germany
- Distribution: world
- Message-ID: <4h45g4$ije@sunsystem5.informatik.tu-muenchen.de>
- References: <38232442@kone.fipnet.fi> <xJSEnMD0aez4@point86.people-s.people.de> <38232567@kone.fipnet.fi>
- NNTP-Posting-Host: hphalle3g.informatik.tu-muenchen.de
- Originator: fischerj@hphalle3g.informatik.tu-muenchen.de
-
-
- In article <38232567@kone.fipnet.fi>, "Jyrki Saarinen" <jsaarinen@kone.fipnet.fi> writes:
- |>
- |> > A time ago I did an approach to this problem using a similar trick
- |> > than my two-command mapper.
- |> > (btw. actually this one WORKS .. I have tried it out)
- |> >
- |> >
- |> > move.l d3,d2 ;d3=d4=0000000000000XXXXXXXxxxxxxYYYYYY
- |> > move d0,d5 ;d0=a6=yyyyyyyy000000000000BBBBBBbbbbbb
- |> > and.l d6,d2 ;d6= 00000000000001111111000000111111
- |> > and.b d7,d5 ;d7= xxxxxxxxxxxxxxxxxxxxxxxx11000000
- |> > or d5,d2
- |> > move.b (a4,d2.l),(a2)+ ;d2= 00000000000000xxxxxxbbbbbbyyyyyy
- |> > add.l a6,d0
- |> > addx.l d4,d3
- |> >
- |> > This one is doing Texturemapping + gouraud shading with
- |> > shadetable. (!!)
- |> >
- |> > The Texture is 64x64 (6 bit) and the shading is 6 bit two. You
- |> > will need a 256k combined Texture/Shading table.
- |>
- |> Hmm. Not nice in a game for example where several textures
- |> are needed. But a nice idea anyway!
-
- nice ? Cooooooool!
- Cool idea to pack the shading value into the texture adress!
-
- The example does too much instructions :) but allows more general
- mem usage.
-
- What about this...
-
- add.l a2,d2 0...00BBBbbbbbbbbbbbbbbbb
- add.l a3,d1 x...xxxxxYYYYYYYYyyyyyyyy
- addx.l d3,d0 0...0000000000000XXXXXXXX
- move.l d2,d6
- move.w d1,d6
- move.b d0,d6
- move.b 0(a0,d6.l),(a1)+
-
- 20 cycles gouraud mapping :)
-
- 8 shadingsteps are 512k, not too much even for a A1200 game imho
- (well, people tell me they aim for higher machines anyway,
- so the mem consumption can't be considered so bad ;)
-
- I would really think about using this routine, it's really LOT quicker.
- You can put multiple textures into a given 64k range btw. but those can't
- be "repeart-mapped" uh "multiplexed" ? how you call it if x gets 256 and then
- _plop_, 0 again on the left side ? Is this called bump-mapping ? :D
-
-
- |>
- |> > The Routine byself was a bit slower than ordenary Texturemapping.
- |> > But should be a lot fast than to memery-accesses. And it uses only
- yeah!
-
- |> > two adds..
- |>
- |> Yep .. well, normal optimized Texture/Gouraud with a shading table
- |> is ~76% slower than the fastest normal mapper .. I can live
-
- boooh! means my A1201 doing speedomap will be as fast as a A3000 doing
- table-map. My tiny 14MHz cpu could run clones at the speed current
- clones run on a 030!
-
- |> with it, no other restrictions execpt the 64k alignment.
-
- Isn't it enough that average ami got less cpu than clones ?
- why do slower algos than known ?
- You can live with it as you got that 040/60, but average ami... ;)
-
- |>
- |> > Speed could still be improved by aligned the table to a 256k
- |> > border.
- |>
- |> Yep, like using 64k aligned texture, to eliminate the indexed
- |> addressing.
- |>
- |> -- _
- |> a Stellar programmer _ //
- |> "Amiga - back for the future" \X/
- ------------------------------------------------------------------------
- fischerj@Informatik.TU-Muenchen.DE (Juergen "Rally" Fischer) =:)
-
-