aboutsummaryrefslogtreecommitdiff
path: root/Gem/examples/10.glsl/09.vertex_texture_fetching.pd
blob: d03c0f61db251122b5f7b28341a151a50c337196 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#N canvas 239 61 690 677 10;
#X declare -lib Gem;
#X obj 504 69 gemhead;
#X obj 576 346 pack 0 0;
#X obj 597 326 t b f;
#X msg 576 369 link \$1 \$2;
#X floatatom 597 307 2 0 0 0 ID - -;
#X floatatom 576 206 2 0 0 0 ID - -;
#X obj 594 390 print linking;
#X obj 504 480 pix_texture;
#X obj 540 118 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 28 199 gemhead 1;
#X obj 28 311 gemframebuffer;
#X obj 28 485 pix_texture;
#X obj 28 336 translateXYZ 0 0 -4;
#X obj 28 510 square 4;
#X obj 504 261 glsl_fragment;
#X obj 504 164 glsl_vertex;
#X obj 576 183 change;
#X obj 597 281 change;
#X obj 504 409 glsl_program;
#X floatatom 542 505 5 0 0 0 - - -;
#X obj 49 231 loadbang;
#X obj 44 419 loadbang;
#X msg 520 456 quality 0;
#N canvas 70 231 450 300 load_glsl 0;
#X obj 51 22 gemhead;
#X obj 51 98 outlet;
#X obj 51 50 route gem_state;
#X obj 51 74 route 1;
#X connect 0 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X restore 540 93 pd load_glsl;
#X msg 514 231 open fetching.frag;
#X msg 518 142 open fetching.vert;
#X obj 504 525 rotateXYZ -30 0 0;
#X obj 504 551 scaleXYZ 3 3 1;
#X obj 28 388 pix_image img1.jpg;
#X msg 46 363 open img2.jpg;
#X text 137 11 This patch need a glsl 3 compliant hardware;
#X text 26 535 draw an image in a framebuffer;
#X text 49 274 this configuration is very important to have full hardware
support for vertex texture fetching;
#X text 306 603 this example uses the framebuffer image in the vertex
shader in the same way you can do in the pixel shader. This is only
possible in this specific configuration (it's a hardware limitation)
;
#X text 137 56 (nvidia 7000 and 8000 series should work \, ati X1000
series does not \, but later should);
#X obj 504 579 mesh_square 200;
#X text 138 28 As in 2007 \, only good (and new) graphic cards are
able to run this patch.;
#N canvas 87 154 247 179 Gem.init 0;
#X obj 118 46 loadbang;
#X msg 118 81 reset;
#X obj 118 113 outlet;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X restore 56 77 pd Gem.init;
#N canvas 340 107 682 322 gemwin 0;
#X obj 102 122 tgl 15 0 \$0-gemstart \$0-gemstart empty 17 7 0 10 -262144
-1 -1 0 1;
#X obj 102 161 r \$0-gemstart;
#X obj 102 182 select 1 0;
#X msg 102 214 create \, 1;
#X msg 177 215 destroy;
#X obj 102 239 t a;
#X obj 318 54 inlet;
#X obj 318 255 gemwin;
#X obj 318 100 t a a;
#X obj 318 287 outlet;
#X obj 350 128 route create destroy;
#X obj 350 150 t b;
#X msg 350 172 1;
#X obj 390 150 t b;
#X msg 390 172 0;
#X obj 350 195 t f;
#X msg 350 219 set \$1;
#X text 118 122 rendering;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 2 1 4 0;
#X connect 3 0 5 0;
#X connect 4 0 5 0;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 7 0 9 0;
#X connect 8 0 7 0;
#X connect 8 1 10 0;
#X connect 10 0 11 0;
#X connect 10 1 13 0;
#X connect 11 0 12 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 0 0;
#X coords 0 -1 1 1 85 40 1 100 100;
#X restore 26 94 pd gemwin;
#X msg 49 255 rectangle 0 \, type BYTE \, format RGB32 \, dimen 1024
1024;
#X msg 44 439 rectangle 0 \, quality 0;
#X obj 520 437 loadbang;
#X obj 563 7 declare -lib Gem;
#X connect 0 0 15 0;
#X connect 1 0 3 0;
#X connect 2 0 1 0;
#X connect 2 1 1 1;
#X connect 3 0 6 0;
#X connect 3 0 18 0;
#X connect 4 0 2 0;
#X connect 5 0 1 0;
#X connect 7 0 26 0;
#X connect 8 0 25 0;
#X connect 8 0 24 0;
#X connect 9 0 10 0;
#X connect 10 0 12 0;
#X connect 10 1 7 1;
#X connect 11 0 13 0;
#X connect 12 0 28 0;
#X connect 14 0 18 0;
#X connect 14 1 17 0;
#X connect 15 0 14 0;
#X connect 15 1 16 0;
#X connect 16 0 5 0;
#X connect 17 0 4 0;
#X connect 18 0 7 0;
#X connect 19 0 26 1;
#X connect 20 0 39 0;
#X connect 21 0 40 0;
#X connect 22 0 7 0;
#X connect 23 0 8 0;
#X connect 24 0 14 0;
#X connect 25 0 15 0;
#X connect 26 0 27 0;
#X connect 27 0 35 0;
#X connect 28 0 11 0;
#X connect 29 0 28 0;
#X connect 37 0 38 0;
#X connect 39 0 10 0;
#X connect 40 0 11 0;
#X connect 41 0 22 0;