diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-10-06 11:49:09 +0000 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-10-06 16:58:43 +0200 |
commit | 07840524085bd1785b8f9142b03d942f678c5c51 (patch) | |
tree | 499c1674fdd1b3e0c07688d8e4e56748dfea2ca3 /src/Runtime/res/effectlib/perlinNoiseTexture.glsllib |
Initial import
Diffstat (limited to 'src/Runtime/res/effectlib/perlinNoiseTexture.glsllib')
-rw-r--r-- | src/Runtime/res/effectlib/perlinNoiseTexture.glsllib | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Runtime/res/effectlib/perlinNoiseTexture.glsllib b/src/Runtime/res/effectlib/perlinNoiseTexture.glsllib new file mode 100644 index 00000000..d968403e --- /dev/null +++ b/src/Runtime/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 ); +} |