Skip to content

D3d_set_zwriteenable

hpgDesigns edited this page Aug 8, 2021 · 1 revision

NOTOC {{-}}

Notation

Description

Sets whether or not to allow rendering to affect the depth buffer (also known as a Z-buffer). If disabled, objects will render as if hidden surface removal was not being used when rendering, but they without effecting the depth buffer. Definitely needed for rendering 3D particles without artifacts or also for transparent billboards.

Parameters

eanble whether or not to allow writing to the depth buffer for all subsequent draw calls

Return Values

No values are returned from the function.

Example Call

d3d_set_zwriteenable(false);
d3d_draw_wall(0, 0, 0, 0, 1000, 600, background_get_texture(bg_example), 1, 1)

Demontrates rendering a transparent billboard without copying it to the zbuffer to keep it from having alpha-blending artifacts.

This is number 1

Clone this wiki locally