GrabPass in Deferred

Your feedback is very important to us. We are listening.

Re: GrabPass in Deferred

Postby Cyntherius » Thu Jul 05, 2018 3:29 pm

Is there a specific reason why you want to use Deferred only?


Yes, the simple reason is the screen space reflection post process from the unity post processing stack. In my project i wont/cant use a second camera or reflection probe for realtime reflections because of performance reasond and target platform. When you use the "all" option SSR-PP doesn't work.
Cyntherius
 
Posts: 12
Joined: Thu Dec 14, 2017 1:00 pm

Re: GrabPass in Deferred

Postby Amplify_Borba » Thu Jul 05, 2018 5:07 pm

Thank you for the additional details!

You are right that Unity's SSR does not work in Forward, however, as it's stated in Unity's Official Documentation, one of the downsides of deferred shading is that it has no real support for anti-aliasing and can’t handle semi-transparent GameObjects. These are rendered using forward rendering.

Unfortunately, I believe that you'll have to consider using both modes in order to deal with transparent objects.

Please let me know if you have any further questions.
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: GrabPass in Deferred

Postby pdrummond » Thu Sep 20, 2018 6:22 pm

I understand you can't use Grab Screen Color in deferred so I changed my setup to forward. However, I'm using Custom Lighting and still can't grab from the screen. Does this only work in deferred with standard lighting?
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: GrabPass in Deferred

Postby pdrummond » Thu Sep 20, 2018 6:26 pm

Should have explained what I'm trying to do. I want to grab the surface colours, apply some selective blurring, apply SSS and the specular highlights, then pass the result to the renderer.
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: GrabPass in Deferred

Postby pdrummond » Thu Sep 20, 2018 9:09 pm

Alternatively, a way to take the RGB from the Standard Surface Node, blur it, then pass it along to Custom Lighting in the output node would work. I'm investigating this approach now but not quite getting it.
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: GrabPass in Deferred

Postby Amplify_Borba » Fri Sep 21, 2018 8:38 am

Hello! The grab pass should be working in the Custom Lighting model, can you please elaborate on the issues you've come across, perhaps by sharing a shader sample with the issue present and an example of the expected results so that we may best help you?
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: GrabPass in Deferred

Postby pdrummond » Fri Sep 21, 2018 9:37 am

It looks like I need to use deferred lighting for this project so grab pass isn't an option. I'm now looking at ways to manipulate the output of the Standard Surface Lighting node before passing it to the output.

In this example I'm calculating SSS in a separate branch of the shader then adding the results to the output of the Standard Surface Lighting node via an Add node. This works fine. What I'd like to do is take this RBG data and do some selective blurring on the R, G and B channels, recombine this back into RGB data and pass it along to the output. Is this possible or am I wasting my time?

Any help is much appreciated.

Image
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: GrabPass in Deferred

Postby Amplify_Borba » Fri Sep 21, 2018 11:01 am

Unfortunately, in this particular situation I believe that you'll have to use Forward rendering and the Grab Screen Color & Position nodes in order to achieve the desired effect, also due to the fact that we are unable support Deferred rendering in Custom Lighting, which is a limitation on our side.

When using Deferred, the information of the object is allocated to the G-Buffers, and the illumination is only calculated in the end, so there's no way to completely capture the information of what's behind an object. You could possibly try to capture a render texture manually and pass it to the shader, but you'd end up having the same issues as if you were using the grab pass.

If possible, could you please elaborate on the restrictions which require you to use Deferred in your project, so that we may try to help you tackle this situation?
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 1239
Joined: Mon Jul 24, 2017 9:50 am

Re: GrabPass in Deferred

Postby pdrummond » Fri Sep 21, 2018 1:26 pm

I need to use deferred lighting because of requirements for specific screen space post effects (and general flexibility for future work).

I think I'm close to a workable solution because I can get the RGB output from the Standard Surface Light node, split it into R,G and B for manipulation. I just need a way to recombine these separate R, G, B channels as RGBA data and pass it to Custom Lighting on the Output node.

Thanks for your help. Much appreciated.
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

Re: GrabPass in Deferred

Postby pdrummond » Fri Sep 21, 2018 1:59 pm

I suppose what I need is the opposite of Break to Components:

Image
pdrummond
 
Posts: 26
Joined: Wed Sep 19, 2018 12:28 pm

PreviousNext

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron