A shader to rgb node for Cycles too?

It is a question I have long time now: Why not having such a convertion node in Cycles too? Is there any programming difficulty in implementing such a node in Cycles also? Any explanation?

And, does anyone know a way of achieving the same result in Cycles with the already existing means of it? I mean converting, somehow, the shading to a light source dependent mask?

This has been brought up before.

To be able to drive a shader with a shader is actually pretty hard to do in an engine which is all about pathtracing (at least in a way that would be predictable). Eevee can do this because it is largely based on cutting edge rasterization tech (ie. what the old BI engine wished it could become). Even then, you have to be careful about its use once you throw in Irradiance Probes.

Now why is it so difficult with pathtracing, the nature of path tracing is essentially this; Fire a ray > evaluate the surface hit > send the ray elsewhere with new properties based on the result. A ray cannot go back to the surface hit after evaluation to modify its properties and then blend the new result into the old result, and it also cannot last over the course of two or more passes. Rasterization will often not even utilize raytracing for certain things and is generally not progressive, so all evaluation can be done in as many steps as needed.

1 Like

Thanks for the explanation Ace_Dragon. :slightly_smiling_face: