Simon Brown

488 Followers
219 Following
127 Posts
Graphics/systems programmer. Previously at Unity, Media Molecule (Dreams), Sony ATG. Interested in tracing rays, distance fields, Vulkan, Rust/Zig and generally keeping GPUs running efficiently. Opinions my own.
Githubhttps://github.com/sjb3d
Bloghttps://www.sjbrown.co.uk
Latest 3b1b video on the mathematics of this Escher drawing is really great. Kudos to the author reaching literally millions of people with these topics! https://www.youtube.com/watch?v=ldxFjLJ3rVY
Escher's most mathematically interesting piece

YouTube
The algorithm for in-place rotation of an array is neat (and oddly resembles building a geometric rotation as a product of reflections?)

The #Zig folks understandably do not want language proposals from outside their core team, so this is just a local experiment.

I was surprised how easy it was to just start hacking on the compiler though! Code changes are here if anyone is interested: https://codeberg.org/sjb3d/zig/compare/bbc77df..vector-gather-shuffle

zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

Codeberg.org

One thing I miss in #Zig compared with shaders/clang ext_vector is postfix syntax for vector swizzles.

So, weekend experiment as a compiler noob: can I locally modify the compiler to allow postfix syntax via a kind of vector gather op? Answer: yes!

Wasn't expecting to be doing quite so much introspection 2 pages into this pdf

Zig update to 0.14 done, was almost entirely search-replace on standard library changes.

Excellent work #zig folks! ⚡

Refactored things a bit to get adaptive resolution working through domain deformations. A bit costly when the deformation is large, but seems to work! Celebratory twisting cube SDF:

Very happy with how well adaptive resolution is working. Dreams voxelizes each sculpt uniformly, so there is a heavy tradeoff between size and detail, is super nice to lift that restriction.

Quick demo of adaptivity, code is still super dumb and rebuilds the whole object on a single thread, so hopefully plenty of perf headroom left!

With thanks to the Vulkan validation layer, moving uploads/compute off the graphics queue seems to be working fine, hurrah.

With a bit of refactoring to support multiple objects, it's now fairly easy to make temporary objects for a selection effect, which helps a lot to visualise subtractive CSG:

Quick clip of editing the last scene.

Still single-threaded here, with ispc for SIMD. Currently refactoring onto multiple threads with async upload to Vulkan, what could possibly go wrong...