PRNG's
category: code [glöplog]
The dithering happen because the position is always updated by moving left or right but also up or down:
Here is another image I call "the genie" using plot(xp/2, yp/2)
Code:
int rnd = seed;
for(int j=0; j<8192; j++) { // 8192*16 string lenght
rnd += rnd<<16 | rnd>>16;
int d = rnd;
for(int i=0; i<16; i++) { // plot 16 pixels
xp += (d&2)-1;
yp += (d&1)*2 -1;
d >>= 2;
plot(xp, yp);
}
}
Here is another image I call "the genie" using plot(xp/2, yp/2)
Going down memory lane:
ACC = (ACC*3 + TopRightPixel - 0x1E) / 4 + rnd()&0xF + round;
This generate really cheap perlin noise.
rnd() is again : rnd += rnd<<16 | rnd>>16;
ACC = (ACC*3 + TopRightPixel - 0x1E) / 4 + rnd()&0xF + round;
This generate really cheap perlin noise.
rnd() is again : rnd += rnd<<16 | rnd>>16;
so your period is 2^32?
im having period of 2^16. but im using "independent" 8-bit registers in my calcs.
you're saving those images with crappy jpeg compression, jsyk. :P
im having period of 2^16. but im using "independent" 8-bit registers in my calcs.
you're saving those images with crappy jpeg compression, jsyk. :P
Actually this is the random function I used in those test: So 2^64 ?
The fact that I use pure blue doesn't help ms paint default jpeg compression :)
A version shaded with : b = acc; g = acc *acc; r = acc*acc;
Code:
__inline __m128i Rnd() { // 8bytes
rnd = _mm_add_epi64(rnd, _mm_shuffle_epi32(rnd, 0x1E));
return rnd;
}
The fact that I use pure blue doesn't help ms paint default jpeg compression :)
A version shaded with : b = acc; g = acc *acc; r = acc*acc;
Quote:
it's a sailboat!
simple glsl oneliner:
Also, Perlin and Simplex noise for GLSL.
Quote:
float rand(vec2 co){
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}
Also, Perlin and Simplex noise for GLSL.
This is what I saw in the randomness:
Now, lets see your sailboat :)
Now, lets see your sailboat :)
That looks like a bust.
When I generated those random string I posted the result and called it "the genie" because I kind of saw a face in what looked like smoke rising from the bottom left corner.
The 'bust' is from erasing the 'smoke' around the face to make it obvious.
Here is the original random data with the face colorized blue.
But most seed result in a Scandinavian like coastline:)
The 'bust' is from erasing the 'smoke' around the face to make it obvious.
Here is the original random data with the face colorized blue.
But most seed result in a Scandinavian like coastline:)
Quote:
it's a sailboat!
Quote:
You know what? There is NO Easter Bunny! Over there, that's just a guy in a suit!
I am le very interested, the random value I am currently using into my shaders doesn't satisfy me :(
T21: The first moment I saw the picture I was sure I was looking at a noise-disfigured portrait of Hitler.