-
-
Save P-Seebauer/99e7c4413a88d2a70bec to your computer and use it in GitHub Desktop.
Revisions
-
P-Seebauer revised this gist
May 22, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,8 @@ bool isBlack(float progress, vec2 p){ }else{ float nProg = (progress-.25)*2.; return (p.x < r.x || p.x > 1.-r.x) ; ; } return false; -
P-Seebauer revised this gist
May 21, 2014 . 1 changed file with 2 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,18 +24,9 @@ bool isBlack(float progress, vec2 p){ ; }else{ float nProg = (progress-.25)*2.; ; } return false; -
P-Seebauer revised this gist
May 21, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,7 +29,7 @@ bool isBlack(float progress, vec2 p){ vec3 revPr = vec3(1.-r.x,1.- r.y-nProg,1.-r.z); //vec3 revPr = 1.-pr; return p.x < pr.x || p.x > revPr.x // left/right || pr.y < 0. && p.y > fract(pr.y) //|| p.y < fract(pr.y) || p.y > fract(revPr.y) // top/bottom /*||(p.x < pr.x + pr.z && p.y < fract(pr.y) + pr.z && distance(vec2(pr.x,fract(pr.y))+pr.z,p) > pr.z) // bottom left corner ||(p.x > revPr.x - pr.z && p.y < fract(pr.y) + pr.z && distance(vec2(revPr.x-pr.z,fract(pr.y)+pr.z),p) > pr.z) // bottom right corner -
P-Seebauer revised this gist
May 21, 2014 . 1 changed file with 11 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,22 +25,26 @@ bool isBlack(float progress, vec2 p){ }else{ float nProg = (progress-.25)*2.; vec3 pr = vec3( r.x, r.y-nProg,r.z); vec3 revPr = vec3(1.-r.x,1.- r.y-nProg,1.-r.z); //vec3 revPr = 1.-pr; return p.x < pr.x || p.x > revPr.x // left/right || pr.y < 0. && p.y > pr.y //|| p.y < fract(pr.y) || p.y > fract(revPr.y) // top/bottom /*||(p.x < pr.x + pr.z && p.y < fract(pr.y) + pr.z && distance(vec2(pr.x,fract(pr.y))+pr.z,p) > pr.z) // bottom left corner ||(p.x > revPr.x - pr.z && p.y < fract(pr.y) + pr.z && distance(vec2(revPr.x-pr.z,fract(pr.y)+pr.z),p) > pr.z) // bottom right corner ||(p.x < pr.x + pr.z && p.y > fract(revPr.y) - pr.z && distance(vec2(pr.x+pr.z,fract(revPr.y)-pr.z),p) > pr.z) // top left corner ||(p.x > revPr.x - pr.z && p.y > fract(revPr.y) - pr.z && distance(vec2(revPr.x,fract(revPr.y))-pr.z,p) > pr.z) // top right corner */ ; } return false; } bool between (float low, float value, float high){ return low < value && value < high; } void main() { vec2 p = gl_FragCoord.xy / resolution.xy; if(isBlack(progress,p))// distance(p,vec2(.9,.9)) < .1 || p.x < .9 || p.y < .9 ) -
P-Seebauer revised this gist
May 21, 2014 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,8 @@ bool isBlack(float progress, vec2 p){ }else{ float nProg = (progress-.25)*2.; vec3 pr = vec3( r.x, r.y+nProg,r.z); //vec3 revPr = vec3(1.-r.x,1.-r.y+nProg,1.-r.z); vec3 revPr = 1.-pr; return p.x < pr.x || p.x > revPr.x // left/right || p.y < fract(pr.y) || p.y > fract(revPr.y) // top/bottom -
P-Seebauer revised this gist
May 21, 2014 . 1 changed file with 17 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,30 +8,34 @@ uniform vec2 resolution; uniform vec3 r; // ( left/right,top/bottom, radius) bool isBlack(float progress, vec2 p){ if(progress < 0.25|| progress > 0.75){ // "zoom" float nProg = (progress < .5) ? progress * 4. : (-progress+1.)*4.; // if (progress > 0.5) nProg = (-progress+1.)*4. ; vec3 pr = r * nProg; vec3 revPr = 1.-pr; // somehow the bvec functions aren't working for me… return p.x < pr.x || p.x > revPr.x // left/right || p.y < pr.y || p.y > revPr.y // top/bottom ||(p.x < pr.x + pr.z && p.y < pr.y + pr.z && distance(vec2(pr.x,pr.y)+pr.z,p) > pr.z) // bottom left corner ||(p.x > revPr.x - pr.z && p.y < pr.y + pr.z && distance(vec2(revPr.x-pr.z,pr.y+pr.z),p) > pr.z) // bottom right corner ||(p.x < pr.x + pr.z && p.y > revPr.y - pr.z && distance(vec2(pr.x+pr.z,revPr.y-pr.z),p) > pr.z) // top left corner ||(p.x > revPr.x - pr.z && p.y > revPr.y - pr.z && distance(vec2(revPr.x,revPr.y)-pr.z,p) > pr.z) // top right corner ; }else{ float nProg = (progress-.25)*2.; vec3 pr = vec3(r.x, r.y+nProg,r.z); vec3 revPr = 1.-pr; return p.x < pr.x || p.x > revPr.x // left/right || p.y < fract(pr.y) || p.y > fract(revPr.y) // top/bottom ||(p.x < pr.x + pr.z && p.y < fract(pr.y) + pr.z && distance(vec2(pr.x,fract(pr.y))+pr.z,p) > pr.z) // bottom left corner ||(p.x > revPr.x - pr.z && p.y < fract(pr.y) + pr.z && distance(vec2(revPr.x-pr.z,fract(pr.y)+pr.z),p) > pr.z) // bottom right corner ||(p.x < pr.x + pr.z && p.y > fract(revPr.y) - pr.z && distance(vec2(pr.x+pr.z,fract(revPr.y)-pr.z),p) > pr.z) // top left corner ||(p.x > revPr.x - pr.z && p.y > fract(revPr.y) - pr.z && distance(vec2(revPr.x,fract(revPr.y))-pr.z,p) > pr.z) // top right corner ; } return false; } -
P-Seebauer revised this gist
May 21, 2014 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,11 +21,11 @@ bool isBlack(float progress, vec2 p){ // somehow the bvec functions aren't working for me… return p.x < pr.x || p.x > revPr.x // left/right || p.y < pr.y || p.y > revPr.y // top/bottom ||(p.x < pr.x + pr.z && p.y < pr.y + pr.z && distance(vec2(pr.x,pr.y)+pr.z,p) > pr.z) // bottom left corner ||(p.x > revPr.x - pr.z && p.y < pr.y + pr.z && distance(vec2(revPr.x-pr.z,pr.y+pr.z),p) > pr.z) // bottom right corner ||(p.x < pr.x + pr.z && p.y > revPr.y - pr.z && distance(vec2(pr.x+pr.z,revPr.y-pr.z),p) > pr.z) // top left corner ||(p.x > revPr.x - pr.z && p.y > revPr.y - pr.z && distance(vec2(revPr.x,revPr.y)-pr.z,p) > pr.z) // top right corner ; }else{ -
P-Seebauer revised this gist
May 21, 2014 . 1 changed file with 8 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,10 +18,14 @@ bool isBlack(float progress, vec2 p){ if (progress > 0.5) nProg = (-progress+1.)*4. ; vec3 pr = r * nProg; vec3 revPr = 1.-pr; // somehow the bvec functions aren't working for me… return p.x < pr.x || p.x > revPr.x // left/right || p.y < pr.y || p.y > revPr.y // top/bottom ||(p.x < pr.x + pr.z && p.y < pr.y + pr.z && distance(vec2(pr.x,pr.y)+pr.z,p) > pr.z) // bottom left corner ||(p.x > revPr.x - pr.z && p.y < pr.y + pr.z && distance(vec2(revPr.x-pr.z,pr.y+pr.z),p) > pr.z) // bottom right corner ||(p.x < pr.x + pr.z && p.y < pr.y + pr.z && distance(vec2(pr.x,pr.y)+pr.z,p) > pr.z) // bottom left corner ||(p.x < pr.x + pr.z && p.y < pr.y + pr.z && distance(vec2(pr.x,pr.y)+pr.z,p) > pr.z) // bottom left corner ; }else{ -
P-Seebauer revised this gist
May 21, 2014 . 2 changed files with 34 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,38 @@ uniform sampler2D from, to; uniform float progress; uniform vec2 resolution; uniform vec3 r; // ( left/right,top/bottom, radius) bool isBlack(float progress, vec2 p){ float nProg = 1.; vec3 pr = r * nProg; vec3 revPr = 1.-pr; if(progress < 0.25|| progress > 0.75){ // "zoom" nProg = progress * 4.; if (progress > 0.5) nProg = (-progress+1.)*4. ; vec3 pr = r * nProg; vec3 revPr = 1.-pr; return p.x < pr.x || p.y < pr.y || p.x > revPr.x || p.y > revPr.y || (distance(vec2(pr.x,pr.y)+pr.z,p) > pr.z && pr.x + pr.z > p.x && pr.y + pr.z > p.y) // bottom left corner ; }else{ //transition return p.x < pr.x || p.y < pr.y || p.x > revPr.x || p.y > revPr.y; } return false; } void main() { vec2 p = gl_FragCoord.xy / resolution.xy; if(isBlack(progress,p))// distance(p,vec2(.9,.9)) < .1 || p.x < .9 || p.y < .9 ) gl_FragColor = vec4(0,0,0,0); else gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ {"r":[0.1,0.05,0.05]} -
glslioadmin revised this gist
May 16, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ precision highp float; uniform sampler2D from, to; uniform float progress; uniform vec2 resolution; void main() { vec2 p = gl_FragCoord.xy / resolution.xy; gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress); -
glslioadmin revised this gist
May 16, 2014 . 1 changed file with 18 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,22 @@ GLSL.io Transition License (v1): The MIT License (MIT) Copyright (C) 2014 [email protected] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -
glslioadmin created this gist
May 16, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ #ifdef GL_ES precision highp float; #endif uniform sampler2D from, to; uniform float progress; uniform vec2 resolution; void main() { vec2 p = gl_FragCoord.xy / resolution.xy; gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress); } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ {} This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ GLSL.io Transition License (v1) under MIT Copyright (C) 2014 [email protected] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.