Category: Blog
-
Slim Graphics: Introduction
Slim Graphics is my toy graphics engine I’ve been using to experiment with different graphical techniques and learn more about DirectX 12 as well as other graphical features such as Mesh Shaders as well as optimisation techniques. I have not designed the API to be perfectly optimal, nor have I set out to create the…
-
Comparing Synchronisation Methods on Windows
Mutexs, Semaphores, Condition Variables, Critical Sections… There are so many different synchronisation types to choose from but how do they compare in terms of performance and what other synchronisation types are there we can explore? My tests here have been written with a job-system in mind, where worker threads are waiting for work which is…
-
Does calling sqrtf always result in a single asm instruction?
I was recently running some performance benchmarks across different platforms to understand the cost of some simple mathematic functions such as sqrtf and quickly noticed, under certain circumstances compilers such as MSVC, Clang and GCC by default will not generate a single x86-64 sqrtss instruction, there is a little more to it… I think discovering…
-
Visualising SRGB & Gamma Correction
Introduction There are plenty of fantastic websites out there which explain the technicalities of Gamma Correction and SRGB colour correction so won’t try to do the same here. Instead this post is to show visually the effects of SRGB/Gamma Correction in image composition and how blending colours in SRGB space rather than linear space is…
-
Redirect all stdout/stderr to console
If your Windows executable is using /SUBSYSTEM:WINDOWS rather than /SUBSYSTEM:CONSOLE, something you will have noticed your output messages to stdout (printf, std::cout etc) will be missing. You can easily solve this however by spawning your own Windows console window and redirecting stdout to your new console. The code below will redirect all stdout & stderr…