Jump to content
  • Advertisement
Sign in to follow this  
DeathCarrot

OpenGL Render to texture larger than screen?

This topic is 3844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm attempting to implement shadow mapping with OpenGL 2.0 core features only, my implementation works fine using FBOs, but I need to implement it without them. I'm now doing it via the make a texture and use glCopyTexImage2D route, but then my shadow maps look like this (in a 640x480 window): for 512x512: and for 2048x2048: and frankly, I need the resolution, so just using a 512x512 map isn't an option. I have a relatively tight deadline for this, so I hope the solution isn't too extravagant. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
What about to divide it to few smaller ones - so you need 2048*2048 shadow map. Thats 16 512*512 shadow maps (if you divide them, then even shadow detailing is possible, to get some more fps). This should work, but it'll take a lot of memory and CPU power (more than using FBO or PBuffer).

And there's too posiblity of using perspective wrap techniques! They'll increase "sharpness" of shadow map, (sometimes even resolution). Here are the links:
Perspective shadow mapping - http://www.cg.tuwien.ac.at/~scherzer/psm/index.html
Light Space PSM - http://www.cg.tuwien.ac.at/research/vr/lispsm/
Trapezoidal shadow maps - http://www.comp.nus.edu.sg/~tants/tsm.html
Subdivided shadow maps - http://gamma.cs.unc.edu/ssm/
Parallel split shadow maps - http://appsrv.cse.cuhk.edu.hk/~fzhang/pssm_vrcia/

Anyway, why use just core features only? FBO's are supported on every card in mainstream gpu's nowadays (I think, first is GeForce 5xxx series and Radeon 9xxx series, but not 100% sure)

Share this post


Link to post
Share on other sites
Thanks guys =)
Quote:
Original post by Vilem Otte
Anyway, why use just core features only? FBO's are supported on every card in mainstream gpu's nowadays (I think, first is GeForce 5xxx series and Radeon 9xxx series, but not 100% sure)

University assignment unfortunately, although I got a reply from my lecturer after starting this thread he said that it should be OK as long as the program compiles and runs on the lab machines, which are all fitted with geforce 6800s and 8800s from my recollection, so in theory I should be OK with FBOs.
Although if I learn more and I can't use FBOs then I guess the easiest way would be to split into cells (although I'm not entirely sure how to go about doing that since my sun is a point light and I'm defining the light matrices using gluLookAt.

Share this post


Link to post
Share on other sites
Well, splitting is very, very easy way (it's a little tricky too). You've got your point - so how to split that?? you can redefine point for every cell, but this is really not the best way (but it's the way).
The best way needs little experimenting (or little math). Set camera position (when rendering shadow maps) to that point and set view for every cell into the middle of that cell. Then you need to try few perspective FOVs and choose the best for that cell, or you can calculate it (it's not so simple, but it'd be very accurate).

One advice - when you render separate cells, try to render just polygons in that cell, no other polygons from terrain, it'll save a lot of render time.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!