Light information in Post Proccess

Hey there!

I’m working on a NPR environment and I would like to have custom shadows. I thought using a Post Proccess with a WorldAlignedTexture would do the trick, but I’m running into a problem: how can I get how ‘lit’ is a pixel? I know there’s nothing like a Light Buffer, but there must be a way to reverse engineer the light using BaseColor and the pixel color.

Any ideas?

This sounds to me like it’ll need source code access.

Light function would be good choise.
Edit: I use this for custom cloud projection shadows.

Yeah, what you just said. PostProcessInput 0 / Base Color = lighting multiplier for that pixel.

It’s how I do it in my cel shader, for instance.

Yep, that’s what I’m doing. I hooked up the output directly to the emissive, and the results are pretty nice, except for the only thing I actually need it for:

Here’s a scene without the Post Proccess:
HighresScreenshot00003.png

Here’s the same scene with the Post Proccess:
Untitled.png

As you can see, the black/red texture is completely messed up. Any ideas?

What are you trying to do, exactly? It looks correct to me; the output is showing just the effects of the light with no coloration.

Yes, but the red/black square turns completely black, when it should be similar to the panel right above it.