Blur / Frosted Glass in the Unity Universal Render Pipeline (URP) for Free!

Поделиться
HTML-код
  • Опубликовано: 25 янв 2025

Комментарии • 97

  • @unscriptedlogicgames
    @unscriptedlogicgames 4 года назад +6

    I'm confused on how you do not have more than a thousand subs but here's million thanks Tom!

    • @TomChapman
      @TomChapman  4 года назад +1

      Thank you! I'm glad its helped at least some people!

  • @degeneraturat
    @degeneraturat 4 года назад +7

    Wow, finally blur for URP that works :) Thank You.

  • @finleyoderso3654
    @finleyoderso3654 3 года назад +15

    The shader breaks when you have post-processing and want blur to be applied thereafter.

    • @Rammbriel
      @Rammbriel 8 месяцев назад

      I found the issue myself. Any better options for doing blur?

  • @Officialjadenwilliams
    @Officialjadenwilliams 2 года назад +1

    Great tutorial!

  • @Skaski107
    @Skaski107 2 года назад

    It looks so much better with the blur effect, thank you very much!

  • @benjamingerd4703
    @benjamingerd4703 Год назад +6

    Doesn't work for me. I followed the video, but when I add the Kawase Blur to the Renderer Features, the console starts to continuously log the following error:
    You can only call cameraColorTarget inside the scope of a ScriptableRenderPass. Otherwise the pipeline camera target texture might have not been created or might have already been disposed.
    UnityEngine.Rendering.Universal.ScriptableRenderer:get_cameraColorTarget ()
    KawaseBlur:AddRenderPasses (UnityEngine.Rendering.Universal.ScriptableRenderer,UnityEngine.Rendering.Universal.RenderingData&) (at Assets/KawaseBlur/KawaseBlur.cs:126)
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:189)
    Unity 2022.2.1f1
    Kawase Blur Package 1.2

    • @fv4202x
      @fv4202x Год назад +2

      I know how to solve error but when you do blur doesnt work at all. I'm still giving the code maybe someone will find a solution
      replace
      public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
      {
      var src = renderer.cameraColorTarget;
      scriptablePass.Setup(src);
      renderer.EnqueuePass(scriptablePass);
      }
      to
      public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
      {
      }
      public override void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData renderingData)
      {
      var src = renderer.cameraColorTarget;
      scriptablePass.Setup(src);
      renderer.EnqueuePass(scriptablePass);
      }

    • @Spine500
      @Spine500 11 месяцев назад +2

      @@fv4202x It works if you change it like this
      public override void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData renderingData)
      {
      scriptablePass.Setup(renderer.cameraColorTargetHandle);
      }
      public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
      {
      renderer.EnqueuePass(scriptablePass);
      }

    • @ksmani0
      @ksmani0 7 месяцев назад +1

      @@Spine500 You saved my life. Thank you so much...!

  • @qrk7240
    @qrk7240 2 года назад +2

    I was having the problem of the blur being upside down when using camera stacking. The solution is to copy any of the shader-graphs and put a One-Minus between the the screen positon and sample texture nodes to invert the source again.

  • @MH_Create
    @MH_Create 2 года назад +1

    How to Blur Ui Image on another ui image in urp?

  • @tamasorvos8882
    @tamasorvos8882 3 года назад

    Straight to the point, clear and easy to follow tutorial. Thanks man!

  • @HijackHornet
    @HijackHornet 3 года назад +3

    Well i cant make in work with URP 2021 :/ It will just be grey

  • @fv4202x
    @fv4202x Год назад +3

    Looks like there is still no solution for 2022 lts

  • @FireRex75
    @FireRex75 3 года назад +2

    Thank you very much - this effect is just AMAZING! I've been looking for something like this, available in URP, for a loong time until now. Especially the ability to make multiple blur passes and downsampling.

    • @Typtick
      @Typtick 3 года назад

      I don't have the Kawase Blur option tho

  • @xerc1
    @xerc1 3 года назад +5

    Hey Tom! Very useful and beautiful blur! Unfortunately when I'm using it on the Quest 2 in Multiview Mode, I only get a gray image. Any idea what could be causing this? I'm having similar problems with a blur I got from the asset store (Rufat's Fast Mobile Blur) so I'm wondering if this is a Problem specific to VR and Multiview. Very Thankful for any suggestions on this! Cheers!

  • @arihantparsoya
    @arihantparsoya 4 года назад +5

    This works with canvas Render Mode to : Screen Space Overlay also when I tested in locally

    • @TomChapman
      @TomChapman  4 года назад

      They may've changed something since I made the tutorial then! That's good to hear

    • @GhettoRay1
      @GhettoRay1 3 года назад

      How did u get it to work? Help

    • @Gav2965
      @Gav2965 2 года назад

      I'm also interested in this

  • @thymajesty8080
    @thymajesty8080 2 года назад +1

    Thanks! Is there a way to make it blur the ui elements as well?

  • @conveyorXgames9999
    @conveyorXgames9999 3 месяца назад

    Ok man i am asking it says this code is copyrighted on the git page you linked, i am looking to use in my commercial project? I don't want any copyright claims after this!?

  • @walterwhite42068
    @walterwhite42068 3 года назад +1

    I tried this out and it worked great. However it does not work if post processing is used. If i desaturate using the post processing effect, the scene does become black and white but the UI image still shows colored blur, even if rendering pass is set to either before or after post processing. Is there a fix for this?

  • @Maskedmous
    @Maskedmous 3 года назад +1

    I'm wondering if this could be made single-pass & XR compatible. I'm no shader / renderer wizzard to do this.
    In Unity 2020.1 it kind of flickers when hovering over things in the inspector.
    The effect is great, just incompatible with single-pass XR

  • @Havie
    @Havie Год назад

    Anyone have a solution to work with Screen Space Overlay instead of Camera?😓

  • @Rew1209
    @Rew1209 3 года назад

    any idea why it keep saying material was not upgraded

  • @deuttai
    @deuttai 2 года назад

    Thank you ! very nice effect !

  • @abrasivetoast7420
    @abrasivetoast7420 4 года назад +2

    Does this work with 2D topdown games? I think I followed your instructions exactly but the "blur" image that I added on the Canvas to be behind the background image doesn't seem to do anything. I may be doing something wrong.
    EDIT: Doesn't seem to work for 2D renderer :(

    • @TomChapman
      @TomChapman  4 года назад

      Yeah I haven't actually tried it with 2D, but they may add support for it in the future.

  • @earthling864
    @earthling864 3 года назад +1

    Nice work! Does it affect mobile performance?

  • @thomasrisestudio7194
    @thomasrisestudio7194 Год назад

    It didn't work for me, because I'm using it in an AI, and behind it there's a background UI image and it doesn't show that background, but shows the scene below directly, ignoring the UI image behind it. =/

  • @fv4202x
    @fv4202x 2 года назад

    Why you say it doesnt blur at the end

  • @hardworkerstudio
    @hardworkerstudio Год назад

    It can use in old mobile devices?

  • @GangstaGeekArt
    @GangstaGeekArt 4 года назад

    I was wondering this Scriptable Render Feature can have a layer mask?

  • @vipultyagi7389
    @vipultyagi7389 4 года назад +2

    How to blur ui with rounded corners?

    • @TomChapman
      @TomChapman  4 года назад +2

      I've just updated the GitHub repo with a new release (v1.2) allowing for this. There are instructions at the bottom of the readme! 👍

    • @vipultyagi7389
      @vipultyagi7389 4 года назад +1

      @@TomChapman 😄 thanks again

  • @sadiqabbaszade4789
    @sadiqabbaszade4789 4 года назад +2

    This is amazing! Thanks! Do you plan to make UI elements blur other UI elements too in the future?

    • @TomChapman
      @TomChapman  4 года назад +2

      Thank you! The current method doesn't allow the blurring of other UI elements, however in a future URP update there's no reason why this couldn't be possible and I'll try to implement it!

  • @superpolice049
    @superpolice049 3 года назад

    I’m having some trouble, the unlit blur material is pink and when I try to assign it to my UI element, it just makes it disappear. I made sure to upgrade the materials already. Help ??

    • @superpolice049
      @superpolice049 3 года назад

      When I tried “litBlur” it successfully worked, so I think there’s something wrong with “unlitBlur”

  • @HunterD006
    @HunterD006 2 года назад

    Is there a way to apply this blur effect so it affects other shader?

  • @Jericho_oO
    @Jericho_oO 2 года назад

    nope does not works for me. After assigning material to UI image it gets black.

  • @pixelb0i255
    @pixelb0i255 2 года назад

    Very helpful! Thanks

  • @reaeul
    @reaeul 3 года назад

    Hi! Thanks very much! Your shader was a great help to my project. However, I also need blur effect on transparent material. Which one can I change?

  • @politicallyincorrectcamden6972
    @politicallyincorrectcamden6972 2 года назад +2

    seems to not work in 2021 versions but works fine in 2020.3

  • @rimoldi98
    @rimoldi98 4 года назад +1

    Does it work with sprite renderers?

    • @TomChapman
      @TomChapman  4 года назад

      Unfortunately, I haven't tested this method with any 2D components so I couldn't say if it does

  • @fv4202x
    @fv4202x 2 года назад +2

    I FOUND SOLUTION
    tags for ctrl+f users: "black" "gray" "not working" "doesnt work"
    On your canvas set plane distance to 1 or smaller value but not 0
    Edit: It also should be bigger than your camera's near render distance value thing (default was 0.03). Because its rendered in front of camera

  • @RogDolos
    @RogDolos 3 года назад

    Breaks for me in URP 12 (Unity 2021.2b1), where the blur is upside-down in world-space.
    Was working great for me in 2021.1. Might be a quirk Unity sorts out before 2021.2 gets release tho?

    • @RogDolos
      @RogDolos 3 года назад

      I noticed it's not upside-down / inverted on your demo project... and I found the difference: I'm using URP's camera stacking (if I stop stacking, blur is upright again). This did work in URP 11 but not URP 12. Very odd quirk.

    • @muhamedbecirovic5590
      @muhamedbecirovic5590 3 года назад

      @@RogDolos For me it works in URP 12, but because of post-processing, I wanna use camera stacking, but it doesn't work, overlay option is greyed out...

  • @lavart7043
    @lavart7043 3 года назад

    Thank you but I couldnt make it work in Unity 2021.19 and 2021.28. Valve VR, Universal RP 11.0 Installed

  • @dandan-mf4sr
    @dandan-mf4sr 4 года назад

    what if i want to blur by different shapes, not just square??

    • @dandan-mf4sr
      @dandan-mf4sr 4 года назад

      alright, i got it. that so great. thx for that.

    • @cassiovega976
      @cassiovega976 4 года назад

      @@dandan-mf4sr How did you figure it out? I'm currently running into the same issue

    • @dandan-mf4sr
      @dandan-mf4sr 4 года назад +1

      @@cassiovega976 there is an option call: image type, and down blew check mark "use sprite mesh" then the blur shape will follow the outline of your PNG image.

    • @dandan-mf4sr
      @dandan-mf4sr 4 года назад +1

      @@cassiovega976 and remember to add an PNG to "source image"

  • @NaratoNara
    @NaratoNara 4 года назад

    doesnt effect to PBR shader. Problem same to that text. you might looking into this problem

  • @vladkrutenyuk6715
    @vladkrutenyuk6715 3 года назад +1

    Dude, have you found solution to blur ui panels too? it's so important for me now, but I can't find solution((

    • @anhtainguyenvu2574
      @anhtainguyenvu2574 3 года назад

      hello guy, I have same problem. if you have any solution for this problem. plz share with me. Thank you!

  • @FireJojoBoy
    @FireJojoBoy 2 года назад

    thanks sooo much :3

  • @Rokyloreq
    @Rokyloreq 3 года назад

    Very Cool man

  • @waihanlim6699
    @waihanlim6699 Год назад

    Doesn't work in VR mode

  • @Futureblur
    @Futureblur 3 года назад

    Thank you!!

  • @ChetanSaini420
    @ChetanSaini420 4 года назад

    what about HDRP?

  • @anthonykratos1006
    @anthonykratos1006 9 месяцев назад

    in urp2d dont work

  • @VCNAKIRA
    @VCNAKIRA 4 года назад +1

    Thank you for sharing a great asset.
    What is the license for this asset?

    • @TomChapman
      @TomChapman  4 года назад +2

      No problem! The original repo doesn't actually have a licence, but I have no problem with you using it in either a commercial or non-commercial way!

    • @VCNAKIRA
      @VCNAKIRA 4 года назад +1

      @@TomChapman Wow thank you

  • @xermi00
    @xermi00 3 года назад

    Thank you very much, my game have so much better graphics now :)

  • @arihantparsoya
    @arihantparsoya 4 года назад

    Thank you

  • @瑞雪春堂
    @瑞雪春堂 4 года назад +1

    Thanks for the video,but I can‘t use it for 2D Renderer >﹏<

    • @TomChapman
      @TomChapman  4 года назад

      Yeah it seems like it doesn't work using the 2D renderer right now, but hopefully they'll add support for it in the future.

    • @瑞雪春堂
      @瑞雪春堂 4 года назад

      @@TomChapman I have tried many ways to make a blur in URP but none of them can work with 2D renderer or the effect is not good. So sad. (╯︵╰)

  • @MrOmegaXT
    @MrOmegaXT 8 месяцев назад

    anybody made this work for unity 2023 yet?

  • @SneakyRamy
    @SneakyRamy 4 года назад

    My game is now all pink. I have a presentation in 2 days. Thx.

    • @TomChapman
      @TomChapman  4 года назад

      You're welcome! But to fix that, it sounds like you need to follow the steps of upgrading your project materials as shown in the video.

    • @SneakyRamy
      @SneakyRamy 4 года назад

      @@TomChapman I did it, but still pink unless i put none in render pipline Settings instead of UniversalRenderPiplineAsset

    • @SneakyRamy
      @SneakyRamy 4 года назад

      @@TomChapman Okay, it work when i select first all the materials and click on upgrade selected... It's scared me sorry, thx

    • @TomChapman
      @TomChapman  4 года назад

      Okay, I'm glad you got it sorted!

  • @StandWeyz1Cod
    @StandWeyz1Cod 9 месяцев назад +2

    самый тупой шейдер, спасибо что сломал проект

  • @Ahmed-ic9ft
    @Ahmed-ic9ft 4 года назад +1

    2d pls

    • @TomChapman
      @TomChapman  4 года назад

      Hi, unfortunately I'm not an expert at shader programming and don't have any knowledge with the 2D URP at this time. But in the future, I may be able to make an update that works with it.

    • @Ahmed-ic9ft
      @Ahmed-ic9ft 4 года назад

      @@TomChapman its fine, i found a solution that works with no code and takes less than 1 min to setup in unity with post proccesing

    • @hrober5298
      @hrober5298 4 года назад

      @@Ahmed-ic9ft Could You share the solution?

    • @Ahmed-ic9ft
      @Ahmed-ic9ft 4 года назад

      @@hrober5298 ruclips.net/video/3MIJoiprngQ/видео.html

    • @mashmesh
      @mashmesh 3 года назад

      @@Ahmed-ic9ft Yeah, but that's not the same, it applies blur on the whole screen, but we are after just a rectangle

  • @glimpsygames2734
    @glimpsygames2734 2 года назад

    how to make each Object have different blur amount?