-
Notifications
You must be signed in to change notification settings - Fork 0
/
Todo.txt
80 lines (59 loc) · 2.18 KB
/
Todo.txt
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
Remove parameter
- remove connection : done
- remove from ui
- remove declaration from shader text
- let the user remove it from the code, do a search and replace function later
load parameter
- problem loading param name and value
DoUNITTEST
compile the project
parameter range value problem
add input datas info (resolution, time etc)
info about the input parameters
import texture
set button to load texture
link texture input to opengl data
mat2 rotate(float angle){
return mat2(cos(angle),sin(-angle),sin(angle),cos(angle));
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
//parameters
//Deformation intensity
//deformationMode ADD/Mult
//Apply pattern : Add/Sub/Divide/Mult/None
//pattern intensity
//TextureRot1 /ease no movement->movement
//TextureRot2
//ratio Texture/pattern
//alpha : one block on two
//alpha : one row on two
vec4 inputColour = vec4(0.5,0.8,0.0,0.0);
vec2 mouse = iMouse.xy/iResolution.xy;
float time = iTime;
float time2 = 0.5;
float but1 = 0.0;
float alphaMode = 0.0;
// Normalized pixel coordinates (from 0 to 1)
vec2 p = fragCoord/iResolution.xy;
p -= 0.5;
//p.x *= iResolution.x / iResolution.y;
p *= 5.0*(inputColour.g+0.1); //check global size
//angle and distort
float a = atan(p.x, p.y) + smoothstep(0.1, 1.2, sin(length(p*5.0)*20.0*pow(mouse.x, 4.0) + time2*15.0));
float size = mix( floor((inputColour.g + 0.1)*20.0), (inputColour.g + 0.1)*20.0, but1);
//lines
float lines1 = smoothstep(0.0 - mouse.y, 0.0 + mouse.y, sin(a*size + time + inputColour.b*3.1415*2.0));
float lines2 = smoothstep(0.0 - mouse.y, 0.0 + mouse.y, sin(-a*size + time + inputColour.a*3.1415*2.0));
//circles
float circle = smoothstep(0.0 - inputColour.r, 0.0 + inputColour.r, sin(length(p)*3.1415*5.0));
//combine lines and circles
float color = mix(lines1, lines2, circle);
vec4 pattern = vec4(vec3(color), mix(1.0, color, alphaMode));
//rotate texture
mat2 rot1 = rotate(time/size);
vec2 uv_tex1 = p*rot1;
vec2 uv_tex2 = p*rotate(-time/size);;
vec4 tex1 = texture(iChannel0,mix(uv_tex2,uv_tex1,circle)+pattern.x*0.5);
fragColor = vec4(pattern); // tex1;//*pattern;
}