Jump to content

View more

Image of the Day

Inventory ! Va falloir trouver une autre couleur pour le cadre D: #AzTroScreenshot #screenshotsaturday https://t.co/PvxhGL7cOH
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Handling shadow map when objects are far away

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 EarthBanana   GDNet+   

1791
Like
0Likes
Like

Posted 31 March 2013 - 06:10 AM

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

Attached Thumbnails

  • SCRN1.jpg

Edited by EarthBanana, 31 March 2013 - 06:11 AM.


#2 TheChubu   Members   

9328
Like
1Likes
Like

Posted 31 March 2013 - 09:41 AM

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


#3 EarthBanana   GDNet+   

1791
Like
0Likes
Like

Posted 31 March 2013 - 11:44 AM

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, 31 March 2013 - 02:04 PM.





Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.