@@ -223,11 +223,19 @@ public static void CalculateSlopePowerOffset(Color slope, Color power, Color off
223
223
outOffset = GetOffsetValue ( offset ) ;
224
224
}
225
225
226
+ TextureFormat GetCurveFormat ( )
227
+ {
228
+ if ( SystemInfo . SupportsTextureFormat ( TextureFormat . RGBAHalf ) )
229
+ return TextureFormat . RGBAHalf ;
230
+
231
+ return TextureFormat . RGBA32 ;
232
+ }
233
+
226
234
Texture2D GetCurveTexture ( )
227
235
{
228
236
if ( m_GradingCurves == null )
229
237
{
230
- m_GradingCurves = new Texture2D ( k_CurvePrecision , 2 , TextureFormat . RGBAHalf , false , true )
238
+ m_GradingCurves = new Texture2D ( k_CurvePrecision , 2 , GetCurveFormat ( ) , false , true )
231
239
{
232
240
name = "Internal Curves Texture" ,
233
241
hideFlags = HideFlags . DontSave ,
@@ -271,6 +279,14 @@ bool IsLogLutValid(RenderTexture lut)
271
279
return lut != null && lut . IsCreated ( ) && lut . height == k_InternalLogLutSize ;
272
280
}
273
281
282
+ RenderTextureFormat GetLutFormat ( )
283
+ {
284
+ if ( SystemInfo . SupportsRenderTextureFormat ( RenderTextureFormat . ARGBHalf ) )
285
+ return RenderTextureFormat . ARGBHalf ;
286
+
287
+ return RenderTextureFormat . ARGB32 ;
288
+ }
289
+
274
290
void GenerateLut ( )
275
291
{
276
292
var settings = model . settings ;
@@ -279,7 +295,7 @@ void GenerateLut()
279
295
{
280
296
GraphicsUtils . Destroy ( model . bakedLut ) ;
281
297
282
- model . bakedLut = new RenderTexture ( k_InternalLogLutSize * k_InternalLogLutSize , k_InternalLogLutSize , 0 , RenderTextureFormat . ARGBHalf )
298
+ model . bakedLut = new RenderTexture ( k_InternalLogLutSize * k_InternalLogLutSize , k_InternalLogLutSize , 0 , GetLutFormat ( ) )
283
299
{
284
300
name = "Color Grading Log LUT" ,
285
301
hideFlags = HideFlags . DontSave ,
0 commit comments