Where to modifying shadows with GBuffer?

Hello :slight_smile:

I am currently working on a custom shading model and want to modify the shadows on an object.
The model itself is already working. GBuffer-data comes in through CustomDataPins, but I am searching for the place where I can modify the shadow.

I already found ShadowProjectionPixelShader, where I can modify at least some parts of the shadow (except the faces that are facing away from the light)


(in the image: table has custom shading on it that removes the shadow on all the faces pointing towards the light)

The goal is to make it work with baked lighting as well, but thatโ€™s not so important right now.
It would be great if someone can give me a hint where to put my modifications.

Thanks in advance! :slight_smile:

I guess I just figured it out.

The model is shadowed by default and only the light is added later. Just need to add light in the places where I donโ€™t want to have shadows during light calculation in DeferredLightingCommon.

1 Like