• he/him

Avatar by @DrDubz.
Banner by one of Colin Jackson, Rick Lodge, Steve Noake, or David Severn from Bubsy in: Fractured Furry Tales for the Atari Jaguar.


echo-parallax
@echo-parallax

I enjoyed @jam2go's video about stylized depth-of-field bokeh where instead of getting blurrier, it looks like it gets more and more JPEG artifacts. But it bothered me that it wasn't emulating JPEG compression directly — it artistically mimics the visual aspects of JPEG compression instead1.

So, here's a Shadertoy that models JPEG compression more closely! It simulates JPEG's frequency-domain quantization, YCoCg transform, and (sort of) 4:2:0 chroma subsampling, in 4 shader passes2. It also has versions of a few of the other stylized depth-of-field effects from @jam2go's video!

The scene here is @blackle's Whack-A-Mole Pistons, modified to add environment lighting. I've included a few links to other JPEG shaders and resources in the shader code comments as well.


  1. Which is likely a good choice in production, of course! By focusing on the artistic rather than technical aspects of JPEG compression, you can likely write a faster shader and have more control over the output. @ompuco's JPGPU is sort of a middle ground — it lets you also control the block size and resolution and has more options for the DCT quantization stage, but still simulates JPEG's core algorithm.

  2. This could probably be reduced to 1 if each thread did 64 texture reads in one pass instead of 8 texture reads in 4 passes. Or one might use shared memory and warp operations in a single pass if the rendering API and platform supports it; then each thread could only perform 1 texture read, and it would probably be faster. I've included some notes in the shader comments!



crappyblue
@crappyblue

i have some skill in vector art, which these days i mainly put to use by making emotes for my sonic the hedgehog discord server.

  • sonic is traced from sonic's icon in Team Sonic Racing with some small tweaks + pieces taken from the twitter pensive emoji
  • ray is traced from the promotional art for the 30th Anniversary Sonic Symphony
  • mighty is a draw-over of an animation frame from the SegaSonic arcade game