|
Atari coding BBS
Re: Texture U/V misunderstanding |
Posted by: ggn
|
Jan,24.2015-21:43
|
Heh, I admit I must have pressed F5 many times on this thread before replying as I thought someone (maybe Orion_) will have answered before me ;).
Firstly, your addition results are wrong! I had to open up Bugaboo to confirm this: $1ffff+$10001 is in fact $30000, not $3fffe :). So your results should be (starting with $1ffff and $10001 which are your original values):
$1ffff+$10001=$30000
$30000+$10001=$40001
$40001+$10001=$50002
It's pretty obvious that the 68000 add.l adds the full 32 bits each time, so there is carry over from the low to the high word - were you expecting that the low word should wrap?
Anyway, casting that aside, why do you even want such a step value for your texturer? Effectively $0001ffff adds 1/256 pixels to the U coord and 255+1/256 to V (keeping in mind that $00 gets added to U, $01 to u, $ff to V and $ff to v). I would expect positive adding values to U/V coords and 0-255 (fractions don't have a sign) to u/v. So, I duuno, if you want to advance your texture by 1 pixel in U and 0.5 pixels in V you'd need to load $01000080 to d4.
Hope I got the right end of the stick here and I'm not totally off course :). Also sorry if what I wrote sounds patronising but my head is a bit dizzy atm ;)
|
[All messages in this thread] [Start new thread]
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.
|