OpenGL Dynamic Software LightMap

dynamic_light_screent_shot-300x225Here is a simple tutorial for the dynamic software light maps for OpenGL. This program was built on Ubuntu OS. The project management tool is CMake.

In this program, a light map will be created every frame. Each tex-pixel on this light map will be converted into the 3d position in the world space, and light intensity will be calculated based on the current point light source’s position. And the MutiTexturing Technology was used here to blend the light map with the diffuse map. Of course, there are other ways that we could archive the same effect, such as fragment shader real time lighting. This will be much faster than this method, because this will try to run the hardware power as more as possible. Yeach, the GPU could afford to do that, because he has some special and professional operation unit to handle that.

posted @ 2012-08-24 07:46  opencoder  阅读(306)  评论(0编辑  收藏  举报