![]() ![]() When you author your shader, you declare keywords in sets. To enable or disable a local shader keyword for a compute shader, use ComputeShader.EnableKeyword or ComputeShader.DisableKeyword. To check the state, use Material.IsKeywordEnabled. To enable or disable a local shader keyword for a graphics shader, use Material.EnableKeyword or Material.DisableKeyword. Enabling, disabling, and checking the state of local shader keywords To enable or disable a global keyword with a Command Buffer, use CommandBuffer.EnableKeyword, or CommandBuffer.DisableKeyword. To enable or disable a global shader keyword, use Shader.EnableKeyword or Shader.DisableKeyword. Enabling, disabling, and checking the state of global shader keywords Warning: If a material has a local keyword enabled, and its shader changes to one that is no longer declared, Unity creates a new global keyword. Note: If there are global and local keywords with the same name, Unity prioritises the local keyword. For more information, see Shader keywords: global and local scope. You set the scope of a shader keyword when you declare it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |