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

A multisampled texture being bound to a non-multisampled sampler. Disabling in order to avoid undefi

Discussion in 'Universal Render Pipeline' started by DEEnvironment, Dec 2, 2021.

  1. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436
    Unity 2021.2.4 URP api 10.1.1

    Error
    Code (CSharp):
    1. A multisampled texture being bound to a non-multisampled sampler. Disabling in order to avoid undefined behavior. Please use Texture2DMS in the shader.
    2. UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    Bug report (Case 1385425)

    Reproduce
    -- open new scene (unity default)
    -- select main camera in Hierarchy
    -- error spams 999+++ in Console

    after filing report i found that the error happens when RenderPipelinePostProcessData.asset it set in render path "Deferred"

    Forward seams ok
     
  2. bergolli

    bergolli

    Joined:
    Apr 12, 2014
    Posts:
    3
    I get this error on Unity 2021.2.6f URP ver 12.1.2
    It only occurs if:
    - Rendering path: DEFERRED
    - Decals are added as a rendering feature
    - Decal Technique is Auto or Dbuffer

    Error is not occurring if I set Decal Technique as screen space.
     
    Gravesend likes this.
  3. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436
  4. Shanti_Baba

    Shanti_Baba

    Joined:
    Nov 13, 2018
    Posts:
    12
    also getting this error after upgrading project to 2020.3.22
    im not even using Deferred im using forward renderin....
    and don't know what textures\decals are the culprit
     
  5. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    436

    unity sent me an email that they reproduced the error and opened
    https://issuetracker.unity3d.com/is...rs-appear-when-render-path-is-set-to-deferred

    after a few days they sent this and closed it
    "A multisampled texture being bound to a non-multisampled sampler errors" is already telling you what the error is. The deferred renderer does have MSAA disabled, so any user created textures need to be created with only 1 sample when deferred mode is enabled. If trying to use MSAA'd textures in the deferred pipeline will give this error. To fix it, make sure your textures are created with MSAA = 1 (it should ignore the URP asset MSAA setting).


    at no time did I ever create a texture
    the error can be reproduced in a blank new Unity project with no 3rd party assets added

    the reason for closing is false and i have no idea what texture they are talking about
    any texture create is create by unity on open new project

    i sent a reply to Unity QA who closed the issue tracker asking them to help explain what they are talking about in closure justification statement, and i still have no reply.
     
  6. Shanti_Baba

    Shanti_Baba

    Joined:
    Nov 13, 2018
    Posts:
    12
    I was able to stop seeing this error after changing "Lit shader mode" to "BOTH" in my HDRP asset
    was trying to avoid this because apparently it is not needed.
     
    krakendono likes this.
  7. ManueleB

    ManueleB

    Unity Technologies

    Joined:
    Jul 6, 2020
    Posts:
    98
    Hey DEEnvironment, thanks for reporting the issue!

    I looked into it and the problem with your bug report was that the included project had compiler errors because of some extra packages in it, so the developers sent it back to QA so they could attach a minimal working repro project to the bug.
    So I think there was a misundersanding with the QA department closing it by mistake.

    I have just managed to reproduce the issue in a new project with the steps described in this thread and have a fix for it.
    It will be included in the next 22.2 released and backported to 21.2.

    If you need a temporary workaround, while waiting for the fix, you can replace this line of code in DecalRendererFeature.cs:

    Code (CSharp):
    1. m_CopyDepthPass.MssaSamples = 1;
    with:

    Code (CSharp):
    1. UniversalRenderer ur = (UniversalRenderer) renderer;
    2.  
    3. if (ur.actualRenderingMode != RenderingMode.Deferred)
    4.     m_CopyDepthPass.MssaSamples = 1;
     
    psuong, RogDolos and DEEnvironment like this.