[SOLVED] [D3D9] Problem with antialiasing.

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
impulse3d
Posts: 17
Joined: Wed Jun 04, 2008 7:23 pm

[SOLVED] [D3D9] Problem with antialiasing.

Post 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?
Last edited by impulse3d on Mon Jul 28, 2008 5:27 pm, edited 1 time in total.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post 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.
impulse3d
Posts: 17
Joined: Wed Jun 04, 2008 7:23 pm

Post by impulse3d »

Great, this worked like a charm. Thanks Hybrid!
impulse3d
Posts: 17
Joined: Wed Jun 04, 2008 7:23 pm

Post by impulse3d »

I'm curious though--why is it that this only affects scenes with anti-aliasing turned on, and not off?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

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