Shotgun sprite wraps vertically in Final Doom

From DoomWiki.org

A view of the vertical wrapping of the shotgun pumping animation in The Plutonia Experiment.

In The Plutonia Experiment and TNT: Evilution, the HUD shotgun graphic visibly wraps vertically during the pumping animation. During the frame when the shotgun is being held near-vertically, the tip of the muzzle can be seen repeated at the bottom of the graphic.

Technical explanation[edit]

Doom graphics are stored in a special picture format where each column in the image is expressed as a series of one or more "posts," where each post is a consecutive run of non-transparent pixels. The vanilla Doom rendering engine uses the same rendering code for sprites as it does for wall textures, and as a result of this, any post longer than 128 pixels will wrap at that point, so pixel #129 will be drawn as pixel #1, and so forth. Because some columns in the shotgun pumping animation are up to 151 pixels tall, this can result in significant wrapping.

In Doom and Doom 2, id Software specifically bypassed this issue by splitting these long columns into two posts: one of 128 pixels, and a second with the excess. Plutonia and TNT's IWADs, on the other hand, were apparently compiled from the source graphics with the third-party tool DeuTex, which did not take this potential vertical wrapping into account at the time.