d3d_entsort
Determines the sorting of transparent and intransparent entities.
Range:
0 -
do not sort entities before rendering.
This can improve the frame rate in special cases when the order of transparent entities does not matter.
1 -
sort transparent entities back to front by their origin distance
to the camera position (default).
2 - sort entities by their two dimensional XY distance
to the camera position.
3 -
sort entities by only their Y distance
to the camera position. 8.05
5 -
also sort intransparent entities front to back.
6 -
also sort intransparent entities, and use the two dimensional XY distance for sorting.
7 - also sort intransparent entities, and use only the Y distance for sorting. 8.05
8 - sort entities by only their Z distance
to the camera position. 8.50
12 - also sort intransparent entities by only their Z distance. 8.50
Type:
var
Remarks:
-
If at 2, 3, 6, or 7, the Z or X coordinates of the entity are ignored for sorting.
Entities are sorted only by to their XY or by their Y distances to the camera.
This
can solve transparency sorting problems in special cases, f.i. in 2D games or isometric games.
-
If at 5 or above, intransparent entities are also sorted (front to back). This is normally not necessary, but can improve the frame rate due to early z buffer clipping under some circumstances, especially when slow shaders are used.
-
Model polygons or particles are never sorted against each other, and thus can be visible in wrong order. For details, see transparency.
Example:
function main()
{
d3d_entsort = 0; // not sorting transparent objects
...
See also:
Transparency, TRANSLUCENT, alpha
► latest
version online