https://github.com/clabe45/glsl-rand
Random noise for glslify
https://github.com/clabe45/glsl-rand
Last synced: 5 months ago
JSON representation
Random noise for glslify
- Host: GitHub
- URL: https://github.com/clabe45/glsl-rand
- Owner: clabe45
- License: gpl-3.0
- Created: 2022-04-27T04:05:34.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T04:36:05.000Z (about 4 years ago)
- Last Synced: 2025-02-01T16:09:43.674Z (over 1 year ago)
- Language: GLSL
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# glsl-rand
This package provides 2D, 3D and 4D random noise for use with
[glslify](https://www.npmjs.com/package/glslify).
## Usage
```glsl
#pragma glslify: rand2 = require(glsl-rand/2d)
#pragma glslify: rand3 = require(glsl-rand/3d)
#pragma glslify: rand4 = require(glsl-rand/4d)
vec4 seed = vec4(100., 200., 300., 400.);
float a = rand2(seed.xy);
float b = rand3(seed.xyz);
float c = rand4(seed.xyzw);
```
## Contributing
Pull requests are welcome! Please open an issue before making any major changes.
## License
Licensed under GNU GPLv3 (see [LICENSE](./LICENSE) for more info)