Friday, February 6, 2015

New demo showcasing dynamic lighting, soft shadows and post-processing effects

I have compiled a little demo using an updated version of my deferred renderer from 2008.

I updated the shaders to conform to the latest version of OpenGL and GLSL and optimized the rendering pipeline. The performance is still terrible at higher resolutions, though, which is a general problem of the deferred rendering approach but is also due to the engine's general design. There's OpenGL calls scattered everywhere, making it very hard to eliminate redundant draw calls. Also, a fullscreen quad is rendered for a every light, even those that only take up a fraction of the screen. I did, however, implement some optimizations into the shaders, e.g. normal compression using stereographic projection.

The demo presents the main features of the engine: dynamic lighting and soft shadows, integration of the physics engine Bullet Dynamics and some post-processing effects such as light bloom, depth of field, dynamic reflections and screen space ambient occlusion.

I am particularly proud of the soft shadows algorithm, which produces good results even on low resolution shadow maps. It is a combination of variance shadow mapping and two subsequent gaussian blur passes applied to the shadow map.

I created the scene using the no longer supported Milkshape3D which started crashing every few minutes after I was halfway done. I'm glad I switched to Blender for my later frameworks. All textures are licensed from gametextures.com. The skybox textures I found here.

You can download the demo here: Backyard Demo (117 MB, Windows only). Please make sure you have the latest drivers for your graphics card installed and let me know if you have any problems running the demo! Also, you can check the file startup.log for shader compilation errors.

Here are some screenshots with medium settings (which is all my laptop with integrated Intel graphics can handle):








No comments:

Post a Comment