public void Update_AA(Camera mainCamera, AAMode aaMode, bool enabled)
 {
     if (enabled)
     {
         if (aaMode == AAMode.TAA)
         {
             mainCamera.GetComponent <PostProcessLayer> ().antialiasingMode = PostProcessLayer.Antialiasing.TemporalAntialiasing;
             mainCamera.GetComponent <PostProcessLayer> ().Init(null);
         }
         if (aaMode == AAMode.FXAA)
         {
             mainCamera.GetComponent <PostProcessLayer> ().antialiasingMode = PostProcessLayer.Antialiasing.FastApproximateAntialiasing;
             mainCamera.GetComponent <PostProcessLayer> ().Init(null);
         }
         if (aaMode == AAMode.SMAA)
         {
             mainCamera.GetComponent <PostProcessLayer> ().antialiasingMode = PostProcessLayer.Antialiasing.SubpixelMorphologicalAntialiasing;
             mainCamera.GetComponent <PostProcessLayer> ().Init(null);
         }
     }
     else
     {
         mainCamera.GetComponent <PostProcessLayer> ().antialiasingMode = PostProcessLayer.Antialiasing.None;
         mainCamera.GetComponent <PostProcessLayer> ().Init(null);
     }
 }
 public AntialiasingAsPostEffect()
 {
     mode             = AAMode.FXAA3Console;
     offsetScale      = 0.2f;
     blurRadius       = 18f;
     edgeThresholdMin = 0.05f;
     edgeThreshold    = 0.2f;
     edgeSharpness    = 4f;
 }
Beispiel #3
0
        public Material CurrentAAMaterial()
        {
            Material material = null;
            AAMode   aAMode   = mode;

            if (aAMode == AAMode.FXAA3Console)
            {
                return(materialFXAAIII);
            }
            return(null);
        }
Beispiel #4
0
    // Token: 0x06000268 RID: 616 RVA: 0x0001E250 File Offset: 0x0001C450
    public virtual Material CurrentAAMaterial()
    {
        AAMode   aamode = this.mode;
        Material result;

        if (aamode == AAMode.FXAA3Console)
        {
            result = this.materialFXAAIII;
        }
        else if (aamode == AAMode.FXAA2)
        {
            result = this.materialFXAAII;
        }
        else if (aamode == AAMode.FXAA1PresetA)
        {
            result = this.materialFXAAPreset2;
        }
        else if (aamode == AAMode.FXAA1PresetB)
        {
            result = this.materialFXAAPreset3;
        }
        else if (aamode == AAMode.NFAA)
        {
            result = this.nfaa;
        }
        else if (aamode == AAMode.SSAA)
        {
            result = this.ssaa;
        }
        else if (aamode == AAMode.DLAA)
        {
            result = this.dlaa;
        }
        else
        {
            result = null;
        }
        return(result);
    }