DepthBiasAttrib

from panda3d.core import DepthBiasAttrib
class DepthBiasAttrib

Bases: RenderAttrib

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.

Inheritance diagram

Inheritance diagram of DepthBiasAttrib

__init__(*args, **kwargs)
clamp
class_slot = 12
constant_factor
getClassSlot()

C++ Interface: get_class_slot()

getClassType()

C++ Interface: get_class_type()

get_class_slot()

C++ Interface: get_class_slot()

get_class_type()

C++ Interface: get_class_type()

make()

C++ Interface: make(float slope_factor, float constant_factor, float clamp)

/**
  • Constructs a new DepthBiasAttrib object that indicates the slope factor,

  • constant factor, and an optional clamping value.

*/

makeDefault()

C++ Interface: make_default()

/**
  • Returns a RenderAttrib that corresponds to whatever the standard default

  • properties for render attributes of this type ought to be.

*/

make_default()

C++ Interface: make_default()

/**
  • Returns a RenderAttrib that corresponds to whatever the standard default

  • properties for render attributes of this type ought to be.

*/

slope_factor