Тёмный

Unlocking The Power Of Unity's Scriptable Render Pipeline 

Game Dev Guide
Подписаться 112 тыс.
Просмотров 184 тыс.
50% 1

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 - ru-vid.com?...
• Join the Discord - / discord
• Twitter - / gamedevguideyt
• Facebook - / gamedevguideyt
• Instagram - / gamedevguideyt

Опубликовано:

 

28 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 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.
@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
@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!
@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
@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!
@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
@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
@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.
@RamunatorGames
@RamunatorGames Год назад
Wanted to learn about this but found no videos now i have yours Thank you
@xkittencatx
@xkittencatx Год назад
I have missed you GDG :3 happy to see a new upload
@btarg1
@btarg1 Год назад
I was very recently looking for how to replicate Hi Fi Rush in Unity, great timing!
@somestrangeperson
@somestrangeperson Год назад
This is some much fun. It's cool stuff really. Thank you for you video.
@mattkaiser8984
@mattkaiser8984 Год назад
Thank you from the bottom of my heart for this video.
@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.
@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!!
@f11bot
@f11bot Год назад
I’ve just contributed to your future 100k subs, awesome video!! Keep it going!
@HieuTran-iv7ow
@HieuTran-iv7ow Год назад
Very interesting video. Thank you for sharing
@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!
@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 13 дней назад
@@5daydreams Yes, No idea what to do with it.
@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.
@ruslan6435
@ruslan6435 Год назад
You don't release videos often, but they are the best. I would like to know more about the URP.
@ludologian
@ludologian Год назад
Omg the timing!! I just searched grab pass in urp and wanted to learn more about srp .
@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.
@feyakut
@feyakut Год назад
Always a great day when Game Dev Guide uploads
@coolsai
@coolsai Год назад
great tutorial ! i was wondering how they achieve this type of rendering in the sable game , But you cleared my doubt thanks : )
@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!
@haileef7234
@haileef7234 Год назад
For people who can't find the Bloom shader in packages you need to click the crossed out eye to reveal it.
@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.
@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!
@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.
@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!!
@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
@-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!
@martinfinch5011
@martinfinch5011 11 месяцев назад
Great video 🎉
@maxbas2018
@maxbas2018 Год назад
congrats to 100.000 \o/
@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!
@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.
@GameDevBox
@GameDevBox Год назад
great video 💙
@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.
@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
@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.
@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 4 месяца назад
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);
@MrZtapp
@MrZtapp Год назад
Great video
@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
@uncleg1214
@uncleg1214 Год назад
Excellent and informative tutorial, can you please make a terrain toon shader tutorial that also handles trees and foilage
@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 :/
@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!
@AurelioProvedo
@AurelioProvedo Год назад
Thanks for the best documentation out there on SRPs!
@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.
@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)
@lucutes2936
@lucutes2936 Месяц назад
That's a lot of work
@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.
@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
@ttrudeau83
@ttrudeau83 Год назад
Really cool. I didn't understand much of this at all though.
@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?
@4aqha250
@4aqha250 Год назад
welcome back
@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 Месяц назад
Tiled actually tiles the UVs uniformly around the center, which automatically deals with aspect ratio.
@TheFerruccio
@TheFerruccio Месяц назад
@@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)?
@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.
@romainparizot1054
@romainparizot1054 Год назад
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.
@mraland2022
@mraland2022 Год назад
Good Job
@GameDevGuide
@GameDevGuide Год назад
Thanks!
@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.
@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?
@daggerone3370
@daggerone3370 Год назад
Like number 2520 and you deserve even more!
@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.
@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...
@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?
@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 8 месяцев назад
@@smokydaveYo man, make sure you don't have your bloomTexture variable in shader graph set to "exposed".
@5daydreams
@5daydreams 7 месяцев назад
Having properties exposed breaking this effect is a REALLY big deal to forget emphasizing imo - this took me a couple forevers to go through...
@brammutje15
@brammutje15 Год назад
makes me think of sunset overdrive. that game was kind of a banger
@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)
@frogmasto1316
@frogmasto1316 4 месяца назад
can you make a video about compute shaders rendering to the screen in URP?
@Lantertronics
@Lantertronics 11 месяцев назад
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.
@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.
@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.
@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?
@Nightmareinfos
@Nightmareinfos 13 дней назад
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?
@danielcardin4329
@danielcardin4329 Год назад
Wonderful I get to relearn scriptable render passes because URP changed AGAIN
@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);
@dimashutama9378
@dimashutama9378 2 месяца назад
hi, i wonder can we use full screen graph to achieve this effect?
@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
@azzaeuh
@azzaeuh Год назад
Great tutorial but I feel like the new Full Screen Pass is mostly what we needed to avoid the "Scriptable" part
@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?
@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 7 месяцев назад
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.
@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?
@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
@narenjj
@narenjj 11 месяцев назад
I am not good in shader graph. Could someone help how to mask SSAO during the compositing? as @20:06?
@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.
@CaioLMC
@CaioLMC Год назад
I found this tutorial and the way you explain and talk about it is amazing, but I've run into a problem right at the beginning, when creating the script at the line [Serializable, VolumeComponentMenuForRenderPipeline("Custom/Ben Day Bloom", typeof(UniversalRenderPipeline))] the VolumeComponentMenuForRenderPipeline part will throw an error saying that this namespace can't be found and I don't know how to fix this at all. Any ideas? Keep it up, your content is awesome!
@knightoftheblood1841
@knightoftheblood1841 Год назад
Did you install URP package?
@CaioLMC
@CaioLMC Год назад
@@knightoftheblood1841 I did, I think the problem was the version that was installed of the RPCore
@CaioLMC
@CaioLMC Год назад
@@knightoftheblood1841 I had to update Unity to a later version for it to be available
@TheGameLecturer
@TheGameLecturer 8 месяцев назад
What version ? Me I'm having this issue with 2022.3.5f1 @@CaioLMC [Edit] Anyway, if figured out that doing : public class TextureBloomEffect : VolumeComponent, IPostProcessComponent just works on its own now.
@shotoutgames8823
@shotoutgames8823 Год назад
I don't see the outline shader in the package so I can test the multipass.
@Btomaek
@Btomaek Год назад
that's cool, how do make the shadows cartoony?
@Noideagsd0
@Noideagsd0 10 месяцев назад
Haven't tried myself yet, but if I understand correctly it would probably be something like: write a custom render pass that duplicates the behaviour of the classic MainLightShadow pass, isolate the shadows, run that to a texture, then to a custom shader, then back to screen space, similar to how the bloom and AO effects are dealt with.
@dissonantprotean5495
@dissonantprotean5495 Год назад
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
@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#
@congxincheng5095
@congxincheng5095 7 месяцев назад
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!
@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.
Далее
The Strange Graphics Of LETHAL COMPANY
15:59
Просмотров 648 тыс.
20 Advanced Coding Tips For Big Unity Projects
22:23
Просмотров 150 тыс.
Remove side stitch !! 😱😱
00:29
Просмотров 13 млн
ПОЧИСТИЛ КАРТОШКУ
00:24
Просмотров 263 тыс.
Beautiful sport😍🔥
00:13
Просмотров 1,1 млн
Giving Personality to Procedural Animations using Math
15:30
How Are Games Rendering Fur?
28:51
Просмотров 408 тыс.
An introduction to Shader Art Coding
22:40
Просмотров 903 тыс.
Material Ambient Occlusion in Unreal Engine 5
6:53
Просмотров 66 тыс.
Dear Game Developers, Stop Messing This Up!
22:19
Просмотров 674 тыс.