Skip to content

Commit

Permalink
fixed obselete FormatUsage with GraphicsFormatUsage
Browse files Browse the repository at this point in the history
  • Loading branch information
christing12 committed Aug 17, 2023
1 parent 44b4314 commit 07c69ea
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,18 @@ public MultiScaleVO(AmbientOcclusion settings)
// R8 is not supported on all platforms as a storage texture format
m_R8Format = RenderTextureFormat.R8;
m_R16Format = RenderTextureFormat.RHalf;

if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R8Format, false), FormatUsage.LoadStore))
if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R8Format, false), GraphicsFormatUsage.LoadStore))
{
if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.ARGB32, false), FormatUsage.LoadStore))
if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.ARGB32, false), GraphicsFormatUsage.LoadStore))
{
m_R8Format = RenderTextureFormat.ARGB32;
float4Texture = true;
}
}

if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R16Format, false), FormatUsage.LoadStore))
if (!SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(m_R16Format, false), GraphicsFormatUsage.LoadStore))
{
if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.RFloat, false), FormatUsage.LoadStore))
if (SystemInfo.IsFormatSupported(GraphicsFormatUtility.GetGraphicsFormat(RenderTextureFormat.RFloat, false), GraphicsFormatUsage.LoadStore))
{
m_R16Format = RenderTextureFormat.RFloat;
}
Expand Down

0 comments on commit 07c69ea

Please sign in to comment.