from panda3d.core import DepthBiasAttrib
- class DepthBiasAttrib
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.
- property clamp float
Returns the maximum (or minimum, if negative) value of the bias. If zero, no clamping is performed.
- static get_class_type() TypeHandle
- static make(slope_factor: float, constant_factor: float, clamp: float) RenderAttrib
Constructs a new
DepthBiasAttribobject that indicates the slope factor, constant factor, and an optional clamping value.
- static make_default() RenderAttrib
RenderAttribthat corresponds to whatever the standard default properties for render attributes of this type ought to be.