diff --git a/data/saves.sav b/data/saves.sav index 0d2ed77..a52ff63 100755 --- a/data/saves.sav +++ b/data/saves.sav @@ -1,2 +1,2 @@ //globals -uptime = 116657675 +uptime = 116660036 diff --git a/effects.pde b/effects.pde index 9d86fe5..b04e99a 100644 --- a/effects.pde +++ b/effects.pde @@ -1535,7 +1535,6 @@ class DARKER extends Shader { */ class BRIGHTER extends Shader { - float thresh = 120; float thresh2 = 150; float brighten = 180; @@ -1547,15 +1546,11 @@ class BRIGHTER extends Shader { params.add(new Param("brighten", INTVAL, 0, 255, new int[]{TRIANG, SINE, RAMPUPDOWN })); } - - void apply() { brighten = int(params.get(2).value); thresh2 = int(params.get(1).value); thresh = int(params.get(0).value); - - renderer.beginDraw(); renderer.colorMode(HSB); colorMode(HSB); @@ -1578,8 +1573,92 @@ class BRIGHTER extends Shader { } } +/* + +AMPLIFY + + */ +//13 +class AMPLIFY extends Shader { + int spawnT; + float h, s, b; + AMPLIFY() { + name = "fxAmplify"; + params.add(new Param("hue / red", FLOATVAL, -255, 255, new int[]{SAWTOOTH, TRIANG, SINE, TAN, TANINVERSE, RAMPUPDOWN, RAMP, RAMPINVERSE})); + params.add(new Param("saturation / green", FLOATVAL, -255, 255, new int[]{SAWTOOTH, TRIANG, SINE, TAN, TANINVERSE, RAMPUPDOWN, RAMP, RAMPINVERSE})); + params.add(new Param("brightness / blue", FLOATVAL, -255,255, new int[]{SAWTOOTH, TRIANG, SINE, TAN, TANINVERSE, RAMPUPDOWN, RAMP, RAMPINVERSE})); + params.add(new Param("RGB / HSB", INTVAL, 0, 1, new int[]{SQUAR, RANDOM})); + } + void apply() { + renderer.beginDraw(); + if(params.get(3).value > 0) colorMode(HSB); + else { colorMode(RGB); } + renderer.loadPixels(); + for (int i = 0; i < renderer.width*renderer.height; i++) { + float h = hue(renderer.pixels[i]); + float s = saturation(renderer.pixels[i]); + float b = brightness(renderer.pixels[i]); + renderer.pixels[i] = color(h+params.get(0).value,s+params.get(1).value,b+params.get(2).value); + } + renderer.updatePixels(); + renderer.endDraw(); + colorMode(RGB); + } +} + + + +class BROKENCOLORROT extends Shader { + int spawnT; + float h, s, b; + BROKENCOLORROT() { + name = "fxHSB"; + + params.add(new Param("hue", INTVAL, 0, 255, new int[]{SAWTOOTH, TRIANG, SINE, TAN, TANINVERSE, RAMPUPDOWN, RAMP, RAMPINVERSE})); + params.add(new Param("saturation", INTVAL, 0, 255, new int[]{SAWTOOTH, TRIANG, SINE, TAN, TANINVERSE, RAMPUPDOWN, RAMP, RAMPINVERSE})); + params.add(new Param("brightness", INTVAL, 0, 255, new int[]{SAWTOOTH, TRIANG, SINE, TAN, TANINVERSE, RAMPUPDOWN, RAMP, RAMPINVERSE})); + params.add(new Param("mode", INTVAL, 0, 1, new int[]{SQUAR, RANDOM})); + } + void apply() { + renderer.beginDraw(); + if(params.get(3).value > 0) colorMode(HSB); + else { colorMode(RGB); } + renderer.loadPixels(); + float h = params.get(0).value; + float s = params.get(1).value; + float b = params.get(2).value; + for (int i = 0; i < renderer.width*renderer.height; i++) { + h = hue(renderer.pixels[i])+h; + if(h > 255) h -= 255; + s = saturation(renderer.pixels[i])+s; + if(s > 255) s -= 255; + b = brightness(renderer.pixels[i])+b; + if(b > 255) b -= 255; + renderer.pixels[i] = color(h, s, b); + } + renderer.updatePixels(); + renderer.endDraw(); + colorMode(RGB); + } +} + +} + + +/* + +BUFFER + +*/ + +class BUFFER extends Shader{ + BUFFER(){ + name = "BUFFER"; + } + +} @@ -1608,8 +1687,8 @@ class BRIGHTER extends Shader { // name String getColorspaceName(int cs) { switch(cs) { - case OHTA: - return "OHTA"; + case OHTA: + return "OHTA"; case CMY: return "CMY"; case XYZ: diff --git a/secondapplet.pde b/secondapplet.pde index 36fe339..deac531 100644 --- a/secondapplet.pde +++ b/secondapplet.pde @@ -536,6 +536,12 @@ public class SecondApplet extends PApplet { case(10): shaderManager.addShader(new BRIGHTER()); break; + case(11): + shaderManager.addShader(new AMPLIFY()); + break; + case(12): + shaderManager.addShader(new BROKENCOLORROT()); + break; /* case(4): shaderManager.addShader(new AUECHO()); diff --git a/statics_and_lists.pde b/statics_and_lists.pde index 10e44eb..673636f 100644 --- a/statics_and_lists.pde +++ b/statics_and_lists.pde @@ -52,19 +52,22 @@ String availableFx[] = { "fxEcho", "fxDarker", "fxBrighter", + "fxAmplify", + "fxBrokenColorRot", + "fxMove", - "fxScale", "fxEpilepsy", "fxPosterize", "fxCopyZoom", "fxDual", "fxScanker", "fxPixelSort", - "fxHSB", "fxEcho", "fxSubtleSort", "fxBlackWhite", + "fxDrawGenerative", "fxDrawStrokes", + "fxGrauzone" };