From 01015ee03992ae5a633f81aab434c905e1250c21 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Mon, 28 Nov 2016 12:49:04 +0000 Subject: Gem 83e036efcfb97e8901669d4a49273f2f30283745 linux/amd64 built 'master:83e036efcfb97e8901669d4a49273f2f30283745' for linux/amd64 --- Gem/Gem.pd_linux | Bin 28489446 -> 28600745 bytes Gem/cubemaptosphere.frag | 17 ++ Gem/cubemaptosphere.vert | 8 + Gem/gemcubeframebuffer-help.pd | 401 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 426 insertions(+) create mode 100644 Gem/cubemaptosphere.frag create mode 100644 Gem/cubemaptosphere.vert create mode 100644 Gem/gemcubeframebuffer-help.pd (limited to 'Gem') diff --git a/Gem/Gem.pd_linux b/Gem/Gem.pd_linux index 3b23962..50f2491 100755 Binary files a/Gem/Gem.pd_linux and b/Gem/Gem.pd_linux differ diff --git a/Gem/cubemaptosphere.frag b/Gem/cubemaptosphere.frag new file mode 100644 index 0000000..cd2befb --- /dev/null +++ b/Gem/cubemaptosphere.frag @@ -0,0 +1,17 @@ +// Antoine Rousseau september 2015 +#version 120 + +uniform samplerCube envMap; +uniform float alpha = 1.0; + +void main() { + + vec2 tc = gl_TexCoord[0].st ; + vec2 thetaphi = ((tc * 2.0) - vec2(1.0)) * vec2(3.1415926535897932384626433832795, 1.5707963267948966192313216916398); + float ctpy = cos(thetaphi.y); + + vec3 rayDirection = vec3(ctpy * cos(thetaphi.x), sin(thetaphi.y), ctpy * sin(thetaphi.x)); + + gl_FragColor = textureCube(envMap, rayDirection); + gl_FragColor.a *= alpha; +} diff --git a/Gem/cubemaptosphere.vert b/Gem/cubemaptosphere.vert new file mode 100644 index 0000000..bda9f47 --- /dev/null +++ b/Gem/cubemaptosphere.vert @@ -0,0 +1,8 @@ +// Cyrille Henry 2007 + +void main() +{ + gl_TexCoord[0] = gl_MultiTexCoord0; + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + +} diff --git a/Gem/gemcubeframebuffer-help.pd b/Gem/gemcubeframebuffer-help.pd new file mode 100644 index 0000000..95f6a34 --- /dev/null +++ b/Gem/gemcubeframebuffer-help.pd @@ -0,0 +1,401 @@ +#N canvas 334 69 706 568 10; +#X obj 175 337 cnv 15 90 60 empty empty empty 20 12 0 14 -257985 -66577 +0; +#X obj 174 147 cnv 15 150 25 empty empty pre 2 12 0 14 -4032 -1 0; +#X obj 174 259 cnv 15 150 25 empty empty post 2 12 0 14 -4032 -1 0 +; +#X obj 20 496 cnv 15 400 30 empty empty empty 20 12 0 14 -260097 -66577 +0; +#X obj 27 92 cnv 15 100 60 empty empty empty 20 12 0 14 -195568 -66577 +0; +#N canvas 248 699 448 300 gemwin 0; +#X obj 67 89 outlet; +#X obj 67 10 inlet; +#X msg 67 70 set destroy; +#X msg 271 113 destroy; +#X msg 146 71 set create; +#X obj 67 41 route create; +#X msg 311 80 lighting \$1; +#X obj 311 56 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 198 32 dimen 1024 768; +#X obj 217 197 gemhead 80; +#X obj 217 227 world_light; +#X msg 190 10 dimen 1280 1024; +#X msg 132 112 create \, 1 \, view 0 0 3; +#X obj 86 132 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 342 29 inlet; +#X obj 132 149 gemwin; +#X connect 1 0 5 0; +#X connect 2 0 0 0; +#X connect 3 0 15 0; +#X connect 4 0 0 0; +#X connect 5 0 2 0; +#X connect 5 0 12 0; +#X connect 5 1 4 0; +#X connect 5 1 3 0; +#X connect 6 0 15 0; +#X connect 7 0 6 0; +#X connect 8 0 15 0; +#X connect 9 0 10 0; +#X connect 11 0 15 0; +#X connect 12 0 15 0; +#X connect 13 0 15 0; +#X connect 14 0 15 0; +#X restore 32 131 pd gemwin; +#X msg 32 109 create; +#X obj 174 225 cnv 15 150 30 empty empty empty 20 12 0 14 -4034 -66577 +0; +#X obj 184 46 gemhead; +#X obj 184 24 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 184 68 alpha; +#N canvas 1604 201 450 481 draw_6_faces 0; +#X msg 177 365 face \$1; +#X obj 75 18 inlet; +#X obj 177 276 t f f; +#X obj 75 217 t a b; +#X msg 104 241 0; +#X obj 90 190 t a b; +#X obj 105 155 t a b; +#X obj 120 127 t a b; +#X obj 135 100 t a b; +#X obj 150 78 t a b; +#X msg 118 211 1; +#X msg 132 174 2; +#X msg 147 147 3; +#X msg 162 125 4; +#X obj 75 56 t a a a a a a; +#X msg 177 100 5; +#X obj 75 419 outlet; +#X obj 204 341 outlet num_face_to_rot_scene; +#X connect 0 0 16 0; +#X connect 1 0 14 0; +#X connect 2 0 0 0; +#X connect 2 1 17 0; +#X connect 3 0 16 0; +#X connect 3 1 4 0; +#X connect 4 0 2 0; +#X connect 5 0 16 0; +#X connect 5 1 10 0; +#X connect 6 0 16 0; +#X connect 6 1 11 0; +#X connect 7 0 16 0; +#X connect 7 1 12 0; +#X connect 8 0 16 0; +#X connect 8 1 13 0; +#X connect 9 0 16 0; +#X connect 9 1 15 0; +#X connect 10 0 2 0; +#X connect 11 0 2 0; +#X connect 12 0 2 0; +#X connect 13 0 2 0; +#X connect 14 0 3 0; +#X connect 14 1 5 0; +#X connect 14 2 6 0; +#X connect 14 3 7 0; +#X connect 14 4 8 0; +#X connect 14 5 9 0; +#X connect 15 0 2 0; +#X restore 211 152 pd draw_6_faces; +#N canvas 788 152 450 372 rotate_scene 0; +#X obj 81 190 unpack f f; +#X obj 81 78 sel 0 1 2 3 4 5; +#X msg 81 131 0 90; +#X msg 114 131 0 -90; +#X msg 153 131 90 0; +#X msg 188 131 -90 0; +#X msg 234 131 0 0; +#X msg 263 131 0 180; +#X obj 81 47 inlet num_face; +#X obj 50 9 inlet head; +#X obj 50 304 outlet head; +#X floatatom 163 186 5 0 0 0 - - -, f 5; +#X floatatom 89 245 5 0 0 0 - - -, f 5; +#X floatatom 148 250 5 0 0 0 - - -, f 5; +#X floatatom 57 253 5 0 0 0 - - -, f 5; +#X obj 50 216 rotateXYZ 0 90 0; +#X obj 50 280 rotateXYZ -90 0 90; +#X connect 0 0 15 1; +#X connect 0 1 15 2; +#X connect 1 0 2 0; +#X connect 1 1 3 0; +#X connect 1 2 4 0; +#X connect 1 3 5 0; +#X connect 1 4 6 0; +#X connect 1 5 7 0; +#X connect 2 0 0 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 6 0 0 0; +#X connect 7 0 0 0; +#X connect 8 0 1 0; +#X connect 9 0 15 0; +#X connect 11 0 15 3; +#X connect 12 0 16 2; +#X connect 13 0 16 3; +#X connect 14 0 16 1; +#X connect 15 0 16 0; +#X connect 16 0 10 0; +#X restore 211 263 pd rotate_scene; +#X obj 211 231 gemcubeframebuffer; +#X obj 225 177 loadbang; +#X obj 184 107 t a a; +#N canvas 628 189 360 553 shader 0; +#X obj 72 166 glsl_vertex; +#X obj 72 269 glsl_fragment; +#X obj 72 449 glsl_program; +#X obj 138 387 pack 0 0; +#X obj 156 357 t b f; +#X obj 156 300 change; +#X obj 138 191 change; +#X msg 138 409 link \$1 \$2; +#X floatatom 156 324 2 0 0 0 ID - -, f 2; +#X floatatom 138 214 2 0 0 0 ID - -, f 2; +#X obj 120 60 tgl 15 0 \$0-shadOn-snd \$0-shadOn-rcv on/off 17 7 0 +10 -262144 -1 -1 1 1; +#X obj 21 59 inlet gemlist; +#X obj 21 489 outlet gemlist; +#X msg 87 139 open \$1.vert; +#X msg 152 238 open \$1.frag; +#X obj 120 14 loadbang; +#X msg 120 36 1; +#X obj 152 69 inlet loadShader; +#X obj 229 408 inlet variables; +#N canvas 85 80 450 300 demux 0; +#X obj 52 33 inlet; +#X obj 308 37 inlet select; +#X obj 52 55 t a a; +#X obj 52 148 outlet; +#X obj 105 105 == 0; +#X obj 52 126 spigot 1; +#X obj 122 148 outlet; +#X obj 175 105 == 1; +#X obj 122 126 spigot 0; +#X obj 308 59 t f f; +#X connect 0 0 2 0; +#X connect 1 0 9 0; +#X connect 2 0 5 0; +#X connect 2 1 8 0; +#X connect 4 0 5 1; +#X connect 5 0 3 0; +#X connect 7 0 8 1; +#X connect 8 0 6 0; +#X connect 9 0 4 0; +#X connect 9 1 7 0; +#X restore 21 108 pd demux; +#X obj 152 91 symbol; +#X obj 152 113 t s s; +#X connect 0 0 1 0; +#X connect 0 1 6 0; +#X connect 1 0 2 0; +#X connect 1 1 5 0; +#X connect 2 0 12 0; +#X connect 3 0 7 0; +#X connect 4 0 3 0; +#X connect 4 1 3 1; +#X connect 5 0 8 0; +#X connect 6 0 9 0; +#X connect 7 0 2 0; +#X connect 8 0 4 0; +#X connect 9 0 3 0; +#X connect 10 0 19 1; +#X connect 11 0 19 0; +#X connect 13 0 0 0; +#X connect 14 0 1 0; +#X connect 15 0 16 0; +#X connect 16 0 10 0; +#X connect 17 0 20 0; +#X connect 18 0 2 0; +#X connect 19 0 12 0; +#X connect 19 1 0 0; +#X connect 20 0 21 0; +#X connect 21 0 13 0; +#X connect 21 1 14 0; +#X restore 184 369 pd shader; +#X obj 184 343 pix_texture; +#X obj 184 310 separator; +#X obj 211 130 separator; +#X obj 273 345 loadbang; +#X obj 184 501 rectangle 2.8 1.4; +#X obj 342 64 gemframebuffer; +#X obj 326 457 translateXYZ 0 0 -4; +#X obj 184 478 spigot; +#X obj 326 500 sphere 4 50; +#X obj 217 451 == 1; +#X obj 39 478 translateXYZ 0 0 -7; +#X obj 33 184 vradio 20 1 0 3 empty empty empty 0 -8 0 10 -257985 -1 +-1 0; +#X text 55 185 scene; +#X text 55 204 equirectangular; +#X text 55 224 mapped to sphere; +#X obj 217 427 r \$0-show; +#X obj 33 250 s \$0-show; +#X obj 371 387 r \$0-show; +#X obj 84 407 r \$0-show; +#X obj 84 429 == 0; +#X obj 39 456 spigot 1; +#X obj 371 410 == 2; +#X obj 326 433 spigot 0; +#X obj 211 285 s \$0-sceneHead; +#X obj 39 500 s \$0-sceneHead; +#X msg 83 55 lighting \$1; +#X obj 83 31 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X text 28 88 1:Create window; +#X obj 465 312 cnv 15 100 60 empty empty empty 20 12 0 14 -257985 -66577 +0; +#N canvas 1281 147 632 578 draw_scene 0; +#X obj 243 285 rotateXYZ; +#X obj 402 84 f; +#X obj 402 109 + 1; +#X obj 402 61 metro 50; +#X obj 63 314 cube 0.75; +#X obj 63 283 rotateXYZ 45 0 0; +#X obj 62 434 sphere 0.75 30; +#X obj 63 179 separator; +#X obj 243 181 separator; +#X obj 62 346 separator; +#X obj 242 348 separator; +#X obj 63 255 translateXYZ 3 3 0; +#X obj 243 243 translateXYZ 3 -3 0; +#X obj 62 411 translateXYZ -3 3 0; +#X obj 242 410 translateXYZ -3 -3 0; +#X obj 243 316 cylinder 0.75; +#X obj 242 436 cube 0.75; +#X obj 402 315 / 180; +#X obj 402 334 * 3.14159; +#X obj 402 358 cos; +#X obj 402 276 * 10; +#X obj 390 414 f; +#X obj 390 386 + 1; +#X obj 418 387 * -1; +#X obj 418 414 + 1; +#X floatatom 320 341 5 0 0 0 - - -, f 5; +#X obj 63 218 color 0.8 0.2 0.2; +#X obj 243 218 color 0.2 0.8 0.2; +#X obj 242 385 color 0.8 0.8 0.2; +#X obj 62 385 color 0.2 0.2 0.8; +#X obj 402 16 loadbang; +#X obj 402 40 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X floatatom 156 320 5 0 0 0 - - -, f 5; +#X obj 185 34 inlet; +#X obj 185 88 rotateXYZ 0 0 0; +#X obj 488 187 separator; +#X obj 488 211 color 0.2 0.8 0.8; +#X msg 504 261 draw line; +#X obj 185 112 t a a; +#X obj 185 139 t a; +#X obj 504 239 loadbang; +#X obj 253 54 * 0.5; +#X obj 402 133 mod 720; +#X obj 488 295 sphere 6 20; +#X msg 466 95 0; +#X connect 0 0 15 0; +#X connect 1 0 2 0; +#X connect 2 0 42 0; +#X connect 3 0 1 0; +#X connect 5 0 4 0; +#X connect 7 0 26 0; +#X connect 8 0 27 0; +#X connect 9 0 29 0; +#X connect 10 0 28 0; +#X connect 11 0 5 0; +#X connect 12 0 0 0; +#X connect 13 0 6 0; +#X connect 14 0 16 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 19 0 22 0; +#X connect 19 0 23 0; +#X connect 20 0 17 0; +#X connect 21 0 14 3; +#X connect 21 0 11 3; +#X connect 22 0 21 0; +#X connect 23 0 24 0; +#X connect 24 0 13 3; +#X connect 24 0 12 3; +#X connect 25 0 15 1; +#X connect 26 0 11 0; +#X connect 27 0 12 0; +#X connect 28 0 14 0; +#X connect 29 0 13 0; +#X connect 30 0 31 0; +#X connect 31 0 3 0; +#X connect 32 0 5 3; +#X connect 33 0 34 0; +#X connect 34 0 38 0; +#X connect 35 0 36 0; +#X connect 36 0 43 0; +#X connect 37 0 43 0; +#X connect 38 0 39 0; +#X connect 38 1 35 0; +#X connect 39 0 7 0; +#X connect 39 0 9 0; +#X connect 39 0 8 0; +#X connect 39 0 10 0; +#X connect 40 0 37 0; +#X connect 41 0 34 1; +#X connect 42 0 1 1; +#X connect 42 0 0 3; +#X connect 42 0 5 3; +#X connect 42 0 0 2; +#X connect 42 0 20 0; +#X connect 42 0 34 3; +#X connect 42 0 34 2; +#X connect 42 0 41 0; +#X connect 44 0 42 0; +#X restore 470 347 pd draw_scene; +#X obj 470 318 r \$0-sceneHead; +#X text 30 165 Show:; +#X obj 553 178 hsl 128 15 0 1 0 0 empty empty background_opacity -2 +-8 0 10 -262144 -1 -1 0 1; +#X msg 550 199 color 0 0.1 0.2 \$1; +#X msg 225 199 dimen 512 512 \, format RGBA \, color 0 0.1 0.2 1; +#X text 11 536 Antoine Rousseau nov 2015; +#X text 316 64 See:; +#X text 436 64 for more messages.; +#X text 309 39 Renders a scene to faces of a GL cubemap texture.; +#X msg 273 368 cubemaptosphere; +#X connect 5 0 6 0; +#X connect 6 0 5 0; +#X connect 8 0 10 0; +#X connect 9 0 8 0; +#X connect 10 0 15 0; +#X connect 11 0 13 0; +#X connect 11 1 12 1; +#X connect 12 0 40 0; +#X connect 13 0 12 0; +#X connect 13 1 17 1; +#X connect 14 0 51 0; +#X connect 15 0 18 0; +#X connect 15 1 19 0; +#X connect 16 0 24 0; +#X connect 16 0 39 0; +#X connect 17 0 16 0; +#X connect 18 0 17 0; +#X connect 18 0 37 0; +#X connect 19 0 11 0; +#X connect 20 0 56 0; +#X connect 23 0 25 0; +#X connect 24 0 21 0; +#X connect 26 0 24 1; +#X connect 27 0 41 0; +#X connect 28 0 33 0; +#X connect 32 0 26 0; +#X connect 34 0 38 0; +#X connect 35 0 36 0; +#X connect 36 0 37 1; +#X connect 37 0 27 0; +#X connect 38 0 39 1; +#X connect 39 0 23 0; +#X connect 42 0 5 1; +#X connect 43 0 42 0; +#X connect 47 0 46 0; +#X connect 49 0 50 0; +#X connect 50 0 13 0; +#X connect 51 0 13 0; +#X connect 56 0 16 1; -- cgit v1.2.1