homosexual update screen

This commit is contained in:
Yoshman29
2022-12-20 23:14:42 +01:00
parent 81bc9fca36
commit 76f29d797a
3 changed files with 46 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
#pragma header
uniform float elapsed;
uniform float strength;
vec3 rgb2hsv(vec3 c)
{
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 1.0e-10;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c)
{
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
void main() {
vec2 coords = getCamPos(openfl_TextureCoordv);
vec4 color = flixel_texture2D(bitmap, openfl_TextureCoordv);
vec3 hsv = rgb2hsv(color.rgb);
hsv.g = (1.0/3.0) * strength * coords.y;
hsv.r = mod(elapsed + coords.x + coords.y, 1);
gl_FragColor = vec4(hsv2rgb(hsv), color.a);
}
+1 -1
View File
@@ -1 +1 @@
1598
1601
+11
View File
@@ -1,5 +1,6 @@
package funkin.updating;
import funkin.shaders.CustomShader;
import flixel.util.FlxDestroyUtil;
import funkin.ui.FunkinText;
import funkin.menus.TitleState;
@@ -24,6 +25,8 @@ class UpdateScreen extends MusicBeatState {
public var generalProgress:FunkinText;
public var partProgress:FunkinText;
public var rainbowShader:CustomShader;
public function new(check:UpdateCheckCallback) {
super(false);
updater = new AsyncUpdater(check.updates);
@@ -59,6 +62,8 @@ class UpdateScreen extends MusicBeatState {
overSound = FlxG.sound.load(Paths.sound('gameOverEnd'));
updater.execute();
FlxG.camera.addShader(rainbowShader = new CustomShader("updaterShader"));
}
@@ -66,6 +71,12 @@ class UpdateScreen extends MusicBeatState {
super.update(elapsed);
elapsedTime += elapsed;
rainbowShader.hset("elapsed", elapsedTime / 5);
if (elapsedTime >= 3)
rainbowShader.hset("strength", 1);
else
rainbowShader.hset("strength", elapsedTime / 5);
progressBar.y = FlxG.height - (60 + (Math.sin(elapsedTime * Math.PI / 2) * 15));
if (done) return;