Пример #1
0
    private void EnablePostFX(PerformanceInfo.ePOSTFX keyword, bool enabled)
    {
        //string shaderKeywordPrefix = "EBG_POSTFX_COMPOSITE_" + keyword.ToString().ToUpper();
        if (enabled)
        {
            //_CompositeMaterial.DisableKeyword(shaderKeywordPrefix + "_OFF");
            //_CompositeMaterial.EnableKeyword(shaderKeywordPrefix + "_ON");
#if UNITY_EDITOR
            if (CurrentPostFX.Contains(keyword))
            {
                EB.Debug.LogError("Enabling already enabled PostFX: {0}", keyword);
            }
#endif
            CurrentPostFX.Add(keyword);
        }
        else
        {
            //_CompositeMaterial.DisableKeyword(shaderKeywordPrefix + "_ON");
            //_CompositeMaterial.EnableKeyword(shaderKeywordPrefix + "_OFF");
#if UNITY_EDITOR
            if (!CurrentPostFX.Contains(keyword))
            {
                EB.Debug.LogError("Disabling already disabled PostFX: {0}", keyword);
            }
#endif
            CurrentPostFX.Remove(keyword);
        }

        EnableMaterialKeyword(keyword, enabled);
    }
Пример #2
0
 public bool IsActive(PerformanceInfo.ePOSTFX postfx)
 {
     return(CurrentPostFX.Contains(postfx));
 }