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

Simple Blur - URP

Discussion in 'Assets and Asset Store' started by isleofassets, Sep 6, 2022.

  1. isleofassets

    isleofassets

    Joined:
    Jul 5, 2022
    Posts:
    8
    This asset allows you to blur 3D and 2D scenes to switch the focus of the user's attention to something new, for example, an emerging menu or message.

    Highlighting important interface elements is one of the main tools for improving user perception. Switching attention can be done in different ways from the smooth escape of the buttons over the edges of the screen to darkening the background. These also include the effect of blurring the image. On the one hand, it reduces the contrast of background elements, and it becomes harder for the eye to catch on to it. On the other hand, blurring has a subconscious effect when the image becomes out of focus and we perceive it differently.

    Two types of shaders (LitBlur, UnlitBlur) allow you to use blur for UI, 2D and 3D scenes. Specifically for the UI, a good addition is the ability to mask.
    Features:
    • Easy to use;
    • Customizable;
    • Smooth, high-quality blur effect.

    https://assetstore.unity.com/packages/slug/228567

    cover-img-render0002.jpg
     
  2. macube

    macube

    Joined:
    Jul 16, 2017
    Posts:
    37
    For me, it crashes when i set the material to plane: (Unity 2021.3.15f1)

    Code (CSharp):
    1. Obtained 61 stack frames
    2. 0x00007ff6d8736687 (Unity) ShaderPropertySheet::UpdateTextureInfo
    3. 0x00007ff6d8733b79 (Unity) ShaderPropertySheet::SetTexture
    4. 0x00007ff6d85289d5 (Unity) ShaderScripting::SetGlobalTexture
    5. 0x00007ff6d7bd6935 (Unity) Shader_CUSTOM_SetGlobalTextureImpl
    6. 0x000001f04aeeeb65 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Shader:SetGlobalTextureImpl (int,UnityEngine.Texture)
    7. 0x000001f04ab76013 (Mono JIT Code) UnityEngine.Shader:SetGlobalTexture (int,UnityEngine.Texture)
    8. 0x000001f04ab74df3 (Mono JIT Code) [UniversalRenderPipeline.cs:1260] UnityEngine.Rendering.Universal.UniversalRenderPipeline:SetupPerFrameShaderConstants ()
    9. 0x000001f04ab73333 (Mono JIT Code) [UniversalRenderPipeline.cs:257] UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
    10. 0x000001f04ab72c69 (Mono JIT Code) UnityEngine.Rendering.RenderPipeline:InternalRender (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
    11. 0x000001eee9dcd723 (Mono JIT Code) UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,System.Collections.Generic.List`1<UnityEngine.Camera/RenderRequest>,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle)
    12. 0x000001eee9dcd988 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr_object_AtomicSafetyHandle (object,intptr,intptr,intptr)
    13. 0x00007ffd1b3afeb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    14. 0x00007ffd1b2ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    15. 0x00007ffd1b2ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    16. 0x00007ff6d89e1104 (Unity) scripting_method_invoke
    17. 0x00007ff6d89c09a4 (Unity) ScriptingInvocation::Invoke
    18. 0x00007ff6d860d96f (Unity) ScriptableRenderContext::ExtractAndExecuteRenderPipeline
    19. 0x00007ff6da45e067 (Unity) Camera::ExecuteCustomRenderPipeline
    20. 0x00007ff6da4609d3 (Unity) Camera::RenderEditorCamera
    21. 0x00007ff6da4622f5 (Unity) Camera::RenderEditorCamera
    22. 0x00007ff6d818347f (Unity) Handles_CUSTOM_Internal_DrawCameraWithGrid
    23. 0x000001eee9dcd4a8 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.Handles:Internal_DrawCameraWithGrid (UnityEngine.Camera,UnityEditor.DrawCameraMode,UnityEditor.DrawGridParameters&,bool,bool)
    24. 0x000001eee9daba43 (Mono JIT Code) UnityEditor.Handles:DrawCameraImpl (UnityEngine.Rect,UnityEngine.Camera,UnityEditor.DrawCameraMode,bool,UnityEditor.DrawGridParameters,bool,bool,bool,UnityEngine.GameObject[])
    25. 0x000001eee9dab4c3 (Mono JIT Code) UnityEditor.Handles:DrawCameraStep1 (UnityEngine.Rect,UnityEngine.Camera,UnityEditor.DrawCameraMode,UnityEditor.DrawGridParameters,bool,bool)
    26. 0x000001eee9da8753 (Mono JIT Code) UnityEditor.SceneView:DoDrawCamera (UnityEngine.Rect,UnityEngine.Rect,bool&)
    27. 0x000001eee9d99613 (Mono JIT Code) UnityEditor.SceneView:DoOnGUI ()
    28. 0x000001eee9d988fb (Mono JIT Code) UnityEditor.SceneView:OnSceneGUI ()
    29. 0x000001f04b1da8b7 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
    30. 0x000001f04b1d9acb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
    31. 0x000001f04b1d7683 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:DoIMGUIRepaint ()
    32. 0x000001f04b1d2ee4 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)
    33. 0x000001f04b1d15c3 (Mono JIT Code) UnityEngine.UIElements.UIR.UIRenderDevice:EvaluateChain (UnityEngine.UIElements.UIR.RenderChainCommand,UnityEngine.Material,UnityEngine.Material,UnityEngine.Texture,UnityEngine.Texture,single,Unity.Collections.NativeSlice`1<UnityEngine.UIElements.UIR.Transform3x4>,Unity.Collections.NativeSlice`1<UnityEngine.Vector4>,UnityEngine.MaterialPropertyBlock,bool,System.Exception&)
    34. 0x000001f04b1caf23 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChain:Render ()
    35. 0x000001f04b1ae333 (Mono JIT Code) UnityEngine.UIElements.UIRRepaintUpdater:Update ()
    36. 0x000001f04b1919c6 (Mono JIT Code) UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
    37. 0x000001f04b1918bb (Mono JIT Code) UnityEngine.UIElements.Panel:UpdateForRepaint ()
    38. 0x000001f04b19025b (Mono JIT Code) UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
    39. 0x000001f04b18f78f (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
    40. 0x000001f04b18f4b3 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
    41. 0x000001f04b18f2af (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
    42. 0x000001f04b18f1eb (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
    43. 0x000001f04b18f04d (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
    44. 0x000001f04b18f106 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
    45. 0x00007ffd1b3afeb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    46. 0x00007ffd1b2ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    47. 0x00007ffd1b2ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    48. 0x00007ff6d89e1104 (Unity) scripting_method_invoke
    49. 0x00007ff6d89c09a4 (Unity) ScriptingInvocation::Invoke
    50. 0x00007ff6d89bb5b5 (Unity) ScriptingInvocation::Invoke<void>
    51. 0x00007ff6d8b057da (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
    52. 0x00007ff6d950fbc8 (Unity) GUIView::ProcessRetainedMode
    53. 0x00007ff6d9a606eb (Unity) GUIView::OnInputEvent
    54. 0x00007ff6d950f9da (Unity) GUIView::ProcessInputEvent
    55. 0x00007ff6d9a594fe (Unity) GUIView::DoPaint
    56. 0x00007ff6d9a6278d (Unity) GUIView::RepaintAll
    57. 0x00007ff6d95e21d3 (Unity) Application::TickTimer
    58. 0x00007ff6d9a3619a (Unity) MainMessageLoop
    59. 0x00007ff6d9a3aa5b (Unity) WinMain
    60. 0x00007ff6daddcade (Unity) __scrt_common_main_seh
    61. 0x00007ffd761a7614 (KERNEL32) BaseThreadInitThunk
    62. 0x00007ffd768c26a1 (ntdll) RtlUserThreadStart
    63.  
     
  3. ikeuchi_yuya_unity

    ikeuchi_yuya_unity

    Joined:
    Feb 12, 2022
    Posts:
    2
    Please support URP12.1.7 & 2021.3.7f1
    Add the Blur URP renderer feature to the current renderer,Play the game and it will crash after standing for a certain amount of time.
     
    Unity : 2021.3.7f1
    URP : version 12.1.7 - July 18,2022

         
    Code (CSharp):
    1. Obtained 25 stack frames.
    2.  
    3. #0  0x000001018711a1 in ShaderPropertySheet::UpdateTextureInfo(int, FastTexturePropertyName const&, Texture const*, TextureID)
    4.  
    5. #1  0x00000101723842 in RenderingCommandBuffer::ExecuteCommandBufferWithState(ShaderPassContext&, RenderNodeQueue&, RenderingCommandBufferState*, unsigned int, ComputeQueueType) const
    6.  
    7. #2  0x00000101720a68 in RenderingCommandBuffer::ExecuteCommandBuffer(ShaderPassContext&, RenderNodeQueue&, unsigned int, dynamic_array<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, 0ul>*, ComputeQueueType, RenderTexture*) const
    8.  
    9. #3  0x0000010173d460 in ScriptableRenderContext::ExecuteScriptableRenderLoop()
    10.  
    11. #4  0x000001a9244b33 in  (wrapper managed-to-native) UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal_Injected (UnityEngine.Rendering.ScriptableRenderContext&) [{0x7fbddc4c5b30} + 0x83]  (0x1a9244ab0 0x1a9244bd5) [0x14aac2a80 - Unity Child Domain]
    12.  
    13. #5  0x000001a91f52cb in  UnityEngine.Rendering.Universal.UniversalRenderPipeline:RenderCameraStack (UnityEngine.Rendering.ScriptableRenderContext,UnityEngine.Camera) [{0x7fbdcd9628c0} + 0x13bb] [/Users/yuya.ikeuchi.ts/Wolf-new/Wolf/Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/UniversalRenderPipeline.cs :: 573u] (0x1a91f3f10 0x1a91f6116) [0x14aac2a80 - Unity Child Domain]
    14.  
    15. #6  0x000001a863a623 in  UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>) [{0x7fbddd1358f0} + 0x3c3] [/Users/yuya.ikeuchi.ts/Wolf-new/Wolf/Library/PackageCache/com.unity.render-pipelines.universal@12.1.7/Runtime/UniversalRenderPipeline.cs :: 265u] (0x1a863a260 0x1a863a9da) [0x14aac2a80 - Unity Child Domain]
    16.  
    17. #7  0x000001a8639b9b in  UnityEngine.Rendering.RenderPipeline:InternalRender (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>) [{0x7fbddcc19660} + 0x4b] [/Users/bokken/buildslave/unity/build/Runtime/Export/RenderPipeline/RenderPipeline.cs :: 52u] (0x1a8639b50 0x1a8639c03) [0x14aac2a80 - Unity Child Domain]
    18.  
    19. #8  0x000001a843dbfb in  UnityEngine.Rendering.RenderPipelineManager:DoRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,System.Collections.Generic.List`1<UnityEngine.Camera/RenderRequest>,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle) [{0x7fbdd27622d0} + 0x18b] [/Users/bokken/buildslave/unity/build/Runtime/Export/RenderPipeline/RenderPipelineManager.cs :: 115u] (0x1a843da70 0x1a843dcc1) [0x14aac2a80 - Unity Child Domain]
    20.  
    21. #9  0x000001a843de2f in  (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr_object_AtomicSafetyHandle (object,intptr,intptr,intptr) [{0x7fbddcc197d8} + 0xaf]  (0x1a843dd80 0x1a843def3) [0x14aac2a80 - Unity Child Domain]
    22.  
    23. #10 0x0000015c0abd1c in mono_jit_runtime_invoke
    24.  
    25. #11 0x0000015c26133b in do_runtime_invoke
    26.  
    27. #12 0x0000015c261278 in mono_runtime_invoke
    28.  
    29. #13 0x00000101b9be27 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)
    30.  
    31. #14 0x00000101b96db6 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)
    32.  
    33. #15 0x0000010173e25d in ScriptableRenderContext::ExtractAndExecuteRenderPipeline(dynamic_array<Camera*, 0ul> const&, void (*)(SceneNode const*, AABB const*, IndexList&, SceneCullingParameters const*), void*, ScriptingObjectPtr)
    34.  
    35. #16 0x0000010151299f in RenderManager::RenderCamerasWithScriptableRenderLoop(int)
    36.  
    37. #17 0x00000101512bc9 in RenderManager::RenderCameras(int, void (*)(), void (*)())
    38.  
    39. #18 0x00000102629aca in RepaintController::RenderPlayModeViewCameras(RenderTexture*, int, Vector2f, bool, bool)
    40.  
    41. #19 0x00000102c7381c in EditorGUIUtility::RenderPlayModeViewCamerasInternal(RenderTexture*, int, Vector2f, bool, bool)
    42.  
    43. #20 0x000001012326ae in EditorGUIUtility_CUSTOM_RenderPlayModeViewCamerasInternal_Injected(ScriptingBackendNativeObjectPtrOpaque*, int, Vector2f const&, unsigned char, unsigned char)
    44.  
    45. #21 0x000001a843d60f in  (wrapper managed-to-native) UnityEditor.EditorGUIUtility:RenderPlayModeViewCamerasInternal_Injected (UnityEngine.RenderTexture,int,UnityEngine.Vector2&,bool,bool) [{0x7fbdcba76658} + 0x9f]  (0x1a843d570 0x1a843d6bd) [0x14aac2a80 - Unity Child Domain]
    46.  
    47. #22 0x007fbdda9be0f0 in (Unknown)
    48.  
    49. #23 0x007ff7befdf910 in (Unknown)
    50.  
    51. #24 0x007ff7beff1f10 in (Unknown)
     
    Last edited: Jan 4, 2023
  4. isleofassets

    isleofassets

    Joined:
    Jul 5, 2022
    Posts:
    8
    Hi, I have sent a new version 1.1.5 of the asset for moderation and the problem with the crash may have been solved in it. The update will be available in a couple of days, but if you need it now, write me an email isleofassets@gmail.com
     
  5. ikeuchi_yuya_unity

    ikeuchi_yuya_unity

    Joined:
    Feb 12, 2022
    Posts:
    2
    I got ver1.1.5 and the problem was fixed. Thank you for your support!!
     
    isleofassets likes this.
  6. Danaezio

    Danaezio

    Joined:
    Dec 9, 2018
    Posts:
    1
    Does it work with VR?
     
  7. plan-systems

    plan-systems

    Joined:
    Mar 8, 2020
    Posts:
    43
    Hi @isleofassets, I bought `Fast Mobile Blur - URP`. I'm looking to use a couple quads (not UI rects) with the effect to obscure the background. So far, the effect does the entire screen and adding the `BlurURP` material to a quad isn't working.
     
  8. plan-systems

    plan-systems

    Joined:
    Mar 8, 2020
    Posts:
    43
    @isleofassets, so I bought both `Fast Mobile Blur - URP` and `Simple Blur - URP`.

    Looks like Simple Blur has a major issue -- either that or Unity 2021.3.18 is face planting:

    In the attached image, the game view is on the left, the editor view in the right, and a quad running the Unlit blur shader can be seen as a rect running in the game view. However, instead of blurring out what's behind it's using a feed from the editor camera!?

    If you're going to be selling this thing (specially as multiple products), the appropriate QA could be better. Please fix this asap? Please message or email me if you need help with a repro.
     

    Attached Files:

    Last edited: Feb 14, 2023
  9. isleofassets

    isleofassets

    Joined:
    Jul 5, 2022
    Posts:
    8
    Hi, yes it works in VR
     
  10. isleofassets

    isleofassets

    Joined:
    Jul 5, 2022
    Posts:
    8
    Hi, please send me this project with the scene in the picture by email and I will try to figure out what is wrong. You are the first to write to me with a similar problem, so I can't even guess what caused it.
     
  11. plan-systems

    plan-systems

    Joined:
    Mar 8, 2020
    Posts:
    43
    Apparently I can't make make a repro project, and I can't send you our main project unfortunately.

    I am noticing some things about the code that are not leaving me feel good:
    - constructing strings in loops when they could be done once an stored (GC load)
    - not putting things in descriptive constants (just pasted places)
    - What is the purpose of `Instances`?

    You have my email -- happy to jump on a video call and show you the behavior and we can do a trace together. Prolly knock it in 15 mins. I am so slammed, and this is unfortunately the last thing I have time for unfortunately.
     
  12. plan-systems

    plan-systems

    Joined:
    Mar 8, 2020
    Posts:
    43
    Hi @isleofassets, I was able to reproduce it and emailed you the project.
     
  13. isleofassets

    isleofassets

    Joined:
    Jul 5, 2022
    Posts:
    8
    Hi, you just used the wrong Render Pipeline Asset. I have sent a solution to this problem by email, I hope it will help you.
     
  14. plan-systems

    plan-systems

    Joined:
    Mar 8, 2020
    Posts:
    43
    Switching to your URP settings asset, seeing it go away, and calling it "fixed" isn't very helpful. Instead, it would be helpful to identify what is happening. Do you know what's happening?

    1) If I encountered this in minutes, then it is reasonable that others will as well
    2) It's not reasonable to ask / assume others will use you URP settings asset when theirs is already set up in their project. Please know that most people aren't about to replace their URP settings asset with a vanilla one.

    Can you please identify what is causing the issue? In the repro project I sent you, what about it exactly is not set up properly causing the blur to fail? What about the repro project's URP settings are not set up properly that is causing the issue?
     
    Last edited: Feb 20, 2023
  15. plan-systems

    plan-systems

    Joined:
    Mar 8, 2020
    Posts:
    43
    It appears the issue occurs when render order is set to After Rendering Transparents is ok when set to Before Rendering Transparents. By using your own URP settings asset, you were applying different settings for this and therefore were not seeing the issue.
     
  16. Rachan

    Rachan

    Joined:
    Dec 3, 2012
    Posts:
    682
    it can work with 2D sprite and UI image on canvas and with URP?
     
  17. isleofassets

    isleofassets

    Joined:
    Jul 5, 2022
    Posts:
    8
    Hi, if you still need an answer, then please describe in more detail what you want to do and send me an email isleofassets@gmail.com