Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Handling shadow map when objects are far away


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   Members   -  Reputation: 959

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.


Sponsor:

#2 TheChubu   Crossbones+   -  Reputation: 4564

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   Members   -  Reputation: 959

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.



PARTNERS