Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

RDPipelineRasterizationState

繼承: RefCounted < Object

管線柵格化狀態(由 RenderingDevice 使用)。

說明

這個物件由 RenderingDevice 使用。

屬性

PolygonCullMode

cull_mode

0

float

depth_bias_clamp

0.0

float

depth_bias_constant_factor

0.0

bool

depth_bias_enabled

false

float

depth_bias_slope_factor

0.0

bool

discard_primitives

false

bool

enable_depth_clamp

false

PolygonFrontFace

front_face

0

float

line_width

1.0

int

patch_control_points

1

bool

wireframe

false


屬性說明

PolygonCullMode cull_mode = 0 🔗

繪製多邊形時的剔除模式,決定隱藏正面還是反面。


float depth_bias_clamp = 0.0 🔗

  • void set_depth_bias_clamp(value: float)

  • float get_depth_bias_clamp()

每個深度值可以偏移多少的限制。如果為負,則充當最小值;如果為正,則充當最大值。


float depth_bias_constant_factor = 0.0 🔗

  • void set_depth_bias_constant_factor(value: float)

  • float get_depth_bias_constant_factor()

新增到每個深度值的恆定偏移量。在 depth_bias_slope_factor 之後應用。


bool depth_bias_enabled = false 🔗

  • void set_depth_bias_enabled(value: bool)

  • bool get_depth_bias_enabled()

如果為 true,每個生成的深度值將偏移一定量。它是基於 depth_bias_slope_factor 和 depth_bias_constant_factor 的值生成每個多邊形的特定量。


float depth_bias_slope_factor = 0.0 🔗

  • void set_depth_bias_slope_factor(value: float)

  • float get_depth_bias_slope_factor()

A constant scale applied to the slope of each polygon's depth. Applied before depth_bias_constant_factor.


bool discard_primitives = false 🔗

  • void set_discard_primitives(value: bool)

  • bool get_discard_primitives()

如果為 true,則會在柵格化階段前立即丟棄圖元。


bool enable_depth_clamp = false 🔗

  • void set_enable_depth_clamp(value: bool)

  • bool get_enable_depth_clamp()

如果為 true,則根據關聯視埠的最小和最大深度鉗制深度值。


PolygonFrontFace front_face = 0 🔗

要使用的纏繞順序,決定三角形的哪個面是正面。


float line_width = 1.0 🔗

  • void set_line_width(value: float)

  • float get_line_width()

繪製線段時使用的線寬(單位為圖元)。可能不是所有硬體都支援粗線段。


int patch_control_points = 1 🔗

  • void set_patch_control_points(value: int)

  • int get_patch_control_points()

啟用曲面細分繪製面片時,使用的控制點的數量。值越高,品質越高,但是效能開銷也越高。


bool wireframe = false 🔗

  • void set_wireframe(value: bool)

  • bool get_wireframe()

如果為 true,則會為三角形進行線框渲染,不進行平面或紋理渲染。