@@ -7,11 +7,11 @@ namespace UnityEngine.Rendering.PostProcessing
77 // Temporary code dump until the texture format refactor goes into trunk...
88 public static class TextureFormatUtilities
99 {
10- static Dictionary < TextureFormat , RenderTextureFormat > m_FormatMap ;
10+ static Dictionary < TextureFormat , RenderTextureFormat > s_FormatMap ;
1111
1212 static TextureFormatUtilities ( )
1313 {
14- m_FormatMap = new Dictionary < TextureFormat , RenderTextureFormat >
14+ s_FormatMap = new Dictionary < TextureFormat , RenderTextureFormat >
1515 {
1616 { TextureFormat . Alpha8 , RenderTextureFormat . ARGB32 } ,
1717 { TextureFormat . ARGB4444 , RenderTextureFormat . ARGB4444 } ,
@@ -43,9 +43,11 @@ static TextureFormatUtilities()
4343 { TextureFormat . PVRTC_RGBA2 , RenderTextureFormat . ARGB32 } ,
4444 { TextureFormat . PVRTC_RGB4 , RenderTextureFormat . ARGB32 } ,
4545 { TextureFormat . PVRTC_RGBA4 , RenderTextureFormat . ARGB32 } ,
46- { TextureFormat . ETC_RGB4 , RenderTextureFormat . ARGB32 } ,
46+ #if ! UNITY_2018_1_OR_NEWER
4747 { TextureFormat . ATC_RGB4 , RenderTextureFormat . ARGB32 } ,
4848 { TextureFormat . ATC_RGBA8 , RenderTextureFormat . ARGB32 } ,
49+ #endif
50+ { TextureFormat . ETC_RGB4 , RenderTextureFormat . ARGB32 } ,
4951 { TextureFormat . ETC2_RGB , RenderTextureFormat . ARGB32 } ,
5052 { TextureFormat . ETC2_RGBA1 , RenderTextureFormat . ARGB32 } ,
5153 { TextureFormat . ETC2_RGBA8 , RenderTextureFormat . ARGB32 } ,
@@ -78,7 +80,7 @@ public static RenderTextureFormat GetUncompressedRenderTextureFormat(Texture tex
7880 var inFormat = ( ( Texture2D ) texture ) . format ;
7981 RenderTextureFormat outFormat ;
8082
81- if ( ! m_FormatMap . TryGetValue ( inFormat , out outFormat ) )
83+ if ( ! s_FormatMap . TryGetValue ( inFormat , out outFormat ) )
8284 throw new NotSupportedException ( "Texture format not supported" ) ;
8385
8486 return outFormat ;
0 commit comments