--@TBCONFIG INFO: Constrast Soft Light
--@TBCONFIG INFO: Revision 1
--@TBCONFIG INFO:  
--@TBCONFIG SLIDER: Strength, 100
--@TBCONFIG FLAG: Post Levels, true
--@TBCONFIG FLAG: Post Histo Stretch, false



paint_open(0)

paint_buffer_from_layer(0)

paint_filter("Grayscale",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
paint_filter("Surface Blur",0,1000,1000,0,0,0,0,0,0,1,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_buffer_from_layer(1)
paint_buffer_to_layer(0)
paint_buffer_merge_layer(1, MERGE_SOFT_LIGHT, sliderVal1 * 255)

if flagVal1 == true then
  paint_filter("Levels",0,0,1000,0,1000,0,0,0,0,1,1,1,0,1,0,0,0,0,0)
end

if flagVal2 == true then
  paint_filter("Histogram Stretch",0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
end

paint_close()




