Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    glsl-intersect

    0.0.6¬†‚Äʬ†Public¬†‚Äʬ†Published

    glsl-intersect experimental

    GLSL Intersection Functions for Ray Tracing. Can be required from glslify.

    NPM

    Usage

    When using glslify, you can include the intersecion functions like so:

     
    #pragma glslify: rayBox = require('glsl-intersect/3d/intersection/rayAABB') 
     
    void main() {
      vec2 result;
      bool test = rayBox(
        vec3(0.0, 0.0, 0.0),    //Ray Origin 
        vec3(0.0, 1.0, 0.0),    //Ray Direction 
        vec3(-2.0, 3.0, -5.0),  //Box Min Vertex 
        vec3(2.0, 10.0, 5.0),   //Box Max Vertex 
        result
      );
      //... 
    }
     

    Development Progress

    • Basic 3D Intersection Function Implementations
    • Testing And Verification for 3D Functions
    • Basic 2D Intersection Function Implementations
    • Testing And Verification for 2D Functions
    • Complex Shape Intersection Functions

    Install

    npm i glsl-intersect

    DownloadsWeekly Downloads

    3

    Version

    0.0.6

    License

    MIT

    Unpacked Size

    20 kB

    Total Files

    24

    Last publish

    Collaborators

    • avatar