This is a special kind of attribute that instructs the graphics driver to apply an offset or bias to the generated depth values for rendered polygons, before they are written to the depth buffer.
This class replaces the old
DepthOffsetAttrib, which had a more limited parameterization. The differences are: - The sign of the factor parameter was inverted. - The slope and constant factors are specified separately. - The factors are specified as floating-point instead of integer. - There is a new clamp parameter.
Nested DepthBiasAttrib values accumulate; that is, a DepthBiasAttrib with a value of 1 beneath another DepthBiasAttrib with a value of 2 presents a net offset of 3. (A DepthBiasAttrib will not, however, combine with any other DepthBiasAttribs with a lower override parameter.)
New in version 1.11.0.
static int get_class_slot(void)
static ConstPointerTo<RenderAttrib> make(PN_stdfloat slope_factor, PN_stdfloat constant_factor, PN_stdfloat clamp = 0)
Constructs a new
DepthBiasAttribobject that indicates the slope factor, constant factor, and an optional clamping value.
- static int get_class_slot(void)