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.
Checking the stable version of the documentation...
RDPipelineSpecializationConstant
繼承: RefCounted < Object
管線特化常數(由 RenderingDevice 使用)。
說明
特化常數可以建立同一著色器的額外版本,但不會導致實際編譯的著色器版本數增加。這樣就能減少著色器的版本數、減少 if 分支,從而提升性能,但與此同時保持著色器能夠在不同場合靈活運用。
這個物件由 RenderingDevice 使用。
屬性
|
||
屬性說明
特化常數的識別字。這個值從 0 開始,給定著色器中每一個不同的特化常數都會將其遞增。