Squashed commit of the following:

commit 4987983dc6e655183b34258fed905be2fba73e0a
Author: lunarcleint <88809950+lunarcleint@users.noreply.github.com>
Date:   Mon Apr 1 06:32:22 2024 -0700

    fix charter bug

commit 1135b53d4d4ab48fb74a9d5693579d0a2e4923db
Author: lunarcleint <88809950+lunarcleint@users.noreply.github.com>
Date:   Mon Apr 1 00:46:53 2024 -0700

    small changes

commit 102931f3511c9f0423cf887ebf91eaeeb1024abe
Author: lunarcleint <88809950+lunarcleint@users.noreply.github.com>
Date:   Sun Mar 31 23:03:03 2024 -0700

    update spelling mistakes

commit 87ad53ae91bc8b4d3b49af3ebb8c07db9f13765b
Author: lunarcleint <88809950+lunarcleint@users.noreply.github.com>
Date:   Sun Mar 31 22:40:48 2024 -0700

    Chart editor updates

commit 8f7cae8a80a681158ff125c3e2547c9fd4dee7c1
Author: NeeEoo <NeeEoo@users.noreply.github.com>
Date:   Mon Apr 1 07:03:30 2024 +0200

    Redesigned Chart Editor

commit dbb94ba3bd8455a91883d6e5b59b25da87aefa32
Author: NeeEoo <NeeEoo@users.noreply.github.com>
Date:   Mon Apr 1 02:20:57 2024 +0200

    Added Stage Editor
This commit is contained in:
lunarcleint
2024-04-01 06:44:28 -07:00
parent 20fe94cd5a
commit 014be749e6
28 changed files with 2902 additions and 87 deletions
+24 -24
View File
@@ -2,6 +2,11 @@
// Used in charter by waveforms
#define HEIGHT 0.05 // Height of the Bar
#define BACKLIGHT 0.6 // Backlight
#define BRIGHTNESS 0.33 // overall Brightness
#define GLOW 1.25 // Glow intensity of the Bar
const vec3 gradient1 = vec3(114.0/255.0, 81.0/255.0, 135.0/255.0);
const vec3 gradient2 = vec3(144.0/255.0, 80.0/255.0, 186.0/255.0);
@@ -18,6 +23,8 @@ uniform ivec2 waveformSize;
uniform bool lowDetail;
uniform float time;
float getAmplitude(vec2 pixel) {
float pixelID = floor((pixel.y+pixelOffset)/3.0);
@@ -52,26 +59,7 @@ void outlineWaveform(vec2 pixel, vec2 offset) {
float ampwidth = (1.0-amplitude) * textureRes.x;
if (!inWaveForm(pixel, ampwidth))
gl_FragColor -= outlinecolor*mix(0.5, 0.8, amplitude);
}
void highDetailWaveform(vec2 pixel, float amplitude, float ampwidth) {
vec3 gradientColor = mix(gradient1, gradient2, openfl_TextureCoordv.x);
gradientColor *= pixel.y+pixelOffset>playerPosition ? 0.7 : 1.0;
gradientColor = mix(gradientColor, gradientColor * vec3(1.8), map(getHightlight(amplitude), 0.0, 1.0, 0.5, 1.0));
float ampwidthHighlight = getAmpWidth(amplitude/3.0);
if (inWaveForm(pixel, ampwidthHighlight))
gradientColor = mix(gradientColor, gradientColor * vec3(1.8), map(getHightlight(ampwidthHighlight), 0.0, 1.0, 0.5, 1.0));
gl_FragColor = vec4(vec3(gradientColor * mix(0.5, 0.8, amplitude))*openfl_Alphav, openfl_Alphav);
outlineWaveform(pixel, vec2(0.0, -1.0));
outlineWaveform(pixel, vec2(0.0, 1.0));
}
void lowDetailWaveform(vec2 pixel, float amplitude, float ampwidth) {
gl_FragColor = vec4(lowdetailcol * (pixel.y+pixelOffset>playerPosition ? 0.7 : 1.0), 1.0);
gl_FragColor = vec4(vec3(0.), 1.);
}
void main()
@@ -80,9 +68,21 @@ void main()
float amplitude = getAmplitude(pixel);
float ampwidth = getAmpWidth(amplitude);
gl_FragColor = vec4(0.0);
if (!inWaveForm(pixel, ampwidth)) return;
gl_FragColor = vec4(vec3(0.0), .1);
if (lowDetail) lowDetailWaveform(pixel, amplitude, ampwidth);
else highDetailWaveform(pixel, amplitude, ampwidth);
vec2 uv = openfl_TextureCoordv.xy - 0.5;
float c = BACKLIGHT;
float a = abs(uv.x);
float s = 1.0 - smoothstep(0.0, ampwidth/textureRes.x, a);
c *= 1.33 - smoothstep(0.0, 0.5, a);
c*=c*c;
c += s*.5;
if (inWaveForm(pixel, ampwidth))
c += s;
gl_FragColor = vec4((cos(6.283 * (uv.y + time + vec3(0.0,.33,0.66)))*map(getHightlight(amplitude), 0.0, 1.0, 0.5, 1.0)) + GLOW, 1.0) * c * BRIGHTNESS;
gl_FragColor.xyz *= map(getHightlight(amplitude), 0.0, 1.0, 0.5, 1.0);
gl_FragColor.xyz *= pixel.y+pixelOffset>playerPosition ? 0.6 : 1.0;
}