https://github.com/hughsk/glsl-noise
webgl-noise shaders ported to work with glslify
https://github.com/hughsk/glsl-noise
Last synced: 29 days ago
JSON representation
webgl-noise shaders ported to work with glslify
- Host: GitHub
- URL: https://github.com/hughsk/glsl-noise
- Owner: hughsk
- License: mit
- Created: 2013-09-27T01:38:53.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-12-27T00:44:39.000Z (over 9 years ago)
- Last Synced: 2024-05-15T13:08:55.289Z (about 1 year ago)
- Language: GLSL
- Size: 9.77 KB
- Stars: 358
- Watchers: 7
- Forks: 24
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# glsl-noise [](http://github.com/hughsk/stability-badges) #
[webgl-noise](http://github.com/ashima/webgl-noise) ported to an NPM package
so that you can require it from
[glslify](http://github.com/chrisdickinson/glslify).[](https://nodei.co/npm/glsl-noise)
## Usage ##
``` glsl
// Require as many or as little as you need:
#pragma glslify: snoise2 = require(glsl-noise/simplex/2d)
#pragma glslify: snoise3 = require(glsl-noise/simplex/3d)
#pragma glslify: snoise4 = require(glsl-noise/simplex/4d)
#pragma glslify: cnoise2 = require(glsl-noise/classic/2d)
#pragma glslify: cnoise3 = require(glsl-noise/classic/3d)
#pragma glslify: cnoise4 = require(glsl-noise/classic/4d)
#pragma glslify: pnoise2 = require(glsl-noise/periodic/2d)
#pragma glslify: pnoise3 = require(glsl-noise/periodic/3d)
#pragma glslify: pnoise4 = require(glsl-noise/periodic/4d)attribute vec3 position;
// And just treat them as functions like
// you normally would:
void main() {
gl_FragColor = vec4(snoise3(position), 1.0);
}
```