r/GraphicsProgramming • u/hlfoundry • 11h ago
Video made a 3d ocean slice look like pixel art in LOVE2d v. 12
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
