Handling shadow map when objects are far away

Started by
1 comment, last by EarthBanana 11 years ago

So I for each spot light I go through and create a shadow map depth texture by rendering all of my objects from all of the spot light's point of views - it works fine but when I move the spot lights far away I start to get the pixelated (giant pixels) looking shadows I think because the texture is the same resolution as the screen size.. so when the light is really far away the shadows are very small on the texture making them appear pixelated.

Anyways - does anyone know a way to deal with this? I tried resizing my texture but it didn't actually help at all - it just made the pixelated shadows even smaller.

The picture shows what the shadow looks like when the spot light is really far away

Advertisement

I think you're looking for cascaded shadow maps.

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

Thanks it looks like that's exactly what I need.

I found also what I was doing wrong in making the higher resolution shadow map texture - I wasnt changing the viewport size to match the texture when I enabled the frame buffer.. It works great now - I'm working on switching textures based on the camera's distance from the shadows now - it's a bit tricky though considering the shadows can all be at different depths in the viewing frustum.. I'll figure it out though

Thanks for the help

This topic is closed to new replies.

Advertisement