Adjusting hightlight & shade colors via shaderChunks

Hello community,

I’m looking to get a similar effect to Unity’s ToonShaders, where you can adjust model’s highlight&shade colors (see the screenshot below).

Could anybody point me where to dig and what shader chunk includes the code that mixes the albedo with received light & calculates the reflected light intensity?
Maybe somebody has done it before? :slight_smile:

I had a quick look at this and it’s not easy to add I think, as the code that combines the attenuation (which is based on the light direction in regards to the normal, but also contains shadow attenuation) is not in a chunk but it’s a shader code generated using javascript here:

custom engine with a change to this is one way, not sure what other options are here.

1 Like