Access lighting pass (shadergraph + lightweight pipeline)

Hi all, first forum post, and my graphics lingo is a bit underdeveloped still, so bear with me…

Im building a shader with a custom shadow effect. Instead of regular “darkness” it should sample a screen space pattern. This worked fine in forward rendering with shaderforge. However, i decided I wanted to try to do a pbr version (now in the new shader graph). I noticed I couldnt get the lighting pass from the buffer. I’ve looked everywhere but can’t seem to find it.

tl;dr I need access to the lighting pass in shader graph if thats even possible.

Thanks in advance.

You cant get lighting data in shadergraph yet, you will need to edit the code directly for this.

Hmmm. I need to solve similar thing. Any ideas if and when it might be implemented?

No idea, but for now you can look at lighting.hlsl in the SRP github to get an idea of how to do this by code.

https://github.com/Unity-Technologies/ScriptableRenderPipeline/blob/master/ScriptableRenderPipeline/LightweightPipeline/LWRP/ShaderLibrary/Lighting.hlsl

I was afraid this was the case. Seems I have some more work to do :slight_smile:

These will help as they are the threads I have gone through to collate info on this:

https://discussions.unity.com/t/699223

https://discussions.unity.com/t/687786

https://discussions.unity.com/t/700302