Private GLSL utility functions
Go to file
2017-01-26 14:44:10 +09:00
convertHsvToRgb.glsl [add] glsl files. 2016-10-04 00:31:23 +09:00
convertRgbToHsv.glsl [add] glsl files. 2016-10-04 00:31:23 +09:00
package.json Update package.json 2016-12-27 15:16:40 +09:00
polar.glsl [add] polar function. this function calculates polar coordinates. 2017-01-26 14:44:10 +09:00
random.glsl [add] glsl random. 2016-12-27 01:19:28 +09:00
README.md [add] polar function. this function calculates polar coordinates. 2017-01-26 14:44:10 +09:00

glsl-util

utility functions for glsl.

install

npm i git://github.com/ykob/glsl-util.git

convertHsvToRgb and convertRgbToHsv

this function converts RGB to HSV. or is its opposite.

Quote source

http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl

usage

#pragma glslify: convertHsvToRgb = require(glsl-util/convertHsvToRgb);
#pragma glslify: convertRgbToHsv = require(glsl-util/convertRgbToHsv);

random

usage

#pragma glslify: random = require(glsl-util/random);

polar

this function calculates polar coordinates.

usage

#pragma glslify: polar = require(glsl-util/polar);
vec3 p = polar(float radian1, float radian2, float radius);