glsl-noise
webgl-noise shaders ported to work with glslify
Last updated 11 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install glsl-noise 
SYNC missed versions from official npm registry.

glsl-noise frozen

webgl-noise ported to an NPM package so that you can require it from glslify.

glsl-noise

Usage

// Require as many or as little as you need:
#pragma glslify: cnoise2 = require(glsl-noise)
#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);
}

Current Tags

  • 0.0.0                                ...           latest (11 years ago)

1 Versions

  • 0.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE