Advertisement · 728 × 90

Posts by Geolm

Post image

Some news about my WebGPU gpu-driven 2d port:

The GPU binning phase is working, but there are still issues with culling, likely related to AABB tests.

Debugging WebGPU in Xcode is a nightmare: a lot of passes unneeded, no way to inspect shader source or code easily, no stepping in shaders...

3 weeks ago 0 0 0 0

I’m porting my 2D SDF GPU-driven renderer (onedraw) from Metal to the WebGPU API. A few observations so far:
- Pure C API, no more Objective-C or metal-cpp 👍
- WGSL :(
- A lot more boilerplate for bind group and pipeline setup
- ~30 MB executable just to clear the backbuffer

1 month ago 1 1 0 0
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)

2 months ago 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.

3 months ago 0 0 0 0
Video

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).

3 months ago 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

4 months ago 1 0 0 0

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

4 months ago 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

4 months ago 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).

4 months ago 0 0 0 0
Advertisement

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

4 months ago 0 0 1 0

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

4 months ago 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.

4 months ago 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...

4 months ago 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?

4 months ago 0 0 1 0
Video

Haven't done a camera analysis in a while!
Here's a quick look at the camera for Metroid Dread 🎥

4 months ago 437 102 5 1
Video

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).

4 months ago 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.

4 months ago 2 0 2 0
Advertisement

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

4 months ago 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.

4 months ago 3 1 1 0
Video

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

4 months ago 2 0 0 0
Video

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

4 months ago 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.

5 months ago 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.

5 months ago 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.

5 months ago 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!

5 months ago 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.

5 months ago 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.

5 months ago 0 0 0 0
Advertisement

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)

5 months ago 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?

5 months ago 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.

5 months ago 0 0 0 0