RDSamplerState

Hereda: RefCounted < Object

Estado del sampler (utilizado por RenderingDevice).

Descripción

Este objeto es utilizado por RenderingDevice.

Propiedades

float

anisotropy_max

1.0

SamplerBorderColor

border_color

2

CompareOperator

compare_op

7

bool

enable_compare

false

float

lod_bias

0.0

SamplerFilter

mag_filter

0

float

max_lod

1e+20

SamplerFilter

min_filter

0

float

min_lod

0.0

SamplerFilter

mip_filter

0

SamplerRepeatMode

repeat_u

2

SamplerRepeatMode

repeat_v

2

SamplerRepeatMode

repeat_w

2

bool

unnormalized_uvw

false

bool

use_anisotropy

false


Descripciones de Propiedades

float anisotropy_max = 1.0 🔗

  • void set_anisotropy_max(value: float)

  • float get_anisotropy_max()

Máxima anisotropía que se puede utilizar al muestrear. Solo es efectivo si use_anisotropy es true. Los valores más altos dan como resultado un sampler más nítido en ángulos oblicuos, a costa del rendimiento (debido al ancho de banda de la memoria). Este valor puede estar limitado por el hardware gráfico en uso. La mayoría del hardware gráfico solo admite valores de hasta 16.0.

Si anisotropy_max es 1.0, desactiva por la fuerza la anisotropía incluso si use_anisotropy es true.


SamplerBorderColor border_color = 2 🔗

El color del borde que se devolverá al muestrear fuera de los límites del sampler y los modos repeat_u, repeat_v o repeat_w tienen la repetición desactivada.


CompareOperator compare_op = 7 🔗

La operación de comparación a utilizar. Solo es efectiva si enable_compare es true.


bool enable_compare = false 🔗

  • void set_enable_compare(value: bool)

  • bool get_enable_compare()

Si es true, los valores devueltos se basarán en la operación de comparación definida en compare_op. Este es un enfoque basado en hardware y, por lo tanto, es más rápido que realizar esto manualmente en un shader. Por ejemplo, las operaciones de comparación se utilizan para el renderizado de mapas de sombras comparando los valores de profundidad de un sampler de sombras.


float lod_bias = 0.0 🔗

  • void set_lod_bias(value: float)

  • float get_lod_bias()

El sesgo de LOD de mipmap a utilizar. Los valores positivos harán que el sampler sea más borroso a una distancia dada, mientras que los valores negativos harán que el sampler sea más nítido a una distancia dada (con el riesgo de verse granulado). Los valores recomendados están entre -0.5 y 0.0. Solo es efectivo si el sampler tiene mipmaps disponibles.


SamplerFilter mag_filter = 0 🔗

The sampler's magnification filter. It is the filtering method used when sampling texels that appear bigger than on-screen pixels.


float max_lod = 1e+20 🔗

  • void set_max_lod(value: float)

  • float get_max_lod()

The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available.


SamplerFilter min_filter = 0 🔗

The sampler's minification filter. It is the filtering method used when sampling texels that appear smaller than on-screen pixels.


float min_lod = 0.0 🔗

  • void set_min_lod(value: float)

  • float get_min_lod()

The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available.


SamplerFilter mip_filter = 0 🔗

The filtering method to use for mipmaps.


SamplerRepeatMode repeat_u = 2 🔗

The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.


SamplerRepeatMode repeat_v = 2 🔗

The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.


SamplerRepeatMode repeat_w = 2 🔗

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.


bool unnormalized_uvw = false 🔗

  • void set_unnormalized_uvw(value: bool)

  • 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.


bool use_anisotropy = false 🔗

  • void set_use_anisotropy(value: bool)

  • bool get_use_anisotropy()

If true, perform anisotropic sampling. See anisotropy_max.