Understanding BCn Texture Compression Formats

February 12, 2012 · Workflow · 2 comments

The current state of the art in GPU-supported texture compression is a set of seven formats called BC1 through BC7. These formats are used by almost all realistic 3D games to reduce the memory footprint of their texture maps. In this article, I’m going to get under the hood of each of the seven BCn formats, explain how they work, and show how their features make them effective for compressing different kinds of images. Read more…


The Shunting-Yard Algorithm

December 11, 2011 · Languages · No comments

In game development (or programming in general) it’s not uncommon to have a situation where you’d like to let a user enter an arithmetic formula that your code parses and evaluates. For example, in a shader you might like to have an annotation that specifies how a parameter is to be computed in the main application. In various kinds of authoring tools you might like to create a shape, image, or animation based on a mathematical function. Embedding a full-fledged scripting language like Python or Lua is a bit overkill for these kinds of tasks. So how can we handle arithmetic expressions without a large amount of infrastructure?

Read more…


GPU Profiling 101

October 12, 2011 · GPU Programming · 2 comments

In the screenshots in my previous post, you might have noticed this readout in one corner:

As you can see, even though Idyll is at a very, very early stage (it has no textures, only ambient and directional lighting), it still has a fairly complete performance measurement system. I chose to implement this early on in development because it’s my belief that although it can be too early to optimize, it’s never too early to profile.

Read more…


A First Look at Idyll

October 9, 2011 · Eye Candy · No comments

Hello, and welcome to my new coding blog! I’m going to use this space to talk about lighting, shaders, GPU programming, and other graphics- and gamedev-related topics as they come up. In my spare time I’m working on a project that for now I’m calling “Idyll”. At the moment this is just a graphics engine, and it’s just in its infancy. Eventually I hope to expand it into a more full-featured game engine—and maybe even make an actual game with it—but for my purposes, the graphics are paramount.

Read more…