RDPipelineMultisampleState
继承: RefCounted
< Object
Pipeline multisample state (used by RenderingDevice
).
描述
RDPipelineMultisampleState is used to control how multisample or supersample antialiasing is being performed when rendering using RenderingDevice
.
属性
bool | enable_alpha_to_coverage |
bool | enable_alpha_to_one |
bool | enable_sample_shading |
float | min_sample_shading |
TextureSamples | sample_count |
Array int | sample_masks |
属性说明
bool
enable_alpha_to_coverage = false
If true
, alpha to coverage is enabled. This generates a temporary coverage value based on the alpha component of the fragment's first color output. This allows alpha transparency to make use of multisample antialiasing.
bool
enable_alpha_to_one = false
If true
, alpha is forced to either 0.0
or 1.0
. This allows hardening the edges of antialiased alpha transparencies. Only relevant if enable_alpha_to_coverage
is true
.
bool
enable_sample_shading = false
If true
, enables per-sample shading which replaces MSAA by SSAA. This provides higher quality antialiasing that works with transparent (alpha scissor) edges. This has a very high performance cost. See also min_sample_shading
. See the per-sample shading Vulkan documentation for more details.
float
min_sample_shading = 0.0
The multiplier of sample_count
that determines how many samples are performed for each fragment. Must be between 0.0
and 1.0
(inclusive). Only effective if enable_sample_shading
is true
. If min_sample_shading
is 1.0
, fragment invocation must only read from the coverage index sample. Tile image access must not be used if enable_sample_shading
is not 1.0
.
TextureSamples sample_count = 0
void
set_sample_count ( value: TextureSamples )- TextureSamples get_sample_count ( )
The number of MSAA samples (or SSAA samples if enable_sample_shading
is true
) to perform. Higher values result in better antialiasing, at the cost of performance.
The sample mask array. See the sample mask Vulkan documentation for more details.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。