Miss any of our Open RFC calls?Watch the recordings here! »

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.00.00.0),    //Ray Origin 
    vec3(0.01.00.0),    //Ray Direction 
    vec3(-2.03.0, -5.0),  //Box Min Vertex 
    vec3(2.010.05.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

11

Version

0.0.6

License

MIT

Unpacked Size

20 kB

Total Files

24

Last publish

Collaborators

  • avatar