123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- :github_url: hide
- .. DO NOT EDIT THIS FILE!!!
- .. Generated automatically from Godot engine sources.
- .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py.
- .. XML source: https://github.com/godotengine/godot/tree/4.2/doc/classes/RDPipelineDepthStencilState.xml.
- .. _class_RDPipelineDepthStencilState:
- RDPipelineDepthStencilState
- ===========================
- **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
- Pipeline depth/stencil state (used by :ref:`RenderingDevice<class_RenderingDevice>`).
- .. rst-class:: classref-introduction-group
- Description
- -----------
- **RDPipelineDepthStencilState** controls the way depth and stencil comparisons are performed when sampling those values using :ref:`RenderingDevice<class_RenderingDevice>`.
- .. rst-class:: classref-reftable-group
- Properties
- ----------
- .. table::
- :widths: auto
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` | :ref:`back_op_compare<class_RDPipelineDepthStencilState_property_back_op_compare>` | ``7`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`back_op_compare_mask<class_RDPipelineDepthStencilState_property_back_op_compare_mask>` | ``0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` | :ref:`back_op_depth_fail<class_RDPipelineDepthStencilState_property_back_op_depth_fail>` | ``1`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` | :ref:`back_op_fail<class_RDPipelineDepthStencilState_property_back_op_fail>` | ``1`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` | :ref:`back_op_pass<class_RDPipelineDepthStencilState_property_back_op_pass>` | ``1`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`back_op_reference<class_RDPipelineDepthStencilState_property_back_op_reference>` | ``0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`back_op_write_mask<class_RDPipelineDepthStencilState_property_back_op_write_mask>` | ``0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` | :ref:`depth_compare_operator<class_RDPipelineDepthStencilState_property_depth_compare_operator>` | ``7`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`depth_range_max<class_RDPipelineDepthStencilState_property_depth_range_max>` | ``0.0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`float<class_float>` | :ref:`depth_range_min<class_RDPipelineDepthStencilState_property_depth_range_min>` | ``0.0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`enable_depth_range<class_RDPipelineDepthStencilState_property_enable_depth_range>` | ``false`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`enable_depth_test<class_RDPipelineDepthStencilState_property_enable_depth_test>` | ``false`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`enable_depth_write<class_RDPipelineDepthStencilState_property_enable_depth_write>` | ``false`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`bool<class_bool>` | :ref:`enable_stencil<class_RDPipelineDepthStencilState_property_enable_stencil>` | ``false`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` | :ref:`front_op_compare<class_RDPipelineDepthStencilState_property_front_op_compare>` | ``7`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`front_op_compare_mask<class_RDPipelineDepthStencilState_property_front_op_compare_mask>` | ``0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` | :ref:`front_op_depth_fail<class_RDPipelineDepthStencilState_property_front_op_depth_fail>` | ``1`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` | :ref:`front_op_fail<class_RDPipelineDepthStencilState_property_front_op_fail>` | ``1`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` | :ref:`front_op_pass<class_RDPipelineDepthStencilState_property_front_op_pass>` | ``1`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`front_op_reference<class_RDPipelineDepthStencilState_property_front_op_reference>` | ``0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- | :ref:`int<class_int>` | :ref:`front_op_write_mask<class_RDPipelineDepthStencilState_property_front_op_write_mask>` | ``0`` |
- +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-----------+
- .. rst-class:: classref-section-separator
- ----
- .. rst-class:: classref-descriptions-group
- Property Descriptions
- ---------------------
- .. _class_RDPipelineDepthStencilState_property_back_op_compare:
- .. rst-class:: classref-property
- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **back_op_compare** = ``7``
- .. rst-class:: classref-property-setget
- - void **set_back_op_compare** **(** :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` value **)**
- - :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_back_op_compare** **(** **)**
- The method used for comparing the previous back stencil value and :ref:`back_op_reference<class_RDPipelineDepthStencilState_property_back_op_reference>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_back_op_compare_mask:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **back_op_compare_mask** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_back_op_compare_mask** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_back_op_compare_mask** **(** **)**
- Selects which bits from the back stencil value will be compared.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_back_op_depth_fail:
- .. rst-class:: classref-property
- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_depth_fail** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_back_op_depth_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)**
- - :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_back_op_fail:
- .. rst-class:: classref-property
- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_fail** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_back_op_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)**
- - :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_fail** **(** **)**
- The operation to perform on the stencil buffer for back pixels that fail the stencil test
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_back_op_pass:
- .. rst-class:: classref-property
- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **back_op_pass** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_back_op_pass** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)**
- - :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_back_op_pass** **(** **)**
- The operation to perform on the stencil buffer for back pixels that pass the stencil test.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_back_op_reference:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **back_op_reference** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_back_op_reference** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_back_op_reference** **(** **)**
- The value the previous back stencil value will be compared to.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_back_op_write_mask:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **back_op_write_mask** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_back_op_write_mask** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_back_op_write_mask** **(** **)**
- Selects which bits from the back stencil value will be changed.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_depth_compare_operator:
- .. rst-class:: classref-property
- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **depth_compare_operator** = ``7``
- .. rst-class:: classref-property-setget
- - void **set_depth_compare_operator** **(** :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` value **)**
- - :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_depth_compare_operator** **(** **)**
- The method used for comparing the previous and current depth values.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_depth_range_max:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **depth_range_max** = ``0.0``
- .. rst-class:: classref-property-setget
- - void **set_depth_range_max** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_depth_range_max** **(** **)**
- The maximum depth that returns true for :ref:`enable_depth_range<class_RDPipelineDepthStencilState_property_enable_depth_range>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_depth_range_min:
- .. rst-class:: classref-property
- :ref:`float<class_float>` **depth_range_min** = ``0.0``
- .. rst-class:: classref-property-setget
- - void **set_depth_range_min** **(** :ref:`float<class_float>` value **)**
- - :ref:`float<class_float>` **get_depth_range_min** **(** **)**
- The minimum depth that returns true for :ref:`enable_depth_range<class_RDPipelineDepthStencilState_property_enable_depth_range>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_enable_depth_range:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **enable_depth_range** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_enable_depth_range** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **get_enable_depth_range** **(** **)**
- If ``true``, each depth value will be tested to see if it is between :ref:`depth_range_min<class_RDPipelineDepthStencilState_property_depth_range_min>` and :ref:`depth_range_max<class_RDPipelineDepthStencilState_property_depth_range_max>`. If it is outside of these values, it is discarded.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_enable_depth_test:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **enable_depth_test** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_enable_depth_test** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **get_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).
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_enable_depth_write:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **enable_depth_write** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_enable_depth_write** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **get_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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_enable_stencil:
- .. rst-class:: classref-property
- :ref:`bool<class_bool>` **enable_stencil** = ``false``
- .. rst-class:: classref-property-setget
- - void **set_enable_stencil** **(** :ref:`bool<class_bool>` value **)**
- - :ref:`bool<class_bool>` **get_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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_front_op_compare:
- .. rst-class:: classref-property
- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **front_op_compare** = ``7``
- .. rst-class:: classref-property-setget
- - void **set_front_op_compare** **(** :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` value **)**
- - :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_front_op_compare** **(** **)**
- The method used for comparing the previous front stencil value and :ref:`front_op_reference<class_RDPipelineDepthStencilState_property_front_op_reference>`.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_front_op_compare_mask:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **front_op_compare_mask** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_front_op_compare_mask** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_front_op_compare_mask** **(** **)**
- Selects which bits from the front stencil value will be compared.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_front_op_depth_fail:
- .. rst-class:: classref-property
- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_depth_fail** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_front_op_depth_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)**
- - :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_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.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_front_op_fail:
- .. rst-class:: classref-property
- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_fail** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_front_op_fail** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)**
- - :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_fail** **(** **)**
- The operation to perform on the stencil buffer for front pixels that fail the stencil test.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_front_op_pass:
- .. rst-class:: classref-property
- :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **front_op_pass** = ``1``
- .. rst-class:: classref-property-setget
- - void **set_front_op_pass** **(** :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` value **)**
- - :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>` **get_front_op_pass** **(** **)**
- The operation to perform on the stencil buffer for front pixels that pass the stencil test.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_front_op_reference:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **front_op_reference** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_front_op_reference** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_front_op_reference** **(** **)**
- The value the previous front stencil value will be compared to.
- .. rst-class:: classref-item-separator
- ----
- .. _class_RDPipelineDepthStencilState_property_front_op_write_mask:
- .. rst-class:: classref-property
- :ref:`int<class_int>` **front_op_write_mask** = ``0``
- .. rst-class:: classref-property-setget
- - void **set_front_op_write_mask** **(** :ref:`int<class_int>` value **)**
- - :ref:`int<class_int>` **get_front_op_write_mask** **(** **)**
- Selects which bits from the front stencil value will be changed.
- .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
- .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
- .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
- .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
- .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
- .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
- .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|