Files
godot-docs-l10n/classes/fr/class_rdpipelinedepthstencilstate.rst

442 lines
22 KiB
ReStructuredText
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_RDPipelineDepthStencilState:
RDPipelineDepthStencilState
===========================
**Hérite de:** :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
Propriétés
--------------------
.. 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
Descriptions des propriétés
------------------------------------------------------
.. _class_RDPipelineDepthStencilState_property_back_op_compare:
.. rst-class:: classref-property
:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **back_op_compare** = ``7`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_compare>`
.. rst-class:: classref-property-setget
- |void| **set_back_op_compare**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_compare_mask>`
.. rst-class:: classref-property-setget
- |void| **set_back_op_compare_mask**\ (\ value\: :ref:`int<class_int>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_depth_fail>`
.. rst-class:: classref-property-setget
- |void| **set_back_op_depth_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_fail>`
.. rst-class:: classref-property-setget
- |void| **set_back_op_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_pass>`
.. rst-class:: classref-property-setget
- |void| **set_back_op_pass**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_reference>`
.. rst-class:: classref-property-setget
- |void| **set_back_op_reference**\ (\ value\: :ref:`int<class_int>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_back_op_write_mask>`
.. rst-class:: classref-property-setget
- |void| **set_back_op_write_mask**\ (\ value\: :ref:`int<class_int>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_depth_compare_operator>`
.. rst-class:: classref-property-setget
- |void| **set_depth_compare_operator**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_depth_range_max>`
.. rst-class:: classref-property-setget
- |void| **set_depth_range_max**\ (\ value\: :ref:`float<class_float>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_depth_range_min>`
.. rst-class:: classref-property-setget
- |void| **set_depth_range_min**\ (\ value\: :ref:`float<class_float>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_depth_range>`
.. rst-class:: classref-property-setget
- |void| **set_enable_depth_range**\ (\ value\: :ref:`bool<class_bool>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_depth_test>`
.. rst-class:: classref-property-setget
- |void| **set_enable_depth_test**\ (\ value\: :ref:`bool<class_bool>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_depth_write>`
.. rst-class:: classref-property-setget
- |void| **set_enable_depth_write**\ (\ value\: :ref:`bool<class_bool>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_enable_stencil>`
.. rst-class:: classref-property-setget
- |void| **set_enable_stencil**\ (\ value\: :ref:`bool<class_bool>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_compare>`
.. rst-class:: classref-property-setget
- |void| **set_front_op_compare**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_compare_mask>`
.. rst-class:: classref-property-setget
- |void| **set_front_op_compare_mask**\ (\ value\: :ref:`int<class_int>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_depth_fail>`
.. rst-class:: classref-property-setget
- |void| **set_front_op_depth_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_fail>`
.. rst-class:: classref-property-setget
- |void| **set_front_op_fail**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_pass>`
.. rst-class:: classref-property-setget
- |void| **set_front_op_pass**\ (\ value\: :ref:`StencilOperation<enum_RenderingDevice_StencilOperation>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_reference>`
.. rst-class:: classref-property-setget
- |void| **set_front_op_reference**\ (\ value\: :ref:`int<class_int>`\ )
- :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`` :ref:`🔗<class_RDPipelineDepthStencilState_property_front_op_write_mask>`
.. rst-class:: classref-property-setget
- |void| **set_front_op_write_mask**\ (\ value\: :ref:`int<class_int>`\ )
- :ref:`int<class_int>` **get_front_op_write_mask**\ (\ )
Selects which bits from the front stencil value will be changed.
.. |virtual| replace:: :abbr:`virtual (Cette méthode doit typiquement être redéfinie par l'utilisateur pour avoir un effet.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Cette méthode n'a pas d'effets de bord. Elle ne modifie aucune des variables membres de l'instance.)`
.. |vararg| replace:: :abbr:`vararg (Cette méthode accepte n'importe quel nombre d'arguments après ceux décris ici.)`
.. |constructor| replace:: :abbr:`constructor (Cette méthode est utilisée pour construire un type.)`
.. |static| replace:: :abbr:`static (Cette méthode n'a pas besoin d'instance pour être appelée, elle peut donc être directement appelée en utilisant le nom de la classe.)`
.. |operator| replace:: :abbr:`operator (Cette méthode décrit un opérateur valide à utiliser avec ce type en tant qu'opérande gauche.)`
.. |bitfield| replace:: :abbr:`BitField (Cette valeur est un nombre entier composé d'un masque de bits des options suivantes.)`
.. |void| replace:: :abbr:`void (Aucune valeur de retour.)`