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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

999+ warnings: MTLPixelFormat

Discussion in 'iOS and tvOS' started by Shushustorm, Aug 2, 2022.

  1. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Hey everyone!

    I tried to switch to the iOS build platform on 2020.3 LTS in order to preview different resolutions in the Game view.

    Now I frequently get errors [Edit: warnings] stating there is an issue with the "MTLPixelFormat".

    I assume this has something to do with the image files stored in the project. However, I haven't made any changes to their format. Their format is set to "Automatic" for all platforms. I don't use any platform specific settings to overwrite that either.
    The warnings appear outside of play mode, seemingly when the Editor UI is repainted.
    What could be causing this? In about an hour, this results in 999+ warnings, which makes important warnings go lost.

    Best wishes,
    Shu
     
    Last edited: Aug 2, 2022
  2. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,603
    > What could be causing this? In about an hour, this results in 999+ warnings, which makes important warnings go lost.

    and what are these warnings? how do you expect help without providing any information?
     
  3. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    @Alexey
    Sorry, was on my phone and didn't have access to Unity and thought this may be a known issue due to Automatic settings.
    Here's the whole warning:
    "
    Metal: Shader[Hidden/UIElements/EditorUIE]: Pixel format [MTLPixelFormatRGBA32Float] of texture [UIR Shader info 5] bound at index 0 is incompatible with texture parameter [half_ShaderInfoTex]. Compatible types [float]
    "
     
  4. Alexey

    Alexey

    Unity Technologies

    Joined:
    May 10, 2010
    Posts:
    1,603
    Ok so the root cause is that metal is picky about connecting textures to shader, it checks types quite strictly. If i read this warning correctly it expects float texture, not rgba float (as in - 1 component not 4) but it is impossible to say what is wrong (and no, i didnt see it in the editor myself, so i cant say this is common)
    maybe bug report with repro project
     
    Shushustorm likes this.
  5. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Thanks for the reply! Interesting that this isn't known. Not sure then. I'll file a report.
     
  6. NickVas

    NickVas

    Joined:
    Jul 28, 2017
    Posts:
    9
    I have the same problem. This warning also appears when you switch to Android build.
    Interesting, that these warning appears outside the "Play mode", like you said, and only when you do some action in the editor - like, just moving the mouse cursor around. When you do nothing - no new warnings.

    Running Unity 2021.3.7f1 on Mac - High Sierra 10.13.6
     

    Attached Files:

    gulige001 and Shushustorm like this.
  7. Shushustorm

    Shushustorm

    Joined:
    Jan 6, 2014
    Posts:
    1,084
    Interesting! I'm using High Sierra as well.
    Haven't been able to file a report so far, didn't have a lot of time and deleting Library (slow upload due to file size) gets rid of the issue, since it falls back to Standalone build.