Sometimes, you want the same shader to do different things under different circumstances. When this happens, you use conditionals to define different behavior for different hardware.
このセクションでは、シェーダーバリアントやキーワードの仕組みや、いつ、どのように使用するかについて説明します。
| ページ | 説明 |
|---|---|
| Conditionals in shaders | An introduction to conditionals in shaders, including information on the different types of conditional, and when to use which one. |
| Branching in shaders | An introduction to static and dynamic branching in shaders. |
| シェーダーバリアント | シェーダーバリアントと、Unity がコンパイルするシェーダーバリアントの数を理解し制御する方法について。 |
| Check how many shader variants you have | Using logging and profiling tools to check how many shader variants Unity compiles, and identify ways you can remove (strip) variants. |
| シェーダーキーワード | シェーダーキーワードとその使い方について。 |
| C# スクリプトによるシェーダーキーワードの使用 | C#スクリプトでシェーダーキーワードを使う方法について。 |
| Using shader keywords with the material Inspector | マテリアル Inspector を使用して Unity エディターでシェーダーキーワードを扱う方法について。 |
| Shader variant stripping | Preventing shader variants from being compiled to reduce build times, file size, shader loading times and runtime memory usage. |
| シェーダーバリアントコレクション | シェーダバリアントコレクションの説明と、その使い方についての情報について。 |