|
Atari coding BBS
Re: Mapping question |
Posted by: dml
|
May,08.2014-19:04
|
Defjam posted a nice example here last year sometime (was it that long ago?) so you might find that.
If you fiddle your texture size (e.g. 256x?) you can reduce complexity a lot, effectively doing a mask/combine with moves (should look a bit like this, with some suitable x flag setup, swapping/preshifting of terms):
clr.l vuoff
move.w ua,tmp
add.l vuinc,ua ; start cascade
move.w tmp,ua
loop:
move.w va,vuoff ; $uuuu:VVvv skewed acc/inc
move.b ua,vuoff ; $vvxx:xxUU
move.b (src,vuoff.l),(dst)++
addx.l uvinc,va
addx.l vuinc,ua
(...unroll)
dbra lr,loop
Often the best (?) use of addx for multiple terms is to skew the terms into a pipeline/cascade, and avoid trashing x with some other op. But IIRC there are also variants which don't use two addx ops, relying on moves, rotates... Too fiddly for me to remember. A small, fast fragment will involve a fixed texture size for sure.
Sorry don't have much time to doublecheck the details and my memory sucks for these things. At least this might give you some clues. Dig up the Defjam version if you can. Ray/tscc also posted some bits on this a while back. And there's the DSP method favoured by Mikro/Earx (and now me, for some stuff :-)
Most of the effort I spent on this area really involved tiling, mipping and lighting - so I rarely ended up with something as fast and tidy as that above. Have fun working out the best way.
D
|
[All messages in this thread] [Start new thread]
Topic
|
Posted by
|
Date
|
Mapping question
|
Laurent / Thadoss
|
May,08.2014-16:22
|
Re: Mapping question
|
dml
|
May,08.2014-19:04
|
Re: Mapping question
|
Laurent / Thadoss
|
May,08.2014-20:39
|
Re: Mapping question
|
dml
|
May,09.2014-00:27
|
Re: Mapping question
|
Laurent / Thadoss
|
May,08.2014-22:24
|
Re: Mapping question
|
Defjam
|
May,12.2014-16:57
|
Re: Mapping question
|
dml
|
May,13.2014-10:41
|
Re: Mapping question
|
p01
|
Jan,06.2015-00:01
|
Re: Mapping question
|
evil
|
Jan,06.2015-18:36
|
Re: Mapping question
|
Laurent / Thadoss
|
Jan,06.2015-21:58
|
Re: Mapping question
|
p01
|
Jan,06.2015-23:17
|
Re: Mapping question
|
p01
|
Jan,09.2015-13:46
|
Re: Mapping question
|
Orion_
|
Jan,09.2015-17:15
|
Re: Mapping question
|
Cyg
|
Jan,09.2015-23:34
|
Re: Mapping question
|
Patrice Mandin
|
May,13.2014-21:44
|
Re: Mapping question
|
Laurent / Thadoss
|
May,14.2014-22:08
|
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|