Search Unity

[Worker0] Trying to get RenderBuffer with invalid antiAliasing (must be at least 1)

Discussion in 'Editor & General Support' started by DEEnvironment, Nov 24, 2021.

  1. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    Unity URP api 12.1.1 2021.2.3

    i also found a few old threads from 2018 about this subject
    seams it may have returned in 2021.2.3

    this error happen when i was exporting a few new prefabs for the new 12x URP Decal Projector into a packed .unitypackage file

    Code (CSharp):
    1. [Worker0] Trying to get RenderBuffer with invalid antiAliasing (must be at least 1)
    also may be related ?
    Code (CSharp):
    1. [Worker0] Attempting to get Camera relative temporary RenderTexture (width || height <= 0) via a CommandBuffer  in a Sriptable Render Pipeline.
    2.  
    any idea what this was ?
     
  2. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    Same here. This appeared after migration from 2021.2.5f1 to 2021.2.7f1
     
    mediangame likes this.
  3. deXter_47

    deXter_47

    Joined:
    Jun 21, 2020
    Posts:
    2
    Happening for me too. Does anyone have a solution for this ?
     
    mediangame likes this.
  4. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    I saw that someone advice to remove URP profiles and create new one, but I didn't try it on my end
     
    gonzalezdiego likes this.
  5. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    only going form 2021.2.5f1 to 2021.2.7f1 is not a big leap
    its possible your api was 12.1.1 and you may have move up into 12.1.2
    Unity has been continually flushing out small bugs and it is always a good idea to make a fresh camera / Dir light / and profiles when moving up into a higher api versions .. also consider cleaning out unity catch files and let it regenerate

    -- RenderPipelineAsset
    -- RenderPipelineLightLayers
    -- RenderPipelinePostProcessData

    i am not saying this is the problem however it is good practice to clean out any lingering catch data
     
  6. fendercodes

    fendercodes

    Joined:
    Feb 4, 2019
    Posts:
    192
    I'm also getting this.

    I suppose it's worth noting that I use Enviro and Opsive UFPS - both which provide some URP renderer feaures, just in case anyone else is also using those.
     
  7. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    if you can reproduce this, please can you send a bug report
    i have not been able to produce it again
     
  8. spawnpointgaming

    spawnpointgaming

    Joined:
    Feb 5, 2019
    Posts:
    16
    I am getting this error while using the latest URP renderer from Gaia Pro 2021 asset.

    Did anyone have any solution as how to fix such errors ?
     
  9. Tycho

    Tycho

    Joined:
    Nov 24, 2012
    Posts:
    205
    I'm seeing the same errors in the editor after upgrading a URP project from 2021.1.12f1 to 2021.2.7f1.

    upload_2022-1-14_11-54-32.png

    They seem to consistently appear:
    • When I enter play mode while having a prefab selected in the project window
    • After exiting play mode and then selecting a prefab in the project window
     
  10. Vaupell

    Vaupell

    Joined:
    Dec 2, 2013
    Posts:
    302
    2021.2.8f1 URP, found it only using Vegetitation studio trying to place vegetation.
    upload_2022-1-22_13-58-37.png

    Also at and after runtime (it never stops) stack and leak errors. But this i find across multiple assets using any sort of URP..
    upload_2022-1-22_13-58-6.png
     
    DEEnvironment likes this.
  11. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    I get this too (URP - Unity 2021.2.7f1)

    [Worker2] Trying to get RenderBuffer with invalid antiAliasing (must be at least 1)
     
  12. Nordjk

    Nordjk

    Joined:
    Aug 3, 2020
    Posts:
    3
    Same error. Has anyone managed to fix it?

    Code (CSharp):
    1. Trying to get RenderBuffer with invalid antiAliasing (must be at least 1)
    2. UnityEngine.StackTraceUtility:ExtractStackTrace ()
    3. UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal ()
    4. UnityEngine.Rendering.ScriptableRenderContext:Submit ()
    5. UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Rendering.Universal.CameraData,bool) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/Runtime/UniversalRenderPipeline.cs:430)
    6. UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderSingleCamera (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/Runtime/UniversalRenderPipeline.cs:323)
    7. UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>) (at Library/PackageCache/com.unity.render-pipelines.universal@12.1.2/Runtime/UniversalRenderPipeline.cs:278)
    8. UnityEngine.Rendering.RenderPipeline:InternalRender (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
    9. UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,System.Collections.Generic.List`1<UnityEngine.Camera/RenderRequest>,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle)
    10. UnityEditor.PreviewRenderUtility:Render (bool,bool)
    11. UnityEditor.GameObjectInspector:DoRenderPreview ()
    12. UnityEditor.GameObjectInspector:RenderStaticPreview (string,UnityEngine.Object[],int,int)
    13. UnityEditor.AssetPreviewUpdater:CreatePreview (UnityEngine.Object,UnityEngine.Object[],string,int,int)
    14. UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset (UnityEngine.Object,UnityEngine.Object[],string)
    15.  
    16. [C:\buildslave\unity\build\Runtime\Graphics\RenderBufferManager.cpp line 180]
     
  13. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    I noticed I haven't had that in a few days, think it was because I deleted the Library folder and re-imported the project.
     
  14. SniperED007

    SniperED007

    Joined:
    Sep 29, 2013
    Posts:
    345
    I'm getting it again. (Unity 2021.2.10f1)
    upload_2022-2-7_15-49-50.png
     
  15. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    437
    i mostly find this error when exporting files with materials in it into .unity compressed files
     
  16. Skymorphis

    Skymorphis

    Joined:
    May 4, 2017
    Posts:
    17
    I'm also getting the same thing after upgrading from 2020 to 2021 Workers.png
     
  17. IliqNikushev

    IliqNikushev

    Joined:
    Feb 1, 2017
    Posts:
    23
    Just got this when added script define
    ENABLE_HYBRID_RENDERER_V2

    ran the scene

    Then i just re-ran it and everything was fine
     
  18. Glitshy

    Glitshy

    Joined:
    May 26, 2018
    Posts:
    15
    I get this as well, seems to be when I'm working with a Shader using the Scene Color node. Might just be coincidience though.

    upload_2022-2-13_11-51-15.png

    I'm on Unity 2021.2.11f1
     
  19. webik150

    webik150

    Joined:
    Mar 23, 2013
    Posts:
    62
    I have the same problem in 2021.2.13f.
    I am also working with a Shader with a Scene color node.
     
  20. Crawdad

    Crawdad

    Joined:
    Nov 23, 2016
    Posts:
    174
    I have the exact same issue.
     
  21. kugimasa

    kugimasa

    Joined:
    Dec 9, 2019
    Posts:
    1
    I have the same issue too.
    I upgraded the Unity version from 2020.3.21f1 to 2021.2.11f1.
    Also some of the materials turned pink and the shader type turned to Hidden/InternalErrorShader at first.
    After reimporting my materials the pink was gone and the shader type returned to what it was, but I still had the error.
    upload_2022-3-12_22-50-27.png
     
  22. PIKACHURR0

    PIKACHURR0

    Joined:
    Sep 17, 2021
    Posts:
    1
    i also have the same issue upload_2022-3-12_15-26-46.png
     
  23. Tomas_Moesgaard

    Tomas_Moesgaard

    Joined:
    May 26, 2020
    Posts:
    2
    I got rid of these errors when I changed a shader using the Opaque/Color texture.
    Instead of accessing it directly via:
    TEXTURE2D_X(_CameraOpaqueTexture);
    SAMPLER(sampler_CameraOpaqueTexture);
    I switched over to using the include:
    #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl"

    Haven't seen the errors since. Hope this helps somebody.
     
    DEEnvironment likes this.
  24. ElliotB

    ElliotB

    Joined:
    Aug 11, 2013
    Posts:
    289
    Do you still sample the texture the same way as before? From GitHub, the include just defines the sampler/texture as :
    Code (csharp):
    1.  
    2. TEXTURE2D_X(_CameraOpaqueTexture);
    3. SAMPLER(sampler_CameraOpaqueTexture);
    4.  
    5. float3 SampleSceneColor(float2 uv)
    6. {
    7. return SAMPLE_TEXTURE2D_X(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, UnityStereoTransformScreenSpaceTex(uv)).rgb;
    8. }
    9.  
    but I can't see anything different in this to the way you defined it beforehand. It also defines the following statement:
    Code (csharp):
    1.  
    2. #define UNITY_DECLARE_OPAQUE_TEXTURE_INCLUDED
    3.  
    but I can't see anywhere else in the graphics github repo where that statement is referenced, so I don't think that could fix it.
     
  25. S_P_L_E_E_N

    S_P_L_E_E_N

    Joined:
    Jan 24, 2016
    Posts:
    1
    I get the same problem when using the Opaque Texture in a Renderer Feature with a custom hlsl shader..
     
  26. Blepius

    Blepius

    Joined:
    Mar 9, 2021
    Posts:
    68
    I've encountered this when using the following two assets: Poseidon, Brute Force Grass Shader.
     
    Last edited: Apr 29, 2022
  27. charlesvien

    charlesvien

    Joined:
    Oct 23, 2018
    Posts:
    1
    I've just been getting this error recently, just added the Volumetric Fog Bundle from Kronnect, so just wanted to add it to the list. Someone earlier said they noticed the error when an open prefab was in the inspector when they press play, that's the same for mine too.
     
  28. Cranium-Software-Limited

    Cranium-Software-Limited

    Joined:
    Apr 12, 2017
    Posts:
    5
    there is also a bug, since there is zero perceptible fallout from this, it should be a warning, not an error.
     
  29. Cranium-Software-Limited

    Cranium-Software-Limited

    Joined:
    Apr 12, 2017
    Posts:
    5
    ... also the typo in the error message.

    ALSO can someone just fix both of these instead of logging a bug or writing a reply? both are a huge waste of time compared to the work required for those fixes.
     
  30. soleron

    soleron

    Joined:
    Apr 21, 2013
    Posts:
    584
    Also happens in 2021.3.0f1 with URP 12.1.6
    I deleted all the old URP related files and created new. No difference.

    Enabling and Disabling the "Opaque Texture" in the URP settings seems to have removed the "errors".

    If these are a non-issue and can be ignored, Unity should reduce them to warnings.

    upload_2022-5-1_13-26-18.png
     
    Last edited: May 1, 2022
  31. plyr4

    plyr4

    Joined:
    Jan 4, 2017
    Posts:
    2
    same 3 errors happening in 2021.3.1f1 after upgrading from 2020.3.32f1.
    entering/exiting play mode with any prefab or material selected would trigger the error stack.

    for what its worth, reimporting all assets seems to have cleared the problem for me (for now).
    (reimporting only my in-scene prefabs and materials didnt work)

    but be warned, doing a reimport could make problems much worse (missing inspector references and overwritten assets, for example) but for my simple project it solved the issue.

    if you decide to reimport, at least make some sort of backup first.
     
  32. plyr4

    plyr4

    Joined:
    Jan 4, 2017
    Posts:
    2
    scratch that, reimporting solved the issue for a few hours but the moment I selected a prefab that was missing a script (one that I had recently deleted from my project) it started throwing the errors again.

    removing the invalid reference by deleting the script from the prefab resolved the console errors (for now).
    they do seem correlated with script/shader/material references being out of whack after the upgrade.
     
  33. FamousJoshua

    FamousJoshua

    Joined:
    Feb 20, 2016
    Posts:
    11
    I had this error for a while and after much trial and error and soul searching (and this forum thread) I discovered it was related to materials that used an outdated shader. Like soleran says I'm pretty sure its related to the opaque texture setting somehow. I isolated and removed materials using that and it went away but then it came back. I discovered that not only do you need to fix/remove the offending materials but any PRESETS you have that used the broken shader will trigger it as well. So I had to fix or delete those as well. Just putting this out there in case it helps someone.
     
  34. FamousJoshua

    FamousJoshua

    Joined:
    Feb 20, 2016
    Posts:
    11
    Aaaaand I spoke too soon. The error has returned and I can't find anything in my project still using the deprecated shader. So there must be something else. It's an editor only error and it only occurs when clicking something (anything?) in the project window. I had thought it was the thumbnails triggering it somehow. Sometimes it comes in the pair with the "[Worker0] Attempting to get Camera relative temporary RenderTexture (width || height <= 0) via a CommandBuffer in a Sriptable Render Pipeline." error but not always.
     
  35. ExtraCat

    ExtraCat

    Joined:
    Aug 30, 2019
    Posts:
    52
    I was getting this error even when selecting objects with spriterenderers using default material, ie almost all the time. Reimporting did not fix it.
    It was irritating enough to go back to 2020 version.
     
  36. VisualDima

    VisualDima

    Joined:
    May 21, 2020
    Posts:
    19
    Same errors. After upgrading from 2020 LTS to 2021 LTS.
     
  37. Ultroman

    Ultroman

    Joined:
    Mar 10, 2014
    Posts:
    110
    Adding to the choir. We're on 2021 LTS and this error comes up every time I save changes to a prefab.

    I found a fix for another issue that might be tangential, because it comes from the same Worker0 at the same time (immediately preceding the errors mentioned in the OP). This other error had to do with the icons for scripts/components. Setting them to None instead of one of the built-in icons removed that particular error, but we're left with the ones in OP.
     
    Last edited: Jun 4, 2022
  38. AndrewCzarnietzki

    AndrewCzarnietzki

    Joined:
    Jul 23, 2013
    Posts:
    189
    One more bump, its on any use having an object thumbnail via Odin. First time thumbnail appears its a little cube icon and then we get two instances of the error:

    [Worker0] Trying to get RenderBuffer with invalid antiAliasing (must be at least 1)

    Apparently harmless, but distressing to the team and would be nice to eliminate the console clutter.
     
  39. JGameMaker92

    JGameMaker92

    Joined:
    Oct 15, 2014
    Posts:
    96
    Bump. It's giving me this same error and it's not telling me how to fix it or what it's referencing. Not very helpful.
     
  40. KazooCar69

    KazooCar69

    Joined:
    Apr 4, 2013
    Posts:
    2
    Same issues here.
     
  41. FamousJoshua

    FamousJoshua

    Joined:
    Feb 20, 2016
    Posts:
    11
    Updating to version 2021.3.4f fixed the problem for me. It's been a week or two and I haven't had the error at all since.
     
    nik_nikita likes this.
  42. yonatanab1

    yonatanab1

    Joined:
    Sep 9, 2018
    Posts:
    56
    Enabling and Disabling Opaque Texture fixed it for me.
    Just make sure it's on the selected URP Asset file which you can find in project settings -> graphics -> urp asset.

    Thank you!
     
  43. DriftsandGames12

    DriftsandGames12

    Joined:
    Jul 30, 2019
    Posts:
    4
    I figured it out, so basically there is post processing put on an empty game object, that would be v1, when you download post-processing from the package manager its technically v2 not the entirety of post-processing ie., you dont have to have it downloaded to actually have post-processing, its just an "upgraded" version, you can only have one or the other not both and thats why the anti-aliasing values clash and you get that error
     
    DEEnvironment likes this.
  44. yonatanab1

    yonatanab1

    Joined:
    Sep 9, 2018
    Posts:
    56
    do we just need to disable these in the project settings or actually uninstall one of them in the package manager?
    I can't find anything in my project that uses the first one, and only the second one is installed (unless the first one comes with the urp asset)
     
  45. scuko-chaos

    scuko-chaos

    Joined:
    Feb 7, 2018
    Posts:
    1
    i had the same problem.

    i changed the MainCamera's Anti-aliasing settings from "No" to "FXAA" (Main Camera -> Rendering -> Anti-aliasing) and these errors are gone.

    Unity 2021.3.3f1
    URP 12.1.6
     
  46. mat108

    mat108

    Joined:
    Aug 24, 2018
    Posts:
    133
    It's not possible to use Unity anymore at all without being constantly bombarded with bullshit errors in the console, is it.

    Upgraded my project from 2020 to 2021 hoping this would fix it and it's worse. I get the old bullshit error more frequently and I now get some new bullshit errors for free to go along.