[WIP] SkyBerron Env Mapping

Lastest Pico 8 releases added built in texture mapping capabilities! :smile:

tline x0 y0 x1 y1 mx my [mdx mdy]

  Draw a textured line from (x0,y0) to (x1,y1), sampling colour values from the map.

  mx, my are map coordinates to sample from, given in tiles.
  Colour values are sampled from the 8x8 sprite present at each map tile.

This function allows very interesting effects running @30fps: 3d Environment/Material Mapping

I just wanted to know how fast is SBDL texture mapping on Cortex M0+ against Pico 8 :thinking:

SkyBerron Bunny.bin.4

SkyBerron Bunny.bin.3

SkyBerron Bunny.bin (114.8 KB)

Only 20fps? It seems SBDL texture mapping needs some serious boosting :face_with_raised_eyebrow:


Looks gorgeous!
Isn’t Pico-8 128x128? Pokitto has more pixels to render.


Really eyecatcher!

What texture are you using? I’m clearly see a person head and some kind of church environment…
Where could live a shiny silver rabbit?

Spherical environment mapping cannot use directly pictures taken with a camera. I know (or at least I knew) how to generate spherical maps using POV Ray, which may be useful for some synthetic reflections. But I don’t know how to craft spherical maps from standard pictures.

As this was going to be a simple speed test, I just googled around and found several different textures suitable for testing. It seems that the lower the detail, the better, and also having areas with strong light also help. I packed some 128x128 8bpp textures in the binary, just use up/down to switch texture.

SkyBerron Bunny.bin.2
SkyBerron Bunny.bin.3
SkyBerron Bunny.bin.4
SkyBerron Bunny.bin.5
SkyBerron Bunny.bin.6