Skip to main content
GameDev.net gamedev.net
🔒 Locked

Detect/Prevent forced AA through driver

Started by w0dk4 Feb 10, 2012 at 3:38 AM 4 replies 1.7k views
Original Post
w0dk4
w0dk4
Hey there,

my problem is that I am coding a deferred renderer on Direct3D9 and when you force Anti Aliasing through the driver, nothing gets rendered for obvious reason,

Is there a best practice to prevent this behaviour? Or if it is not possible to prevent, how could I detect if AA is forced?
Direct3D does not seem to throw any errors...
Promit
Promit
If you're trying to fight against the driver, you are going to lose. Big games get NVIDIA and AMD to dial exceptions in specifically for them, but obviously that's not an option for you. That said, the driver has to store the setting somewhere so I imagine it should be possible to at least detect it and warn the user. There's unlikely to be a consistent and reliable way to go about it, though.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Adam_42
Adam_42
You could detect it by drawing a white triangle on a black render target and then lock it and go looking for grey pixels.
w0dk4
w0dk4
So there is no *proper* way to detect this? sad.png

How do other games do this then that use deferred rendering? Or if you have developed a deferred renderer, do you care about this / have you implemented something that works well?
Evil Steve
Evil Steve
When you say "nothing gets drawn", surely some D3D calls fail which you can detect?

Or what about using GetPresentParameters() on your swap chain - does that say the backbuffer is antialiased (I suspect no if the driver is doing it)?
21st Century Moose
21st Century Moose

Or what about using GetPresentParameters() on your swap chain - does that say the backbuffer is antialiased (I suspect no if the driver is doing it)?

Just tested this and it's a "no", unfortunately (at least on AMD, haven't tested NV yet, probably won't bother as a hardware-independent way is obviously a high preference here). GetDesc on the backbuffer might be another option (just occurred to me, haven't tested yet).
Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls. 

Topic Locked

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

Sign in to reply to this topic.