npm.devtool.tech
👏 You can access glsl-ascii-filter package with using glslAsciiFilter variable in browser devtools!
faux ASCII post-processing effect in GLSL

basic

package
Npm Version
Node Version

popularity

Star
Npm Weekly Downloads
Jsdeliver Month Downloads
Dependents Pkg
Dependents Repo

size

Code Size
Publish Size
Install Size
Minified Size
Gzip Size

quality

Open Issues
Tree Shaking Support
Type Support
Last Commit

health

Package health
Dependency Count
Outdated Dep
Vulnerablities

glsl-ascii-filter

stable

ascii

(glslbin demo)

A simple ASCII post-processing effect in GLSL, original here by @movAX13h.

#pragma glslify: asciiFilter = require('glsl-ascii-filter')

void main() {
  vec4 color = texture2D(u_sampler, uv);

  //aspect-corrected screen UVs
  vec2 st = uv;
  st.x *= iResolution.x / iResolution.y;
  
  //apply filter
  gl_FragColor.rgb = color.rgb * asciiFilter(color.rgb, uv);
  gl_FragColor.a = color.a;
}

Best rendered with retina scaling for crisp edges.

Usage

NPM

float asciiFilter(vec3 color, vec2 uv[, float pixelSize])

Applies an ASCII-like filter to the given pixel color based on the current screen uv texcoords. The pixelSize (defaults to 0.04) can be used to scale the characters.

License

MIT, see LICENSE.md for details.