direct sound ja parempi syncca

This commit is contained in:
2025-06-24 17:26:50 +03:00
parent 134a85111e
commit cfd6c97f32
7 changed files with 90 additions and 76 deletions

View File

@ -10,18 +10,20 @@ const char *fragment_frag =
"out vec4 f;"
"const float m=22./7.;"
"layout(location=0)uniform float v[7];"
"float n=v[0]/441e2;"
"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=vec2(1920,1080),n=gl_FragCoord.xy/m.xy;"
"n=-1.+2.*n;"
"n.x*=n.x/m.y;"
"vec3 a=n.y>=0.&&n.y<=.01?"
"vec3(abs(v[5])):"
"n.y>=-.21&&n.y<=-.2?"
"vec3(abs(v[6]*1.3)):"
"vec3(.1,.2,.3);"
"f=vec4(a,1);"
"vec2 m=gl_FragCoord.xy*2./vec2(1920,1080);"
"f=vec4(s(m),1);"
"}";
#endif // FRAGMENT_INL_