Memory-mapping is my preferred way to do file I/O, on pretty much every platform I write code for (desktop and console). In this post, we’ll start by discussing some of the key advantages of this approach, as well as some disadvantages. Then, we’ll look at some Windows-specific undocumented user-mode functions which help mitigate some of those disadvantages. In particular, we’ll address an…
Years ago, I wrote a somewhat popular Twitter X thread on recommendations for getting started in the field of computer graphics. I deleted my account some time ago, but have been asked more than a few times for the same advice, and while I’m happy to offer whatever help I can, I figured it would be a decent idea to publish my recommendations in blog form this time (FAQ style). As a disclaimer,…
The goal here is to compile a list of C++20 features I think game devs should probably use (possibly with caveats), and features I think game devs will probably want to avoid. You’re probably curious “why now?” given that it’s 2023 and C++20 was standardized several years ago. Well, mainly it’s because it took me several years of trying and retrying various features to get a sense for what I liked…
In this post, I’ll be reviewing a surface gradient bump mapping framework ( jstor ) proposed in 2020 by Dr. Mikkelsen (well-known also for creating the Mikktspace standard). The objective of the framework is to provide a unified prescription for how to apply bump map influences from a variety of sources in a way that is consistent and comprehensible. In the example image taken from the paper…
This is a quick (and final) continuation of the previous post on HLSL interlocked min/max floats . As a recap, the goal is to leverage some properties of the bit-representation of an IEEE 754 float to perform atomic min and max operations on floating point values. In the previous post, we used some bit-twiddling to map the entire floating point range to a 32-bit unsigned value, at which point…
I’ve had to evaluate and understand different game engines and game architectures for myriad purposes in my career. In no particular order, I’ve evaluated engines to: Understand a custom engine as part of my onboarding to a new role Weigh different tradeoffs for a new title Evaluate an existing choice for a title in-progress While I’ll refrain from commenting on specific commercial engines (e.g.…
For quite some time now, HLSL has supported a variety of intrinsics for performing atomic operations on a given address. The address typically refers to groupshared memory (sometimes referred to as “LDS” or “shmem” depending on the color of your GPU) or a location in an RWByteAddressBuffer (or some other uint or int typed-resource). These intrinsics are extremely useful in a variety of situations…
Do you frequently find yourself struggling to remember how the various built-in compute shader semantic values work by glancing at the image below? You can find this image on the various SV_* Win32 documentation pages such as this one . It’s easy to get confused as to when to use which semantic value if you’re not used to it, so here’s how I remember things. The main thing to remember is that both…
This is a light brain dump intended to describe the interviewing process as it pertains to graphics programmers (including prospective ones). If you are in the business of assessing other graphics programmers in an interview, you’ll likely find that getting a good signal-to-noise ratio can be quite tricky. Things don’t get much easier on the other side of the table for prospective graphics…
There are plenty of reasons you might find yourself in a big unfamiliar codebase. You might have just started a new position. You might be doing technical due diligence on a possible acquisition or contract with an external company. You might be evaluating a third party framework or engine. Regardless of how you got there, learning to navigate unfamiliar code effectively is a useful skill that is…