8

I don't understand what is wrong with this shader

shader simple_material(
    color Diffuse_Color = color(0.6, 0.8, 0.6),
    float Noise_Factor = 0.1,
    normal Normal = N,
    output closure color BSDF = diffuse_toon(normalize(Normal),1.1,0.0)
    )
{
   color material_color = Diffuse_Color * mix(1.0, noise(P * 10.0), Noise_Factor);
   BSDF = material_color * diffuse_toon(normalize(Normal),1.1,0.0);
}

enter image description here

What I'm doing wrong and why the output is black ?

I checked and re-checked everything but still I don't think there is something obviously wrong with this .

user2485710
  • 247
  • 1
  • 6

1 Answers1

9

It seems that you missed one of the following settings:

enter image description here

  • Diffuse color of you OSL input node
  • Tick Open Shading Language in the render settings
  • Set Render device to CPU (GPU can't handle script nodes)
stacker
  • 38,549
  • 31
  • 141
  • 243