🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

glsl-inverse

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glsl-inverse

Invert a matrix in GLSL

1.0.0
latest
Source
npm
Version published
Weekly downloads
22K
-29.66%
Maintainers
1
Weekly downloads
 
Created
Source

glsl-inverse

Invert a matrix in GLSL.

Example

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

void main() {
  mat3 m = mat3(1, 2, -3,
                4, 0, 6,
                7.1, 8, 9);

  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

Keywords

matrix

FAQs

Package last updated on 10 Oct 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts