display | more...
In Doom, if you use the no clipping cheat to go outside the level, you typically see a shimmering mass in the empty space outside, composed of bits of previous frames of animation. You can achieve the same effect by making a level where a wall has no texture. The name comes from the fact that it looks kind of like being in a hall of mirrors. It is sometimes abbreviated HOM or HOM Effect (there is another writeup under that node; I did not realise when I wrote this one).

Why it happens

When Doom renders the level to the screen, it draws it into a buffer, an area of memory. As you walk around the level, the previous contents of the buffer get overwritten. When you get outside the level however, there are no walls to draw. So doom draws nothing there. Instead, you get the previous contents of the buffer, left over from previous frames.

This much is fairly obvious, but why does it shimmer? The answer is in the doom video system. See, doom doesnt actually draw into one buffer, but two. This is called page flipping. While Doom is rendering into buffer 1, the video card is displaying the contents of buffer 2 (this is a good thing, otherwise you'd be able to see the screen while it was still half-drawn). When it is done, it flips the buffers round. The video card displays the contents of buffer 1, and Doom draws the next frame into buffer 2.

So when there is nothing to draw, you instead get the leftover bits of previous frames. However, because of page flipping you actually get the contents of two previous frames, alternating back and forth. Because there is typically only very slight difference between frames of animation, it is like they are shimmering back and forth. Most of the modern Doom Source Ports dont use page flipping, so they lose the shimmering effect.

Interestingly, if you turn around again and look back toward the level, you can see through the walls and inside the level. The floors of the level stretch outwards toward you in vertical columns. This is because the Doom floor and ceiling drawing system was like a flood fill algorithm: because there are no walls to bound them, they simply bleed down to the edges of the screen.

Some levels even used this effect: you can use it to make invisible pits, for a deep water effect for example. The edges of the pit have no texture, so the floor bleeds over the step. As an added bonus, if the player dies while in the water, his viewpoint falls below the waterline and you get the shimmering hall of mirrors effect on the missing texture, sort of like being underwater!

Log in or register to write something here or to contact authors.