Showing posts with label multitexturing. Show all posts
Showing posts with label multitexturing. Show all posts

Tuesday, 23 September 2008

N lights are better than one

Here we go! Accumulation buffers allowed an easy drawing of multiple light sources and relative shadows.

The trickiest aspect was the balance of exposition: every light features its accumulation factor and the light contributions are supposed to be under 1, in order to avoid overexposition.

It could be a cool effect, anyway. =)

Wednesday, 17 September 2008

When shadows and light combine


Now it's not just primitives and smooth shading! Multitexturing is part of OpenGL since 1.2.1 specification and allows direct textures combining. Putting the shadow map into a separate texture unit (with glActiveTexture) permit us to spread it on our already textured polygons.

I don't know if this is the most performant way to achieve a correct result, but it works fine! =)