Month: March 2008

First week without laptop

As ancient Chinese knowledge puts it: The probability of finding a stock NVIDIA video card for my Dell laptop at the local service centre is epsilon.

I had to regress into developing on my five year old desktop PC during the last week. Good thing I chose to furnish it with an X800 Pro back then; with the laptop undergoing open heart surgery at the service centre, I can at least test and run Shader 2.0 programs. Since the last update, I’ve implemented render targets in the driver abstraction layer, to allow for effects such as reflections and shadow maps, and cleaned bits and pieces of code here and there. I’ve also had a go at implementing a mirror effect, which turned out quite nice. Now that I am in process of formalising the effect system, I will re-code the reflection as an effect node in terms of the new framework.

In the meantime, I’ve attached some pictures showing the latest developments:





RIP 7900 GTX

It seems like the next update will have to wait – my laptop’s video card is busted! It was during a perfectly normal Windows session, that, all of a sudden, the desktop froze and the only way out was rebooting the machine. When the BIOS screen came up, it was evident something was not quite right – a display overlay of green vertical stripes is usually not a good sign. Well, to cut a long story short, I could boot neither Vista nor XP except in safe mode. I tried re-installing the video card driver but to no avail – the vertical stripes from hell have made a comely abode out of my display.

Since the last post, I have been working on a scene graph system and a high level pipeline for culling, sorting and rendering it. The pipeline consists of fully customisable modules, which can be extended or replaced at will, through the plug-in system. The culling module, for instance, is input a node of the scene graph and outputs a set of potentially visible entities. The culling strategy is up to the user to decide; so far, the core culling module only provides frustum culling of bounding volume hierarchies. Eventually, there will be implementations for various space partitioning schemes.

From the culling stage to the sorting stage: the entity set output from the culling stage is not optimally ordered or sorted for rendering. During this stage, the visibility set is sorted to provide a queue optimised for drawing operations. The basic implementation of the sorting module organises geometry, grouping it together using its material properties (render state changes, shader programs and textures), and comes up with a number of batches which, when rendered in the specified order, reduce the number of state changes. Although various sorting strategies will be made available, if none satisfy specific user requirements, the framework empowers the user to write his own sorting plug-ins.

The rendering module may take its input from the sorting stage or directly from the culling stage. Basically, when drawing from the sorting stage, entities are batched, grouped by specific criteria. On the other hand, drawing directly from the culling stage implies that no optimisation is performed on the input set, and accordingly entities are rendered one by one. So, fundamentally, the high-level rendering interface supports two modes of operation: batch and immediate. Being fully customisable, rendering modules allow a great deal of control over how scenes are rendered. It will eventually be trivial (I hope) to switch between, say, forward and deferred shading.

The next stage of development is the effects system, which is very much inspired from David Eberly’s Wild Magic engine ( With the effect system in place, I will have a framework within which to implement multi-node effects such as shadow mapping or planar reflections.

With my XPS out of the way, I thank the good Lord for providing me with a machine I can do some development on, until my trusty laptop is back home.