Sprites improperly clipped

From DoomWiki.org

A triangular visplane cuts a part of a tree's sprite in vanilla Doom.
In OpenGL mode, only the part of the sprite that should be behind the floor and the wall is clipped.

Sprites can sometimes be improperly clipped in the Doom engine. When an actor is close to a wall bordering a higher sector floor, a portion of the sprite will not be clipped where it overlaps a portion of the floor itself that is not covered on-screen by a linedef.

The engine uses the vertices from the map for a two-sided linedef to determine whether it should clip a sprite by projecting them into screen space and creating a data structure called a drawseg. This represents a region of the screen between those vertices where sprites should be subject to clipping by the two-sided linedef. The billboards of sprites are clipped against these drawseg windows, but not against visplanes. Any part of the sprite's billboard that does not overlap with a drawseg will not be subject to clipping, and since sprites are drawn after floors and ceilings, it will appear on top of the floor that should physically be above it.

This problem is corrected in most source ports which render the game using OpenGL and other hardware rendering solutions, since floors and ceilings there are drawn as polygons which are subject to the same depth testing and clipping as walls. However, some implementations may suffer other, similar issues, particularly on platforms where a depth buffer is either unavailable or insufficiently fast for use on sprites. Such effects may be observed in the PlayStation and Doom 64 ports, due to the respective consoles' difficulties in this regard.

The KEX 2-derived graphics engine used in Strife: Veteran Edition is capable of deliberately emulating the software behavior of sprite clipping, including the propensity of sprites near walls to show through floors. This is accomplished through use of multiple drawing passes.[1]

References[edit]

  1. Sprite clipping explained