Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

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]

Topic Posted by  Date 
Texture U/V misunderstanding Orion_ Jan,24.2015-17:41
  Re: Texture U/V misunderstanding ggn Jan,24.2015-21:43
    Re: Texture U/V misunderstanding Orion_ Jan,25.2015-18:07
      Re: Texture U/V misunderstanding ggn Jan,25.2015-20:51
  Re: Texture U/V misunderstanding mikro Jan,26.2015-10:05
    Re: Texture U/V misunderstanding Orion_ Jan,26.2015-15:47
      Re: Texture U/V misunderstanding Orion_ Jan,26.2015-17:54
      Re: Texture U/V misunderstanding mikro Jan,27.2015-11:26


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

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.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson