Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Resolved "A non-multisampled texture..." spams the Console

Discussion in '2021.2 Beta' started by RunninglVlan, Jul 20, 2021.

  1. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    I don't know if it's a bug, but I don't know what to do with it.
    After updating from 0b1 to either 0b2 or 0b3 or 0b4 I get this Error in the Console:
    I guess it's related to URP which we're using, but I'm not sure.
    Everything is OK in 2021.2.0b1.
    The moment I add Camera to new Scene it starts spamming.
    I also tried deleting Library folder.

    P.S.: I tried creating new project in 0b4 to test if it shows up there too, but couldn't:
     
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @RunninglVlan,

    Could you please submit a bug report with the project attached that breaks when upgraded past b1?

    Which version of the Hub are you using? Does the error still occur after shutting down the Hub completely and restarting it?
     
  3. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    I was using Hub v3 Beta. Downgrading to v2 solved template issue.
    I reproduced the problem and reported the bug by using manifest.json from actual project and URP asset settings from it.
    Looks like it's related to Quality Anti Aliasing (MSAA) setting - the error appears when it's enabled.
     
    LeonhardP likes this.
  4. SevenPointRed

    SevenPointRed

    Joined:
    Feb 3, 2016
    Posts:
    218
    Just to let you know I've had this bug as well, I spoke to someone from support about it briefly. The exact same things happens to me b3 and b4 both suffer from it. URP. Turning off all AA fixes it.
     
  5. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Thanks for the report @RunninglVlan. Could you please share the issue ID of your report here? That makes it easier to follow up on it.
     
  6. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    It's 1352005
     
    LeonhardP likes this.
  7. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    Hi @LeonhardP. We just hit that same bug with 2021.2.0b6 and I was wondering if it has been confirmed as a bug by your team? Can we already track it in issuetracker.unity3d.com?
     
  8. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136
    Hi @oobartez, not yet. The case is still being looked into. So far we weren't able to reproduce the behaviour.
     
  9. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    @LeonhardP We were able to get rid of the error by changing Depth Priming Mode to Forced. If I understand it correctly, it is not a problem if our shaders use depth data anyway - am I right? Does that option incur any performance overhead?

    This is on Unity 2021.2.0b6.
     
  10. NicoLeyman

    NicoLeyman

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    33
    Hmmm, I'll take a look at the bug in case Depth Priming caused something to regress even when it's disabled.
    Forcing Depth Priming shouldn't cause much performance overhead. It should cost you 0.x % CPU time (and some extra GPU memory in case of MSAA) in exchange for gaining 7-16% GPU time. Your shaders will need a depth and depthnormals pass.
    Still, if something regressed when Depth Priming is disabled that shouldn't happen and needs a fix.
     
    oobartez likes this.
  11. NicoLeyman

    NicoLeyman

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    33
    No luck trying to reproduce it using the attached project. Tried on 2021.2.0b6 and our dev branch both with SRP v12. :(
    Even after playing with MSAA and Depth Priming settings I couldn't trigger it.
    I saw that QA so far wasn't able to reproduce it yet either.

    If you're ok using Depth Priming performance wise be aware that it currently still has a limitation regarding 3D Text rendering. UI Text rendering seems to be fine. We're still working on straightening this out. (seems to be mostly some tweaks to the default 3D Text shader needed)
     
  12. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    Last edited: Aug 12, 2021
  13. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    @NicoLeyman So we're still trying to isolate a repro but in the meantime I noticed that on macOS I get one more warning every frame, in addition to the original error.
    Perhaps that warning holds a clue as to what is causing the error? It specifically points at the Universal Render Pipeline/CopyDepth shader.
     
  14. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    @NicoLeyman I was able to create a minimal repro project with only a Camera and a Cube. I have submitted a bug report with the project, case #1357776.
     
  15. NicoLeyman

    NicoLeyman

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    33
    Managed to reproduce it with this new repro project. Looks like it's a bug that we've encountered in one of our test projects. The fix is available on a separate branch but it should be able to land soon.
    I'll see about poking some people to get it landed. If you're curious you can check out https://github.com/Unity-Technologies/Graphics/pull/5039 in the meanwhile.
     
    oobartez likes this.
  16. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    Thank you!
     
  17. NicoLeyman

    NicoLeyman

    Unity Technologies

    Joined:
    Jun 18, 2019
    Posts:
    33
    People have been sufficiently poked and the fix just got merged into the master branch of the Graphics repo.
    So next package release the bug should be gone.
     
    adamgolden and oobartez like this.
  18. oobartez

    oobartez

    Joined:
    Oct 12, 2016
    Posts:
    167
    That's great, thank you!
     
  19. RunninglVlan

    RunninglVlan

    Joined:
    Nov 6, 2018
    Posts:
    182
    Confirming, can't reproduce this bug in b15
     
    LeonhardP likes this.
  20. baohua581

    baohua581

    Joined:
    Sep 17, 2014
    Posts:
    2
    @NicoLeyman Excuse me, I added another camera to the scene,The same error was reported,My version is 2021.3.3,What do I do,help me please
     
  21. yunsong97

    yunsong97

    Joined:
    Jun 23, 2022
    Posts:
    2
    @NicoLeyman The same error was reported too when I use the virtual texture function,My version is 2021.3.1f1 on windows 10.
    When I close the MSAA, the error is gone.
    Could you check the problem in this environment?
    Thanks
     
  22. yunsong97

    yunsong97

    Joined:
    Jun 23, 2022
    Posts:
    2
    @NicoLeyman
    The environment detail:
    In a urp project, open Virtual Texture(VT) in project settings, and create a VT shader through ShaderGraph, then create a vt material and put the material on a gameobject of the scene, at last play the game.
     
  23. lemapp

    lemapp

    Joined:
    Mar 30, 2020
    Posts:
    34
    This is marked as resolved several months ago, yet I'm seeing the error today.
    MacM1, 2021.3.10f1
    I installed UniStorm 5.2.0 ( did the URP file overwrite)

    My console overflows like it is trying to capture a firehose *:
    "Metal: Shader[Hidden/Universal Render Pipeline/CopyDepth]: Incompatible texture type [MTLTextureType2D] of texture [UnityDefault2D] bound at index 0, expected [MTLTextureType2DMultisample]"

    I understand Metal is a reference to the graphic engine used by AppleM1 (I'm an Apple Developer as well.) I only have two years experience with Unity, but I get that the error reports a shader is receiving a texture from a material at position Index 0. That this texture is in an incorrect format. The error message is clear except it fails to report which material/ texture it is complaining about. I would appreciate any assistance in correcting this issue. Thanks.

    * indicating that this is occurring multiple times per frame.
     
  24. sebj

    sebj

    Joined:
    Dec 4, 2013
    Posts:
    70
    The error is occuring in 2021.3.3f1 when building to the Quest 2 -
    OpenGLES3,
    Empty scene with the OVRCameraRig,
    URP with Depth Priming Mode set to Forced.

    Setting Depth Priming Mode to Disabled, and the error does not occur.

    This is not a workaround for us, because we need the depth texture for a renderer feature.

    Alternatively, turn off MSAA in the URP Asset.

    (It is not our feature causing the problem - the feature is removed in the above test).
     
    Last edited: May 26, 2023
  25. spajus

    spajus

    Joined:
    Jun 10, 2015
    Posts:
    47
    This error is still not fixed. One thing that could be helpful for everyone is to include more information into the error message itself, for example, which shader and which texture is causing it.
     
    paladim likes this.