diff options
author | Epikastema <[email protected]> | 2024-04-17 18:01:50 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2024-04-17 19:01:50 +0100 |
commit | 82222342f10a7eff0ec9be972153e740d0f95213 (patch) | |
tree | 895a9c920a1465ec89737974a815ee15fb48a0ef | |
parent | 78b04c3a76614015a6f79f7b3c0e4ebe05548594 (diff) | |
download | Hyprland-82222342f10a7eff0ec9be972153e740d0f95213.tar.gz Hyprland-82222342f10a7eff0ec9be972153e740d0f95213.zip |
shaders: Use sin-less hash for noise (#5607)
-rw-r--r-- | src/render/shaders/Textures.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp index 59c7304f..6ac33a0a 100644 --- a/src/render/shaders/Textures.hpp +++ b/src/render/shaders/Textures.hpp @@ -400,7 +400,9 @@ uniform float noise; uniform float brightness; float hash(vec2 p) { - return fract(sin(dot(p, vec2(12.9898, 78.233))) * 43758.5453); + vec3 p3 = fract(vec3(p.xyx) * 1689.1984); + p3 += dot(p3, p3.yzx + 33.33); + return fract((p3.x + p3.y) * p3.z); } void main() { |