updated readme.

This commit is contained in:
ykob 2022-04-20 20:24:45 +09:00
parent d133d6d4c5
commit fa90b6d2bc

View File

@ -6,7 +6,7 @@ these functions are dependent by [glslify](https://github.com/glslify/glslify).
## install ## install
``` ```
npm i git://github.com/ykob/glsl-util.git yarn add @ykob/glsl-util
``` ```
## usage ## usage
@ -17,7 +17,7 @@ convert HSV to RGB.
http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl
``` ```
#pragma glslify: convertHsvToRgb = require(glsl-util/convertHsvToRgb); #pragma glslify: convertHsvToRgb = require(glsl-util/src/convertHsvToRgb);
``` ```
### `convertRgbToHsv(vec3 rgb)` ### `convertRgbToHsv(vec3 rgb)`
@ -26,7 +26,7 @@ convert RGB to HSV.
http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl
``` ```
#pragma glslify: convertRgbToHsv = require(glsl-util/convertRgbToHsv); #pragma glslify: convertRgbToHsv = require(glsl-util/src/convertRgbToHsv);
``` ```
### `random(vec2 p)` ### `random(vec2 p)`
@ -34,7 +34,7 @@ http://lolengine.net/blog/2013/07/27/rgb-to-hsv-in-glsl
calculate white noise. calculate white noise.
``` ```
#pragma glslify: random = require(glsl-util/random); #pragma glslify: random = require(glsl-util/src/random);
``` ```
### `polar(float radian1, float radian2, float radius)` ### `polar(float radian1, float radian2, float radius)`
@ -42,7 +42,7 @@ calculate white noise.
calculate polar coordinates. calculate polar coordinates.
``` ```
#pragma glslify: polar = require(glsl-util/polar); #pragma glslify: polar = require(glsl-util/src/polar);
``` ```
### `gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction)` ### `gaussianBlur(sampler2D texture, vec2 uv, float radius, vec2 resolution, vec2 direction)`
@ -50,7 +50,7 @@ calculate polar coordinates.
calculate the Gaussian blur. calculate the Gaussian blur.
``` ```
#pragma glslify: gaussianBlur = require(glsl-util/gaussianBlur); #pragma glslify: gaussianBlur = require(glsl-util/src/gaussianBlur);
``` ```
### `lookAt(vec3 base, vec3 p1, vec3 p2, vec3 up)` ### `lookAt(vec3 base, vec3 p1, vec3 p2, vec3 up)`
@ -58,7 +58,7 @@ calculate the Gaussian blur.
rotate a vector in any direction. rotate a vector in any direction.
``` ```
#pragma glslify: lookAt = require(glsl-util/lookAt); #pragma glslify: lookAt = require(glsl-util/src/lookAt);
``` ```
### `rotateAxisAngle(vec3 p, vec3 axis, float angle)` ### `rotateAxisAngle(vec3 p, vec3 axis, float angle)`
@ -66,5 +66,5 @@ rotate a vector in any direction.
rotate a vector by any axis and angle. rotate a vector by any axis and angle.
``` ```
#pragma glslify: rotateAxisAngle = require(glsl-util/rotateAxisAngle); #pragma glslify: rotateAxisAngle = require(glsl-util/src/rotateAxisAngle);
``` ```