glsl-barrel-pincushion
Distort the UV with barrel or pincushion effect. Adapted from this shadertoy.
Installation 📦
npm i glsl-barrel-pincushion -S
Usage 📖
barrelPincushion(vec2 st, float strength)
strength > 0 for barrel distortion, strength < 0 for pincushion.
Example 💾
uniform float uTime;# barrelPincushion = require(glsl-barrel-pincushion) # rectangle = require(glsl-2d-primitives/rectangle) attribute vec2 vUv; void
License 📝
MIT. See LICENSE for details.