virtualx-engine/doc/classes/RDSamplerState.xml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
5 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8" ?>
<class name="RDSamplerState" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Sampler state (used by [RenderingDevice]).
</brief_description>
<description>
This object is used by [RenderingDevice].
</description>
<tutorials>
</tutorials>
<members>
<member name="anisotropy_max" type="float" setter="set_anisotropy_max" getter="get_anisotropy_max" default="1.0">
Maximum anisotropy that can be used when sampling. Only effective if [member use_anisotropy] is [code]true[/code]. 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 [code]16.0[/code].
If [member anisotropy_max] is [code]1.0[/code], forcibly disables anisotropy even if [member use_anisotropy] is [code]true[/code].
</member>
<member name="border_color" type="int" setter="set_border_color" getter="get_border_color" enum="RenderingDevice.SamplerBorderColor" default="2">
The border color that will be returned when sampling outside the sampler's bounds and the [member repeat_u], [member repeat_v] or [member repeat_w] modes have repeating disabled.
</member>
<member name="compare_op" type="int" setter="set_compare_op" getter="get_compare_op" enum="RenderingDevice.CompareOperator" default="7">
The compare operation to use. Only effective if [member enable_compare] is [code]true[/code].
</member>
<member name="enable_compare" type="bool" setter="set_enable_compare" getter="get_enable_compare" default="false">
If [code]true[/code], returned values will be based on the comparison operation defined in [member 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.
</member>
<member name="lod_bias" type="float" setter="set_lod_bias" getter="get_lod_bias" default="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 [code]-0.5[/code] and [code]0.0[/code]. Only effective if the sampler has mipmaps available.
</member>
<member name="mag_filter" type="int" setter="set_mag_filter" getter="get_mag_filter" enum="RenderingDevice.SamplerFilter" default="0">
The sampler's magnification filter. It is the filtering method used when sampling texels that appear bigger than on-screen pixels.
</member>
<member name="max_lod" type="float" setter="set_max_lod" getter="get_max_lod" default="1e+20">
The maximum mipmap LOD bias to display (lowest resolution). Only effective if the sampler has mipmaps available.
</member>
<member name="min_filter" type="int" setter="set_min_filter" getter="get_min_filter" enum="RenderingDevice.SamplerFilter" default="0">
The sampler's minification filter. It is the filtering method used when sampling texels that appear smaller than on-screen pixels.
</member>
<member name="min_lod" type="float" setter="set_min_lod" getter="get_min_lod" default="0.0">
The minimum mipmap LOD bias to display (highest resolution). Only effective if the sampler has mipmaps available.
</member>
<member name="mip_filter" type="int" setter="set_mip_filter" getter="get_mip_filter" enum="RenderingDevice.SamplerFilter" default="0">
The filtering method to use for mipmaps.
</member>
<member name="repeat_u" type="int" setter="set_repeat_u" getter="get_repeat_u" enum="RenderingDevice.SamplerRepeatMode" default="2">
The repeat mode to use along the U axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.
</member>
<member name="repeat_v" type="int" setter="set_repeat_v" getter="get_repeat_v" enum="RenderingDevice.SamplerRepeatMode" default="2">
The repeat mode to use along the V axis of UV coordinates. This affects the returned values if sampling outside the UV bounds.
</member>
<member name="repeat_w" type="int" setter="set_repeat_w" getter="get_repeat_w" enum="RenderingDevice.SamplerRepeatMode" default="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.
</member>
<member name="unnormalized_uvw" type="bool" setter="set_unnormalized_uvw" getter="get_unnormalized_uvw" default="false">
If [code]true[/code], 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.
</member>
<member name="use_anisotropy" type="bool" setter="set_use_anisotropy" getter="get_use_anisotropy" default="false">
If [code]true[/code], perform anisotropic sampling. See [member anisotropy_max].
</member>
</members>
</class>