Posts

Some Info-graphics

Image
I make info-graphics to make it easier to explain to others what I'm working on. These also make it easier for me to keep the details straight. Anyway, this is just a dump of a few recent info-graphics. I'm especially fond of the second one!

Speedup from wrapping third-party libraries in C++20 modules

Image
TL;DR: Wrapping third-party include-heavy libraries in C++ modules improved clean-and-build time by about 40% for both my laptop and desktop.   My desktop (which I haven't been able to use because of a leg injury), has like 20processor_threads each at 4.5GHz . Multiply that out, and you've got 90GHz-processor_threads . My laptop has 8processor_threads each at 2.0GHz for 16GHz-processor_threads . 90/16 is about 5.5 , and I certainly feel the difference on this laptop.   I've been wanting to start using third-party c++ libraries as modules for a while now. There is a huge promise of build time speedup, but not all of the tools are in place for a library creator to provide their library as a module yet (via a package manager anyway).   I learned recently that you can pretty concisely export included symbols from a module. For example: Here is my wrapper module for a popular command line parsing library:       I was also recently forced to recognize just h...

Preventing banding by including truncated color depth as dithering

An image with and without dither rounding   The same image with one band shaded a different color.   NOTE: The stripey pattern on some of the cubes is an artifact of half-implemented SSAO. It is not an artifact of dither rounding. In a deferred-renderer: Intermediate images are created and combined to form what the user sees each frame. In my case, one of these intermediate images uses 16bit floats for each color channel. This is really nice for a lot of reasons. One reason for this is to allow certain pixels to be "brighter than white" ( https://learnopengl.com/Advanced-Lighting/HDR ). Another reason is to retain enough precision to produce any color when converting from linear color space to sRGB. This post is about yet another good reason to have that high-bit-depth image: The extra color information can be included in the final image as dithering! This prevents the otherwise unavoidable banding that comes from having only 256 brightness levels for any one color. The algor...