4 namespace HKI.Core.Settings
9 [RequireComponent(typeof(PostProcessLayer))]
16 PostProcessLayer PPL = null;
21 if(AntiAliasingMode != null)
23 PPL = GetComponent<PostProcessLayer>();
25 AntiAliasingMode.OnValueChanged += ChangeAAMode;
28 Debug.LogError(
"There is no linked >AntiAliasingMode< variable of type >AntiAliasingMode< in this AntiAliasingController!");
34 if(AntiAliasingMode != null)
35 AntiAliasingMode.OnValueChanged -= ChangeAAMode;
41 switch(AntiAliasingMode.
Value)
43 case AntiAliasingModes.Off: PPL.antialiasingMode = PostProcessLayer.Antialiasing.None;
break;
45 case AntiAliasingModes.FXAA: PPL.antialiasingMode = PostProcessLayer.Antialiasing.FastApproximateAntialiasing;
break;
47 case AntiAliasingModes.TAA: PPL.antialiasingMode = PostProcessLayer.Antialiasing.TemporalAntialiasing;
break;
49 case AntiAliasingModes.SMAA_Low: PPL.antialiasingMode = PostProcessLayer.Antialiasing.SubpixelMorphologicalAntialiasing; PPL.subpixelMorphologicalAntialiasing.quality = SubpixelMorphologicalAntialiasing.Quality.Low;
break;
51 case AntiAliasingModes.SMAA_Medium: PPL.antialiasingMode = PostProcessLayer.Antialiasing.SubpixelMorphologicalAntialiasing; PPL.subpixelMorphologicalAntialiasing.quality = SubpixelMorphologicalAntialiasing.Quality.Medium;
break;
53 case AntiAliasingModes.SMAA_High: PPL.antialiasingMode = PostProcessLayer.Antialiasing.SubpixelMorphologicalAntialiasing; PPL.subpixelMorphologicalAntialiasing.quality = SubpixelMorphologicalAntialiasing.Quality.High;
break;
55 default: PPL.antialiasingMode = PostProcessLayer.Antialiasing.TemporalAntialiasing;
break;
Special Variable enables the use of the AntiAliasingModes data type as a variable of the settings sys...
AntiAliasingModes
All possible settings for anti aliasing.
This MonoBehaviour sets anti aliasing values on the PostProcessLayer that is attached to the same Gam...