Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

SystemInfo said the device supports render texture formats but logs say it's not.

Discussion in 'Android' started by Fuduin, Dec 18, 2020.

  1. Fuduin

    Fuduin

    Joined:
    Feb 7, 2020
    Posts:
    7
    SystemInfo.SupportsRenderTextureFormat returns true for R8 and R16 but in logs still appear messages like this.

    12-16 12:28:06.907: E/Unity(12610): RenderTexture.Create failed: format unsupported for random writes - R16 SFloat (45).
    12-16 12:28:06.914: E/Unity(12610): RenderTexture.Create failed: format unsupported for random writes - RG8 UNorm (6).

    Does R8 checks RG8? R16 and R16 SFloat are the same?

    GPU: Adreno 430
     
  2. kaarloew

    kaarloew

    Joined:
    Nov 1, 2018
    Posts:
    360
    Those are different:
    R8 Single channel (R) texture format, 8 bit integer.
    R16 Single channel (R) texture format, 16 bit integer.

    Floats are floats. RG has two channels (red and green), R has only one channel
     
  3. Fuduin

    Fuduin

    Joined:
    Feb 7, 2020
    Posts:
    7
    Thanks. This means I understand it right. So, is there any way to check the support of RG8 UNorm and R16 SFloat?
     
  4. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    If you want to check specifically for random write support of a format you can use SystemInfo.IsFormatSupported with FormatUsage.LoadStore.
     
    futurlab_peterh and Fuduin like this.
  5. Fuduin

    Fuduin

    Joined:
    Feb 7, 2020
    Posts:
    7
    florianpenzkofer likes this.