Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / an antialiasing question

Author
Message
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Mar 2012 12:22
I'm hoping someone can clarify what is meant by the different levels of antialiasing that seem to be available.

For example, the MS DX9 Docs give the following options:

Quote: "typedef enum D3DMULTISAMPLE_TYPE
{
D3DMULTISAMPLE_NONE = 0,
D3DMULTISAMPLE_NONMASKABLE = 1,
D3DMULTISAMPLE_2_SAMPLES = 2,
D3DMULTISAMPLE_3_SAMPLES = 3,
D3DMULTISAMPLE_4_SAMPLES = 4,
D3DMULTISAMPLE_5_SAMPLES = 5,
D3DMULTISAMPLE_6_SAMPLES = 6,
D3DMULTISAMPLE_7_SAMPLES = 7,
D3DMULTISAMPLE_8_SAMPLES = 8,
D3DMULTISAMPLE_9__SAMPLES = 9,
D3DMULTISAMPLE_10_SAMPLES = 10,
D3DMULTISAMPLE_11_SAMPLES = 11,
D3DMULTISAMPLE_12_SAMPLES = 12,
D3DMULTISAMPLE_13_SAMPLES = 13,
D3DMULTISAMPLE_14_SAMPLES = 14,
D3DMULTISAMPLE_15_SAMPLES = 15,
D3DMULTISAMPLE_16_SAMPLES = 16,
D3DMULTISAMPLE_FORCE_DWORD = 0xffffffff,
} D3DMULTISAMPLE_TYPE, *LPD3DMULTISAMPLE_TYPE;
"


On the other hand the nVidia control panel gives the following options for antialiasing:

Quote: "2x
4x
8x CSAA
8x
16x CSAA
16xQ CSAA
"


How do these different lists relate to each other? The DBPro Help file tells us to use a value from the first list.

Is the difference simply that you are restricted in the choices when you use the control panel, i.e. to 2, 4, 8 and 16? Or are these things different in some other way?
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 3rd Mar 2012 13:43
I'd be interested to find out what people know about this too. I was playing around with anti-aliasing yesterday but wasn't really seeing noticable results. I find with high resolutions, it seems less and less important.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Mar 2012 14:16
Quote: "I find with high resolutions, it seems less and less important."


Agreed - and if you've got eyes like mine you've got AA built-in.
Fallout
23
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 3rd Mar 2012 14:41
Quote: "Agreed - and if you've got eyes like mine you've got AA built-in."


My eye sight's pretty good, but the couple of cans of Magners I enjoy while gaming probably has the same effect.

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Mar 2012 00:23 Edited at: 4th Mar 2012 00:24
There are two values you pass to Direct3D when enabling multisampling. The first is the multisample type which that enum is for. If you use anything except "D3DMULTISAMPLE_NONMASKABLE" the second value is ignored and it looks for a mode which takes the number of samples you specified whenever it find a pixel on the edge of a triangle.

The second value is a "quality" value which is an integer ranging from 0 to N-1 where N is the number of quality levels supported by the driver and can be retrieved using "CheckDeviceMultiSampleType". The meaning of a given quality level is entirely driver dependent and can't be queried from Direct3D, but it is generally assumed that a higher quality level results in more antialiasing, and that there is a quality level for every mode the driver supports, so it's likely that they correspond to options on the nvidia control panel menu.

[b]
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Mar 2012 00:48
Not sure what you're saying.

If we use the setting "4" in the following DBPro statement



Is that asking for 4xAA or something else? This is what the DBPro Help file says (on the set display mode page):

Quote: "Multisampling Factor

Integer
Set Multisampling Factor to map direct to the D3DMULTISAMPLE_TYPE format in DirectX, ideal for setting multisampling screens for anitaliasing"
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Mar 2012 01:05 Edited at: 4th Mar 2012 01:05
Yes, a 4 equates to D3DMULTISAMPLE_4_SAMPLES which is not D3DMULTISAMPLE_NONMASKABLE, so Direct3D will find a multisample mode for you which performs up to 4 samples per pixel which I presume equates to 4xAA. This doesn't let you distinguish between "8x CSAA" and "8x" which is why the quality factor exists, although it appears DBPro doesn't give you access to that.

[b]
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 4th Mar 2012 01:28
Thanks.
mr Handy
18
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 10th Mar 2012 22:03
Btw antialiasing works only for one (final) camera, so some fullscreen quad-based shaders may have ugly artifacts where antialiasing effect drawn. Although, DBP can do FSAA on some machines and do not on others. Randomly. So, I do not recommend using FSAA inside your game.
Morcilla
23
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Mar 2012 11:35
Recently I discovered (Brendy boy told us) that full-screen shaders can also have AA if the AA code is written in the shader.

Login to post a reply

Server time is: 2026-07-09 00:08:30
Your offset time is: 2026-07-09 00:08:30