Fixed a bug in my previous commit.
I forgot that sin and cos functions want angle value in radians. Now the code looks a bit ugly, but generates proper values.
This commit is contained in:
parent
0c254dfa5d
commit
cee0de3af3
@ -40,7 +40,7 @@ void main(void)
|
||||
float bl = 0.0;
|
||||
float m = log2(r) + 6 + log2(invSamples);
|
||||
|
||||
float theta = mod(2. * 3.14 * tau * .5 * invSamples + phi, 360.);
|
||||
float theta = radians(mod(degrees(2. * 3.14 * tau * .5 * invSamples + phi), 360.));
|
||||
vec2 rotations = vec2(cos(theta), sin(theta)) * screen;
|
||||
vec2 offset = vec2(cos(invSamples), sin(invSamples));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user