home dev games gallery work
Lewpen.com»Research & Development»3D Graphics»WebGL»GLSL Raytracer

GLSL Raytracer

WebGL is quite effective at raytracing simple scenes with a decent frame rate
These use the Fragment Shader Framework to render everything in one fragment shader function which is called for every pixel in the canvas.

Contents

26/Dec/2010

Using shadow rays to determine if the path between each pixel and the light source is blocked

26/Dec/2010

First Test - Using a fragment shader to hit-test 3 spheres and colour each pixel based on the surface normal

26/Dec/2010

Lets try it with 6 spheres this time

26/Dec/2010

Adding a lighting model with specular (Phong) and diffuse lighting

26/Dec/2010

Pushing it a bit with 16 spheres

26/Dec/2010

Creating bumpy surfaces by perturbing the surface normal at each point

26/Dec/2010

Adding a pearlescent effect by adjusting the brightness of each point by the sine of the distance from the camera

26/Dec/2010

Recursive ray tracing to add reflection to the spheres

Games

The Dodge Game
Flatspace

2-Player Games:

Quake 2D
Meteora

Puzzle Games:

Mini Tetris
Sudoku Solver

Development

3D Graphics:

3D Graphics Articles
WebGL Examples
OpenGL Examples
Flash 3D Engine
Java 3D Engine

Development:

Programming Articles
Game Development Examples

Work

Portfolio
Clients
Startups & Projects
Expertise

Links

CubeLogix Studios
PHP Charts & Graphs
Local Legends Football