I would like to create a post process shader where certain things would be displayed only on parts of my scene where lights hits my mesh with a certain intensity. It has to be “procedural”, so work with any lights and number of lights in any scene.
The only way I found is by dividing the scenetexture PostProcess0 pass and the scenetexture DiffuseColor, and then setting a threshold with an “IF”, the result of the IF is used as a mask to apply or not my postprocess. This gives me a correct result, but works very badly with high metalness and roughness.
So my question is : Is there a way to have the same result, but fully working ?
I think I miss explained haha
I basically want to create a mask to apply my post process. This mask has to be defined by how much light hits my object, and has to work with any number of light (not be specific to one light).
Here are a screenshot of how I did it :
And here is what is the result, as you can see some object are fully white but aren’t very impacted by the lights, that’s because of rougness and metallic, they tend to do “false positives” :
its kinda hacky and i dont know if it will work but you could use a second camera to render to a texture but on that cam use lighting only mode… then turn that lighing texture into a mask
I think there’s a console command for lighting only mode but cant remember now
I’m not quite sure on how to use it. What I immagine is executing this command only on one specific camera, but I’m not really savy with blueprint, anyone have any idea ?