Page 1 of 1

[SOLVED] [D3D9] Problem with antialiasing.

Posted: Mon Jul 28, 2008 4:03 pm
by impulse3d
Hi,

I've searched the forum (and even posted a while back), but I haven't found an answer. Does anyone have trouble running with antialiasing on in D3D9. I use an 8800 GT.

This trouble is that, with it off, everything is fine. With it on, things get drawn in incorrect orders (maybe something turns off z-buffering?). For an example image, see an earlier post I made about this issue here.

My device initialization code (C#):

Code: Select all

_device = new IrrlichtDevice(DriverType.Direct3D9, new Dimension2D(GAME_WIDTH, GAME_HEIGHT), 32, false, true, false, true);
It works fine in OpenGL, but not D3D9. It may be relevant that I have transparent materials in my scene. Any ideas?

Posted: Mon Jul 28, 2008 5:01 pm
by hybrid
Yes, remove the zwriteenable=false statements from the d3d material renderers (all of them...) and make sure you set the zbuffer falgs properly in your materials. This should resolve all transparency problems.

Posted: Mon Jul 28, 2008 5:26 pm
by impulse3d
Great, this worked like a charm. Thanks Hybrid!

Posted: Tue Jul 29, 2008 2:42 pm
by impulse3d
I'm curious though--why is it that this only affects scenes with anti-aliasing turned on, and not off?

Posted: Tue Jul 29, 2008 3:01 pm
by hybrid
OpenGL has no FSAA under Windows, currently. For D3D I don't know if there's a difference, maybe some other zbuffer is used and hides some problems.