[add] glsl random.
This commit is contained in:
parent
9c63edd10c
commit
5d5cd17749
12
README.md
12
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);
|
||||
```
|
||||
|
4
random.glsl
Normal file
4
random.glsl
Normal file
@ -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)
|
Loading…
Reference in New Issue
Block a user