• Advertisement

Archived

This topic is now archived and is closed to further replies.

Limited render-to-texture resolution

This topic is 5004 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''ve been implementing shadow mapping, which requires a render-to-texture the size of the depth buffer. I set the depth buffer to 1024x1024, but the window size is only 800x600, and it looks like it can only get the portion that the window displays? It cropped it, so that the area outside 800x600 region was black. Is there any way around this, or am I doing something wrong? I''m also setting the viewport to 1024x1024.

Share this post


Link to post
Share on other sites
Advertisement
I believe that since no pixels are drawn outside the viewport, no depth data etc will be drawn there either... I don''t know there''s any point of using a larger resolution that what is displayed... a common thing is using a lower res than the viewport. =)


But that''s just my nickels!

Cheers mate!

Share this post


Link to post
Share on other sites
I dont I can help you but thanks for the post, i was fiddling with shadow mapping 2 weeks back and I also had the problem of not being able to make a 1024^2 shadow map coz my window was only 800*600, a quick change to my program to make my viewport the same size as my shadow map and lo! wonderfully smooth shadows

From a bit of fiddling it appears your window/context must be at least the same size as the shadow map in both dimentions, so if you want a 1024^2 shadow map make sure your window is at least 1280*1024 in size however i'm not doing RTT atm I'm doing it to the frame buffer and then copying to a texture, RTT via a pbuffer is next, unless thats what you are doing maybe that'll change something...

[edited by - _the_phantom_ on June 9, 2004 12:18:26 AM]

Share this post


Link to post
Share on other sites
ras - it is very needed if you want a high resolution shadow map, in my case at least.. I''m sure there are other uses as well.

phantom - thanks for the tip, I totally forgot about pbuffers. It sounds like it might fix the problem, and be faster anyway. Time to learn something new about opengl

Share this post


Link to post
Share on other sites
i had a quick look at the pbuffer paper from ATI last night and when you create a pbuffer you set its width and height, so in theory if you create a 1024^2 pbuffer and a 1024^2 texture, bind ''em together (via the pbuffer voodoo magic) you can render a 1024^2 shadow map while having a 800*600 window :D

Share this post


Link to post
Share on other sites
Looks like it my friend. Should be more efficient too :D Now I just gotta learn the implementation details. Any tips? Thanks a lot

Share this post


Link to post
Share on other sites
most of my infomation I got from the ATI pbuffer pdf (clicky) and from a pbuffer example from CodeSampler.com about half way down the page.

Its not that hard really, there is just a slight lack of glBindpBufferToTexture() function, its kinda automagic, which baffled me for a while...

Share this post


Link to post
Share on other sites

  • Advertisement