Sign in to follow this  
PDX_Catalyst

[.net] RenderTarget2D - Can't be larger than the screen?

Recommended Posts

I'm rendering terrain using (or trying to) one giant 2048 x 2048 texture which I'm creating using RenderTarget2D. The problem is, I can't do this... rt = new RenderTarget2D(device, 2048, 2048, 1, SurfaceFormat.Color); ... or I get an empty texture. It took me a while to figure out that the dimensions had to be no larger than these... graphics.PreferredBackBufferHeight = ScreenHeight; graphics.PreferredBackBufferWidth = ScreenWidth; Once I lowered the dimensions of the RenderTarget2D I got a texture just fine. Why is that? And isn't there some way I can create a larger texture? Thanks in advance for any help!

Share this post


Link to post
Share on other sites
Solution:

NOTE: SIZE_P == 2048

device.DepthStencilBuffer = new DepthStencilBuffer(device, SIZE_P, SIZE_P, device.PresentationParameters.AutoDepthStencilFormat, device.PresentationParameters.MultiSampleType, device.PresentationParameters.MultiSampleQuality);

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