Add fft
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
// Generated with Shader Minifier 1.5.1 (https://github.com/laurentlb/Shader_Minifier/)
|
||||
#ifndef FRAGMENT_INL_
|
||||
# define FRAGMENT_INL_
|
||||
# define VAR_fft_output "l"
|
||||
# define VAR_o "f"
|
||||
# define VAR_syncs "v"
|
||||
|
||||
@ -10,20 +11,13 @@ const char *fragment_frag =
|
||||
"out vec4 f;"
|
||||
"const float m=22./7.;"
|
||||
"layout(location=0)uniform float v[7];"
|
||||
"layout(location=8)uniform float l[512];"
|
||||
"float n=v[0];"
|
||||
"vec3 s(vec2 f)"
|
||||
"{"
|
||||
"float m=v[4];"
|
||||
"return f.x>=m&&f.x<=m+.01?"
|
||||
"vec3(1):"
|
||||
"f.x>=0.&&f.x<=.01?"
|
||||
"vec3(abs(v[3]*2)):"
|
||||
"vec3(.1,.2,.3)*abs(v[1]*1.2);"
|
||||
"}"
|
||||
"void main()"
|
||||
"{"
|
||||
"vec2 m=gl_FragCoord.xy*2./vec2(1920,1080);"
|
||||
"f=vec4(s(m),1);"
|
||||
"float n=clamp(l[clamp(int(floor(m.x*128.)),0,255)],0.,1.);"
|
||||
"f=vec4(vec3(smoothstep(n,n+.02,1.-m.y)),1);"
|
||||
"}";
|
||||
|
||||
#endif // FRAGMENT_INL_
|
||||
|
||||
Reference in New Issue
Block a user