[HN Gopher] Surface-Stable Fractal Dither on Playdate
___________________________________________________________________
Surface-Stable Fractal Dither on Playdate
Author : atan2
Score : 132 points
Date : 2025-02-18 03:04 UTC (4 days ago)
(HTM) web link (aras-p.info)
(TXT) w3m dump (aras-p.info)
| sneak wrote:
| TIL playdate has no GPU. i had assumed part of its appeal was
| being able to do intense modern graphics processing on an
| otherwise-retro display.
| karlgkk wrote:
| Its appeal is that you have a target to build simple games
| against. It's limiting, but on purpose.
| ant6n wrote:
| Well it has a 168MHz arm, so assuming 20fps, you got 80
| instructions to work with per pixel drawing - that's a bit
| tight, but not overly so. In the 90s, games (like Quake) worked
| with much less.
|
| But this assumes that wait states of the memory or a funky way
| to access graphics don't screw you over. I did a quick search,
| and couldn't find detailed hardware specs (like pano docs for
| game boy, or gbatek for gba / Nintendo das).
| yzydserd wrote:
| It has a Cortex M7 180 MHz MCU. No real SIMD. Reasonable
| memory at 16MB but it is slow to r/w at about 30MB/s. DTCM
| 30x faster but you don't get much to address, e.g. the stack
| is just 10KB. Framebuffer 12KB. System reserves the rest of
| the 64KB TCM. There's just a 4KB cache. So the limiting
| factor is often memory access not cpu. The 400 x 240 1 bit
| Sharp Memory LCD has to be carefully addressed in horizontal
| strips of 32 bit words with weird endianness if you want high
| performance. It's very possible to work at the maximum 50fps
| per full frame and do per pixel work and prep for blit in sub
| 15 percent of CPU. Almost all devs aim for and achieve 30fps.
| You can have effective 200fps if you like since not all rows
| need to be refreshed per frame. An interesting situation is
| the device had an earlier Rev A before the Rev B that 90% of
| users have, and with Rev A up to 30-50% slower you have to
| develop for the base device specs if you want to be
| inclusive. It makes you wonder about Rev C decisions. All
| that said, most games are written in Lua which runs 50x
| slower than compiled C on the device, yet many very fun games
| have been released. You can compile ARM intrinsics/asm but
| it's a rare situation if you can beat the compiler. Working
| within all these constraints is part of the charm of
| developing for it. It necessitates a discipline of writing
| tight benchmarked code, even inspecting compiled
| instructions, if you want to push it.
| WithinReason wrote:
| This looks bad since the resolution of the dither pattern is too
| low. Maybe mipmapping it would help?
| qingcharles wrote:
| This definitely seems like the wrong platform to experiment
| with this technique. It's a lot of work to have such a poor
| result when there are other solutions which would produce much
| nicer results with less effort.
|
| Plus it is doing a wild amount of per-pixel computation for
| this.
|
| I don't wanna knock the author too bad, though. He put the
| hours in and he documented every step in serious detail, so mad
| respect for that.
| brianpan wrote:
| His Game Boy Advance was probably out of batteries. Sometimes
| you gotta make do.
| gyomu wrote:
| > This definitely seems like the wrong platform to experiment
| with this technique
|
| As an owner of a playdate, it's kind of the wrong platform
| for... everything. So in that sense it's right at home.
|
| You have to respect the vision, execution, and the commitment
| to the product - the hardware looks great and feels great.
|
| The games are all kinda gimmicky and obviously limited by the
| platform though. Falls squarely into the "I want to love this
| thing so bad, but I just can't" camp.
| mobiledev2014 wrote:
| It's definitely not for everyone but I feel like, of the
| people who were intrigued enough to buy one, you're
| probably in the minority. I would have found it worth it
| just with the first season of games. It has exceeded my
| wildest expectations
| madeofpalk wrote:
| I'm sure doing it on the Playdate was the point.
| bjconlan wrote:
| Yeah I agree. The dithering effects in Everybody wants to crank
| the world[0] are much more visually satisfying but as you
| pointed out perhaps it's the levels of the textures that make
| it feel... Well like textures.
|
| [0] https://aras-p.github.io/demo-pd-cranktheworld/
| diffuse_l wrote:
| You can estimate mip levels per triangle and subdivde them
| based on the wanted mip level across z lines, instead of doing
| the calculation per pixel. It's a bit wonky, but can work, at
| least for the bigger triangles.
|
| I've linked some code that does something along those lines for
| mipmapping [1].
|
| [1] https://github.com/Gil-
| AdB/REVIVAL/blob/0da65f18a34b74575a89...
| WithinReason wrote:
| yeah I was wondering if you could use blue noise mipmaps,
| trilinear sample from it, then round to 0 or 1. With the
| right mipbias it feels like it should look OK.
| diffuse_l wrote:
| Trilinear might be possible, but then you'll still need per
| pixel derivatives, no?
| cubefox wrote:
| The dither pattern is not really aligned with the screen
| pixels. So you can't have just one black or white dot per
| pixel. The alignment is only approximate, so you have dots that
| are much larger than pixels.
| stuaxo wrote:
| This was a great read. I'd like to see Elite (or just a scene
| from it) rendered with this, I reckon that would be pretty
| interesting on the play date.
|
| Using the handle to rotate your ship on the way into dock would
| be very cool.
| montag wrote:
| This is a cool novel technique for sure, but for some reason I'm
| just not aesthetically in love with it. The fact that the pattern
| is surface aligned just...doesn't add anything over dithering in
| screen space. And I really loved the dithering in Return of Obra
| Dinn. Is it just me?
| chpatrick wrote:
| I agree with you, it's technically very cool but Obra Dinn just
| looks better.
| turnsout wrote:
| Thought the same thing when the original Surface-Stable
| dither link made the rounds. There's just something off about
| 1-bit dither with perspective applied, but constantly
| shifting scale on different parts of the model.
|
| Super interesting thought experiment (and this version is an
| impressive exercise in optimization), but the aesthetic of
| Obra Dinn is in another league.
| cubefox wrote:
| Surface-Stable Fractal Dithering - 182 points by bj-rn 29 days
| ago:
|
| https://news.ycombinator.com/item?id=42808889
| amelius wrote:
| The Playmate might be a cool device for geeks, but I don't see
| how it appeals to the general population, especially considering
| that you can get more from a typical smartphone.
| chrisbrandow wrote:
| That's not really its purpose. I think it's makers are
| generally going for a cool device for geeks
| jjj123 wrote:
| It doesn't appeal to the general population, that's not its
| goal.
___________________________________________________________________
(page generated 2025-02-22 23:01 UTC)