This is the first installment in the “Demystifying the PVS” series.
This is the second installment in the “Demystifying the PVS” series.
This is the third installment in the “Demystifying the PVS” series.
A little horizontal blur doesn’t hurt.
MS-DOS games that ran at 320x200 screen resolution didn’t have square pixels. This means the image was vertically stretched by the cathode-ray tube to fit the 4:3 aspect ratio of the actual display screen. As a consequence, screenshots taken of such games must be scaled vertically to look right on modern displays with square pixels.
Pekka Väänänen | 30fps.net | November 7th, 2024.
Towards the end of Wim Wenders’s excellent Perfect Days, the protagonist Hirayama is drinking beer under a bridge after he has seen a Businessman courting his crush. Suddenly the Businessman joins him under the bridge. As it turns out, things aren’t actually that simple but the point is their conversation takes them to some fundamental questions:
So you have written a cool raymarcher but for some reason it looks cheap. There are a few basic things you can always do to improve the perceived image quality: tone mapping, avoiding clipping color channels, color grading, adding glow, anti-aliasing and dithering.
Pekka Väänänen | 30fps.net | March 8th, 2024
Pekka Väänänen | 30fps.net | March 5th, 2024
Let’s say you’re programming in C and need to serialize a data structure to a storage format on disk. The storage format is not a perfect 1:1 representation of your internal data but for example a custom 3D model format of your game engine.
Hierarchical frustum culling is quick to do with a bounding volume hierarchy (BVH). Possibly the simplest of such is the sphere BVH where each node is represented by a sphere that is large enough to hold all of its children’s bounding spheres:
I wrote a software rasterizer for occlusion culling and hit many small speed bumps along the way. Here I reveal what I’ve learned in the hope of you writing your own with more ease than I did.
The simplest thing: how to extend a low bit depth color to a higher bit depth one? Well, there’s a trick.
Pekka Väänänen | 30fps.net | April 30th, 2023
Let’s say you have a bunch of 2D boxes and you want to find only ones that intersect some other box. For example to do collision detection in a game. If you’re in a hurry you can just write a loop and be done with it:
Nobody talks about binary space partitioning (BSP) trees anymore but they used to be a big deal in computer graphics. Here are some BSP lessons I recently learned.
So here’s a well-known optimization trick that also tells you a bit about how GPUs work.