From 2af916371b2edf71fb055a3f8de2bcd7b99b2251 Mon Sep 17 00:00:00 2001 From: Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> Date: Wed, 29 May 2024 23:00:20 +0200 Subject: Improvement: Added Mining Event Icons (#1305) Co-authored-by: Cal --- src/main/resources/assets/skyhanni/shaders/darken.fsh | 13 +++++++++++++ src/main/resources/assets/skyhanni/shaders/darken.vsh | 9 +++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/main/resources/assets/skyhanni/shaders/darken.fsh create mode 100644 src/main/resources/assets/skyhanni/shaders/darken.vsh (limited to 'src/main/resources/assets/skyhanni/shaders') diff --git a/src/main/resources/assets/skyhanni/shaders/darken.fsh b/src/main/resources/assets/skyhanni/shaders/darken.fsh new file mode 100644 index 000000000..cfc118eef --- /dev/null +++ b/src/main/resources/assets/skyhanni/shaders/darken.fsh @@ -0,0 +1,13 @@ +#version 120 + +// Fragment Shader +uniform sampler2D texture; +uniform float darknessLevel; + +varying vec4 outColor; + +void main() { + vec4 color = texture2D(texture, gl_TexCoord[0].st) * outColor; + vec3 darkenedColor = color.rgb * darknessLevel; + gl_FragColor = vec4(darkenedColor, color.a); +} diff --git a/src/main/resources/assets/skyhanni/shaders/darken.vsh b/src/main/resources/assets/skyhanni/shaders/darken.vsh new file mode 100644 index 000000000..210bee872 --- /dev/null +++ b/src/main/resources/assets/skyhanni/shaders/darken.vsh @@ -0,0 +1,9 @@ +#version 120 + +varying vec4 outColor; + +void main() { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + gl_TexCoord[0] = gl_MultiTexCoord0; + outColor = gl_Color; +} -- cgit