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 ?