Source

Branch

1/ @tom_forsyth

@mike_acton

Am I right in thinking this is running the entire Pico8 program at every pixel and then discarding all but the specific pixel it cares about? This is… so wrong :-)

2/ @mike_acton

@tom_forsyth

Yes and no. It’s doing that for an area that matches the draw area of the pico8 (128x128). Then the actual render view is just a texture lookup. I have a few things I could do to reduce it further, but webgpu doesn’t have this constraint so not bothering.

3/ @tom_forsyth

@mike_acton

I did once contemplate writing a ZX Spectrum emulator like this. It is unclear if there is quite enough horsepower to do this at full speed. Maybe if it transpiled the Z80 code rather than emulating it?