Need private packages and team management tools?Check out npm Teams »

glsl-inverse

1.0.0 • Public • Published

glsl-inverse

Invert a matrix in GLSL.

Example

#pragma glslify: inverse require(glsl-inverse) 
 
void main() {
  mat3 m = mat3(12, -3,
                406,
                7.189);
 
  mat3 mi = inverse(m);
 
  //now mi is the inverse of m 
}

Usage

Install with npm:

npm install glsl-inverse

Then use with glslify.

API

#pragma glslify: inverse require(glsl-inverse) 

mi = inverse(float|mat2|mat3|mat4 m)

Computes inverse of m

  • m is a matrix to invert, either float, mat2, mat3 or mat4

Returns The inverse of m

License

(c) 2014 Mikola Lysenko. MIT License

Install

npm i glsl-inverse

DownloadsWeekly Downloads

63,824

Version

1.0.0

License

MIT

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar