morg
This commit is contained in:
parent
8ea152a924
commit
8e43e4db7e
1 changed files with 2 additions and 2 deletions
|
|
@ -7,13 +7,13 @@ float rand(ivec2 co) {
|
|||
return fract(sin(dot(co, vec2(12.9898, 78.233))) * 43758.5453);
|
||||
}
|
||||
|
||||
float cell_size = 0.1;
|
||||
float cell_size = 0.01;
|
||||
|
||||
#define PI 3.1415926538
|
||||
|
||||
// whatever that corner contributes
|
||||
float c_dot(vec2 point, vec2 corner) {
|
||||
ivec2 c = ivec2(round(corner * 10000));
|
||||
ivec2 c = ivec2(round(corner * 100));
|
||||
float angle = rand(c) * 2*PI;
|
||||
vec2 random_corner_vec = vec2(cos(angle), sin(angle));
|
||||
vec2 offset = (point - corner) / cell_size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue