Table of Contents

Class RDPipelineDepthStencilState

Pipeline depth/stencil state (used by RenderingDevice).

Inheritance
RDPipelineDepthStencilState

Remarks

RDPipelineDepthStencilState controls the way depth and stencil comparisons are performed when sampling those values using RenderingDevice.

Properties

back_op_compare

The method used for comparing the previous back stencil value and back_op_reference.

var back_op_compare : int = 7

Property Value

int

Remarks

  • void set_back_op_compare(int value)
  • int get_back_op_compare

back_op_compare_mask

Selects which bits from the back stencil value will be compared.

var back_op_compare_mask : int = 0

Property Value

int

Remarks

  • void set_back_op_compare_mask(int value)
  • int get_back_op_compare_mask

back_op_depth_fail

The operation to perform on the stencil buffer for back pixels that pass the stencil test but fail the depth test.

var back_op_depth_fail : int = 1

Property Value

int

Remarks

  • void set_back_op_depth_fail(int value)
  • int get_back_op_depth_fail

back_op_fail

The operation to perform on the stencil buffer for back pixels that fail the stencil test.

var back_op_fail : int = 1

Property Value

int

Remarks

  • void set_back_op_fail(int value)
  • int get_back_op_fail

back_op_pass

The operation to perform on the stencil buffer for back pixels that pass the stencil test.

var back_op_pass : int = 1

Property Value

int

Remarks

  • void set_back_op_pass(int value)
  • int get_back_op_pass

back_op_reference

The value the previous back stencil value will be compared to.

var back_op_reference : int = 0

Property Value

int

Remarks

  • void set_back_op_reference(int value)
  • int get_back_op_reference

back_op_write_mask

Selects which bits from the back stencil value will be changed.

var back_op_write_mask : int = 0

Property Value

int

Remarks

  • void set_back_op_write_mask(int value)
  • int get_back_op_write_mask

depth_compare_operator

The method used for comparing the previous and current depth values.

var depth_compare_operator : int = 7

Property Value

int

Remarks

  • void set_depth_compare_operator(int value)
  • int get_depth_compare_operator

depth_range_max

The maximum depth that returns true for enable_depth_range.

var depth_range_max : float = 0.0

Property Value

float

Remarks

  • void set_depth_range_max(float value)
  • float get_depth_range_max

depth_range_min

The minimum depth that returns true for enable_depth_range.

var depth_range_min : float = 0.0

Property Value

float

Remarks

  • void set_depth_range_min(float value)
  • float get_depth_range_min

enable_depth_range

If true, each depth value will be tested to see if it is between depth_range_min and depth_range_max. If it is outside of these values, it is discarded.

var enable_depth_range : bool = false

Property Value

bool

Remarks

  • void set_enable_depth_range(bool value)
  • bool get_enable_depth_range

enable_depth_test

If true, enables depth testing which allows objects to be automatically occluded by other objects based on their depth. This also allows objects to be partially occluded by other objects. If false, objects will appear in the order they were drawn (like in Godot's 2D renderer).

var enable_depth_test : bool = false

Property Value

bool

Remarks

  • void set_enable_depth_test(bool value)
  • bool get_enable_depth_test

enable_depth_write

If true, writes to the depth buffer whenever the depth test returns true. Only works when enable_depth_test is also true.

var enable_depth_write : bool = false

Property Value

bool

Remarks

  • void set_enable_depth_write(bool value)
  • bool get_enable_depth_write

enable_stencil

If true, enables stencil testing. There are separate stencil buffers for front-facing triangles and back-facing triangles. See properties that begin with "front_op" and properties with "back_op" for each.

var enable_stencil : bool = false

Property Value

bool

Remarks

  • void set_enable_stencil(bool value)
  • bool get_enable_stencil

front_op_compare

The method used for comparing the previous front stencil value and front_op_reference.

var front_op_compare : int = 7

Property Value

int

Remarks

  • void set_front_op_compare(int value)
  • int get_front_op_compare

front_op_compare_mask

Selects which bits from the front stencil value will be compared.

var front_op_compare_mask : int = 0

Property Value

int

Remarks

  • void set_front_op_compare_mask(int value)
  • int get_front_op_compare_mask

front_op_depth_fail

The operation to perform on the stencil buffer for front pixels that pass the stencil test but fail the depth test.

var front_op_depth_fail : int = 1

Property Value

int

Remarks

  • void set_front_op_depth_fail(int value)
  • int get_front_op_depth_fail

front_op_fail

The operation to perform on the stencil buffer for front pixels that fail the stencil test.

var front_op_fail : int = 1

Property Value

int

Remarks

  • void set_front_op_fail(int value)
  • int get_front_op_fail

front_op_pass

The operation to perform on the stencil buffer for front pixels that pass the stencil test.

var front_op_pass : int = 1

Property Value

int

Remarks

  • void set_front_op_pass(int value)
  • int get_front_op_pass

front_op_reference

The value the previous front stencil value will be compared to.

var front_op_reference : int = 0

Property Value

int

Remarks

  • void set_front_op_reference(int value)
  • int get_front_op_reference

front_op_write_mask

Selects which bits from the front stencil value will be changed.

var front_op_write_mask : int = 0

Property Value

int

Remarks

  • void set_front_op_write_mask(int value)
  • int get_front_op_write_mask