Unlocking The Power Of Unity's Scriptable Render Pipeline

  Рет қаралды 184,514

Game Dev Guide

Game Dev Guide

Күн бұрын

Inspired by the release of Hi-Fi Rush by Bethesda, I wanted to see if I could get a similar vibrant and stylized aesthetic in Unity. Little did I know, it would swiftly lead me down a rabbit hole of custom rendering in Unity and, in turn, completely overhaul my entire perception of Unity's Scriptable Render Pipelines. This video is a showcase of that journey... so let's take a look at how we can use Scriptable Renderer Features, and Scriptable Render Passes to completely overhaul our rendering in Unity and replicate some of the techniques on show in Hi-Fi Rush.
Chapters:
00:00 - Intro
01:42 - Coming Up
02:23 - The Communication Problem
03:38 - How Bloom Started It All
05:10 - The Bloom Approach
05:51 - Volume Component
07:11 - Creating A Renderer Feature
09:55 - Setting Up The Bloom Pass
15:33 - Adding Ben-Day Dots
17:05 - Outline Multi-Pass
19:35 - Cross-Hatching Ambient Occlusion
20:12 - Outro
• Outline Post-Processing in Built-In - • Creating an Outline Ef...
• Unity Graphics Library - github.com/Unity-Technologies...
• Custom Renderer Feature Docs - docs.unity3d.com/Packages/com...
• Full Screen Pass - docs.unity3d.com/Packages/com...
• RTHandles - docs.unity3d.com/Packages/com...
• Toon Shading- blog.unity.com/engine-platfor...
roystan.net/articles/toon-sha...
--------------------------------------------------------------------------------
Want to support the channel?
▶️ Help fund new episodes by joining the Patreon - / gamedevguide
💡 Get One-Month Free of Skillshare Premium - skl.sh/MKR826
Use these links to grab some cool assets from the asset store:
Get the Must Have Assets! - assetstore.unity.com/top-asse...
Free Unity Assets! - assetstore.unity.com/top-asse...
New on the Asset Store! - assetstore.unity.com/top-asse...
Top Paid Asset Store Packages - assetstore.unity.com/top-asse...
Asset Store Partners - assetstore.unity.com/lists/as...
--------------------------------------------------------------------------------
Socials and Other Stuff:
• Subscribe - kzbin.info?...
• Join the Discord - / discord
• Twitter - / gamedevguideyt
• Facebook - / gamedevguideyt
• Instagram - / gamedevguideyt

