Skip to content

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

License

Notifications You must be signed in to change notification settings

btmxh/glsl-intersect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages