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 905B

12345678910111213141516171819202122232425262728293031323334353637
  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. try{ //problematic
  22. params = gui.bricks.get(pos).params;
  23. } catch(Exception e){}
  24. if(frameRate < 1) println("Rendering " + this + " on position " + pos + "...");
  25. }
  26. void changeParam(int paramNo, Param newParam){
  27. gui.bricks.get(pos).params.remove(paramNo);
  28. gui.bricks.get(pos).params.add(paramNo, newParam);
  29. gui.bricks.get(pos).exchangeSlider(paramNo, newParam);
  30. }
  31. void apply() {
  32. }; //override me
  33. }