TSL : Raymarching

Channel:
Subscribers:
24,800
Published on ● Video Link: https://www.youtube.com/watch?v=yCEGL9WcRD0



Duration: 0:00
72 views
3


Playlist :    • Three.js Shading Language (TSL)  
Documentation : https://sbcode.net/tsl/raymarching/

We can use Signed Distance Fields (SDF) to define shapes and scenes, but if we want to view our SDF shapes in 3D, then we can use raymarching.

Raymarching will help us to calculate the distances to SDF shapes in 3D space. We will also be able to calculate the normal in which we can then use to calculate the lighting effects.

So in this first example, imagine a position in space, this is the camera position, and it is scanning a coordinate in a some direction, and the fragment shader will raymarch along that direction until it hits a surface. We can then use that information to color the returned pixel.

#three
#threejs
#tsl
#ThreejsShadingLanguage
#ThreeShaderLanguage
#SignedDistanceFields
#raymarching
#sdf
#sdfdrawing