ShaderLab 文法: CustomEditor
詳細な ShaderLab トピック

ShaderLab文法: その他のコマンド

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Sumbission failed

For some reason your suggested change could not be submitted. Please try again in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

カテゴリ

カテゴリ は,下のコマンドの論理的グルーピングです。 これは,多くの場合,レンダリング状態を_継承_するのに使用されます。 例えば,シェーダに複数の subshaders がある場合,それぞれが,fog をオフににし,blending を追加に指定する必要があるとします。カテゴリを使ってこれを行うことができます。

Shader "example" {
Category {
    Fog { Mode Off }
    Blend One One
    SubShader {
        // ...
    }
    SubShader {
        // ...
    }
    // ...
}
}

カテゴリ ブロックは,シェーダの構文解析にのみ影響しますが,下のすべてのブロックにカテゴリ内で設定した状態を_構文解析_するのとまったく同じです。 シェーダの実行速度には一切影響しません。

ShaderLab 文法: CustomEditor
詳細な ShaderLab トピック