Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- put this in the Lua file of the chart (if you already have a onCreatePost or onUpdate function just put it at the end of beginning and with some spacing)
- function onCreatePost()
- initLuaShader("fart")
- setSpriteShader("background", "fart")
- end
- function onUpdate()
- setShaderFloat("background", "uTime", getSongPosition()/1000)
- setShaderFloat("background", "uWaveAmplitude", 0.01)
- setShaderFloat("background", "uSpeed", 2)
- setShaderFloat("background", "uFrequency", 5)
- end
- then on the folder of your mod on the Shaders folder add a file called fart.frag
- open that file on notepad and put This text in it:
- #pragma header
- //uniform float tx, ty; // x,y waves phase
- //modified version of the wave shader to create weird garbled corruption like messes
- uniform float uTime;
- /**
- * How fast the waves move over time
- */
- uniform float uSpeed;
- /**
- * Number of waves over time
- */
- uniform float uFrequency;
- /**
- * How much the pixels are going to stretch over the waves
- */
- uniform float uWaveAmplitude;
- vec2 sineWave(vec2 pt)
- {
- float x = 0.0;
- float y = 0.0;
- float offsetX = sin(pt.y * uFrequency + uTime * uSpeed) * (uWaveAmplitude / pt.x * pt.y);
- float offsetY = sin(pt.x * uFrequency - uTime * uSpeed) * (uWaveAmplitude / pt.y * pt.x);
- pt.x += offsetX; // * (pt.y - 1.0); // <- Uncomment to stop bottom part of the screen from moving
- pt.y += offsetY;
- return vec2(pt.x + x, pt.y + y);
- }
- void main()
- {
- vec2 uv = sineWave(openfl_TextureCoordv);
- gl_FragColor = texture2D(bitmap, uv);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement