summaryrefslogtreecommitdiffstats
path: root/res/effectlib/perlinNoiseTexture.glsllib
diff options
context:
space:
mode:
Diffstat (limited to 'res/effectlib/perlinNoiseTexture.glsllib')
-rw-r--r--res/effectlib/perlinNoiseTexture.glsllib11
1 files changed, 11 insertions, 0 deletions
diff --git a/res/effectlib/perlinNoiseTexture.glsllib b/res/effectlib/perlinNoiseTexture.glsllib
new file mode 100644
index 0000000..d968403
--- /dev/null
+++ b/res/effectlib/perlinNoiseTexture.glsllib
@@ -0,0 +1,11 @@
+texture_return perlinNoiseTexture( in texture_coordinate_info uvw, in vec3 color1, in vec3 color2, in float size, in bool applyMarble, in bool applyDent
+ , in float noisePhase, in int noiseLevels, in bool absoluteNoise, in vec3 noiseDistortion
+ , in float noiseThresholdHigh, in float noiseThresholdLow, in float noiseBands )
+{
+ float noise = perlinNoise( uvw.position / size, noisePhase, noiseLevels, noiseDistortion, absoluteNoise
+ , applyMarble, applyDent, noiseBands, noiseThresholdLow, noiseThresholdHigh );
+ texture_return tr;
+ tr.tint = mix( color1, color2, noise );
+ tr.mono = average( tr.tint );
+ return( tr );
+}