diff --git a/README.md b/README.md index 0b42805..cfd2b05 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,14 @@ http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl ### usage ``` -#pragma glslify: convertHsvToRgb = require(glsl-convert-color/convertHsvToRgb); -#pragma glslify: convertRgbToHsv = require(glsl-convert-color/convertRgbToHsv); +#pragma glslify: convertHsvToRgb = require(glsl-util/convertHsvToRgb); +#pragma glslify: convertRgbToHsv = require(glsl-util/convertRgbToHsv); +``` + +## random + +### usage + +``` +#pragma glslify: random = require(glsl-util/random); ``` diff --git a/random.glsl b/random.glsl new file mode 100644 index 0000000..039e284 --- /dev/null +++ b/random.glsl @@ -0,0 +1,4 @@ +float random(vec2 co){ + return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); +} +#pragma glslify: export(random)