Thank you so much for this video! I was having a lot of trouble getting full screen shaders to work until this video. None of the other videos talked about the sample texture 2D node and the MainTex to get it to be based off of what was already there. Thank you again!
Hi Bill, thanks for a great video and blog post. I have a kinda related question i would like to ask. Using the built-in renderer and a component on the camera you could fairly easily modify the shader over a duriation of time by feeding it variables in a coroutine or the update function. Do you have any idea how one would about doing that in UPR, or if it's even still possible?
The shader itself (the old movie) will work in HRDP, but the full-screen setup is different. On my article gamedevbill.com/full-screen-shaders-in-unity/ I cover how to set up full screen shaders in HDRP, URP, and the legacy renderer. In this video I only cover URP because it's the most complex. HDRP is much easier to set up, but requires code shaders (not shader graph). If is possible to convert a graph to code though, which I cover early in my tutorial on Geometry Shaders in Unity - ruclips.net/video/beSRCSRS6mI/видео.html
Hey Bill, thanks for the input, keep up the great work, really helpful so far! Is it possible to achieve these fullscreen effects with the "New 2D Renderer" of the URP instead of the Forward one? Cause there i cant find the option to add a new renderer feature :(
You're the second person to ask this. I had not realized that the new 2d renderer behaved differently. I'll have to look into it and get back to you both.
@@GameDevBill Hey again, I suppose you also surrendered and accepted the fact it's not really possible with the current version of unity and the 2d renderer? :D
if you want this to work in later versions. at least 2022 LTS. you'll need to create a SetupRenderPasses override in the blitter code. something like public override void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData renderingData) { var src = renderer.cameraColorTargetHandle; var dest = (settings.destination == Target.Color) ? RenderTargetHandle.CameraTarget : m_RenderTextureHandle; blitPass.Setup(src, dest); } and remove the stuff from AddRenderPasses override. public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) { if (settings.blitMaterial == null) { Debug.LogWarningFormat("Missing Blit Material. {0} blit pass will not execute. Check for missing reference in the assigned renderer.", GetType().Name); return; } renderer.EnqueuePass(blitPass); } there's still some obsolete stuff in there, but I'm only doing a few tests, so I'm going to ignore them. good luck.
what do you mean by "transparent". The shader shouldn't really have transparency. Basically the scene has rendered to a texture, then you are reading that scene in through MainTex. You can then do whatever you want to that color before drawing it out. But you can't make it transparent because there's nothing behind this. If you have the shader graph just as of 4:44 do you see the sepia scene? Or something else? If more discussion is needed, feel free to reply to my thread on the Unity forums here: forum.unity.com/threads/gamedevbill-tutorial-comment-thread.945515/ There you can include screenshots and go into more detail if it still isn't working.
Really great video. Thank you a lot for your time and dedication. I'm having some trouble visualizing the effect as my screen stays completely white. I've created the Blit script and used it as a Renderer Feature in the ForwardRenderer. The "Event" is set to "After Rendering Transparents". My "Blit Material" is based on the "Shockwave shader" you explain in another of your video. Still, I can't see anything but white color on the screen. That being said, when I changed the MainTexture of my shockwave material, I see the effect working perfectly on the 2D texture. Would someone have any idea of what I am doing wrong ? Why can't I see my scene and the screen effect on top of it? Maybe there is something wrong with my postprocessing settings? On that front, my Volume Profile works well as I can add override effects like bloom, film grain, vignette, etc. with no problem? Any help would be a blast ! Thanks.
I've done my homework and the problem was related to my Texture2D input. I add named its reference "MainTexture" instead of "_MainTex". Now everything works like a charm. I'll have to read to doc more carefully next time. Sorry for bothering.
@@gamingarchive8435 Hey Thanks, Man. I was also looking at why the effect is not coming in my scene. Seriously sometimes it was frustrating. But thanks to your Homework. I was making the same mistake. Thanks once again.
Thank you so much for this video! I was having a lot of trouble getting full screen shaders to work until this video. None of the other videos talked about the sample texture 2D node and the MainTex to get it to be based off of what was already there. Thank you again!
man, why didnt i find you earlier. i was searching for soooo long for a good shader graph tutorial. finally i found you!
Thanks for the kind words. Happy to help :)
Your explaination is very clear, hope you will continue series
Hi Bill, thanks for a great video and blog post.
I have a kinda related question i would like to ask.
Using the built-in renderer and a component on the camera you could fairly easily modify the shader over a duriation of time by feeding it variables in a coroutine or the update function.
Do you have any idea how one would about doing that in UPR, or if it's even still possible?
I lost at 3:26.. where can i set post processing ?
I would like to ask if this is the same process when I apply this to HDRP?
The shader itself (the old movie) will work in HRDP, but the full-screen setup is different. On my article gamedevbill.com/full-screen-shaders-in-unity/ I cover how to set up full screen shaders in HDRP, URP, and the legacy renderer. In this video I only cover URP because it's the most complex. HDRP is much easier to set up, but requires code shaders (not shader graph). If is possible to convert a graph to code though, which I cover early in my tutorial on Geometry Shaders in Unity - ruclips.net/video/beSRCSRS6mI/видео.html
Every time i click on "add render feature > Blit" nothing happens
forget it, i just had to name my script as "Blit"
Glad you got it working :)
this was very helpful! quite suprised that image effects arent as straight forward as in the built-in.
Thanks :)
Glad you liked it!!
Awesome stuff! What really is the difference between LWRP and URP? Would this approach work in lwrp too?
URP is just the new name of LWRP. It was rebranded, i think in one of the 2019 releases.
So yeah, this will be the same in LWRP.
GameDevBill Thank you so much!!
How to use it on the 2D renderer? thank you!
Hey Bill, thanks for the input, keep up the great work, really helpful so far!
Is it possible to achieve these fullscreen effects with the "New 2D Renderer" of the URP instead of the Forward one?
Cause there i cant find the option to add a new renderer feature :(
You're the second person to ask this. I had not realized that the new 2d renderer behaved differently. I'll have to look into it and get back to you both.
@@GameDevBill Hey again, I suppose you also surrendered and accepted the fact it's not really possible with the current version of unity and the 2d renderer? :D
@@GameDevBill Also seeking this! Thanks :)
Count me in as one more person interested in this!
@@TheodorGal There is now a Camera Sorting Layer Texture for the new 2D renderer. Still figuring it out though :D
cool Batman
if you want this to work in later versions. at least 2022 LTS. you'll need to create a SetupRenderPasses override in the blitter code. something like
public override void SetupRenderPasses(ScriptableRenderer renderer, in RenderingData renderingData) {
var src = renderer.cameraColorTargetHandle;
var dest = (settings.destination == Target.Color) ? RenderTargetHandle.CameraTarget : m_RenderTextureHandle;
blitPass.Setup(src, dest);
}
and remove the stuff from AddRenderPasses override.
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData) {
if (settings.blitMaterial == null) {
Debug.LogWarningFormat("Missing Blit Material. {0} blit pass will not execute. Check for missing reference in the assigned renderer.", GetType().Name);
return;
}
renderer.EnqueuePass(blitPass);
}
there's still some obsolete stuff in there, but I'm only doing a few tests, so I'm going to ignore them. good luck.
thanks for ur sharing! but Why is my screen color not transparent? I followed your steps exactly ,but my unity is urp 2020.
what do you mean by "transparent". The shader shouldn't really have transparency. Basically the scene has rendered to a texture, then you are reading that scene in through MainTex. You can then do whatever you want to that color before drawing it out. But you can't make it transparent because there's nothing behind this.
If you have the shader graph just as of 4:44 do you see the sepia scene? Or something else? If more discussion is needed, feel free to reply to my thread on the Unity forums here: forum.unity.com/threads/gamedevbill-tutorial-comment-thread.945515/ There you can include screenshots and go into more detail if it still isn't working.
Really great video. Thank you a lot for your time and dedication.
I'm having some trouble visualizing the effect as my screen stays completely white. I've created the Blit script and used it as a Renderer Feature in the ForwardRenderer. The "Event" is set to "After Rendering Transparents". My "Blit Material" is based on the "Shockwave shader" you explain in another of your video. Still, I can't see anything but white color on the screen. That being said, when I changed the MainTexture of my shockwave material, I see the effect working perfectly on the 2D texture.
Would someone have any idea of what I am doing wrong ? Why can't I see my scene and the screen effect on top of it? Maybe there is something wrong with my postprocessing settings? On that front, my Volume Profile works well as I can add override effects like bloom, film grain, vignette, etc. with no problem? Any help would be a blast ! Thanks.
I've done my homework and the problem was related to my Texture2D input. I add named its reference "MainTexture" instead of "_MainTex". Now everything works like a charm. I'll have to read to doc more carefully next time. Sorry for bothering.
@@gamingarchive8435 Hey Thanks, Man. I was also looking at why the effect is not coming in my scene. Seriously sometimes it was frustrating. But thanks to your Homework. I was making the same mistake. Thanks once again.