Raytracing with GLSL
Sunday, August 08, 2004
I was curious about how raytracing was possible after seeing it in FXComposer.
Then it hit me, the puny memory of our GPUs is enough for basic shapes!
Unfortunatly, it runs in software on my R300. Cutting it down makes it possible to execute in hardware
by carefully avoiding certain C/C++ statements and reducing the code.
Anyway, how about a screenshot?
Tuesday, August 10, 2004
This one uses a similar shader on the sphere, but the shader for the plane is
different for doing something that resembles realtime photon mapping.
The shader for the sphere runs in hardware.
The shader for the plane runs in software, unless I remove the shadow component from the
fragment shader.
The original code was using a more accurate method and was actually exceeding the software implementations
limit so I was getting a link failure. The fragment shader for the plane was over 400 lines, so I cut it
down to about 200.
This page is http://www.oocities.org/vmelkon/glsl_raytracing.html
This page is http://ee.1asphost.com/vmelkon/glsl_raytracing.html
Copyright (C) 2004 Vrej M. All Rights Reserved.