Possible to change colors after shadow pass?

Hello,

I’m trying to hue shift colors that are in direct light a bit towards yellow and the ones in shadow towards purple (for better aesthetics).

I got UE4.27 source code and built it and I’m trying to figure out how the deferred rendering pipeline works in code.

My idea is to take the lighting data after shadow pass and change the base color in the GBuffer before the final image is shown on screen but I couldn’t find an exact GBuffer variable and also don’t have any clue as to where the shadow pass ends.

Does anyone know more about this?

why not just use a postprocessing volume. and tweak the color grading options. i don’t have 4.2x lying around, but it should have the options for shadow and light grading.

1 Like

I’m using AgX tonemapper so that disables some post processing options like color grading.

Also, as far as I know, materials aren’t aware of how much light is hitting them.

Maybe I’m just being ignorant but I don’t see how post processing can help.

There is no way to do this in deferred, what you can do is try to isolate dark/bright areas in post process and then do whatever you want with them but you wont actually have access to the light information nor the shadow information.

(Unless you switch to forward rendering and look at some of the forward shading extension plugins)

Hi, in UE 5.4 (don’t have 4.x anymore to check there) you can change the scene color and shadow color in the post process volume under Color Grading. For the shadows the setting is under Color Grading → Shadows. So you could e.g. add a purple offset to the shadows there.

Yeah, post processing doesn’t make that effect.

I enabled forward rendering some time ago just to test how it looks and it seems like the graphics are quite worse, some of my materials with blend screen are just horrible.

So there’s no way to do it in deferred?

I got the idea for the hue shifting from this video:

The guys at Lego tried new rendering method and the results were pretty dramatic.
Before:


After:

The post processing volume can barely do anything since I have AgX tonemapper (I wanted correct colors), only exposure, lens flares, bloom and such work, any color grading is disabled.