RDSamplerState
Hereda: RefCounted < Object
Estado del sampler (utilizado por RenderingDevice).
Descripción
Este objeto es utilizado por RenderingDevice.
Propiedades
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Descripciones de Propiedades
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 🔗
void set_border_color(value: SamplerBorderColor)
SamplerBorderColor get_border_color()
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 🔗
void set_compare_op(value: CompareOperator)
CompareOperator get_compare_op()
La operación de comparación a utilizar. Solo es efectiva si enable_compare es true.
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.
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 🔗
void set_mag_filter(value: SamplerFilter)
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.
The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available.
SamplerFilter min_filter = 0 🔗
void set_min_filter(value: SamplerFilter)
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.
The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available.
SamplerFilter mip_filter = 0 🔗
void set_mip_filter(value: SamplerFilter)
SamplerFilter get_mip_filter()
The filtering method to use for mipmaps.
SamplerRepeatMode repeat_u = 2 🔗
void set_repeat_u(value: SamplerRepeatMode)
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.
SamplerRepeatMode repeat_v = 2 🔗
void set_repeat_v(value: SamplerRepeatMode)
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.
SamplerRepeatMode repeat_w = 2 🔗
void set_repeat_w(value: SamplerRepeatMode)
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.
bool unnormalized_uvw = false 🔗
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.
If true, perform anisotropic sampling. See anisotropy_max.