Jump to content

  • Log In with Google      Sign In   
  • Create Account


Detect/Prevent forced AA through driver


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 w0dk4   Members   -  Reputation: 122

Like
0Likes
Like

Posted 09 February 2012 - 09:38 PM

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...

Sponsor:

#2 Promit   Moderators   -  Reputation: 6340

Like
0Likes
Like

Posted 09 February 2012 - 10:01 PM

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.

#3 Adam_42   Crossbones+   -  Reputation: 2422

Like
0Likes
Like

Posted 10 February 2012 - 03:32 AM

You could detect it by drawing a white triangle on a black render target and then lock it and go looking for grey pixels.

#4 w0dk4   Members   -  Reputation: 122

Like
0Likes
Like

Posted 10 February 2012 - 08:22 AM

So there is no *proper* way to detect this? Posted Image

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?

#5 Evil Steve   Members   -  Reputation: 1959

Like
0Likes
Like

Posted 10 February 2012 - 11:42 AM

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)?

Steve Macpherson
Senior programmer, Firebrand Games


#6 mhagain   Crossbones+   -  Reputation: 7608

Like
0Likes
Like

Posted 10 February 2012 - 02:23 PM

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).

It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS