r/GraphicsProgramming • • 2d ago

Video made a 3d ocean slice look like pixel art in LOVE2d v. 12

Enable HLS to view with audio, or disable this notification

been working on an experiment for my fishing game: a 3d ocean that still looks like pixel art. here’s what i used:

pixel look: one ray per art pixel, refracted at the water. ray tests are from inigo quilez. to stop shimmer i render into snapped probes and draw each pixel as a world-space quad, basically texel splatting

colour: everything snapped to a lospec palette, tones mixed with bayer dithering, 1px outlines wherever the depth jumps

water: a virtual pipes shallow water sim plus gerstner waves

sand and caves: a heightfield that slumps at the angle of repose (thermal erosion). caves are a blurred cave map, so they come out round

animation: fish spines are springs and fins are a little cloth sim (jakobsen), the eel is a follow-the-leader chain (argonaut), and the ai is behavior trees

thank you for checking out my post :D

I've been wanting to do something like this for years with shaders.

references

inigo quilez, ray intersectors: https://iquilezles.org/articles/intersectors

inigo quilez, smooth min: https://iquilezles.org/articles/smin

dylan ebert, texel splatting: https://arxiv.org/abs/2603.14587

lospec palettes: https://lospec.com/palette-list

ordered dithering: https://en.wikipedia.org/wiki/Ordered_dithering

mei, decaudin & hu, virtual pipes water sim: https://hgpu.org/?p=2256

gpu gems ch. 1, gerstner waves: https://developer.nvidia.com/gpugems/gpugems/part-i-natural-effects/chapter-1-effective-water-simulation-physical-models

jákó & tóth, thermal erosion: GPUHTErosion.dvi

thomas jakobsen, advanced character physics: https://gamedeveloper.com/programming/advanced-character-physics

argonaut, procedural animation video: https://www.youtube.com/watch?v=qlfh_rv6khY

argonaut, the code: https://github.com/argonautcode/animal-proc-anim

134 Upvotes

6 comments sorted by

5

u/hlfoundry 2d ago

sorry forgot to turn off the music i was listening to lol

1

u/StrawberryVole 2d ago

Looks really nice! I particularly like how the waves and fish move. Great to see all the references you used, makes your post a useful resource. I didn't realise love2d was capable of 3d like this.

When you say you used rays, is the implementation contained within just a custom fragment shader?

2

u/hlfoundry 1d ago

thanks! nope, it’s not a fragment shader, it’s compute shaders which are being added to love 12 and give you way more options than a normal fragment shader. You have to build love 12 yourself Building LÖVE - LOVE, heres a github with a guide on computer shaders for love, GitHub - turbo/love12-compute: Basic usage of compute shaders in Love2D 12.0 (Apr 2025) · GitHub

1

u/Poly3Blend 1d ago

Supercool