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

330 lines
16 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.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

:github_url: hide
.. _class_RDSamplerState:
RDSamplerState
==============
**Hérite de:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
État déchantillonneur (utilisé par :ref:`RenderingDevice<class_RenderingDevice>`).
.. rst-class:: classref-introduction-group
Description
-----------
This object is used by :ref:`RenderingDevice<class_RenderingDevice>`.
.. rst-class:: classref-reftable-group
Propriétés
--------------------
.. table::
:widths: auto
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`anisotropy_max<class_RDSamplerState_property_anisotropy_max>` | ``1.0`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` | :ref:`border_color<class_RDSamplerState_property_border_color>` | ``2`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` | :ref:`compare_op<class_RDSamplerState_property_compare_op>` | ``7`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`enable_compare<class_RDSamplerState_property_enable_compare>` | ``false`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`lod_bias<class_RDSamplerState_property_lod_bias>` | ``0.0`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` | :ref:`mag_filter<class_RDSamplerState_property_mag_filter>` | ``0`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`max_lod<class_RDSamplerState_property_max_lod>` | ``1e+20`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` | :ref:`min_filter<class_RDSamplerState_property_min_filter>` | ``0`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`min_lod<class_RDSamplerState_property_min_lod>` | ``0.0`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` | :ref:`mip_filter<class_RDSamplerState_property_mip_filter>` | ``0`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` | :ref:`repeat_u<class_RDSamplerState_property_repeat_u>` | ``2`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` | :ref:`repeat_v<class_RDSamplerState_property_repeat_v>` | ``2`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` | :ref:`repeat_w<class_RDSamplerState_property_repeat_w>` | ``2`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`unnormalized_uvw<class_RDSamplerState_property_unnormalized_uvw>` | ``false`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`use_anisotropy<class_RDSamplerState_property_use_anisotropy>` | ``false`` |
+--------------------------------------------------------------------+-------------------------------------------------------------------------+-----------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descriptions des propriétés
------------------------------------------------------
.. _class_RDSamplerState_property_anisotropy_max:
.. rst-class:: classref-property
:ref:`float<class_float>` **anisotropy_max** = ``1.0`` :ref:`🔗<class_RDSamplerState_property_anisotropy_max>`
.. rst-class:: classref-property-setget
- |void| **set_anisotropy_max**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_anisotropy_max**\ (\ )
Maximum anisotropy that can be used when sampling. Only effective if :ref:`use_anisotropy<class_RDSamplerState_property_use_anisotropy>` is ``true``. Higher values result in a sharper sampler at oblique angles, at the cost of performance (due to memory bandwidth). This value may be limited by the graphics hardware in use. Most graphics hardware only supports values up to ``16.0``.
If :ref:`anisotropy_max<class_RDSamplerState_property_anisotropy_max>` is ``1.0``, forcibly disables anisotropy even if :ref:`use_anisotropy<class_RDSamplerState_property_use_anisotropy>` is ``true``.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_border_color:
.. rst-class:: classref-property
:ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` **border_color** = ``2`` :ref:`🔗<class_RDSamplerState_property_border_color>`
.. rst-class:: classref-property-setget
- |void| **set_border_color**\ (\ value\: :ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>`\ )
- :ref:`SamplerBorderColor<enum_RenderingDevice_SamplerBorderColor>` **get_border_color**\ (\ )
The border color that will be returned when sampling outside the sampler's bounds and the :ref:`repeat_u<class_RDSamplerState_property_repeat_u>`, :ref:`repeat_v<class_RDSamplerState_property_repeat_v>` or :ref:`repeat_w<class_RDSamplerState_property_repeat_w>` modes have repeating disabled.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_compare_op:
.. rst-class:: classref-property
:ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **compare_op** = ``7`` :ref:`🔗<class_RDSamplerState_property_compare_op>`
.. rst-class:: classref-property-setget
- |void| **set_compare_op**\ (\ value\: :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>`\ )
- :ref:`CompareOperator<enum_RenderingDevice_CompareOperator>` **get_compare_op**\ (\ )
The compare operation to use. Only effective if :ref:`enable_compare<class_RDSamplerState_property_enable_compare>` is ``true``.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_enable_compare:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **enable_compare** = ``false`` :ref:`🔗<class_RDSamplerState_property_enable_compare>`
.. rst-class:: classref-property-setget
- |void| **set_enable_compare**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_enable_compare**\ (\ )
If ``true``, returned values will be based on the comparison operation defined in :ref:`compare_op<class_RDSamplerState_property_compare_op>`. This is a hardware-based approach and is therefore faster than performing this manually in a shader. For example, compare operations are used for shadow map rendering by comparing depth values from a shadow sampler.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_lod_bias:
.. rst-class:: classref-property
:ref:`float<class_float>` **lod_bias** = ``0.0`` :ref:`🔗<class_RDSamplerState_property_lod_bias>`
.. rst-class:: classref-property-setget
- |void| **set_lod_bias**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_lod_bias**\ (\ )
The mipmap LOD bias to use. Positive values will make the sampler blurrier at a given distance, while negative values will make the sampler sharper at a given distance (at the risk of looking grainy). Recommended values are between ``-0.5`` and ``0.0``. Only effective if the sampler has mipmaps available.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_mag_filter:
.. rst-class:: classref-property
:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **mag_filter** = ``0`` :ref:`🔗<class_RDSamplerState_property_mag_filter>`
.. rst-class:: classref-property-setget
- |void| **set_mag_filter**\ (\ value\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ )
- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_mag_filter**\ (\ )
The sampler's magnification filter. It is the filtering method used when sampling texels that appear bigger than on-screen pixels.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_max_lod:
.. rst-class:: classref-property
:ref:`float<class_float>` **max_lod** = ``1e+20`` :ref:`🔗<class_RDSamplerState_property_max_lod>`
.. rst-class:: classref-property-setget
- |void| **set_max_lod**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_max_lod**\ (\ )
The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_min_filter:
.. rst-class:: classref-property
:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **min_filter** = ``0`` :ref:`🔗<class_RDSamplerState_property_min_filter>`
.. rst-class:: classref-property-setget
- |void| **set_min_filter**\ (\ value\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ )
- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_min_filter**\ (\ )
The sampler's minification filter. It is the filtering method used when sampling texels that appear smaller than on-screen pixels.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_min_lod:
.. rst-class:: classref-property
:ref:`float<class_float>` **min_lod** = ``0.0`` :ref:`🔗<class_RDSamplerState_property_min_lod>`
.. rst-class:: classref-property-setget
- |void| **set_min_lod**\ (\ value\: :ref:`float<class_float>`\ )
- :ref:`float<class_float>` **get_min_lod**\ (\ )
The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_mip_filter:
.. rst-class:: classref-property
:ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **mip_filter** = ``0`` :ref:`🔗<class_RDSamplerState_property_mip_filter>`
.. rst-class:: classref-property-setget
- |void| **set_mip_filter**\ (\ value\: :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>`\ )
- :ref:`SamplerFilter<enum_RenderingDevice_SamplerFilter>` **get_mip_filter**\ (\ )
The filtering method to use for mipmaps.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_repeat_u:
.. rst-class:: classref-property
:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_u** = ``2`` :ref:`🔗<class_RDSamplerState_property_repeat_u>`
.. rst-class:: classref-property-setget
- |void| **set_repeat_u**\ (\ value\: :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>`\ )
- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_u**\ (\ )
The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_repeat_v:
.. rst-class:: classref-property
:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_v** = ``2`` :ref:`🔗<class_RDSamplerState_property_repeat_v>`
.. rst-class:: classref-property-setget
- |void| **set_repeat_v**\ (\ value\: :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>`\ )
- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_v**\ (\ )
The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_repeat_w:
.. rst-class:: classref-property
:ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **repeat_w** = ``2`` :ref:`🔗<class_RDSamplerState_property_repeat_w>`
.. rst-class:: classref-property-setget
- |void| **set_repeat_w**\ (\ value\: :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>`\ )
- :ref:`SamplerRepeatMode<enum_RenderingDevice_SamplerRepeatMode>` **get_repeat_w**\ (\ )
The repeat mode to use along the W axis of UV coordinates. This affects the returned values if sampling outside the UV bounds. Only effective for 3D samplers.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_unnormalized_uvw:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **unnormalized_uvw** = ``false`` :ref:`🔗<class_RDSamplerState_property_unnormalized_uvw>`
.. rst-class:: classref-property-setget
- |void| **set_unnormalized_uvw**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_unnormalized_uvw**\ (\ )
If ``true``, the texture will be sampled with coordinates ranging from 0 to the texture's resolution. Otherwise, the coordinates will be normalized and range from 0 to 1.
.. rst-class:: classref-item-separator
----
.. _class_RDSamplerState_property_use_anisotropy:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **use_anisotropy** = ``false`` :ref:`🔗<class_RDSamplerState_property_use_anisotropy>`
.. rst-class:: classref-property-setget
- |void| **set_use_anisotropy**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **get_use_anisotropy**\ (\ )
If ``true``, perform anisotropic sampling. See :ref:`anisotropy_max<class_RDSamplerState_property_anisotropy_max>`.
.. |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.)`