Search Unity

Render texture Create Failed

Discussion in 'Windows' started by sfjohansson, Mar 11, 2016.

Thread Status:
Not open for further replies.
  1. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    369
    Hi,
    I'm developing on mac and trying to make a windows build, the app works perfectly fine in the editor on mac but when I launch the standalone build on windows I get the error:

    RenderTexture.Create failed: format unsupported.

    The format I have set in the editor is RGB656 and no depth buffer.
    The size is 1920 x 1080

    Has anybody seen this before?

    Cheers

    Stefan
     
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
    Hi,

    you should be able to use SystemInfo.SupportsRenderTextureFormat() to find out whether render texture format is supported on a particular machine. If it's not, you should fallback to the default render texture format. In your case, you cannot render to RGB656 textures on DirectX.
     
    dkaraush likes this.
  3. sfjohansson

    sfjohansson

    Joined:
    Mar 12, 2013
    Posts:
    369
    Thanks, for the heads up. I Did solve it at the time by changing the render texture format as you advice, went for ARGB32. Maybe a few notes in the docs would be helpful for others who venture into the same problem.
     
    kyelin and Cuteknight like this.
  4. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    How do you change render texture format?
     
    Oluap84 and R-Hacker like this.
  5. ju_my

    ju_my

    Joined:
    Mar 7, 2017
    Posts:
    23
    Hi, is it possible to find a list of supported format by machines?
    Thanks
     
    BBIT-SOLUTIONS likes this.
  6. awais124

    awais124

    Joined:
    Aug 28, 2019
    Posts:
    3
    I had also faced this issue .I solved it by changing depth buffer to "depth buffer with no stencil" in render texture properties
     
    minakoh likes this.
  7. cdr9042

    cdr9042

    Joined:
    Apr 22, 2018
    Posts:
    173
    How do I do that? I don't find any property that say "depth buffer with no stencil". I'm using Unity 2022.1.20
     

    Attached Files:

  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,676
    In the drop down menu you listed, the "D" stands for depth and the "S" stands for stencil. So for instance, "D32_UFLOAT_S8_UINT" means the format has both depth and stencil: depth is stored in 32-bit unsigned float whereas the stencil is stored in an unsigned 8-bit integer. "D32_UFLOAT", on the other hand, only has the depth component.
     
  9. Cuteknight

    Cuteknight

    Joined:
    Apr 14, 2023
    Posts:
    1
  10. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,459
    Please use the like button to show your appreciation. This stops the post from being necroed.

    Thanks.
     
Thread Status:
Not open for further replies.