Search Unity

Replacement shaders and Keywords based shader program variants support

Discussion in 'Shaders' started by brn, Jun 29, 2015.

  1. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    320
    A question for the Unity Engine Shader Guru's.

    Should keywords set in a Material such as myMaterial.EnableKeyword("AMAZEBALLS_KEYWORD")
    work for both the main shader and the replaced one if it exists in both or at least the replaced version as a shader program variant?

    Cheers
    BRN
     
  2. brn

    brn

    Joined:
    Feb 8, 2011
    Posts:
    320
    Took a gamble and tested it out. Works like a charm.
    Nice work unity.