After spending most of my free time last year writing a raytracer, I’ve finally finished another OpenGL demo.
This demo loads a Doom-3 level (using the .proc format) and renders the level using portal-based visibility culling. I use the OpenGL Shading Language (GLSL) to render the levels using the light-data loaded from the .map files.
This demo is not a ‘perfect’ Doom-3 map viewer, but more of an experiment to find out how to use GLSL and render a lot of lights in realtime.
The standard shader renders the geometry using bump mapping, diffuse and specular lighting using specular maps (no shadows!).
During the demo you can use the following keys:
- B – shows the bounding boxes of the lights.
- N – shows the bounding quads of the lights in screen space.
- M – cycles through the shaders defined in de scene.
You can render different scenes by ‘drag and drop’-ing the scene (.txt) files to the exe.
You need GLSL capable hardware such as the Radeon 9500 and up and GeForce FX 5200 and up to run this demo.
If you like this post, you may also like one of my other posts:
- kD-tree collision detection
- Wolfenstein: Ray Tracing On using WebGL1
- Tokyo – breakdown of a webgl fragment shader
- Image-Based Lighting
- Robotic Arm