diff options
| author | yuzu-eva <cafebabe@disroot.org> | 2025-06-08 19:10:30 +0200 |
|---|---|---|
| committer | yuzu-eva <cafebabe@disroot.org> | 2025-06-08 19:10:30 +0200 |
| commit | 3438bb45053b30c69eb96fc2476f7d7ba4189906 (patch) | |
| tree | a9861498c0775805416418efc8e1b66cc7b7673a /shaders | |
| parent | a029d434b3f67c37bb4663be8e9b4d6623a32955 (diff) | |
rearranged project structure and adjusted Makefiles
Diffstat (limited to 'shaders')
| -rw-r--r-- | shaders/circles.fs | 27 | ||||
| -rw-r--r-- | shaders/smear.fs | 27 |
2 files changed, 0 insertions, 54 deletions
diff --git a/shaders/circles.fs b/shaders/circles.fs deleted file mode 100644 index 5d504d8..0000000 --- a/shaders/circles.fs +++ /dev/null @@ -1,27 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Output fragment color -out vec4 finalColor; - -void main() -{ - float radius = 0.1; - vec2 distance_from_center = fragTexCoord - vec2(0.5); -// s <= 0 -> inside circle -// s > 0 -> outside circle - if (length(distance_from_center) <= 0.5) { - float s = length(distance_from_center) - radius; - if (s <= 0) { - finalColor = fragColor*1.5; - } else { - float t = 1 - s / (0.5 - radius); - finalColor = vec4(fragColor.xyz, t*t); - } - } else { - finalColor = vec4(0); - } -} diff --git a/shaders/smear.fs b/shaders/smear.fs deleted file mode 100644 index 0f7c316..0000000 --- a/shaders/smear.fs +++ /dev/null @@ -1,27 +0,0 @@ -#version 330 - -// Input vertex attributes (from vertex shader) -in vec2 fragTexCoord; -in vec4 fragColor; - -// Output fragment color -out vec4 finalColor; - -void main() -{ - float radius = 0.25; - vec2 distance_from_center = fragTexCoord - vec2(0.5); -// s <= 0 -> inside circle -// s > 0 -> outside circle - if (length(distance_from_center) <= 0.5) { - float s = length(distance_from_center) - radius; - if (s <= 0) { - finalColor = fragColor*1.25; - } else { - float t = 1 - (s / (0.5 - radius)); - finalColor = vec4(fragColor.xyz, t); - } - } else { - finalColor = vec4(0); - } -} |
