Skip to content

Commit

Permalink
rename AntiAliasing -> Antialiasing
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyOThan committed Jul 15, 2024
1 parent 2d40697 commit 86616eb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Source/GUI/ConfigurationGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private void renderGeneralSettings(TUFXProfile profile)
if (DrawGroupHeader("General Settings"))
{
bool hdrChanged = renderHDRSettings(profile);
bool primaryChanged = renderAntialiasingSettings("Primary Camera Antialiasing", ref profile.AntiAliasing);
bool primaryChanged = renderAntialiasingSettings("Primary Camera Antialiasing", ref profile.Antialiasing);
bool secondaryChanged = renderAntialiasingSettings("Secondary Camera Antialiasing", ref profile.SecondaryCameraAntialiasing);

if (hdrChanged || primaryChanged || secondaryChanged)
Expand Down Expand Up @@ -318,7 +318,7 @@ private bool renderHDRSettings(TUFXProfile profile)
return changed;
}

private bool renderAntialiasingSettings(string label, ref AntiAliasingParameters parameters)
private bool renderAntialiasingSettings(string label, ref AntialiasingParameters parameters)
{
GUILayout.BeginVertical(HighLogic.Skin.box);
bool needRefresh = false;
Expand Down
14 changes: 7 additions & 7 deletions Source/TUFXProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static BuiltinEffect GetBuiltinEffect(PostProcessEffectSettings settings)

}

public struct AntiAliasingParameters
public struct AntialiasingParameters
{
public void Init()
{
Expand All @@ -105,9 +105,9 @@ public class TUFXProfile

public bool HDREnabled;

public AntiAliasingParameters AntiAliasing;
public AntialiasingParameters Antialiasing;

public AntiAliasingParameters SecondaryCameraAntialiasing;
public AntialiasingParameters SecondaryCameraAntialiasing;

private UrlDir.UrlConfig urlConfig;

Expand All @@ -134,7 +134,7 @@ ConfigNode SaveToNode()
node.SetValue("name", ProfileName, true);
node.SetValue("hdr", HDREnabled, true);

node.WriteObject(nameof(AntiAliasing), AntiAliasing);
node.WriteObject(nameof(Antialiasing), Antialiasing);
node.WriteObject(nameof(SecondaryCameraAntialiasing), SecondaryCameraAntialiasing);

int len = Settings.Count;
Expand Down Expand Up @@ -182,13 +182,13 @@ void LoadProfile(ConfigNode node)
ProfileName = node.GetStringValue("name");
HDREnabled = node.GetBoolValue("hdr", false);

AntiAliasing.Init();
Antialiasing.Init();
SecondaryCameraAntialiasing.Init();

// support loading legacy profiles
AntiAliasing.Mode = node.GetEnumValue("antialiasing", PostProcessLayer.Antialiasing.None);
Antialiasing.Mode = node.GetEnumValue("antialiasing", PostProcessLayer.Antialiasing.None);

node.ReadObject(nameof(AntiAliasing), ref AntiAliasing);
node.ReadObject(nameof(Antialiasing), ref Antialiasing);
node.ReadObject(nameof(SecondaryCameraAntialiasing), ref SecondaryCameraAntialiasing);

Settings.Clear();
Expand Down
2 changes: 1 addition & 1 deletion Source/TexturesUnlimitedFXLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ private void ApplyProfileToCamera(Camera camera, TUFXProfile tufxProfile, bool i
// motion vectors aren't shared between cameras, and applying TAA on multiple cameras will produce smearing
layer.volumeLayer = isFinalCamera ? 1 : 0;

AntiAliasingParameters aaParameters = isPrimaryCamera ? tufxProfile.AntiAliasing : tufxProfile.SecondaryCameraAntialiasing;
AntialiasingParameters aaParameters = isPrimaryCamera ? tufxProfile.Antialiasing : tufxProfile.SecondaryCameraAntialiasing;

layer.antialiasingMode = aaParameters.Mode;
layer.temporalAntialiasing = aaParameters.TemporalAntialiasing;
Expand Down

0 comments on commit 86616eb

Please sign in to comment.