Simple Blur - URP

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.

8420178--1113948--cover-img-render0002.jpg

For me, it crashes when i set the material to plane: (Unity 2021.3.15f1)

Obtained 61 stack frames
0x00007ff6d8736687 (Unity) ShaderPropertySheet::UpdateTextureInfo
0x00007ff6d8733b79 (Unity) ShaderPropertySheet::SetTexture
0x00007ff6d85289d5 (Unity) ShaderScripting::SetGlobalTexture
0x00007ff6d7bd6935 (Unity) Shader_CUSTOM_SetGlobalTextureImpl
0x000001f04aeeeb65 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Shader:SetGlobalTextureImpl (int,UnityEngine.Texture)
0x000001f04ab76013 (Mono JIT Code) UnityEngine.Shader:SetGlobalTexture (int,UnityEngine.Texture)
0x000001f04ab74df3 (Mono JIT Code) [UniversalRenderPipeline.cs:1260] UnityEngine.Rendering.Universal.UniversalRenderPipeline:SetupPerFrameShaderConstants ()
0x000001f04ab73333 (Mono JIT Code) [UniversalRenderPipeline.cs:257] UnityEngine.Rendering.Universal.UniversalRenderPipeline:Render (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
0x000001f04ab72c69 (Mono JIT Code) UnityEngine.Rendering.RenderPipeline:InternalRender (UnityEngine.Rendering.ScriptableRenderContext,System.Collections.Generic.List`1<UnityEngine.Camera>)
0x000001eee9dcd723 (Mono JIT Code) UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_Internal (UnityEngine.Rendering.RenderPipelineAsset,intptr,System.Collections.Generic.List`1<UnityEngine.Camera/RenderRequest>,Unity.Collections.LowLevel.Unsafe.AtomicSafetyHandle)
0x000001eee9dcd988 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr_object_AtomicSafetyHandle (object,intptr,intptr,intptr)
0x00007ffd1b3afeb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ffd1b2ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ffd1b2ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff6d89e1104 (Unity) scripting_method_invoke
0x00007ff6d89c09a4 (Unity) ScriptingInvocation::Invoke
0x00007ff6d860d96f (Unity) ScriptableRenderContext::ExtractAndExecuteRenderPipeline
0x00007ff6da45e067 (Unity) Camera::ExecuteCustomRenderPipeline
0x00007ff6da4609d3 (Unity) Camera::RenderEditorCamera
0x00007ff6da4622f5 (Unity) Camera::RenderEditorCamera
0x00007ff6d818347f (Unity) Handles_CUSTOM_Internal_DrawCameraWithGrid
0x000001eee9dcd4a8 (Mono JIT Code) (wrapper managed-to-native) UnityEditor.Handles:Internal_DrawCameraWithGrid (UnityEngine.Camera,UnityEditor.DrawCameraMode,UnityEditor.DrawGridParameters&,bool,bool)
0x000001eee9daba43 (Mono JIT Code) UnityEditor.Handles:smile:rawCameraImpl (UnityEngine.Rect,UnityEngine.Camera,UnityEditor.DrawCameraMode,bool,UnityEditor.DrawGridParameters,bool,bool,bool,UnityEngine.GameObject[])
0x000001eee9dab4c3 (Mono JIT Code) UnityEditor.Handles:smile:rawCameraStep1 (UnityEngine.Rect,UnityEngine.Camera,UnityEditor.DrawCameraMode,UnityEditor.DrawGridParameters,bool,bool)
0x000001eee9da8753 (Mono JIT Code) UnityEditor.SceneView:smile:oDrawCamera (UnityEngine.Rect,UnityEngine.Rect,bool&)
0x000001eee9d99613 (Mono JIT Code) UnityEditor.SceneView:smile:oOnGUI ()
0x000001eee9d988fb (Mono JIT Code) UnityEditor.SceneView:OnSceneGUI ()
0x000001f04b1da8b7 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:smile:oOnGUI (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,bool,UnityEngine.Rect,System.Action,bool)
0x000001f04b1d9acb (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:HandleIMGUIEvent (UnityEngine.Event,UnityEngine.Matrix4x4,UnityEngine.Rect,System.Action,bool)
0x000001f04b1d7683 (Mono JIT Code) UnityEngine.UIElements.IMGUIContainer:smile:oIMGUIRepaint ()
0x000001f04b1d2ee4 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChainCommand:ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams,single,System.Exception&)
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&)
0x000001f04b1caf23 (Mono JIT Code) UnityEngine.UIElements.UIR.RenderChain:Render ()
0x000001f04b1ae333 (Mono JIT Code) UnityEngine.UIElements.UIRRepaintUpdater:Update ()
0x000001f04b1919c6 (Mono JIT Code) UnityEngine.UIElements.VisualTreeUpdater:UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase)
0x000001f04b1918bb (Mono JIT Code) UnityEngine.UIElements.Panel:UpdateForRepaint ()
0x000001f04b19025b (Mono JIT Code) UnityEngine.UIElements.Panel:Repaint (UnityEngine.Event)
0x000001f04b18f78f (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:smile:oDispatch (UnityEngine.UIElements.BaseVisualElementPanel)
0x000001f04b18f4b3 (Mono JIT Code) UnityEngine.UIElements.UIElementsUtility:UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (int,intptr,bool&)
0x000001f04b18f2af (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration:ProcessEvent (int,intptr)
0x000001f04b18f1eb (Mono JIT Code) UnityEngine.UIElements.UIEventRegistration/<>c:<.cctor>b__1_2 (int,intptr)
0x000001f04b18f04d (Mono JIT Code) UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
0x000001f04b18f106 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_int_intptr_intptr& (object,intptr,intptr,intptr)
0x00007ffd1b3afeb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
0x00007ffd1b2ee764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
0x00007ffd1b2ee8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
0x00007ff6d89e1104 (Unity) scripting_method_invoke
0x00007ff6d89c09a4 (Unity) ScriptingInvocation::Invoke
0x00007ff6d89bb5b5 (Unity) ScriptingInvocation::Invoke<void>
0x00007ff6d8b057da (Unity) Scripting::UnityEngine::GUIUtilityProxy::ProcessEvent
0x00007ff6d950fbc8 (Unity) GUIView::ProcessRetainedMode
0x00007ff6d9a606eb (Unity) GUIView::OnInputEvent
0x00007ff6d950f9da (Unity) GUIView::ProcessInputEvent
0x00007ff6d9a594fe (Unity) GUIView::smile:oPaint
0x00007ff6d9a6278d (Unity) GUIView::RepaintAll
0x00007ff6d95e21d3 (Unity) Application::TickTimer
0x00007ff6d9a3619a (Unity) MainMessageLoop
0x00007ff6d9a3aa5b (Unity) WinMain
0x00007ff6daddcade (Unity) __scrt_common_main_seh
0x00007ffd761a7614 (KERNEL32) BaseThreadInitThunk
0x00007ffd768c26a1 (ntdll) RtlUserThreadStart

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

Obtained 25 stack frames.

#0  0x000001018711a1 in ShaderPropertySheet::UpdateTextureInfo(int, FastTexturePropertyName const&, Texture const*, TextureID)

#1  0x00000101723842 in RenderingCommandBuffer::ExecuteCommandBufferWithState(ShaderPassContext&, RenderNodeQueue&, RenderingCommandBufferState*, unsigned int, ComputeQueueType) const

#2  0x00000101720a68 in RenderingCommandBuffer::ExecuteCommandBuffer(ShaderPassContext&, RenderNodeQueue&, unsigned int, dynamic_array<std::__1::pair<ShaderLab::FastPropertyName, RenderTexture*>, 0ul>*, ComputeQueueType, RenderTexture*) const

#3  0x0000010173d460 in ScriptableRenderContext::ExecuteScriptableRenderLoop()

#4  0x000001a9244b33 in  (wrapper managed-to-native) UnityEngine.Rendering.ScriptableRenderContext:Submit_Internal_Injected (UnityEngine.Rendering.ScriptableRenderContext&) [{0x7fbddc4c5b30} + 0x83]  (0x1a9244ab0 0x1a9244bd5) [0x14aac2a80 - Unity Child Domain]

#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]

#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]

#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]

#8  0x000001a843dbfb in  UnityEngine.Rendering.RenderPipelineManager:smile:oRenderLoop_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]

#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]

#10 0x0000015c0abd1c in mono_jit_runtime_invoke

#11 0x0000015c26133b in do_runtime_invoke

#12 0x0000015c261278 in mono_runtime_invoke

#13 0x00000101b9be27 in scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool)

#14 0x00000101b96db6 in ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool)

#15 0x0000010173e25d in ScriptableRenderContext::ExtractAndExecuteRenderPipeline(dynamic_array<Camera*, 0ul> const&, void (*)(SceneNode const*, AABB const*, IndexList&, SceneCullingParameters const*), void*, ScriptingObjectPtr)

#16 0x0000010151299f in RenderManager::RenderCamerasWithScriptableRenderLoop(int)

#17 0x00000101512bc9 in RenderManager::RenderCameras(int, void (*)(), void (*)())

#18 0x00000102629aca in RepaintController::RenderPlayModeViewCameras(RenderTexture*, int, Vector2f, bool, bool)

#19 0x00000102c7381c in EditorGUIUtility::RenderPlayModeViewCamerasInternal(RenderTexture*, int, Vector2f, bool, bool)

#20 0x000001012326ae in EditorGUIUtility_CUSTOM_RenderPlayModeViewCamerasInternal_Injected(ScriptingBackendNativeObjectPtrOpaque*, int, Vector2f const&, unsigned char, unsigned char)

#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]

#22 0x007fbdda9be0f0 in (Unknown)

#23 0x007ff7befdf910 in (Unknown)

#24 0x007ff7beff1f10 in (Unknown)

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

I got ver1.1.5 and the problem was fixed. Thank you for your support!!

1 Like

Does it work with VR?

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.

@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.

Hi, yes it works in VR

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.

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.

Hi @isleofassets , I was able to reproduce it and emailed you the project.

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.

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?

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.

it can work with 2D sprite and UI image on canvas and with URP?

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