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

Commit 3e8ce16

Browse files
committed
Fixed pre-2019.1 compatibility
1 parent f833910 commit 3e8ce16

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

PostProcessing/Runtime/Effects/ColorGrading.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ public sealed class ColorGrading : PostProcessEffectSettings
227227

228228
/// <summary>
229229
/// Adjusts the overall exposure of the scene in EV units. This is applied after HDR effect
230-
/// and right before tonemapping so it won’t affect previous effects in the chain.
230+
/// and right before tonemapping so it won't affect previous effects in the chain.
231231
/// </summary>
232232
/// <remarks>
233233
/// This is only used when working with <see cref="GradingMode.HighDefinitionRange"/>.
@@ -783,8 +783,13 @@ Texture2D GetCurveTexture(bool hdr)
783783

784784
static bool IsRenderTextureFormatSupportedForLinearFiltering(RenderTextureFormat format)
785785
{
786+
#if UNITY_2019_1_OR_NEWER
786787
var gFormat = GraphicsFormatUtility.GetGraphicsFormat(format, RenderTextureReadWrite.Linear);
787788
return SystemInfo.IsFormatSupported(gFormat, FormatUsage.Linear);
789+
#else
790+
// No good/fast way to test it on pre-2019.1
791+
return format.IsSupported();
792+
#endif
788793
}
789794

790795
static RenderTextureFormat GetLutFormat()

0 commit comments

Comments
 (0)