Skip to content

yiwenl/glsl-fbm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

glsl-fbm

Fractional Brownian Motion(fBM) ported to an NPM package for glslify. Also check out GLSL Noise Algorithms

Installation

npm install glsl-fbm

Usage

attribute vec3 position;
attribute vec2 uv;
uniform float time;

#pragma glslify: fbm = require(glsl-fbm)

void main() {
  vec3 pos = position;
  float height = fbm(vec3(uv, time));
  pos.y += height;
  
  gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(pos, 1.0);
}

About

Fractional Brownian Motion in glsl

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages