Geolm's Avatar

Geolm

@geolm

Team lead in the video game industry, in my spare time : saxophonist/composer, chess patzer, pixelart lover. All expressed opinions are my own.

73
Followers
158
Following
57
Posts
22.10.2024
Joined
Posts Following

Latest posts by Geolm @geolm

Preview
GitHub - Geolm/bc_crunch at huffman tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~1000 LoC) - GitHub - Geolm/bc_crunch at huffman

As people asked for better decompression speed in my bc_crunch lib, I started experimenting with Huffman coding. First results look promising: compression ratio is still better than zlib (~1.52:1) and decompression reaches ~144 MB/s.
github.com/Geolm/bc_cru...
(BC1 only for now)

23.01.2026 16:53 πŸ‘ 4 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

nope, as you said it's complicated to get it done properly, I don't have the need ATM (not fan of the property grid everything) and it would add a lot of LOC to me lean lib.

13.01.2026 13:14 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

I didn't had the luxury to work on my personal projects during the holidays season but here's a video of my attempt to animate my creature using position based dynamics (distance/angle/elbow constraint + ik).

07.01.2026 12:38 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

also with multiple quads and alpha blending you have more overdraw and r/w access to the framebuffer compared to tile rendering. Another point is primitive smoothin and boolean operation that are only possible with tile

14.12.2025 12:38 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

got a 404 error when trying to access the pdf...

12.12.2025 19:22 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

People kept asking me to compare bc_crunch with zlib, so I finally ran the tests. Overall, bc_crunch comes out ahead. More details are available on the GitHub page.

bc_crunch BC1: 1.580368 vs zlib: 1.436144
bc_crunch BC4: 1.327702 vs zlib: 1.104125

I used miniz with the highest compression setting

12.12.2025 08:29 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

another note : BC5 ratio is pretty bad at the moment because it treats the image as two independent channels. One solution would be to create a new function only for normalmaps that exploit inter-channel prediction (not planned for now).

10.12.2025 10:28 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

btw I also found some small improvements for BC4, ratio went from 1.23 to 1.29

10.12.2025 10:20 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I understand, I might need that at some point too, if so I'll update the lib.

10.12.2025 09:07 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I don't know, I did not try nanovg. Onedraw supports less features for sure. I wrote this lib for my own needs and to try some ideas I had in mind, not to compete with others libs.

10.12.2025 09:06 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
GitHub - Geolm/bc_crunch: tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~800 LoC) tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~800 LoC) - Geolm/bc_crunch

Hey, I thought I was done with bc_crunch, but I tried one last idea: Inter-channel differential coding.

It works pretty well. The average compression ratio for BC1 went from 1.494:1 to 1.580:1, finally breaking the 1.5Γ— barrier.

It's already available here: github.com/Geolm/bc_cru...

10.12.2025 07:28 πŸ‘ 4 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Do you mean using a texture map as a probability field for spawning? I'm curious, what would be the use case?

08.12.2025 15:48 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

Haven't done a camera analysis in a while!
Here's a quick look at the camera for Metroid Dread πŸŽ₯

04.12.2025 01:53 πŸ‘ 437 πŸ” 102 πŸ’¬ 5 πŸ“Œ 1
Video thumbnail

Experimenting with a new control: a knob :) It should land in the public leanUI library soon. And yes, I’m working on a synth… stay tuned (pun intended).

03.12.2025 19:41 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

As a Canadian, I can tell you the shovel sound is a bit off. You only get that bright metal-on-concrete noise when the ground is bare. Most of the time there’s a layer of packed snow or ice stuck to the concrete, which makes the shovel sound more muted and less metallic.

03.12.2025 09:55 πŸ‘ 2 πŸ” 0 πŸ’¬ 2 πŸ“Œ 0

no the post can't be that long !! ;)

30.11.2025 21:58 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - Geolm/spawn2d: Uniform sampling in combined shapes with overlap handling and distance constraints. (~300 LOC, C11) Uniform sampling in combined shapes with overlap handling and distance constraints. (~300 LOC, C11) - Geolm/spawn2d

