compositor for 2d glitch effects
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shader.pde 855B

1234567891011121314151617181920212223242526272829303132333435
  1. class Param {
  2. String name;
  3. int type;
  4. float minValue, maxValue;
  5. float value;
  6. int[] osciModes;
  7. Param(String name_, int type_, float minValue_, float maxValue_, int[] osciModes_) {
  8. name = name_;
  9. type = type_; //FLOATVAL or INTVAL
  10. minValue = minValue_;
  11. maxValue = maxValue_;
  12. osciModes = osciModes_;
  13. }
  14. }
  15. class Shader {
  16. int id;
  17. int pos;
  18. String name;
  19. ArrayList<Param> params = new ArrayList<Param>();
  20. void getValuesFromGUI(){
  21. params = gui.bricks.get(pos).params;
  22. if(frameRate < 1) println("Rendering " + this + " on position " + pos + "...");
  23. }
  24. void changeParam(int paramNo, Param newParam){
  25. gui.bricks.get(pos).params.remove(paramNo);
  26. gui.bricks.get(pos).params.add(paramNo, newParam);
  27. gui.bricks.get(pos).exchangeSlider(paramNo, newParam);
  28. }
  29. void apply() {
  30. }; //override me
  31. }