Archive for December, 2007

GLSL-based Sort-Last Recomposition

28. December 2007

Equalizer just got a lot faster for database (sort-last) compounds.

The problem with the recomposition is that if you are using a fixed-function pipeline the standard algorithm is using stencilling and glDrawPixels. The latter is dreadfully slow for depth values, since the depth and stencil values are interleaved in the frame buffer.

Equalizer’s new default algorithm uses a GLSL fragment shader (when available) and two textures. The shader simply reads the color and depth values from the two textures and uses them as the fragment’s color and depth value, respectively. The depth test will take care of the correct fragment ordering.

The performance speedup is impressive, even without any tuning. So far I’ve tested it on a Linux system with a GeForce 7800 – the speedup is roughly 2.3x ( 171ms old, 72ms new at 2560×1600 and 42ms old, 18ms new at 1280×800).

Off-the-Shelf Head Tracking

24. December 2007

Some of you might already have seen it, but it’s a nice hack to get cheap head tracking with a Wii Remote:

If you are new to VR – he gives an easily understandable explanation how head tracking works. And the video manages to show the effect quite well.

Now if I only had the time to play with such things in Equalizer… 🙂

Pixel Compounds

13. December 2007

Three-to-one pixel compound

Equalizer just got something new for all you ray-tracing and volume rendering people out there: Pixel compounds. The load is always almost equally distributed, thus allowing to scale the fill-rate nearly linearly.

The frustum for the source channels gets distorted so that the channel only renders 1/nth of the pixels in one dimension. Afterwards the frustum is moved slightly to select the ‘starting’ point of the channel.

OpenGL functionality which is influenced by the raster position will not work correctly with pixel compounds, or needs at least special attention. Among them are: lines, points, glRasterPos, glPolygonStipple.

On the right you’ll see an image of it in action. The backgrounds are colored differently for illustration purposes. Click on the image for a high-res version.