Class RDSamplerState
- Namespace
- Godot
- Assembly
- GodotSharp.dll
This object is used by RenderingDevice.
public class RDSamplerState : RefCounted, IDisposable
- Inheritance
-
RDSamplerState
- Implements
- Inherited Members
Constructors
RDSamplerState()
public RDSamplerState()
Properties
AnisotropyMax
Maximum anisotropy that can be used when sampling. Only effective if UseAnisotropy 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 AnisotropyMax is 1.0
, forcibly disables anisotropy even if UseAnisotropy is true
.
public float AnisotropyMax { get; set; }
Property Value
BorderColor
The border color that will be returned when sampling outside the sampler's bounds and the RepeatU, RepeatV or RepeatW modes have repeating disabled.
public RenderingDevice.SamplerBorderColor BorderColor { get; set; }
Property Value
CompareOp
The compare operation to use. Only effective if EnableCompare is true
.
public RenderingDevice.CompareOperator CompareOp { get; set; }
Property Value
EnableCompare
If true
, returned values will be based on the comparison operation defined in CompareOp. 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.
public bool EnableCompare { get; set; }
Property Value
LodBias
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.
public float LodBias { get; set; }
Property Value
MagFilter
The sampler's magnification filter.
public RenderingDevice.SamplerFilter MagFilter { get; set; }
Property Value
MaxLod
The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available.
public float MaxLod { get; set; }
Property Value
MinFilter
public RenderingDevice.SamplerFilter MinFilter { get; set; }
Property Value
MinLod
The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available.
public float MinLod { get; set; }
Property Value
MipFilter
The filtering method to use for mipmaps.
public RenderingDevice.SamplerFilter MipFilter { get; set; }
Property Value
RepeatU
The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.
public RenderingDevice.SamplerRepeatMode RepeatU { get; set; }
Property Value
RepeatV
The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.
public RenderingDevice.SamplerRepeatMode RepeatV { get; set; }
Property Value
RepeatW
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.
public RenderingDevice.SamplerRepeatMode RepeatW { get; set; }
Property Value
UnnormalizedUvw
public bool UnnormalizedUvw { get; set; }
Property Value
UseAnisotropy
If true
, perform anisotropic sampling. See AnisotropyMax.
public bool UseAnisotropy { get; set; }
Property Value
Methods
HasGodotClassMethod(in godot_string_name)
Check if the type contains a method with the given name. This method is used by Godot to check if a method exists before invoking it. Do not call or override this method.
protected override bool HasGodotClassMethod(in godot_string_name method)
Parameters
method
godot_string_nameName of the method to check for.
Returns
HasGodotClassSignal(in godot_string_name)
Check if the type contains a signal with the given name. This method is used by Godot to check if a signal exists before raising it. Do not call or override this method.
protected override bool HasGodotClassSignal(in godot_string_name signal)
Parameters
signal
godot_string_nameName of the signal to check for.
Returns
InvokeGodotClassMethod(in godot_string_name, NativeVariantPtrArgs, out godot_variant)
Invokes the method with the given name, using the given arguments. This method is used by Godot to invoke methods from the engine side. Do not call or override this method.
protected override bool InvokeGodotClassMethod(in godot_string_name method, NativeVariantPtrArgs args, out godot_variant ret)
Parameters
method
godot_string_nameName of the method to invoke.
args
NativeVariantPtrArgsArguments to use with the invoked method.
ret
godot_variantValue returned by the invoked method.