Skip to content

lejeunerenard/raymarching-experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screenshot

Ray Marching Experiments

Here lies my experiments in ray marching. Be warned. Their beauty is only skin deep. While fair on the exterior, the code that lies beneath is full of maggots. I intentionally leave it this way to focus on experimental aspect while coding.

Ray marching is the process of moving along a ray coming out of the camera towards a scene for every pixel on the screen. You moving along this ray based on the minimum distance to any surface in the scene as described by a distance field. Since the distance from the distance field is the minimum distance to any object, you know you can move along your ray that distance without hitting an object. So you proceed to do this with each step until you reach a point where you are within a small enough distance from an object that you have effectively hit the surface.

Install

npm install

Run

Note: Currently I am using unreleased modules of my own creation for doing shader work with WebVR & Google Cardboard. Examples should work but you will not be able to run the code yourself. Tweet me @lejeunerenard if you want these modules completed.

npm start

Resources:

Technologies Used

About

Ray marching experiments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published