Log In  

Cart #bunny_envmap-0 | 2020-04-21 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
36

This is a demo using tline to perform 3d environment/material mapping in pico8.

Both the object and the texture are stored in sprite memory.

P#75108 2020-04-21 11:13 ( Edited 2020-04-21 11:18)

:: Felice

Nicely done!

I'm curious why you have sine/cosine that take degree-based angles and convert to pico-8's turn-based angles. It's at a level where the conversion and wrapper overhead has little impact on performance, so I wouldn't call it a problem, but I'm still curious why you'd do it.

P#75124 2020-04-21 17:04 ( Edited 2020-04-21 17:04)
:: jimmi

@Felice - just for convenience really, that and sin() in the pico-8 library is inverted from standard convention. you could easily change this and it wouldn't make much difference.

P#75128 2020-04-21 17:20
:: Felice

@jimmi

Fair enough. I do wish zep hadn't flipped sin() for the sake of making it match screen coordinates better, so I can totally understand a wrapper for that sake. I constantly have to remember flip the math in non-screen uses. With all of the carts out there, it's too late to change it, I guess. Might be nice if we could set a flag or something to say we want normal sin() behavior rather than screen sin() behavior.

P#75150 2020-04-22 05:06
:: machi
1

as a novice this totally blows my mind!
It looks so good and runs stable in browser- whoa

P#80309 2020-08-03 12:01
:: Mot
2

This looks surprisingly good. I wouldn't have expected env mapping to come out so well on a 16 colour, 128x128 device, but wow. Well done.

P#80372 2020-08-05 06:19

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-04-15 04:21 | 0.045s | 4194k | Q:39