Skip to content

Commit

Permalink
shaders: Use sin-less hash for noise (#5607)
Browse files Browse the repository at this point in the history
  • Loading branch information
Epikastema committed Apr 17, 2024
1 parent 78b04c3 commit 8222234
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/render/shaders/Textures.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit 8222234

Please sign in to comment.