--@TBCONFIG INFO: Graphite
--@TBCONFIG INFO: Revision 1
--@TBCONFIG INFO:  
--@TBCONFIG INFO: A very versatile photo to graphite filter.
--@TBCONFIG SLIDER: Line Darkness, 15
--@TBCONFIG SLIDER: Line Threshold, 99
--@TBCONFIG SLIDER: Graphite Rub, 70
--@TBCONFIG SLIDER: Lightness, 10
--@TBCONFIG SLIDER: Darkness, 40
--@TBCONFIG SLIDER: Dark Contrast, 10

paint_open(0)

paint_filter("Edge3",0,sliderVal4 * 1000,sliderVal5 * 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)

paint_buffer_from_layer(0)
paint_filter("Negative",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_filter("Glow",0,sliderVal1 * 1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_filter("Negative",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_filter("Line Art Cleaner",0,sliderVal2 * 1000,1000,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_buffer_from_layer(1)

paint_buffer_to_layer(0)
paint_filter("Contrast Mask",0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0)
paint_filter("Color Contrast",0,1000 - (sliderVal3 * 1000),0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0)

paint_buffer_merge_layer(1, MERGE_MULTIPLY, 255)

if sliderVal6 > 0 then
  paint_filter("Levels",0,sliderVal6 * 1000,1000,0,1000,0,0,0,0,1,1,1,0,0,0,0,0,0,0)
end

paint_close()
