[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Raycasting 3D demo disk



David Schmenk wrote:
aiiadict@gmail.com wrote:

David Schmenk wrote:

I did have to add vertical details on the wall
boundaries or else it all blended together.

Dave...


  for sure...  you have to have some difference
in color otherwise it's all just one color :-)

You said textures are 16X16, with high nibble
matching low nibble..  If I don't make high
nibble = low nibble, it shows textures are
16X16 bytes, but hi/lo nibbles represent
1 pixel on top of another!...  error in the tex
editor showed me this, I was setting the byte
to 1 to 16, not $00,11,22,33,44,55 etc... and
I was getting black spots all over the place :-)

so, if I change the tex editor to display the 16X16
byte as a 16X32 graphic, and allow editing
the hi/lobytes individually, you could get better
resolution..  I don't know if the colors would be
predictable though...

Rich


The colors are replicated in the high and low nibble to avoid shifting during the rendering loop. Shifting by 4 is the worst case scenario for the 6502. I already had to unroll the rendering loop for every vertical pixel to get it fast enough. It still needs to be faster but having only one general purpose register makes things tough. Take a look at the memory map for lores to figure out why :-)

You can shift by 4 with a lookup table and a load...

-michael

NadaNet networking for Apple II computers!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."