I'm making a shader for people that relies heavily on the ability to take incoming light and use it as a way of blending 2 materials. For Eevee, it works perfectly. Take a diffuse shader, plug it into a shader to RGB, and go to town using it as a mask for all sorts of things. It works just as intended. So that half of the shader is done.
Unfortunately, as far as Cycles is concerned, it doesn't work. Shader to RGB isn't supported at all (which is understandable). So I'm after a solution to this problem. Like the post says, is there any way in Cycles to take incoming light, and turn it into a black and white mask to blend things?
I should specify that it shouldn't rely on drivers from the lights, or baking. Ideally I want this shader to be plug and play without requiring any real tweaking from the end-user apart from messing around with the shader parameters.
I'm sure there's some halfway-functional roundabout way of getting some kind of light mask out of Cycles. It doesn't have to be a perfect solution either, even something that approximates it would be decent enough. Any help would be greatly appreciated.
I've taken a look at these two answers:
And they seem like they'd do the job, but it doesn't seem like it would work with multiple lights, won't work with indirect light (which isn't a huge dealbreaker), and seems kind of involved a process to expect for an end user of the shader.
As said before, any help would be appreciated, and the result doesn't have to be perfect. I realize I'm asking something that's generally considered "impossible" as far as cycles is concerned, but I do think there's some way to get something working. Even if it's a bit hacked together.