Here I test out the feasibility of performing raycasting inside a fragment shader, with moderately complex models (3D fractals).

Raycasting Test 9 September 2012

Reference GLSL Raycaster

This is a test of raycasting inside a GLSL fragment shader. The results are promising...

WebGL, live in the page. Open full window

Source 2 files

First Fractal 9 September 2012

First test of fractal casting in a shader

This is a fractal created by applying a repeated boxfold on a Pseudo-Kleinian shape.

WebGL, live in the page. Open full window

Source 2 files

Cathedral 9 September 2012

Alternative fractal parameters

Some different fractal parameters and camera positions give rise to something reminiscent of gothic cathedral architecture.

WebGL, live in the page. Open full window

Source 2 files

Cathedral (faster motion) 9 September 2012

Moving more quickly through the scene

I have made the camera faster to get an idea of what is around. There are some interesting views in here!

WebGL, live in the page. Open full window

Source 2 files

Cathedral (blurry fog) 9 September 2012

Fewer raycasting steps for fog effect

WebGL, live in the page. Open full window

Source 2 files

Cathedral (higher detail) 9 September 2012

More raycasting steps for a sharper image

This increases the raycasting steps, allowing for a more accurate trace and finer details visible.

WebGL, live in the page. Open full window

Source 2 files