Sign in to follow this  
EarthBanana

Handling shadow map when objects are far away

Recommended Posts

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

Edited by EarthBanana

Share this post


Link to post
Share on other sites

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

Edited by EarthBanana

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this