Nuptial Predicament Mediation

    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

    91,932

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • dy
    • archmoj
    • hughsk
    • mikolalysenko
    • substack
    • mattdesl
    • chrisdickinson
    • yoshuawuyts
    • mikkoh
    • rezaali
    • tatumcreative
    • wwwtyro
    • thibauts
    • bpostlethwaite
    • dfcreative
    • erkaman
    • gre
    • rreusser
    • vorg