glsl-intersect
v0.0.6
Published
GLSL Intersection Functions for Ray Tracing. Can be required from glslify.
Downloads
21
Maintainers
Readme
glsl-intersect
GLSL Intersection Functions for Ray Tracing. Can be required from glslify.
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
- [x] 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