Hey guys,
I'm trying to port one of my sketches to a GLSL (fragment) shader. It works, but looks different.
I have pinpointed the culprit: noise
See the following screenshots with Processing on the left and GLSL on the right.
The Processing noise (topleft) looks like I would expect noise to look. The GLSL noise looks blurred. My guess is that the GLSL noise is in fact of a higher precision (thus smoother). I can imagine many cases where this would be a good thing. However when trying to recreate an effect that is based on the Processing noise function, it is not a good thing.
The noise function(s) I am using in my GLSL shader can be found here. I have tried several, both classic and simplex perlin noise. I am already correcting for the difference in range, which is -1 to 1 for the GLSL noise functions. All GLSL noise gives that super-smooth look, which ugly-fies my final result.
I have also looked at the source code of the Processing noise function (written by toxi / Karsten Schmidt). But this code seems to have some dependencies, so it's not straight-forward to copy-paste to a fragment shader.
Does anybody have a GLSL noise function lying around that mimics the Processing noise function?
or
How could I adapt for example this noise function to look more like Processing's output?
I'm trying to port one of my sketches to a GLSL (fragment) shader. It works, but looks different.
I have pinpointed the culprit: noise
See the following screenshots with Processing on the left and GLSL on the right.
The Processing noise (topleft) looks like I would expect noise to look. The GLSL noise looks blurred. My guess is that the GLSL noise is in fact of a higher precision (thus smoother). I can imagine many cases where this would be a good thing. However when trying to recreate an effect that is based on the Processing noise function, it is not a good thing.
The noise function(s) I am using in my GLSL shader can be found here. I have tried several, both classic and simplex perlin noise. I am already correcting for the difference in range, which is -1 to 1 for the GLSL noise functions. All GLSL noise gives that super-smooth look, which ugly-fies my final result.
I have also looked at the source code of the Processing noise function (written by toxi / Karsten Schmidt). But this code seems to have some dependencies, so it's not straight-forward to copy-paste to a fragment shader.
Does anybody have a GLSL noise function lying around that mimics the Processing noise function?
or
How could I adapt for example this noise function to look more like Processing's output?
1