Index · Object → RefCounted → RDSamplerState

RDSamplerState

Sampler state (used by RenderingDevice).

Class Description

This object is used by RenderingDevice.

Properties

var anisotropy_max: float = 1.0

Maximum anisotropy that can be used when sampling. Only effective if 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 anisotropy_max is 1.0, forcibly disables anisotropy even if use_anisotropy is true.

var border_color: RenderingDevice.SamplerBorderColor = 2

The border color that will be returned when sampling outside the sampler's bounds and the repeat_u, repeat_v or repeat_w modes have repeating disabled.

var compare_op: RenderingDevice.CompareOperator = 7

The compare operation to use. Only effective if enable_compare is true.

var enable_compare: bool = false

If true, returned values will be based on the comparison operation defined in 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.

var lod_bias: float = 0.0

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.

var mag_filter: RenderingDevice.SamplerFilter = 0

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

var max_lod: float = 1e+20

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

var min_filter: RenderingDevice.SamplerFilter = 0

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

var min_lod: float = 0.0

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

var mip_filter: RenderingDevice.SamplerFilter = 0

The filtering method to use for mipmaps.

var repeat_u: RenderingDevice.SamplerRepeatMode = 2

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

var repeat_v: RenderingDevice.SamplerRepeatMode = 2

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

var repeat_w: RenderingDevice.SamplerRepeatMode = 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.

var unnormalized_uvw: bool = 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.

var use_anisotropy: bool = false

If true, perform anisotropic sampling. See anisotropy_max.

Methods

Inherited from RefCounted (4)
func init_ref() -> bool
func reference() -> bool
func unreference() -> bool
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

Inherited from Object (2)