Skip to content
This repository was archived by the owner on Nov 30, 2020. It is now read-only.

Commit 0170c0d

Browse files
committed
Renamed "mobile optimized" fields to "fast mode"
1 parent 73ddaef commit 0170c0d

File tree

6 files changed

+17
-11
lines changed

6 files changed

+17
-11
lines changed

PostProcessing/Editor/Effects/BloomEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public override void OnEnable()
2424
m_Diffusion = FindParameterOverride(x => x.diffusion);
2525
m_AnamorphicRatio = FindParameterOverride(x => x.anamorphicRatio);
2626
m_Color = FindParameterOverride(x => x.color);
27-
m_MobileOptimized = FindParameterOverride(x => x.mobileOptimized);
27+
m_MobileOptimized = FindParameterOverride(x => x.fastMode);
2828

2929
m_DirtTexture = FindParameterOverride(x => x.dirtTexture);
3030
m_DirtIntensity = FindParameterOverride(x => x.dirtIntensity);

PostProcessing/Editor/PostProcessLayerEditor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void OnEnable()
6161
m_TaaSharpness = FindProperty(x => x.temporalAntialiasing.sharpness);
6262
m_TaaStationaryBlending = FindProperty(x => x.temporalAntialiasing.stationaryBlending);
6363
m_TaaMotionBlending = FindProperty(x => x.temporalAntialiasing.motionBlending);
64-
m_FxaaMobileOptimized = FindProperty(x => x.fastApproximateAntialiasing.mobileOptimized);
64+
m_FxaaMobileOptimized = FindProperty(x => x.fastApproximateAntialiasing.fastMode);
6565
m_FxaaKeepAlpha = FindProperty(x => x.fastApproximateAntialiasing.keepAlpha);
6666

6767
m_FogEnabled = FindProperty(x => x.fog.enabled);

PostProcessing/Runtime/Effects/Bloom.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using UnityEngine.Serialization;
23

34
namespace UnityEngine.Rendering.PostProcessing
45
{
@@ -32,8 +33,9 @@ public sealed class Bloom : PostProcessEffectSettings
3233
#endif
3334
public ColorParameter color = new ColorParameter { value = Color.white };
3435

35-
[Tooltip("Boost performances by lowering the effect quality. This settings is meant to be used on mobile and other low-end platforms.")]
36-
public BoolParameter mobileOptimized = new BoolParameter { value = false };
36+
[FormerlySerializedAs("mobileOptimized")]
37+
[Tooltip("Boost performances by lowering the effect quality. This settings is meant to be used on mobile and other low-end platforms but can also provide a nice performance boost on desktops and consoles.")]
38+
public BoolParameter fastMode = new BoolParameter { value = false };
3739

3840
[Tooltip("Dirtiness texture to add smudges or dust to the bloom effect."), DisplayName("Texture")]
3941
public TextureParameter dirtTexture = new TextureParameter { value = null };
@@ -121,7 +123,7 @@ public override void Render(PostProcessRenderContext context)
121123
var threshold = new Vector4(lthresh, lthresh - knee, knee * 2f, 0.25f / knee);
122124
sheet.properties.SetVector(ShaderIDs.Threshold, threshold);
123125

124-
int qualityOffset = settings.mobileOptimized ? 1 : 0;
126+
int qualityOffset = settings.fastMode ? 1 : 0;
125127

126128
// Downsample
127129
var lastDown = context.source;

PostProcessing/Runtime/Effects/ChromaticAberration.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using UnityEngine.Serialization;
23

34
namespace UnityEngine.Rendering.PostProcessing
45
{
@@ -12,8 +13,9 @@ public sealed class ChromaticAberration : PostProcessEffectSettings
1213
[Range(0f, 1f), Tooltip("Amount of tangential distortion.")]
1314
public FloatParameter intensity = new FloatParameter { value = 0f };
1415

15-
[Tooltip("Boost performances by lowering the effect quality. This settings is meant to be used on mobile and other low-end platforms.")]
16-
public BoolParameter mobileOptimized = new BoolParameter { value = false };
16+
[FormerlySerializedAs("mobileOptimized")]
17+
[Tooltip("Boost performances by lowering the effect quality. This settings is meant to be used on mobile and other low-end platforms but can also provide a nice performance boost on desktops and consoles.")]
18+
public BoolParameter fastMode = new BoolParameter { value = false };
1719

1820
public override bool IsEnabledAndSupported(PostProcessRenderContext context)
1921
{
@@ -57,7 +59,7 @@ public override void Render(PostProcessRenderContext context)
5759
}
5860

5961
var sheet = context.uberSheet;
60-
sheet.EnableKeyword(settings.mobileOptimized
62+
sheet.EnableKeyword(settings.fastMode
6163
? "CHROMATIC_ABERRATION_LOW"
6264
: "CHROMATIC_ABERRATION"
6365
);

PostProcessing/Runtime/Effects/FastApproximateAntialiasing.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
using System;
2+
using UnityEngine.Serialization;
23

34
namespace UnityEngine.Rendering.PostProcessing
45
{
56
[Serializable]
67
public sealed class FastApproximateAntialiasing
78
{
8-
[Tooltip("Boost performances by lowering the effect quality. This settings is meant to be used on mobile and other low-end platforms.")]
9-
public bool mobileOptimized = false;
9+
[FormerlySerializedAs("mobileOptimized")]
10+
[Tooltip("Boost performances by lowering the effect quality. This settings is meant to be used on mobile and other low-end platforms but can also provide a nice performance boost on desktops and consoles.")]
11+
public bool fastMode = false;
1012

1113
[Tooltip("Keep alpha channel. This will slightly lower the effect quality but allows rendering against a transparent background.")]
1214
public bool keepAlpha = false;

PostProcessing/Runtime/PostProcessLayer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ void RenderFinalPass(PostProcessRenderContext context, int releaseTargetAfterUse
877877

878878
if (antialiasingMode == Antialiasing.FastApproximateAntialiasing)
879879
{
880-
uberSheet.EnableKeyword(fastApproximateAntialiasing.mobileOptimized
880+
uberSheet.EnableKeyword(fastApproximateAntialiasing.fastMode
881881
? "FXAA_LOW"
882882
: "FXAA"
883883
);

0 commit comments

Comments
 (0)