Skip to content

TransparencyDistanceSortMode

Narta Xaymar Dirks edited this page Oct 31, 2026 · 2 revisions

TransparencyDistanceSortMode

TransparencyDistanceSortMode:Void mode:Int32
Parameter Mode Type Default Description
mode In Int32 required 0 for Z Distance, the distance in space like the original, 1 for View Distance, the distance along the view axis. It is 0 by default.

Description

A BlitzLLVM extension: chooses how see-through entities and sprites are put in order before RenderWorld draws them from far to near. The original Blitz3D orders them by the distance in space between the camera and the center of the entity, and so does BlitzLLVM by default (mode 0, Z Distance). With mode 1 (View Distance), they are ordered by how far in front of the camera they are, measured along the direction the camera looks in, which is the distance the depth buffer compares. The two differ towards the edges of the picture: a flat layer or a sprite that is nearer in front of the camera but far to the side counts as farther in space, and is drawn below a layer behind it. Along the view axis the order is the one that looks right for big flat layers that overlap and for sprites that face the camera at nearly the same depth. Each camera orders by its own view axis. It takes effect with the next RenderWorld. It does not change EntityAutoFade, which keeps going by the distance in space. The environment variable BLITZLLVM_TRANSPARENCY_DISTANCE_SORT_MODE=1 makes the program start with mode 1.

Related Commands

DitherMode, GraphicsOrderIndependentTransparency, HWOrderIndependentTransparency, RenderWorld

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally