ramp_closure.osl 529 B

1234567891011121314151617181920
  1. shader node_ramp_bsdf(
  2. float Exponent = 10.0,
  3. color Color1 = color(0.8, 0.0, 0.0),
  4. color Color2 = color(0.0, 0.8, 0.0),
  5. color Color3 = color(0.0, 0.0, 0.8),
  6. color Color4 = 0.1,
  7. color Color5 = 0.2,
  8. color Color6 = 0.3,
  9. color Color7 = 0.4,
  10. color Color8 = 0.5,
  11. normal Normal = N,
  12. output closure color Phong = 0,
  13. output closure color Diffuse = 0)
  14. {
  15. color Color[8] = {Color1, Color2, Color3, Color4, Color5, Color6, Color7, Color8};
  16. Phong = phong_ramp(Normal, Exponent, Color);
  17. Diffuse = diffuse_ramp(Normal, Color);
  18. }