Unlocking The Power Of Unity's Scriptable Render Pipeline

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

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

  • @PixelDough
    @PixelDough Год назад +358

    This is exactly what Unity has needed. The SRP has been in a really unstable state for a while so tutorials are often outdated. Now that it's a lot more stable, we need more clean and informative content surrounding how it can be used by developers

    • @GameDevGuide
      @GameDevGuide  Год назад +47

      Thank you so much, I absolutely agree. So many people (including myself) have absolutely no idea how they work, or why they're actually better than the Built-In pipeline. So hopefully this video sheds some light on it!

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

      Yes agree! great tutorial, hopefully its not too different for HDRP

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

      Hey fancy meeting you here

    • @NaviYT
      @NaviYT Год назад +1

      Even Unity brings this up. I think they’re doing new Unite videos about it and they’re creating a new sample scene that really showcases the power of URP.

    • @theman3282
      @theman3282 Год назад +1

      post processing volume please

  • @joe-the-cannon
    @joe-the-cannon 9 месяцев назад +13

    To anyone confused about what is happening at 12:00:
    In the *CustomPostProcessRenderFeature.cs* script, use _m_customPass_ instead of _m_pass_
    In the *CustomPostProcessPass.cs* script, declare following values at the top:
    RenderTextureDescriptor m_Descriptor;
    RTHandle m_CameraColorTarget;
    RTHandle m_CameraDepthTarget;
    Hope this helps!

  • @AunShiLord
    @AunShiLord Год назад +164

    After watching this video I could say that this is EXACTLY how hard it is, just as I imagined.

    • @rapho8539
      @rapho8539 Год назад +30

      I been a dev for 20 years and i dont understand any of this. Lol

    • @overthinkerapexx7845
      @overthinkerapexx7845 Год назад +4

      @@rapho8539 I dont understand, are your 20 years aren't rendering-related?

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

      @@overthinkerapexx7845 no. Never been a game dev. Thats why.

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

      @@rapho8539 ad dev of what then??!?!?!

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

      ​@@cheezenuts2357 C# and javascript for websites and databases, 'interfacing' with machines,... i think they call it an application dev.

  • @GamesPlusShow
    @GamesPlusShow Год назад +71

    For those of you following along and wondering about m_pass and the Descriptor.. m_pass should be m_customPass and the descriptors declaration is: RenderTextureDescriptor m_Descriptor;

    • @grantmilner8908
      @grantmilner8908 Год назад +1

      Thanks! I was so confused

    • @dechin6144
      @dechin6144 Год назад +1

      thank you! also what about the Dispose void? it says i cant access modifiers from a protected class?

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

      thankkk you

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

      i can access that without a hassel, might be something worng with the urp version, i am using 14.0.8
      @@dechin6144

    • @guybrush3000
      @guybrush3000 11 месяцев назад

      THANK YOU

  • @aidanhobler
    @aidanhobler Год назад +14

    Wow, this is the exact type of Unity content that I want to see, can't believe I hadn't seen your channel already. Instantly subscribed!

  • @lewisgads6432
    @lewisgads6432 Год назад +5

    For those who have a blank grey/white screen when following along, make sure the Bloom Texture in the shader graph has 'Exposed' set to off on the BloomTexture property in shadergraph. This stops it being overwritten to a blank white texture as its expecting to be set in a material.

    • @TheFerruccio
      @TheFerruccio 11 месяцев назад

      You are a LIFE SAVER! Thanks for pointing that out! I am able to get the bloom effect working, though if I dare switch to the “scene” view, I get a ton of null reference exception in reference to the SetupBloom() method, in the BlitCameraTexture() method right before the line “var lastDown = …” but I’ve been unable to debug this.

    • @magic00squirrel
      @magic00squirrel 5 месяцев назад

      @@TheFerruccio Same here, I'm looking in the comments for a fix but haven't been able to find one.

    • @jando8295
      @jando8295 5 месяцев назад

      Thank you!! I spent so long trying to figure it out. I need to get into the habit of just toggling random settings cause I would have never guessed that was the problem.

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

      @@magic00squirrel Probably don't need help with this anymore but for people in the future, I just got rid of the part that checks if you're in GameView (//if(renderingData.cameraData.cameraType == CameraType.Game) in SetupRenderPasses), the shader now applies to scene view which might be bad for performance or something but works for me for now

  • @calmhorizons
    @calmhorizons 6 месяцев назад +1

    For anyone struggling at @10:40 ish to find the built in Bloom, make sure you click the "unhide" eyeball to be able to see where it is located (you can also make a duplicate of it by navigating to Packages/Universak RP/Shaders/PostProcessing - or similar, depending on your version.

  • @oldshamen
    @oldshamen Год назад +5

    Awesome video on the SRP .. You are correct. There is a lack of quality information about the use of the SRP/URP from Unity, and the quality of the tutorials online are often limited to "how to do this one thing with the SRP" without actually showing how it fits into the SRP. Really well explained here so I hope you will do more tutorials on URP in the future because this one is awesome.

  • @tmoneygamestudio
    @tmoneygamestudio Год назад +1

    This is the best, most thorough video about the render pipelines. I was trying to create custom shaders in Amplify Shader to achieve this effect. I was so lost following videos for Amplify that I was going to stop. And then your video showed on my feed, and now I understand them better. Thank you for the video.

  • @csgocondom8372
    @csgocondom8372 Год назад +20

    Hello, I am having some trouble following the tutorial from minute 12:20 onward. There is a very big jump in complexity and pacing when it comes to explaining the code. I tried looking for the Post Processing Pass inside of the package, but cannot find it.
    Inside of the CustomPostProcessPass.cs script:
    -The variable m_BloomEffect is never declared as far as I am aware.
    -''ProfilingScope'' gives me errors, changing it to ''UnityEngine.Rendering.ProfilingScope'' seems to fix it, though
    -m_CameraColorTarget is not declared
    -m_Descriptor is not declared. I tried declaring it as a ''private RenderTextureDescriptor m_Descriptor''
    Inside of the CustomPostProcessRenderFeature.cs script:
    -m_pass is never declared
    I am trying to wrap my head around it, but I cannot fully understand how to fix the missing links to make the code work. Any help would be apprecciated. Thanks in advance.

    • @csgocondom8372
      @csgocondom8372 Год назад +8

      Update:
      - I have managed to fix the m_Bloomeffect by creating a ''private BenDayBloomEffect m_BloomEffect'' variable. I don't know if this is correct, though
      -The Profilingscope now works. I probbaly made a mistake on my part earlier
      - I fixed m_CameraColorTarget and CameraDepthTarget by creating two ''private RTHandle'' variables
      - I fixed m_Descriptor by creating a ''private RenderTextureDescripture m_Descriptor'' variable
      I have no idea if any of this is corret, but I hope it can help anyone stumbling across this problem. I still cannot get the effect to work.
      I see at 14:47 that an ''internal void SetTarget'' is used. But this gives me errors because of ''public void SetTarget'' (which was implemented previously and can be seen shortly after). Is the video correct or am I missing something?
      Just a quick update.

    • @5daydreams
      @5daydreams Год назад

      @@csgocondom8372I'm having some struggles with the cameraColorTarget being null. Did you run into anything similar?

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

      having the same issue I did the same as you did...@@csgocondom8372 Did you ever get it to work ? Me I'm having a a permanent blackscreen and an infinity of nullref exception and "Texture creation failed" errors.
      [Edit] because the tuto goes too fast I skipped the part that shows you "const FormatUsage usage". But let's be honest, this was waaay to much to pack into 20 minutes.
      Also, I'm not done yet as my shader is just rendering though the hole screen instead of the bloom pass.

    • @csgocondom8372
      @csgocondom8372 Год назад +1

      @@5daydreams From what I remember I had no issues with it, but I was planning on giving this another try sometime in the future. I will let you know how it goes and if I run in the same issue!

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

      @@5daydreams Yes, No idea what to do with it.

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

    Wanted to learn about this but found no videos now i have yours Thank you

  • @f11bot
    @f11bot Год назад +12

    I’ve not finished watching the video yet, but this has been the best video explaining SRPs! It’s so difficult to find information online, this is super useful! Unity definitely should try to explain this better, first time they explained I straight up didn’t even want to try to mess with it XD
    More documentation and examples of videos and projects from Unity are really crucial for people to start looking at this, like you said!

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

    Thanks for the best documentation out there on SRPs!

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

    Nice work Matt, this project and video came out great!!

    • @GameDevGuide
      @GameDevGuide  Год назад +1

      Thank you so much! Appreciate your input when I was figuring out which direction to go with it hahaha

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

    I have missed you GDG :3 happy to see a new upload

  • @ChristinaCreatesGames
    @ChristinaCreatesGames Год назад +42

    Oh, this is awesome. I had stumbled upon custom render features two or three weeks ago and I was super stumped. The tutorial I used back then was already a bit outdated and I got more and more lost the longer I tried to follow it and needed to find ways to do it in this current iteration. You explained very well, I'm super looking forward to tinkering with it now 💛 (But I think this will take a few more repeats to make it stick for me :D) Thank you for posting the corresponding docs as well :) (and hey, if it's too much for one video? I'd be happy to watch more on the topic!)

    • @HansPeter-gx9ew
      @HansPeter-gx9ew Год назад

      the video is useless like the whole SRP. I got stuck wanting to do most simple things, which shows how stupid this framework got

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

    great video ... i always wanted to learn about this but there wasn't any good videos this video gave me some good understanding about how it works now i can learn bit more over time... thank you

  • @threemr01
    @threemr01 Год назад +1

    Matt, this tutorial was even better than your usually very high quality ones. Thank you for putting it together!! It’s going to be very useful to my workflow.

  • @TheFerruccio
    @TheFerruccio 11 месяцев назад +1

    Several things regarding the “Ben Day Dots” effect:
    1: Why do you have the “mode” set to “tiled” for “Screen Position”? Keeping it as “Default” eliminates the seams.
    2: Why do you have a time parameter in the composite node group?
    3: I needed a screen node to calculate the ratio to get the dots to remain circular for any aspect ratio. There might be a better way of doing this.
    4: _BloomIntensity will not work unless its exposure in the node settings is disabled, as it’s been set via SetGlobalFloat() in the command buffer, and exposing it would override the buffer value.

    • @McSpjuver
      @McSpjuver 9 месяцев назад +1

      Tiled actually tiles the UVs uniformly around the center, which automatically deals with aspect ratio.

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

      @@McSpjuver Ahh that makes sense, it was an aspect ratio issue! Instead of stretching to the aspect ratio, it simply maintains the (ratio of the input image)?

  • @mikecu2249
    @mikecu2249 Год назад +4

    What is happening at 12:00 ?
    What is the purpose of "ConfigureInput" , what does it do and how can i use it ?
    What is "SetTarget" , what targets can i set, what cna this be used for?

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

    I just started learning Unity, so this subject is of very little value to me other than it's great knowing I can have this level of control far down the line.
    However, it's obvious that your videos are very clear, informative and super well put together. I can already tell that your channel is a great learning resource and I'll definitely check out more of your stuff.

  • @maxsmietana4837
    @maxsmietana4837 Год назад +8

    Hi, i am still a little bit confused about the code @12:00. It references 'm_pass' which was not defined in the code previously. Was that supposed to be 'm_customPass' in the CustomPostProcessRendererFeature?

  • @ZiplawDev
    @ZiplawDev Год назад +16

    i think a more in depth video about the RTHandles stuff, with dome diagrams about how textures are created, blitted and the like would be much appreciated. Personally its been really difficult to get into it lately, as the API has changed so much

  • @yuushi_s
    @yuushi_s Год назад +1

    Great Job! Exactly what I've been looking for

  • @stefkeegan4391
    @stefkeegan4391 Год назад +15

    bummer this starts out so very promising, but there is no way anyone without deeper coding knowledge could follow this because there are several errors and it jumps all over the place! I've tried diggin through the comments for fixes, but it would be good if you could confirm what we should do in the description or something! Otherwise it's a really great video, it's just not possible to follow along with sadly.

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

      I'm also having trouble. He forgets to mention declaring the m_BloomEffect, it switches between calling the CustomPostProcessPass variable m_pass and m_customPass. And the jumping around instead of completing one function at a time makes it extremely hard to follow. He clearly knows what he's doing but he's terrible at explaining it. I'm stuck at 13mins in with a white screen and i've gone through the tutorial 5x now trying to find what is causing it with no luck.

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

      Yeah, huge bummer. If nothing else, just throwing the project / scripts on github would have gone a long way toward papering over these issues. Now I'm 70% of the way done implementing and judging from the other comments wondering if I should even continue, since it's riddled with errors.

    • @mittensandsnowdrop
      @mittensandsnowdrop 6 месяцев назад

      @@smokydave I have a white screen too. I think the down and upscaling is working ok and it is using the right material but I am stuck now. Trying to debug it best I can. Did you fix it in the end?

  • @mario_actually
    @mario_actually Год назад +18

    This is really really awesome.
    I really hope unity gets better at exposing their actual cool features. Until then, great job of stepping in for them.

  • @-nickdev
    @-nickdev Год назад +9

    Seriously good video, this type of content is really lacking for URP. I've stayed with built in/amplify shader editor since there's such a lack of documentation about this stuff, but you've shown how powerful it can be.

    • @GameDevGuide
      @GameDevGuide  Год назад +5

      I've felt exactly the same way up until now. I really hope Unity put work into documenting more of this stuff!

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

    My dude, that is perfect!
    Ever since Unity has switched from working on the engine as a whole to working on hundreds of different modules simultaneously, they have neglected documentation so much. As every one of these modules is pretty much always in "development" state, they don't bother to document it well.
    And that really pisses me off, cause there is so much potential, yet so much time wasted on plain experimentation on how to get things working.

  • @greywolf7849
    @greywolf7849 Год назад +4

    For anyone not able to get this working, try blitting camera color to a temp handle first, and then blit it back to camera color through the composite material. It seems like blitting from src to dst when they are the same handle (ie. camera target) as shown in the video is not working for me (Frame debugger will show the _blittexture as black).

    • @vrclckd-zz3pv
      @vrclckd-zz3pv Год назад

      I can't seem to get it to work. Could you share your code?
      I have:
      using (new ProfilingScope(cmd, new ProfilingSampler("Custom process pass event"))){
      RTHandle tempHandle;
      tempHandle = RTHandles.Alloc(Vector2.one, depthBufferBits: DepthBits.Depth32, dimension: TextureDimension.Tex2D, name: "__tempHandle__");
      Blitter.BlitCameraTexture(cmd, m_cameraColourTarget, tempHandle);
      Blitter.BlitCameraTexture(cmd, tempHandle, tempHandle, m_testMat, 0);
      Blitter.BlitCameraTexture(cmd, tempHandle, m_cameraColourTarget);
      tempHandle.Release();
      }
      I still get strange graphical artefacts doing this though

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

      @@vrclckd-zz3pv I think it's because your rthandle is allocated as a depth buffer but not a color buffer.
      Here is my code:
      First allocate in OnCameraSetup:
      public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
      {
      m_Descriptor = renderingData.cameraData.cameraTargetDescriptor;
      m_Descriptor.depthBufferBits = (int)DepthBits.None;
      RenderingUtils.ReAllocateIfNeeded(ref m_CopiedColor, m_Descriptor, name: "_ColorCopy");
      }
      Then blit in Execute:
      Blitter.BlitCameraTexture(cmd, cameraTargetHandle, m_CopiedColor);
      Blitter.BlitCameraTexture(cmd, m_CopiedColor, cameraTargetHandle, _compositeMaterial, 0);

  • @haileef7234
    @haileef7234 Год назад +7

    For people who can't find the Bloom shader in packages you need to click the crossed out eye to reveal it.

  • @LM-cc7qz
    @LM-cc7qz Год назад +11

    Can someone please tell me if "GetCompatibleDescriptor" at 13:56 is also giving them an error and possibly how to fix it? I am on the same version of unity as the tutorial and I can't figure this out.
    Edit: he calls it before actually showing us the code for it which is at 14:35, would be nice if this was structured in a way so that we knew this instead of spending huge amounts of time thinking I was missing a using statement.
    Another edit, make sure that for your bloom texture parameter in shader graph that it "Exposed" is not checked. this will cause your composite shader texture to not actually be assigned the bloom texture.

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

      I had the same problem, and then he showed the code, but now I'm stuck at 15:26 with a white screen.

    • @LM-cc7qz
      @LM-cc7qz Год назад +1

      @@smokydaveYo man, make sure you don't have your bloomTexture variable in shader graph set to "exposed".

    • @5daydreams
      @5daydreams Год назад

      Having properties exposed breaking this effect is a REALLY big deal to forget emphasizing imo - this took me a couple forevers to go through...

    • @AluRooftop
      @AluRooftop 2 месяца назад

      god damn it
      thank you random internet stranger, i was losing my mind here

  • @pa_de_queijo
    @pa_de_queijo Год назад +13

    Really good video, but it would be nice if you provide the source code in the description, such big scripts can be confusing to follow in the way you edit the video.
    I'm at 15:33 but my screen is all black and I have no Idea why 😅
    I also got some problems that other people in the comments are also having.

    • @alpagateau8236
      @alpagateau8236 Год назад +1

      mine is all white, no idea why either

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

      Did you ever manage to figure it out?

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

      @@NMe6667 nope

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

      SOLVED!
      (kinda)
      Had the same Issue following along.
      I just said "f*@k it" and assigned it to the material directly like he does in 15:10, instead of using the Command Buffer.
      You can do that with:
      m_compositeMaterial.SetTexture("_Bloom_Texture", m_BloomMipUp[0]);
      Still, I would love for someone to explain why the Command Buffer didn't work.

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

    I have been working on this exact thing for the past week! This video couldn't have been timed better. Thank you so much the the in depth look at this stuff. I have been picking through the frame debugger trying to find the shadow pass so I can customise it. Found it now thanks to this video. Also your post-processing video has been a life saver for me. Thanks buddy!

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

    Thank you from the bottom of my heart for this video.

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

    Incredible video - more than enough information to get started without being overwhelming. I've used most of these features just enough to get a taste of what they're capable of, but never managed more thanks to documentation that is either missing, out-of-date, or just flat-out incorrect. I'd honestly assumed that there was something wrong with either my brain or my Unity install, the number of times I've butted heads with it and lost. I'm glad to hear someone who actually worked for Unity admit that this topic is mostly just badly documented, when it's documented at all.

  • @DennisDenchoDenchyaknow
    @DennisDenchoDenchyaknow 10 месяцев назад +4

    For anyone having issues with Null Reff errors, Here what I did to solve.
    Just a Simple Null check via a ready bool
    Declare bool:
    private bool isReady = false;
    In SetTarget void add at end of function:
    isReady = !(m_CameraColorTarget == null || m_CameraDepthTarget == null);
    In Execute void Insert this as first line:
    if (!isReady) return;
    Also prevents any Reload errors you might get (so far), lmk if it works for you

    • @magic00squirrel
      @magic00squirrel 5 месяцев назад +1

      Thank you friend, you just made my day! I don't know how you came up with this solution and I was about to give up on the whole tutorial but you may have just saved the day! Much love from Washington! 🙂

    • @pascu4705
      @pascu4705 5 месяцев назад +1

      I don't know why it works but it works. TY dude

    • @jiayuzhu1154
      @jiayuzhu1154 29 дней назад +1

      Thank you sooooo much, my friend!!!! U just made my day!!!!❤❤❤❤❤❤ Sending love from China!!

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

    This is some much fun. It's cool stuff really. Thank you for you video.

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

    I was very recently looking for how to replicate Hi Fi Rush in Unity, great timing!

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

    Always a great day when Game Dev Guide uploads

  • @mr.hashundredsofprivatepla3711
    @mr.hashundredsofprivatepla3711 19 дней назад

    3:54 For anyone struggling to interpret "filtered through a ?????? dots effect", it's "filtered through a Ben-Day dots effect"

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

    my head exploded.... its wayyyy out of my ability at this time.. i wish i'll understand it in the future... but nontheless, great job on the video. at least finally someone tries to explain the use case of scriptable render pipeline in such detail.

  • @gustavosalmeron2013
    @gustavosalmeron2013 6 месяцев назад

    Some tips for studying this video: Yes, there are a lot of stuff being explained and it is not easy. But it can be made easier.
    Write down a glossary of every class as they get explained. VolumeComponent, VolumeParameter, ScriptableRenderPass, ScriptableRenderFeature, everything. Go inside the code, press F12 to decompile it and read them to better understand their usage. Write exactly everything being explained. Don't rush the video, pause it and take your time.
    It's helping me A LOT.

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

    I’ve just contributed to your future 100k subs, awesome video!! Keep it going!

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

    You don't release videos often, but they are the best. I would like to know more about the URP.

  • @consuminhelium3346
    @consuminhelium3346 Год назад +1

    Been put off from dabbling in the render pipeline, but this gave me good insight into how it works! Thank you + awesome video

  • @sealsharp
    @sealsharp 5 месяцев назад

    At 12:00 the function pass.ConfigureInput(...) is called two times.
    At least in 2022, this will not set multiple values, but overwrite the previous.
    The Unity FullscreenRendererFeature calls it once and treats the parameter as a flag enum, so pass.ConfigureInput(ScriptableRenderPassInput.Color | ScriptableRenderPassInput.Depth) in this case.

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

    great tutorial ! i was wondering how they achieve this type of rendering in the sable game , But you cleared my doubt thanks : )

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

    There's an issue at 12.00: when calling ConfigureInput, use the "|" (OR bitwise operand) to specify which inputs buffers are used, for example:
    m_pass.ConfigureInput(ScriptableRenderPassInput.Depth | ScriptableRenderPassInput.Color)

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

    To those who can't make it work, you need Unity 2022 and URP 14. RTHandle doesn't appear in ScriptableRenderer before URP 14, and SetupRenderPasses doesn't show up until Unity 2022. GDG mentions that he uses Unity 2022, but it's really critical here.

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

    Omg the timing!! I just searched grab pass in urp and wanted to learn more about srp .

  • @nemonzvsworld3967
    @nemonzvsworld3967 10 месяцев назад +1

    I was pretty excited to unlock the full power...
    But then the tutorial just kinda fizzled out at the end.
    I wish i could make the tutorial you showed glimpses of in this tutorial work.
    That looked like the best solution, post processing outlines per object

  • @andresmicalizzi5420
    @andresmicalizzi5420 Месяц назад

    Awsome content. Subscribed!!!

  • @ULTRADARKSETH
    @ULTRADARKSETH Год назад +1

    Brilliant. Been playing with this. But no one jas been able to do this with the 2D Render pipeline. Give that a bash please!!

  • @HieuTran-iv7ow
    @HieuTran-iv7ow Год назад

    Very interesting video. Thank you for sharing

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

    I got it to work finally, but now I have an issue where the scene view looks like it has no light at all except for the bloom when I have the render feature enabled, so I'm no sure what to do about that. besides re-enabling it every time I want to see it.

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

      Did you end up getting a bunch of NullReferenceException as well in the console during scene view? It seems like m_CameraColorTarget is not getting assigned because the cameraType isn't always Game. If I add a bypass to it (just using else and passing the same functions/values through) I get a scene that is pretty much all black, other than the gizmos/grid, but no more issue with NullReferenceException spam
      Edit:
      I finally got it working. The trick was to replace "Params" with "_Params". The vector never got filled because the wrong property name was referenced.
      Edit 2:
      My dots just appear black, so its as if the BlitSource isnt showing under the Ben Day effect. At least it works this way in Scene view. In Game View it works mostly okay. But I have been noticing that my emissive colors on my materials, the intensity is going wonky on its own. I set it to 2, and then edit it again later and it's up to 9, and it seems like as you adjust it, it is growing exponentially (it stops at a certain point, it's not infinite).
      Edit 3:
      I've learned from adding a Debug log that the source is sometimes null in SetupBloom (which is m_CameraColorTarget in Execute). I think it is related to the Scene view, because the Execute function doesn't check if the rendering data camera type is game, while the SetupRenderPasses does check for game view. So the solution is to add a guard clause to Execute which prevents it from running in Scene view, or to remove the check from Setup so it initializes in all views

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

      @@trashcaster Do you know how to display the effect in the scene view as well?

    • @yuunaito2120
      @yuunaito2120 2 месяца назад

      Hi, im sorry for my rudeness. But may if i have your scripts about this topic ? I made myself following this video but it has several errors that makes me more confused

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

    A breath of fresh air.

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

    I wish I could say that this helped! I’ve so far spent about 12 hours following this tutorial super precisely, after having built many shaders and C# scripts for Unity in the past, and I just cannot get this to work. At 14:54, all I can say is “nope” this custom render feature doesn’t at all appear for me. There are no errors in the console, either. I am using the exact same Unity version, too. The only thing I see is that, maybe, the camera is referencing the wrong “Universal Renderer Data.” However, there is no option to select the one that I made. Which is weird, because I have “URP Asset” set as the project asset under “Graphics.” How do I get the camera to reference the correct asset? It is simply not available in the camera’s Renderer menu.
    [EDIT] I managed to get most of this working, however, none of this works in the scene view. Any attempt to even view the scene causes null reference exceptions. I have no idea why this is caused. So long as I am in game mode, everything is EZPZ.

    • @TheFerruccio
      @TheFerruccio 11 месяцев назад

      I managed to partly solve this by checking my quality settings. Make sure you’re using the correct universal render pipeline asset. If you have the wrong one selected, you won’t have the pipeline asset reference the “universal renderer data” scriptable object (aka the renderer)

  • @nosh247
    @nosh247 Год назад +1

    would love to see a toon shader tutorial from you O.O applied in a renderer feature like you do in this tutorial

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

    congrats to 100.000 \o/

  • @GlasTaibhse
    @GlasTaibhse 9 дней назад

    Very cool video! Unfortunately I could not get this to work in Unity 6 using RenderGraph with Compatibility mode enabled. A few methods are tagged as obsolete, so I'm going to go thru them and see if I can get it working.
    Either way, I learned a lot about SRP while watching it, and now I feel a lot more comfortable delving into the subject on my own.
    Thank you!! I'm going to try and use what I learned to turn some of my own FullScreen Graphs into Volume Components :)

  • @surrogatpappan
    @surrogatpappan Год назад +4

    you never defined m_pass at 12:02.
    what is it?
    also m_Descriptor is a bit of a mystery.i defined my own since you never did. but it seems i'm missing something, directX just crashed big time.
    kinda informative video though, i'm getting closer to getting srp to actually work.
    SRP/URP sounds cool, but with the state of it and the state its seemingly going to be in for a long time i just cant bare myself to tell anyone to use unity period. i'm sticking with it though since its the only engine i know, but only because i dont want to waste anyting else ive learned and invested myself in. kinda like a parent that doesn't want divorce since there are kids involved.
    "unity = Best Game engine
    -Sony Playstation"
    Thanks!

    • @LM-cc7qz
      @LM-cc7qz Год назад +1

      Did you figure out what m_pass was? Or where the SetupRenderPasses method is supposed to be?

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

      @@LM-cc7qz i did figure out where SetupRenderPass method was located (i think.... its in the video somewhere), but i can't remember where since had to delete those scripts since i couldn't get them back to a state where they constantly didn't crash directX, now i need to rebuild them though since unity can't remove the render feature it's missing from the urp settings GUI.

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

      @@LM-cc7qz I am also trying to figure the same thing out

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

      @@csgocondom8372 @L M we'll figure this out together guys! i'm sure you have as grand plans with this as I do.

    • @csgocondom8372
      @csgocondom8372 Год назад +1

      @@surrogatpappan For sure. I spent all day tinkering around with it yesterday but couldn't get it to work. I will give it another try today and let you know how it goes

  • @JunkerJames
    @JunkerJames Год назад +1

    Just wanted to thank you so much for this! I've had several stabs at URP NPR effects on my weekends, and it's been super frustrating on many fronts (apis changing, tutorials for older versions). I've managed to leak gpu memory and totally hang my computer a few times because it's been unclear how and when to dealloc RTHandles etc. It has not been for the feint of heart! I hope you do more examples, but this on is great at getting the concepts across more holistically. Finally feels like I can make some progress on my side work!

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

      I'm about half way through - got the blurred elements coming through and about to get into the shader node part. I can't tell you how grateful I am - I felt like I was never going to break the back of this, despite being relatively adept. But by following the tutorial to the letter, and not going off script, everything seemed to work! There was a little bit of a breakage when I had hadn't yet executed the command buffer (since I guess the RTs get reallocated but never actually used?) but that was informative in of itself. It's about the 8th weekend I've thown myself at pipeline code and I'm finally getting a sense of the psycho-geography of where everything lives, how to use the debugger etc.
      I'm gonna head over to the patreon!

    • @JunkerJames
      @JunkerJames Год назад +1

      One issue i ran into was an error when i was editing in the Shader Node editor.
      "AddRenderPasses" must have been called for the MainPreviewWindow - I had not wrapped the enqueue call with a check to see if it was the game window. Needs to be this:
      public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
      {
      if (renderingData.cameraData.cameraType == CameraType.Game)
      {
      renderer.EnqueuePass(m_customPass);
      }
      }
      Hope this helps others!

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

      I also hit an issue with the URP Sample Buffer Node. It seems to render just one time when I hit save, but after that it seems to be black. Feels like it could be a number of things. The video says you may have to blit this yourself if your urp package is older (mine seems to be 14.0.7... which i thought was up to date?) (i assume in the same way as we blit the bloom targets and then give it a global shader name - except we just borrow the bloom material's first pass which is a simple copy).

    • @JunkerJames
      @JunkerJames Год назад +1

      Me again!
      20:00 I tried adding the SSAO feature so that i could snipe the "_ScreenSpaceOcclusionTexture" and pull it into the composit shader as "_SSAOTexture" after calling SetGlobalTexture.
      And it seemed to work, partially. Like, it'd work for one frame then go to grey. Seems to flicker when the mouse moves/updates the screen. Maybe something in the renderer is rendering it really sparingly. Maybe it's because i have lots of checks to see if it's the game camera only. Investigating.

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

      ​@@JunkerJames Did you make Ambient Occlusion at 20:06? How to mask in composite? I couldnt get it done :/

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

    I stopped at 9:45. I can't add Custom post process render feature, because my console shows many problems with the code. But the code is exactly the same as in video. I also downloaded the same Unity version, started new 3D URP project, but it is still the same:
    BenDayBloomEffectComponent doesn not implement interface member "IPostProcessComponent.isActive().
    There I was able to continue only when I deleted "IPostProcessComponent". But then this happened:
    The type or namespace name "ScriptableRenderFeature" could not be found (are you missing a using directive or an assembly reference?)
    CustomPostProcessRenderFeature.AddRenderPasses(ScriptableRenderer, ref RenderingData): no suitable method found to override
    CustomPostProcessRenderFeature.Create(): no suitablemethod found to override
    The type or namespace name "CustomPostProcessPass" could not be found (are you missing a using directive or an assembly reference?)

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

    idk it seems like there's still a lot of boilerplate needed to just get something to draw on the screen :(

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

    This is awesome! Please, bring us more tech content about the URP... i believe it is very powerfull but it needs more quality information on how to use it! THANKS!

  • @zoot.589
    @zoot.589 Год назад +1

    Honestly, The thing that confuses me the most is knowing what the different rendering stages are useful for in the pipeline.
    The order seems to matter completely and Idk much about what each stage does or the order of it.
    The best thing that has helped me start to understand so far is just learning OpenGL on it's own. It's alot to take in but it eases you into it a little more imo because It's a fundamental part of using OpenGL. When your using unity. Unity takes care of all of that inbetween stuff for you. You can choose to skip past it and focus on other stuff. (Which is the purpose of unity to begin with). It's just easier for me to lead into it rather than go back and tweak pre-existing systems personally.

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

    There is still a lot of fundimentals which are foreign to me about rendering and shaders in general.
    I can quite easily understand everything that happens within the shader graphs, but the entire code that wraps around it just to assign it to work was still confusing to me.
    Would be great if Unity just made a render pipeline which just had an array of shader graph assets to assign and then they all happen in order.
    But I suppose that might introduce some limits to people who wants more advanced access? (Or somehow be technically difficult)

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

    has anyone been getting an issue when they try to connect add the bloom texture to the blit texture? for some reason my blit texture is black, so when i add them together it doesn't do anything...

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

    Great Video! Thank you.
    I'm currently stuck with URP 10 😢. The new Blitter API looks promising.

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

    I am not good in shader graph. Could someone help how to mask SSAO during the compositing? as @20:06?

  • @JackAllpikeMusic
    @JackAllpikeMusic Год назад +1

    Hey! I really love these videos - there is one thing I have been struggling with - something I thought would be so simple, but I'd greatly appreciate a tutorial on if you know of a way to do it.
    While using URP, I am trying to get bloom on just certain objects. It's a real pain - because there's no such thing as a post processing volume for certain layers, even using camera stacking. It seems almost like a no-brainer when trying to achieve the effect of just some things glowing - but I have spent days now trying to find resources which can help me achieve this.
    On a side note - I'd also love to see a break down of the Shader Graph.
    Thanks for reading. :)

    • @foundtexas5424
      @foundtexas5424 Год назад +1

      Maybe emission maps could help and setting the treshold to be greater or equal to 1 that will only apply the bloom to the bright areas you define.

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

    Great video 🎉

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

    Thanks for the tutorial; I will say it's a bit unfortunate that Post Process effects aren't so out-the-box. Like to compare with Unreal, you can do it there in like under 10 clicks or something

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

      These days you can add generic post-processing features quite quickly by adding the Full Screen Pass Renderer Feature to the URP asset. It's just not as customizable, for example, you wouldn't just get access to the bloom texture as shown in this video.

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

      @@cvbattum ahh i guess i was using 2021 editor which is why i didnt see this stuff. thanks

  • @Adam-cb3gx
    @Adam-cb3gx Год назад

    I cant seem to get my custom post process pass to render to the screen or show up in the frame debuger at 14:50. What does he mean by "Enable render feature in the settings"? Do I need to change something in the project settings or what? Ive gone through the code multiple times but cant seem to find any problems, any ideas?

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

      He kinda skips over it quickly so it's easy to miss, but the Execute method should end with these 3 lines after the profiling scope call:
      context.ExecuteCommandBuffer(cmd);
      cmd.Clear();

      CommandBufferPool.Release(cmd);

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

    thank you for making this video. I personally tried to work with SRP in the past, but failed because this were so confusing and undocumented.

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

    great video 💙

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

    Do you think some funny stuff could be done related to VR using scriptable pipeline ?

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

      VR typically uses only a single pass, while these usually require multiple.

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

    This is amazing and what I've been looking for for so long. Do you think its possible to make a Depth Of Field blur post process that works with sprites using this method? This is needed by pretty much any serious 2D game and it's baffling why there is no 2D version available. I understand its related to the depth buffer etc and transparents dont work with it but can it not be set up to work off of say Zpos, or even sorting layer? If you could work this out it would be a HUGE help to the Unity community. I'll give it a shot now that I understand this a bit better but I doubt I have the skills to pull it off as well as you could. Anyway thanks heaps honestly this is such a great video.

  • @magic00squirrel
    @magic00squirrel 4 месяца назад

    Make sure to disable opaque texture in your urp settings asset, otherwise Unity will throw a ton of errors when switching scenes.

  • @LucidRhythms
    @LucidRhythms 2 месяца назад

    Great to find a tutorial like this, but I have to say, that I am a beginner. On some points I am totally confused and don't know, what is happening, and then it's going way too fast. It would be great to see a tutorial with a simple blur example. At about minute 12 in the video,... I gave up. And that's a think I generally don't do.

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

    Outline and outline two seem to magically work, could of used a bit more info there.. otherwise a nice primer for custom features

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

    Great tutorial but I feel like the new Full Screen Pass is mostly what we needed to avoid the "Scriptable" part

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

    Would like to see this revisited for the render graph. Render graph has rendered a lot of this video obsolete unfortunately

  • @prod.scrtchout
    @prod.scrtchout Год назад

    I'm love this channel! Can you please make a video on coding a custom text component that uses sprites instead of font files? If it's possible of course. Thank you!

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

    can you make a video about compute shaders rendering to the screen in URP?

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

    My world has gone black, anyone know the cause? I am around 16 min trying to apply ben-day dots, setting up the see the bloom pass has caused darkness...

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

      same, the scene is all black...

    • @TheFerruccio
      @TheFerruccio 11 месяцев назад

      Make sure that the _Bloom_Texture property in ShaderGraph_Composite has its "Exposed" bool disabled. I was getting the same problem. I do not recall that even being mentioned in this video. at 11:08 it's shown that "Exposed" is unchecked, but this is checked by default. This is one of the steps that this video skipped over.

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

    Is there a way to minimise all those ResolveAA instances in the frameDebugger? There is at least 3 or 4 of them, maybe more and they are very costly. They are caused by using MSAA, so in theory could all be removed by disabling it, however if they are simply resolving the same renderTarget each time ( hard to tell without looking at the project ), surely there must be a way in SRP to store or access that resolved texture for effects instead of triggering another resolveAA?

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

    Excellent tutorial on the SRP! Although... it's not clear to me what you're doing here that could be done with a custom post processing effect in the original Built-In Pipeline. I must be overlooking something.

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

    why do we need to recreate Unity's bloom from ground up just to grab bloom texture, when we can just name our texture "_Bloom_Texture" in our composite fullscreen shadergraph and just use regular bloom?

  • @4aqha250
    @4aqha250 Год назад

    welcome back

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

    I am so lost when it comes to the Node Settings > Bloom Texture reference. I don't see any Reference field show up in Node Settings no matter what I am clicking on in the shader graph.

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

    Excellent and informative tutorial, can you please make a terrain toon shader tutorial that also handles trees and foilage

  • @WAX_DOG
    @WAX_DOG Месяц назад

    Does anyone have a completed working version of these files they'd be willing to share? I can't seem to get it working :(

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

    For some unknown reason setting the global texture to share results form one material to another didn't work and didn't output anything. My workaround was simply cached it and set it directly using material's SetTexture API. Other than that this is a great demo for the capabilities of SRP. Thanks a lot!

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

    Why my cmd.setglobalTexture wont assigned the mipup[0] to the _Bloom_Texture in uber post processing? Help!!

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

    When I need to see blurred image, I have just white screen (default texture from composite shader). Rechecked everything many times. Any ideas why it could be?

  • @daniivanov4554
    @daniivanov4554 2 дня назад

    This video is great but I feel I'm missing the required knowledge to understand it better, can you suggest some content that can ramp me up to that level.

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

    Is the toon shader also used as a renderer feature? I always wanted to add a toon look but have so much different shaders on object that I never could afford to change all of those to toon shaders

    • @GameDevGuide
      @GameDevGuide  Год назад +1

      No, that's just the default unlit shader my object materials use.

  • @crinch5307
    @crinch5307 Год назад +1

    For some reason i get the following error: Assets\CustomPostProcessPass.cs(15,13): error CS0246: The type or namespace name 'GraphicsFormat' could not be found (are you missing a using directive or an assembly reference?). Did i do something wrong or is this something else?

    • @GameDevGuide
      @GameDevGuide  Год назад +1

      Check your unity version and consult the unity documentation to see the namespace you need for the GraphicsFormat class or an alternative type.
      This video was made using 2022 URP, so if you're on a different version Unity may have moved, or renamed namespaces.
      The docs should tell you where things belong.

    • @TheFerruccio
      @TheFerruccio 11 месяцев назад

      It's found in the namespace UnityEngine.Experimental.Rendering in Unity 2022.2.5.

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

      @@GameDevGuide I'm not sure if I will get replied to, however if I include the namespace "UnityEngine.Experimental.Rendering", It results with a flood of errors. I tried different versions and still no fix. :(

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

    Wonderful I get to relearn scriptable render passes because URP changed AGAIN