Пікірлер: 262
@PixelDough
@PixelDough Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
post processing volume please
@AunShiLord
@AunShiLord Жыл бұрын
After watching this video I could say that this is EXACTLY how hard it is, just as I imagined.
@rapho8539
@rapho8539 Жыл бұрын
I been a dev for 20 years and i dont understand any of this. Lol
@overthinkerapexx7845
@overthinkerapexx7845 Жыл бұрын
@@rapho8539 I dont understand, are your 20 years aren't rendering-related?
@rapho8539
@rapho8539 Жыл бұрын
@@overthinkerapexx7845 no. Never been a game dev. Thats why.
@cheezenuts2357
@cheezenuts2357 11 ай бұрын
@@rapho8539 ad dev of what then??!?!?!
@rapho8539
@rapho8539 11 ай бұрын
​@@cheezenuts2357 C# and javascript for websites and databases, 'interfacing' with machines,... i think they call it an application dev.
@GamesPlusShow
@GamesPlusShow Жыл бұрын
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 10 ай бұрын
Thanks! I was so confused
@dechin6144
@dechin6144 10 ай бұрын
thank you! also what about the Dispose void? it says i cant access modifiers from a protected class?
@A_Reaper23
@A_Reaper23 8 ай бұрын
thankkk you
@A_Reaper23
@A_Reaper23 8 ай бұрын
i can access that without a hassel, might be something worng with the urp version, i am using 14.0.8 @@dechin6144
@guybrush3000
@guybrush3000 4 ай бұрын
THANK YOU
@tmoneygamestudio
@tmoneygamestudio Жыл бұрын
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.
@threemr01
@threemr01 Жыл бұрын
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.
@aidanhobler
@aidanhobler Жыл бұрын
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!
@GameDevGuide
@GameDevGuide Жыл бұрын
Welcome aboard!
@ChristinaCreatesGames
@ChristinaCreatesGames Жыл бұрын
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 7 ай бұрын
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 Жыл бұрын
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
@f11bot
@f11bot Жыл бұрын
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!
@oldshamen
@oldshamen Жыл бұрын
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.
@yuushi_s
@yuushi_s Жыл бұрын
Great Job! Exactly what I've been looking for
@TurboMakesGames
@TurboMakesGames Жыл бұрын
Nice work Matt, this project and video came out great!!
@GameDevGuide
@GameDevGuide Жыл бұрын
Thank you so much! Appreciate your input when I was figuring out which direction to go with it hahaha
@Novacification
@Novacification Жыл бұрын
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.
@mittensandsnowdrop
@mittensandsnowdrop Жыл бұрын
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!
@xkittencatx
@xkittencatx Жыл бұрын
I have missed you GDG :3 happy to see a new upload
@f11bot
@f11bot Жыл бұрын
I’ve just contributed to your future 100k subs, awesome video!! Keep it going!
@btarg1
@btarg1 Жыл бұрын
I was very recently looking for how to replicate Hi Fi Rush in Unity, great timing!
@RamunatorGames
@RamunatorGames Жыл бұрын
Wanted to learn about this but found no videos now i have yours Thank you
@somestrangeperson
@somestrangeperson Жыл бұрын
This is some much fun. It's cool stuff really. Thank you for you 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.
@mattkaiser8984
@mattkaiser8984 Жыл бұрын
Thank you from the bottom of my heart for this video.
@ruslan6435
@ruslan6435 Жыл бұрын
You don't release videos often, but they are the best. I would like to know more about the URP.
@HieuTran-iv7ow
@HieuTran-iv7ow Жыл бұрын
Very interesting video. Thank you for sharing
@csgocondom8372
@csgocondom8372 Жыл бұрын
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 Жыл бұрын
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 8 ай бұрын
@@csgocondom8372I'm having some struggles with the cameraColorTarget being null. Did you run into anything similar?
@TheGameLecturer
@TheGameLecturer 8 ай бұрын
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 7 ай бұрын
@@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 16 күн бұрын
@@5daydreams Yes, No idea what to do with it.
@ludologian
@ludologian Жыл бұрын
Omg the timing!! I just searched grab pass in urp and wanted to learn more about srp .
@lewisgads6432
@lewisgads6432 4 ай бұрын
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 3 ай бұрын
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.
@mario_actually
@mario_actually Жыл бұрын
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.
@GameDevGuide
@GameDevGuide Жыл бұрын
Thank you so much!
@feyakut
@feyakut Жыл бұрын
Always a great day when Game Dev Guide uploads
@ZiplawDev
@ZiplawDev Жыл бұрын
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
@fergushamilton6274
@fergushamilton6274 Жыл бұрын
Second this, a video on the render textures would be great!
@fhccardoso9487
@fhccardoso9487 Жыл бұрын
I totally agree!!
@coolsai
@coolsai Жыл бұрын
great tutorial ! i was wondering how they achieve this type of rendering in the sable game , But you cleared my doubt thanks : )
@shrimpindustries
@shrimpindustries Жыл бұрын
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.
@martinfinch5011
@martinfinch5011 11 ай бұрын
Great video 🎉
@haileef7234
@haileef7234 Жыл бұрын
For people who can't find the Bloom shader in packages you need to click the crossed out eye to reveal it.
@GameDevBox
@GameDevBox Жыл бұрын
great video 💙
@maxsmietana4837
@maxsmietana4837 Жыл бұрын
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?
@csgocondom8372
@csgocondom8372 Жыл бұрын
I am stuck on the same issue
@-nickdev
@-nickdev Жыл бұрын
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 Жыл бұрын
I've felt exactly the same way up until now. I really hope Unity put work into documenting more of this stuff!
@consuminhelium3346
@consuminhelium3346 Жыл бұрын
Been put off from dabbling in the render pipeline, but this gave me good insight into how it works! Thank you + awesome video
@maxbas2018
@maxbas2018 Жыл бұрын
congrats to 100.000 \o/
@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!
@RobertMaximVerdes
@RobertMaximVerdes 8 ай бұрын
A breath of fresh air.
@syn2142
@syn2142 Жыл бұрын
Great Video! Thank you. I'm currently stuck with URP 10 😢. The new Blitter API looks promising.
@MrZtapp
@MrZtapp Жыл бұрын
Great video
@ULTRADARKSETH
@ULTRADARKSETH Жыл бұрын
Brilliant. Been playing with this. But no one jas been able to do this with the 2D Render pipeline. Give that a bash please!!
@bluzenkk
@bluzenkk Жыл бұрын
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.
@4aqha250
@4aqha250 Жыл бұрын
welcome back
@camerona1512
@camerona1512 4 ай бұрын
I have been desperately trying to make a custom fog effect using a fog shader I created, which works fine when a material is created and placed on objects, but when trying any of the custom render features tutorials it never seems to work. I am confused by all of the shader specific (ben day bloom effect) things added into the code here and can't find any resources to help with my scenario. Do you have any advice?
@AurelioProvedo
@AurelioProvedo Жыл бұрын
Thanks for the best documentation out there on SRPs!
@prod.scrtchout
@prod.scrtchout 11 ай бұрын
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!
@jgurien
@jgurien 9 ай бұрын
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...
@greywolf7849
@greywolf7849 5 ай бұрын
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 5 ай бұрын
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 4 ай бұрын
@@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);
@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.
@Nightmareinfos
@Nightmareinfos 16 күн бұрын
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?
@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?
@graig2558
@graig2558 Жыл бұрын
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.
@JunkerJames
@JunkerJames Жыл бұрын
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 Жыл бұрын
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 Жыл бұрын
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 11 ай бұрын
​@@JunkerJames Did you make Ambient Occlusion at 20:06? How to mask in composite? I couldnt get it done :/
@thedeliverguy879
@thedeliverguy879 Жыл бұрын
Is blitting the only way to get rendering results to other textures? I tried to reset the render target to other textures before draw call but no luck with that at all.
@nosh247
@nosh247 Жыл бұрын
would love to see a toon shader tutorial from you O.O applied in a renderer feature like you do in this tutorial
@stefkeegan4391
@stefkeegan4391 Жыл бұрын
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 9 ай бұрын
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 8 ай бұрын
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.
@uncleg1214
@uncleg1214 Жыл бұрын
Excellent and informative tutorial, can you please make a terrain toon shader tutorial that also handles trees and foilage
@narenjj
@narenjj 11 ай бұрын
I am not good in shader graph. Could someone help how to mask SSAO during the compositing? as @20:06?
@joe-the-cannon
@joe-the-cannon Ай бұрын
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!
@Kronnect
@Kronnect Жыл бұрын
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)
@LockTheMage
@LockTheMage 7 ай бұрын
Awesome
@mikecu2249
@mikecu2249 8 ай бұрын
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?
@bovineox1111
@bovineox1111 2 ай бұрын
I mean I was looking at multi-pass today and found it incredibly annoying tbh. I can use both the light mode tags you mention or I can add a renderer feature, which I think is what you’re doing here, or maybe you’re doing your own custom SRP but is this really any better than duplicating the object and rendering the same mesh with a different material, ensuring it renderers first?
@LM-cc7qz
@LM-cc7qz Жыл бұрын
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 9 ай бұрын
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 9 ай бұрын
@@smokydaveYo man, make sure you don't have your bloomTexture variable in shader graph set to "exposed".
@5daydreams
@5daydreams 8 ай бұрын
Having properties exposed breaking this effect is a REALLY big deal to forget emphasizing imo - this took me a couple forevers to go through...
@dimashutama9378
@dimashutama9378 2 ай бұрын
hi, i wonder can we use full screen graph to achieve this effect?
@bdenix1997
@bdenix1997 Жыл бұрын
how different is this than doing it the normal way? if i want to add some fog, i'll just add it using a post process shader then graphics.blit. then lets say i want to have bloom too. then ill write a shader that blurs the pixels then bring the whites up and stuff. then graphics.blit. is this way of doing things any different than what i do?
@lucutes2936
@lucutes2936 2 ай бұрын
That's a lot of work
@ttrudeau83
@ttrudeau83 Жыл бұрын
Really cool. I didn't understand much of this at all though.
@Adam-cb3gx
@Adam-cb3gx 9 ай бұрын
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 9 ай бұрын
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);
@KandyMan90
@KandyMan90 Жыл бұрын
Does the custom renderer feature created in this video replace the custom renderer feature you made in previous videos? I only ask as since 2022.2 the previous custom renderer feature you did doesn't work for full screen effects. I tried using Unity's full screen feature in my 2D pixel perfect game, however if the UI is set to screen space camera then it doesn't work. Been bashing my head off a wall for months trying to solve this now
@GameDevGuide
@GameDevGuide Жыл бұрын
This is the only video I've ever made about renderer features so far. The outline video was a custom post-process made using the built-in renderer. But, you could use the techniques shown in this video to port the effects over from that one into the render pass.
@mraland2022
@mraland2022 Жыл бұрын
Good Job
@GameDevGuide
@GameDevGuide Жыл бұрын
Thanks!
@daggerone3370
@daggerone3370 Жыл бұрын
Like number 2520 and you deserve even more!
@guillem99
@guillem99 11 ай бұрын
The game view looks fine but the scene view looks black, does anyone know how to fix that?
@brammutje15
@brammutje15 Жыл бұрын
makes me think of sunset overdrive. that game was kind of a banger
@frogmasto1316
@frogmasto1316 4 ай бұрын
can you make a video about compute shaders rendering to the screen in URP?
@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 Жыл бұрын
No, that's just the default unlit shader my object materials use.
@crinch5307
@crinch5307 4 ай бұрын
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 4 ай бұрын
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 3 ай бұрын
It's found in the namespace UnityEngine.Experimental.Rendering in Unity 2022.2.5.
@5daydreams
@5daydreams 8 ай бұрын
I don't know what I have wrong or different to your scripts, I have rechecked line by line several times over the course of three hours now: I noticed a null reference regarding the camera color target. Is there some sort of editor setup which is necessary to retrieve the camera color target from the bloom shader? My result applies the ben day dots, but it doesn't render literally anything from the scene - I also had to force my post processing to check for both the ingame camera and the editor camera, otherwise nothing gets rendered at all in either the viewport or the game screen. I know for a fact that I messed up. I just can't see where and when, and I do have a feeling that the issue could be within the shadergraph settings or the scriptable objects for the URP setup.
@5daydreams
@5daydreams 8 ай бұрын
Yeah, after a few days hopping in and out of this, I can only say the tutorial does bring great content to light, and should very much serve as a good template for the SRP workflow, and I have learned a lot thanks to the information provided. However, as several other commenters have pointed out - one issue here is the sudden burst of information from the 12:00 timestamp and onwards. This could have been alleviated by easing the viewer into the usage of the Render Pass and Features through a simpler effect, and then going into the BenDay effect. Another issue is I noticed is the quick cuts around the codebase without ever showing the full content - these issues are weird, as at some point the best approach to this is done, at around 14:00 - where the shader code is presented fully on the left, while zooming into the relevant parts on the right. I'm not saying this makes the tutorial bad, but it does make me question why are there so many different styles of code presentation being tossed around - it was incredibly easy to follow the thought process, but very hard to follow most of the syntax used and the overall structure of the project. These are points that I saw brought up by some other commenters, that I'd just agreeing with and adding my proposed solutions, however, I'd say my main gripe was the quick shuffling through the editor without emphasizing the really necessary steps, such as toggling the "exposed" boolean off within the shadergraph and other very unity-specific things which will completely break your workflow. Spending a few seconds just to highlight or at least mention that some of the editor setups will conflict with the code being written should have been a paramount priority - as these issues are the hardest to debug/detect. With all of that being said - I'm stil struggling to get the exact same effect happening, and still following this tutorial's guidelines. I do think the content here is great, and presented with a good audience and reach for exposure, but I still am not convinced this is the most instructive approach to this.
@HansPeter-gx9ew
@HansPeter-gx9ew 7 ай бұрын
@@5daydreams I think the tutorial is *garbage* bc of the reasons you mentioned. The effect he shows is extremely simple, but the problem is just how to do it with Unity, it's just know-how. There is not much to understand here. This is no complicated linear algebra for shaders, but just: click this, write that. If he doesn't show it, doesn't provide the code it has almost no worth. I don't know why these game dev guys always skip half of the code, it#s then more of a show off then any help.
@FlashBash64
@FlashBash64 Жыл бұрын
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 11 ай бұрын
@@trashcaster Do you know how to display the effect in the scene view as well?
@JackAllpikeMusic
@JackAllpikeMusic Жыл бұрын
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 Жыл бұрын
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.
@ReneSteenNielsen
@ReneSteenNielsen 3 ай бұрын
Game Dev Guide: Your material is truly amazing! Also, if you or anybody else mind; please try to download the latest Unity 2023 023.2.10f1 (not beta) Now select the "URP core" template, and when the project finally launches, click any of the render pipeline files in the project view. I now see multiple random errors, without actually doing _anything_ besides selecting a template -.-' Pretty frustrating.
@krebuu
@krebuu 6 ай бұрын
Anyone manage to get this working? I've tried following the code 1:1, and even improvising it, and I still can't get it to work. Rewritten 3 times now.
@nemonzvsworld3967
@nemonzvsworld3967 3 ай бұрын
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
@foundtexas5424
@foundtexas5424 Жыл бұрын
the bloom pass only works with the full screen shader? if so I asume it is only available on the 2022 verson right?
@GameDevGuide
@GameDevGuide Жыл бұрын
Not really... The whole point of the video is that you're writing your own pass, and bypassing URP's limitations via your own renderer. While it's true that the Shadergraph used in this video would be compiled to a full-screen shader, I do not see why you couldn't just write your own composite shader outside of Shadergraph for earlier versions of the SRP Package.
@danielcardin4329
@danielcardin4329 Жыл бұрын
Wonderful I get to relearn scriptable render passes because URP changed AGAIN
@TheFerruccio
@TheFerruccio 3 ай бұрын
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 2 ай бұрын
Tiled actually tiles the UVs uniformly around the center, which automatically deals with aspect ratio.
@TheFerruccio
@TheFerruccio 2 ай бұрын
@@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)?
@shotoutgames8823
@shotoutgames8823 Жыл бұрын
I don't see the outline shader in the package so I can test the multipass.
@erikm9768
@erikm9768 Жыл бұрын
I wish i'd know how to do toon shaders with multiple lights. Most tutorials ive seen are just main light only which makes them quite limited
@azzaeuh
@azzaeuh Жыл бұрын
Great tutorial but I feel like the new Full Screen Pass is mostly what we needed to avoid the "Scriptable" part
@foundtexas5424
@foundtexas5424 Жыл бұрын
I´m having some problems with the methods used: 1) SetupRenderPasses() Is not present in the ScriptableRendererFeature or the ScriptableRenderer.cs 2) the ScriptableRenderer.cs renderer doesnt have both cameraColorTargetHandle and cameraDepthTargetHandle. 3) the RTHandle doent have the Alloc() method. Maybe is because of my editor's version (2021.3.8f1) I´ll be trying with the 2022 version
@onuralpylkn9259
@onuralpylkn9259 Жыл бұрын
I had the same problem. Then I learned this features came with URP 13. And 2021 editors not compatible with it. So I switched to the 2022 LTS, which is using URP 14, then problem solved.
@pa_de_queijo
@pa_de_queijo Жыл бұрын
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 Жыл бұрын
mine is all white, no idea why either
@NMe6667
@NMe6667 11 ай бұрын
Did you ever manage to figure it out?
@pa_de_queijo
@pa_de_queijo 11 ай бұрын
@@NMe6667 nope
@ConcerninglyWiseAlligator
@ConcerninglyWiseAlligator 11 ай бұрын
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.
@AleksanderFimreite
@AleksanderFimreite Жыл бұрын
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)
@LordRapter
@LordRapter 10 ай бұрын
The things you are showing here in this video are pretty awesome! Unfortunately at the end, when it is become more and more complex you skip too many things and you explain things WAY to fast to follow. :/
@Nuilescent
@Nuilescent 5 ай бұрын
I do agree. It's such an interesting topic but I'm struggling to follow because I lack the underlying knowledge required to understand it. It feels like something aimed at people already familiar with rendering. It would be nice to have a more in depth explanation on what exactly is happening.
@RoboYak
@RoboYak 7 ай бұрын
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.
@subarnapokharel2218
@subarnapokharel2218 Жыл бұрын
I also want to become a unity game developer can you suggest what course tutorial to follow to become a game developer if i know some basic of c#
@ScareFire
@ScareFire Жыл бұрын
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.
@zoot.589
@zoot.589 Жыл бұрын
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.
@amac333
@amac333 6 ай бұрын
Outline and outline two seem to magically work, could of used a bit more info there.. otherwise a nice primer for custom features
The Strange Graphics Of LETHAL COMPANY
15:59
Acerola
Рет қаралды 656 М.
20 Advanced Coding Tips For Big Unity Projects
22:23
Tesseract
Рет қаралды 151 М.
СҰЛТАН СҮЛЕЙМАНДАР | bayGUYS
24:46
bayGUYS
Рет қаралды 734 М.
How many pencils can hold me up?
00:40
A4
Рет қаралды 17 МЛН
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 94 МЛН
g-squad assembles (skibidi toilet 74)
00:46
DaFuq!?Boom!
Рет қаралды 10 МЛН
What Jumping Spiders Teach Us About Color
32:37
Veritasium
Рет қаралды 1,1 МЛН
2D water magic
10:21
Steve Mould
Рет қаралды 233 М.
Infiltrating Roblox’s Fake Middleman Scam
18:57
No Text To Speech
Рет қаралды 149 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,4 МЛН
How One Programmer Created Gaming's Most Complex Ecosystem
28:29
ThatGuyGlen
Рет қаралды 1,5 МЛН
How To Use All 200+ Nodes in Unity Shader Graph
1:21:31
Daniel Ilett
Рет қаралды 129 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 675 М.
How Are Games Rendering Fur?
28:51
Acerola
Рет қаралды 411 М.
11 Things You (Probably) Didn't Know You Could Do In Unity
13:49
Game Dev Guide
Рет қаралды 147 М.
СҰЛТАН СҮЛЕЙМАНДАР | bayGUYS
24:46
bayGUYS
Рет қаралды 734 М.