ISL = Interactive Shading Language

#include <swizzle.h>
uniform color greentable[2] =
{color(0,.2,0,1), color(0,.4,0,1)};

surface
toon( uniform float do_toon = 1.;
      uniform float edge = .25)
{
  FB = environment("redpark.env");
  if (do_toon > .5) {
      FB += edge;
      FB = transform(rgba_rrra);
      FB = lookup(greentable);
      FB += environment("sun.env");
  }
}