ev_glsl-help.pd 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #N canvas 263 22 1013 708 10;
  2. #X declare -path . -path .. -path data -path ../data -path ev-in -path
  3. ../ev-in -path ev-main -path ../ev-main -path ev-pano -path ../ev-pano
  4. -path ev-pro -path ../ev-pro -path libs/gil -path ../libs/gil -path
  5. libs/kollabs -path ../libs/kollabs -path media -path ../media -path
  6. ev-glsl -path ../ev-glsl -lib Gem;
  7. #X obj 372 159 cnv 15 250 500 empty empty patch 20 12 0 14 -262130
  8. -66577 0;
  9. #X obj 6 -2 cnv 15 925 16 empty empty EXTENDED_VIEW_GLSL-MODULE 2 8
  10. 0 14 -99865 -262144 0;
  11. #X text 61 540 (c)2012 Marian Weger \; part of EXTENDEDVIEW toolkit/
  12. gpl v3;
  13. #X obj 632 160 cnv 15 300 300 empty empty controls_for_shader 20 12
  14. 0 14 -204800 -66577 0;
  15. #X obj 439 316 loadbang;
  16. #X obj 417 317 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
  17. -1 -1;
  18. #X obj 389 380 pix_image;
  19. #X obj 650 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -258113
  20. -1 -1 7000 1;
  21. #X obj 670 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -4034
  22. -1 -1 6350 1;
  23. #X obj 690 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -4160
  24. -1 -1 6350 1;
  25. #X msg 417 344 open ../media/cam2.jpg;
  26. #X obj 389 225 gemhead;
  27. #X obj 650 195 loadbang;
  28. #X msg 650 428 gain \$1 \$2 \$3 \$4;
  29. #X obj 389 268 alpha;
  30. #X obj 710 255 vsl 15 128 0 2 0 0 empty empty empty 0 -9 0 10 -1 -262144
  31. -1 6350 1;
  32. #X msg 650 217 1;
  33. #N canvas 0 22 450 300 pack4 0;
  34. #X obj 141 102 t b f;
  35. #X obj 181 102 t b f;
  36. #X obj 221 102 t b f;
  37. #X obj 101 162 pack 1 1 1 1;
  38. #X obj 101 42 inlet;
  39. #X obj 141 42 inlet;
  40. #X obj 181 42 inlet;
  41. #X obj 221 42 inlet;
  42. #X obj 101 204 outlet;
  43. #X connect 0 0 3 0;
  44. #X connect 0 1 3 1;
  45. #X connect 1 0 3 0;
  46. #X connect 1 1 3 2;
  47. #X connect 2 0 3 0;
  48. #X connect 2 1 3 3;
  49. #X connect 3 0 8 0;
  50. #X connect 4 0 3 0;
  51. #X connect 5 0 0 0;
  52. #X connect 6 0 1 0;
  53. #X connect 7 0 2 0;
  54. #X restore 650 406 pd pack4;
  55. #X obj 372 470 cnv 15 560 230 empty empty empty 20 12 0 14 -262130
  56. -66577 0;
  57. #X text 432 266 needed only \, if the shader;
  58. #X text 432 279 works with alpha.;
  59. #X text 737 275 These controls are only for the;
  60. #X text 737 288 "gain" shader loaded in this;
  61. #X text 739 301 example.;
  62. #X text 739 331 Other shaders might need;
  63. #X text 739 344 different controls.;
  64. #X obj 6 24 cnv 15 360 250 empty empty description 5 12 0 12 -233017
  65. -66577 0;
  66. #X text 9 41 This abstraction loads pairs of GLSL Fragment and Vertex-Shaders
  67. \, and applies them to the gemlist.;
  68. #X text 18 142 <name>.frag contains the fragment shader.;
  69. #X text 18 158 <name>.vert contains the vertex shader.;
  70. #X text 8 92 This abstraction needs specific "<name>.frag" \, "<name>.vert"
  71. and "<name>.ctl.pd" files \, sitting in the "./glsl" folder \, where:
  72. ;
  73. #X obj 6 286 cnv 15 360 60 empty empty creation_arguments: 5 12 0 12
  74. -162280 -1 0;
  75. #X text 9 308 1st: shader name;
  76. #X obj 6 359 cnv 15 360 70 empty empty inlets/outlets 5 12 0 12 -233017
  77. -66577 0;
  78. #X text 11 379 Inlet 1: GEMlist;
  79. #X text 201 379 Outlet 1: GEMlist;
  80. #X text 11 394 Inlet 2: Shader controls;
  81. #X text 18 176 <name>.ctl.pd is a small pd abstraction with the controls
  82. of the shader. A template can be found in here:;
  83. #X obj 373 32 cnv 15 300 120 empty empty Create_Gem_Window 20 12 0
  84. 14 -204786 -66577 0;
  85. #X obj 394 127 gemwin 20;
  86. #X msg 430 103 0 \, destroy;
  87. #X msg 394 77 dimen 800 600 \, color 0.5 0.5 0.5 \, create \, 1;
  88. #X text 437 59 CLICK HERE TO START:;
  89. #X obj 79 617 ../ev-main/ev_declare;
  90. #X text 81 596 load required pathes;
  91. #X obj 6 445 cnv 15 360 70 empty empty GUI_controls 5 12 0 12 -204800
  92. -66577 0;
  93. #X text 11 475 on/off --- on (shader active) \, off (shader inactive)
  94. ;
  95. #X text 121 214 Template for "<name>.ctl.pd";
  96. #X obj 389 577 pix_texture;
  97. #X obj 389 679 rectangle 4 3;
  98. #X msg 464 610 \$3 \$2;
  99. #X obj 464 632 /;
  100. #X obj 464 654 * 4;
  101. #X text 514 616 scale rectangle automatically to the aspect ratio of
  102. the texture.;
  103. #X text 575 523 apply the shader that is specified by creation argument
  104. ;
  105. #X msg 406 553 rectangle 1;
  106. #X obj 406 531 loadbang;
  107. #X text 486 554 "rectangle texturing" needed for this shader;
  108. #X obj 411 436 bng 15 250 50 0 empty empty bang_to_reload_shaders 17
  109. 7 0 10 -262144 -1 -1;
  110. #X obj 151 236 glsl/name.ctl;
  111. #X text 69 236 Look inside:;
  112. #X obj 389 481 ev_glsl mygain dummy gain;
  113. #X connect 4 0 10 0;
  114. #X connect 5 0 10 0;
  115. #X connect 6 0 61 0;
  116. #X connect 7 0 17 0;
  117. #X connect 8 0 17 1;
  118. #X connect 9 0 17 2;
  119. #X connect 10 0 6 0;
  120. #X connect 11 0 14 0;
  121. #X connect 12 0 16 0;
  122. #X connect 13 0 61 2;
  123. #X connect 14 0 6 0;
  124. #X connect 15 0 17 3;
  125. #X connect 16 0 9 0;
  126. #X connect 16 0 8 0;
  127. #X connect 16 0 7 0;
  128. #X connect 16 0 15 0;
  129. #X connect 17 0 13 0;
  130. #X connect 40 0 39 0;
  131. #X connect 41 0 39 0;
  132. #X connect 48 0 49 0;
  133. #X connect 48 1 50 0;
  134. #X connect 50 0 51 0;
  135. #X connect 51 0 52 0;
  136. #X connect 52 0 49 2;
  137. #X connect 55 0 48 0;
  138. #X connect 56 0 55 0;
  139. #X connect 58 0 61 0;
  140. #X connect 61 0 48 0;
  141. #X coords 0 708 1 707 85 60 0;