Skip to content

Instantly share code, notes, and snippets.

@GOROman
Last active April 20, 2020 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GOROman/c4620df858b21108e176513d1cd4abc4 to your computer and use it in GitHub Desktop.
Save GOROman/c4620df858b21108e176513d1cd4abc4 to your computer and use it in GitHub Desktop.
Xevious BGM?
vec2 mainSound(float t){
int x=int(t*10.)%32,y=x%8,z=x/8,a=164<<(x&1);a+=y==4?250:y==2||y==6?146-z*16-z:0;
return vec2(sin(float(a*20)*t)*0.5);
}
@GOROman
Copy link
Author

GOROman commented Apr 20, 2020

vec2 mainSound(float t){
int x=int(t10.)%32,y=x%8,z=x/8,a=164<<(x&1);a+=y==4?250:y==2||y==6?146-z16-z:0;
float l =sin(float(a*20)*t)0.1;
float r =sign(sin(float(a
20)*t))*0.1;
return vec2(l+r);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment