Create A Custom URP Post Effect In Unity

Поділитися
Вставка
  • Опубліковано 30 січ 2023
  • If you want to support my Patreon: patreon.com/user?u=92850367
    Ben here, and I've been writing shaders and full systems of shaders in Unity from scratch for 6-7 years now. Shaders, especially HLSL or CG shaders seem to be less known in Unity, so I just wanted to do my part, share my experiences and really show others how to write shader code.
    The goal is to teach others how to write optimal shader code that is production-ready. I also want to try to recreate the cool-looking effects we see in other games. It would be awesome to see more and more people write shaders from scratch, understand it at a deeper level and ultimately create their own shaders.
    #unity3d #unitydeveloper #gamedev #shaders
    For more in-depth access I do have a Udemy course that I will continue to update as I create more mini-lessons.
    www.udemy.com/course/unity-sh...

КОМЕНТАРІ • 32

  • @benjaminswee-shaders
    @benjaminswee-shaders  Рік тому +2

    I hope you found this helpful. If you want to support my Patreon you can do so here ua-cam.com/video/UtwJGnif2OU/v-deo.html

    • @lex_darlog_fun
      @lex_darlog_fun 7 місяців тому

      It's a nice beginner tutorial... but for the future videos - PLEASE, consider built-in UA-cam subtitles, instead of hardsub, especially with such a giant font.
      To anyone who can understand english in audio, the only thing these subtitles do is distracting.

  • @alleyesonme1432
    @alleyesonme1432 Рік тому +6

    More URP!

  • @CannabisTechLife
    @CannabisTechLife 11 місяців тому +1

    wow ty! This was the most straight forward one i've found for render features so far. I appreciate how you explain _why_ you're doing what you're doing every step instead of just pasting code and saying "this is just required". It actually makes sense now!

  • @aidanhobler
    @aidanhobler Рік тому +4

    Very excited to see you covering URP! I found your channel a while ago while looking for some tips on a screen space ripple effect - at first your tutorials seemed like exactly what I needed, but I’m using URP and I realized the tutorials were for the standard RP, so I decided to put the effect in my backlog for the moment. Now that you’re covering custom URP post processing, I think it might be time for me to take another swing at it!
    Love the videos, thanks!

  • @JandTubers
    @JandTubers Рік тому +3

    Thank you Benjamin for these tutorials! I also bought your Udemy course, always very interesting! You deserve a lot more visibility! Great job! 💪

  • @Le_Mur
    @Le_Mur 11 місяців тому +3

    I was so much pleased to find out this tutorial at the beginning, then I saw you were using the old method with RenderTargetIdentifier and I was so disapointed... Would you make an update version of this tutorial with the new RTHandle methods ?

  • @huseyinpehlivan6072
    @huseyinpehlivan6072 21 день тому

    Hello Benjamin, your lessons are really important and useful to me. It is very pleasing that you share such important information for us. I am a fan of yours.
    I have to ask you a question. While watching the lesson steps, I saw that the cameraColorTarget expression did not appear while I was writing code. The version I use is 2022.3.7f1. What can I use instead of this expression in this version?

  • @karikakahuate
    @karikakahuate Рік тому +2

    Thanks so much for the tutorial! It hqs helped me a lot, I am learning by myself about shaders. I have a question... I followed the tutorial, also I saw several times and paused to compared my code with yours and still my global illumination is not working. Do you have any idea that could help me to solve it?
    And again, thanka for the videos. Today I bought your course in udemy😉👍

    • @AndromAK666
      @AndromAK666 Рік тому +1

      i did the same with the same code, but it didn't work.
      To make it work → Assets/settings/URP-HighFidelity-Renderer/AddRenderFeature and select "TintRenderFeature"

  • @othmanmoat
    @othmanmoat 7 місяців тому

    The kind of course I wish we had in our master's degree

  • @Monophobe
    @Monophobe Рік тому

    This is an excellent tutorial, thank you Ben. I am however facing an issue (Unity 2021.3.14f1) where decals render over the top of the custom effect. I've exposed the RenderPassEvent in the Render Feature so you can select it from a drop down which works, but doesn't help with the decal issue (sidenote: the custom effect doesn't render if you use AfterRenderingPostProcessing or AfterRendering). If you've any idea I'd really appreciate a reply, thanks.

    • @Monophobe
      @Monophobe Рік тому

      I suspect this is a limitation of 2021. In 2022 there's a new 'Fullscreen' graph output that can be used, rather than Unlit which works correctly with decals and transparent effects.
      EDIT: Scratch that - I didn't have my 2021 shader set to transparent surface type. It's now rendering over decals correctly.... :/

  • @jayleo500
    @jayleo500 Місяць тому

    Since this is pulling a volume into the feature for the RP, does that mean you cannot localize the custom feature to a specific camera?

  • @jvnm2890
    @jvnm2890 9 місяців тому

    Hey nice tutorial, i've followed it from start to finish but my unity can somewhy not " resolve symbol 'ScriptableRendererPass' "which causes things such as "Blit" and ScriptableRendererContext to not function at all.
    Even though i do have the latest URP of my engine version, post processing and everything imported so i don't understand why its not working does anyone have a suggestion?

  • @AndromAK666
    @AndromAK666 Рік тому +4

    i did the same with the same code, but it didn't work.
    To make it work → Assets/settings/URP-HighFidelity-Renderer/AddRenderFeature and select "TintRenderFeature"

    • @duhowlett
      @duhowlett 11 місяців тому +2

      This is important. I noticed in his screen he added there, but did not tell.
      Also, I don't know why, but I had to add ".SetTexture("_MainTex", _source);" to link the shader texture sampler with the shader pass source (after the blits).
      There are 2 things that could be the reason for that: I used the Blitter.BlitCameraTexture, instead of Blit and I used RenderingUtils.ReAllocateIfNeeded() for the temp Texture, instead of cmd.GetTemporaryRT().
      But, i will mark this down as a win.

  • @eduardobinks
    @eduardobinks 7 місяців тому

    Can this be done with shader graph?

  • @giantnut
    @giantnut 11 місяців тому +1

    I would expect such a helpful video from someone with 129000 subscribers not 1290 (:

  • @BRtn-nn9nr
    @BRtn-nn9nr 5 місяців тому

    Possible without adding TintRenderFeature ? i don't really want to add a renderfeature for every effect i have

    • @BRtn-nn9nr
      @BRtn-nn9nr 5 місяців тому

      So i found an answer -> no.. You can try to modify some files located in Packages but don't do it -> Universal RP -> Runtime -> Passes

  • @tigerwolf8338
    @tigerwolf8338 11 місяців тому +2

    Great I can write shaders (mostly GLSL), but I need to write 300 miles of c# code to use them.... 😞

  • @mokopa
    @mokopa 10 місяців тому

    ...lost me at 9:05...where does that "name" come from?

    • @CannabisTechLife
      @CannabisTechLife 2 місяці тому

      The name is arbitrary. It is whatever you want the feature to be labeled as in your pipeline asset

  • @dissonantprotean5495
    @dissonantprotean5495 Рік тому +1

    High quality tutorial, but let's be honest, Unity is making this super overcomplicated. I kinda wonder what the benefit of using URP is really

  • @uview920
    @uview920 Рік тому

    it would be great if you have a discord channel or something so that I can ask...!

  • @white_cloth
    @white_cloth Рік тому

    0:41 The tutorial starts here.

    • @trued7461
      @trued7461 6 місяців тому

      absolute brainrot cant handle 40 seconds of explanation