diff options
author | syeyoung <cyoung06@naver.com> | 2023-02-04 18:39:59 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-02-04 18:39:59 +0900 |
commit | 7bc262cbfa173fb0a31fb58d6f1d55fa0cac3b08 (patch) | |
tree | cc92677cb4d86ace73da4afd29dfa3a336341620 /loader/src/main/resources/assets/dungeons_guide_loader/shaders | |
parent | 29d6ebc4433318fb72d4587d7a67b522fd744619 (diff) | |
download | Skyblock-Dungeons-Guide-7bc262cbfa173fb0a31fb58d6f1d55fa0cac3b08.tar.gz Skyblock-Dungeons-Guide-7bc262cbfa173fb0a31fb58d6f1d55fa0cac3b08.tar.bz2 Skyblock-Dungeons-Guide-7bc262cbfa173fb0a31fb58d6f1d55fa0cac3b08.zip |
- cursors
- move guiv2 to launcher
- add force letsencrypt support (without modifying keystore directly)
^ very cool
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'loader/src/main/resources/assets/dungeons_guide_loader/shaders')
6 files changed, 111 insertions, 0 deletions
diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromacircle.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromacircle.frag new file mode 100644 index 00000000..25354550 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromacircle.frag @@ -0,0 +1,27 @@ +#version 120 + +#define TWO_PI 6.28318530718 + +uniform float radius; +uniform vec2 centerPos; +uniform float smoothness; +uniform float value; + + +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 stuff = gl_FragCoord.xy - centerPos; + float sdf = length(stuff)-radius; + float saturation = 1.0+(sdf / radius); + float clampd = 1.0 - smoothstep(-smoothness, smoothness, sdf); + float angle = atan(-stuff.x, -stuff.y) / TWO_PI + 0.5; + + vec3 col = hsv2rgb(vec3(angle, saturation, value)); + + gl_FragColor = vec4(col,clampd); +}
\ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.frag new file mode 100644 index 00000000..7ddf2db8 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.frag @@ -0,0 +1,23 @@ +#version 120 +uniform float radius; +uniform vec2 halfSize; +uniform vec2 centerPos; +uniform float smoothness; +varying vec4 color; + +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); +} + +float roundedBoxSDF(vec2 CenterPosition, vec2 Size, float Radius) { + return length(max(abs(CenterPosition)-Size+Radius,0.0))-Radius; +} + +void main() { + float distance = roundedBoxSDF(gl_FragCoord.xy - centerPos, halfSize, radius); + float smoothedAlpha = smoothstep(-smoothness,0.0, -distance); + gl_FragColor = vec4(hsv2rgb(color.rgb), color.a) * vec4(1.0, 1.0, 1.0, smoothedAlpha); +}
\ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.vert b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.vert new file mode 100644 index 00000000..377182c5 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/chromaroundrect.vert @@ -0,0 +1,19 @@ +#version 120 + +varying vec4 color; + +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); +} + +void main() { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + color = vec4(rgb2hsv(gl_Color.rgb), gl_Color.a); +}
\ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/donut.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/donut.frag new file mode 100644 index 00000000..cca6bc39 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/donut.frag @@ -0,0 +1,17 @@ +#version 120 + + +uniform float radius; +uniform float thickness; +uniform vec2 centerPos; +uniform float smoothness; + + + +void main() { + vec2 stuff = gl_FragCoord.xy - centerPos; + float sdf = abs(length(stuff)-radius); + float clampd = 1.0 - smoothstep(thickness, thickness+smoothness, sdf); + + gl_FragColor = gl_Color * vec4(1.0, 1.0, 1.0, clampd); +}
\ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.frag b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.frag new file mode 100644 index 00000000..95649cf4 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.frag @@ -0,0 +1,17 @@ +#version 120 +uniform float radius; +uniform vec2 halfSize; +uniform vec2 centerPos; +uniform float smoothness; +varying vec4 color; + + +float roundedBoxSDF(vec2 CenterPosition, vec2 Size, float Radius) { + return length(max(abs(CenterPosition)-Size+Radius,0.0))-Radius; +} + +void main() { + float distance = roundedBoxSDF(gl_FragCoord.xy - centerPos, halfSize, radius); + float smoothedAlpha = smoothstep(-smoothness,0.0, -distance); + gl_FragColor = color * vec4(1.0, 1.0, 1.0, smoothedAlpha); +}
\ No newline at end of file diff --git a/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.vert b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.vert new file mode 100644 index 00000000..7a2ec153 --- /dev/null +++ b/loader/src/main/resources/assets/dungeons_guide_loader/shaders/roundrect.vert @@ -0,0 +1,8 @@ +#version 120 + +varying vec4 color; + +void main() { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + color = gl_Color; +}
\ No newline at end of file |