Needed a simple way to spawn 2D objects (grass blades, stones, etc.) in composite shapes or along splines, so I wrote this: github.com/Geolm/spawn2d. It’s minimal, single-file, and easy to drop into any project.

27.11.2025 07:21 πŸ‘ 3 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0
Video thumbnail

Uniform Catmull–Rom spline sampling with disc collision and exclusion zones. Poisson-like, but curve-specific.

26.11.2025 15:35 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Video thumbnail

Working on a uniform sampler with dynamic exclusion zones for procedural gen. Solid results so far, code release is possible once it’s cleaner.

26.11.2025 13:35 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

currently no, TBH it's not planned since my goal was to have a quick way to export video from my games/renderer. Feel free to fork the repo and add the features you need.

21.11.2025 14:09 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - Geolm/mjpegw: Tiny C99 library for creating MJPEG AVI files. No external dependencies Tiny C99 library for creating MJPEG AVI files. No external dependencies - Geolm/mjpegw

Just released a single-file C99 library to create MJPEG AVI videos from an RGBA framebuffer.

github.com/Geolm/mjpegw

Like jo_mpeg, but MJPEG gives higher quality (larger files).
β€’ 3-function API
β€’ No dependencies
β€’ No audio
β€’ Plays in ffmpeg & VLC

Huge thanks to Tiny-JPEG for the JPEG part.

21.11.2025 10:38 πŸ‘ 3 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Also, there’s a benchmark in the repo at /test/benchmark.c that profiles BC1 crunch/decrunchβ€”make sure to compile with optimization flags.

19.11.2025 10:27 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Post image

Some optimizations news: NEON + decoder table in bc_crunch β†’ decrunch ~1.5Γ— faster, crunch ~1.3Γ— faster. No plans for more performance tweaks right now, but I left some ideas in the README. Ping me if you want to chat about them!

19.11.2025 10:23 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Hi everyone! Thanks for the interest in my library bc_crunch. Quick update: I’m currently working on optimizations. Two major bottlenecks have been identified, and fixes are on the way. I’ll share some performance numbers soon and add a profiling test to the repo.

18.11.2025 09:30 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

I’ve updated the BC4 algorithm and I’m curious whether it improves the compression ratio on your textures as well. For reference, my AO/displacement map went from 1.051032 to 1.211644 (a 15.3% gain). I have still some ideas left, I will try to continue to improve more.

17.11.2025 12:13 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Update, I changed the heuristic for BC4 streams, went from an average ratio of 1.051032 to 1.211644. Tested on AO, displacement map (check textures/bc4 folder)

17.11.2025 12:09 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Thanks! I haven't had time to profile decompression yet, so that measurement is really helpful. Would you mind if I add that number to the project page?

17.11.2025 09:51 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Thanks for the feedback! I agree on BC4/5 β€” right now it’s a bit hit-or-miss and too dependent on input noise. The algorithm still needs improvement there. I’m currently building a BC5 test texture set, which should help compare different approaches more reliably.

17.11.2025 09:48 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Don't hesitate to message me if you find a bug or if you have a question or feedback. I will update the readme with the BC4 benchmark soon.

15.11.2025 16:47 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
GitHub - Geolm/bc_crunch: tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~700 LoC) tiny dependency-free lossless compressor for BC/DXT texture streams (C99, ~700 LoC) - Geolm/bc_crunch

Just released bc_crunch: a tiny (~700 LOC), C99 library for lossless BC1/BC4/BC3/BC5 compression.
One .c/.h pair, no deps, no malloc
GPU-ready output
Zigzag + delta + popcount/dictionary tricks
Tested
Perfect for games, procedural assets, streaming textures.

github.com/Geolm/bc_cru...

15.11.2025 13:18 πŸ‘ 40 πŸ” 8 πŸ’¬ 3 πŸ“Œ 0