Skip to main content
gamedev.net
🔒 Locked

Effective resolution

Started by Odie2 6 replies 1.4k views
Original Post
Odie2
Odie2
I have an older 3D game which has a quality slider (low, medium, high) in its options. Changing this slider has the following effect: when I have selected a specific monitor resolution (let's say 1280x1024) the visual appearance of the rendering output is as if the resolution is effectively reduced depending on the quality slider. So my monitor always shows 1280x1024, but the size of the pixels appears larger for lower quality settings (say for low quality 640x512 for example, so 2x2 pixels get the same color values). Is there a specific Direct3D parameter or function for automatically doing such, let me call it pixel clustering ? Or does one have to use dedicated tricks, like rendering to memory and upscaling or something ? [Edited by - Odie2 on March 10, 2009 3:59:43 AM]
jtagge75
jtagge75
They might be rendering the scene to a render target that is smaller then the screen size and then for the actual screen output rendering a quad to the screen and stretching the texture to fit. More or less your second idea.
Evil Steve
Evil Steve
What game is it? Are you sure it's using D3D and not DirectDraw?
Odie2
Odie2
Hi Steve,

It's Pro Evolution Soccer 4. I think it's a D3D game because it calls Direct3D's createDevice in the beginning, and I guess it would be much slower if it was DirectDraw based.

One thing that is strange as well is that it doesn't seem to be possible to force antialiasing through the Nvidia driver control panel (I can turn that on, but I can't see any antialiasing effect).
jollyjeffers
jollyjeffers
The number of pixels rasterized will have a big impact on both performance and quality, so whilst fugly some sort of forced down-sample would be a valid implementation. Sounds like what they've done here.

You can get implicit scaling in windowed mode, but I believe thats done by the DWM/GDI (not sure though to be honest). Create a Window with a 640x480 size and only a 320x240 D3D output and it'll automagically up-scale it, which from memory is a bilinear filter rather than a point filter (=blurry).

Have you tried a PIX trace?

Quote:
One thing that is strange as well is that it doesn't seem to be possible to force antialiasing through the Nvidia driver control panel (I can turn that on, but I can't see any antialiasing effect).
Quite possible they're using some feature, such as render targets, that don't mix with MSAA and thus forcing it on is completely meaningless and hence you see no difference.


hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
Odie2
Odie2
Hi Jack,

Following your advice I've run Pix with the game's executable. But after having pressed F12 and ending the game, PIX tells me that the program "pes4.exe" exited unexpectedly while PIX was analyzing it.

Switching on the debug libraries in the DX control panel didn't seem to help.

Is this probably the typical error message when the application forbids PIX analysis ? Or does the game not even know of PIX since it is from 2004 ? Or could it be a problem with static linkage of DirectX ?
Erik Rufelt
Erik Rufelt
At least in D3D10 you can simply sett the BufferDesc.Width/Height in the DXGI_SWAP_CHAIN_DESC, and it will do this. It can be changed by using swapchain->ResizeBuffers. In window mode the scaling will not be bilinear, at least it isn't for me, but in fullscreen mode it is.
I assume the same can be done width D3D9. I have previously noted that XP uses bilinear filtering more freely than Vista, so I suspect it will do so even in window mode.
Odie2
Odie2
I have solved this one as well. Seems that the implicit scaling (in Jack's words) was done by setting a different resolution for CreateDepthStencilSurface (strange...is there any documentation on this behavior...?). So everyone's suggestions were going in the right direction.

But actually I found it out by debugging through the change of quality level by the user interface. Even in high quality the depth-stencil buffer was set to 1024x1024 which explains why the image seemed suboptimal on my 1920x1200 screen. Now that I have set the depth-stencil buffer to the same resolution, everything looks fine.

Thanks to you all.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.