I’m using a link between the material and the light based on the light position to get an effect similar to the diffuse shader that interacts with the light. It’s working good but I can’t receive any shadows with this setup because it’s directly connected to the light. (I’m using this setup because in cycles we can’t convert shader to RGB like Evee). This is a test to get what I mean
so I searched and found that OSL might help in this situation either by
- converting the shader data (closure) to RGB or
- obtaining in the received shadows as RGB mask inside the shader itself.
I’ve got an OSL script that uses the diffuse toon shader inside the osl all I need to do is converting the output type from closure to RGB.
color Diffuse_Color = color(0.6, 0.8, 0.6), normal Normal = N, output closure color BSDF = 0 )
BSDF = Diffuse_Color * diffuse_toon(normalize(Normal),1.1,0.0);
Thanks in advance!