home games dev
Lewpen.com»Research & Development»3D Graphics»WebGL»Realtime Raytracer»Raytracer 001 - 3 spheres with normals

Raytracer 001 - 3 spheres with normals

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

Files

index.html 3,335 bytes
webgl_fragment_framework.js 7,632 bytes

Comments

Related Articles

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

Recursive ray tracing to add reflection to the spheres

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

Lets try it with 6 spheres this time

Pushing it a bit with 16 spheres

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

Creating bumpy surfaces by perturbing the surface normal at each point

Sponsored Links

Toys & Games:

Doggie Doo
Nerf Vortex
Monster High
Lagoona Hydration Station
Milky Bunny
Moshling Tree House
Lego Ninja Go Fire Temple
Fireman Sam Pontypandy Rescue
Rock Elmo
Star Wars Ultimate Force Lightsaber

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
Flash 3D Engine
Java 3D Engine

Development:

Programming Articles
Animation Demos
Game Development Examples

Links

iBuddy Social Network
Local Legends Football
PHP Charts & Graphs
CubeLogix Studios