Vertical offsets are ignored in texture patches

From DoomWiki.org

In some circumstances, the rendering engine will ignore a texture patch's vertical offsets. There are two main causes: negative offsets and masked middle textures.

Negative offsets[edit]

Negative vertical offsets (placing the origin of the patch above the texture) are ignored, putting the top of the patch back in line with the top of the texture.

An example of this is the STEP2 texture, which is defined as the SW11_4 patch (also used in STARBR2 from the STAR family of textures) with a negative offset of -112, normally placing the bottom of the patch in line with the bottom of the texture, and the STEP03 patch covering the previous patch on the upper half of the texture. Since the negative offset is ignored, it is the top of the starstruct wall that is seen behind the step patch, showing the shaded curves of the padded structure instead of a flat surface. This is a rather subtle effect since in most cases, the STEP2 textures is placed on lines where only its top 16 pixels are shown; one area where the effect of this bug can be seen is in MAP09: The Pit, on the riser of the first step leading from the blue key area into the uppermost platform.

Masked middle textures[edit]

Offsets on masked middle textures are also ignored, even if positive.

An example can be seen in Eternal Doom on MAP25: Beginner's End. The UNLOCK texture, which displays on three lines spanning a height of 29 pixels a message telling to "apply atop any pillar for a security bypass", is 128×64 but to center the message, the patch has a positive offset of 16 pixels. The use of this texture in MAP25 is however rather convoluted: the linedef on which it is placed (#2236) is straddling three different sectors (#414, #415, and #416) but the line itself refers to sector #417 instead for both front and back sector. The sector to which the line belongs does not have the same floor and ceiling height as the three sectors in which it actually appears. The result of this is that the line only has 36 pixel rows to be displayed, effectively hiding the "security bypass" part of the message. However, because the offset is ignored, these 36 pixel rows are enough to display the entire message. It is possible that the setup using a controlling sector with different heights was used as a workaround for this bug.