Game Development Community

TSE Anti aliasing option

by robo · in Torque Game Engine Advanced · 03/07/2008 (7:12 am) · 20 replies

To support Aniti aliaing .
I tried to change.

gfxD3DDevice.cpp 1711 Line

//...
d3dpp.BackBufferWidth = mode.resolution.x;
d3dpp.BackBufferHeight = mode.resolution.y;
d3dpp.BackBufferFormat = fmt;
d3dpp.BackBufferCount = 1;

d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE;
d3dpp.MultiSampleQuality = 0;
d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;

//..

change to


//...
d3dpp.BackBufferWidth = mode.resolution.x;
d3dpp.BackBufferHeight = mode.resolution.y;
d3dpp.BackBufferFormat = fmt;
d3dpp.BackBufferCount = 1;

d3dpp.MultiSampleType = D3DMULTISAMPLE_2_SAMPLES;
// d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE;
d3dpp.MultiSampleQuality = 0;
// d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;

//..

but CreateDevice() failed....

My Graphics Card is Geforce 8600GT. this support to Aniti aliaing X2
does anyone who try enalbe anti aliasing ?

#1
03/07/2008 (7:36 am)
I find !

I change gfxD3DDevice.cpp 1733 Line

if( Con::getBoolVariable( "$pref::Video::killFramesAhead", false ) )
{
d3dpp.Flags |= D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
}

to

if( Con::getBoolVariable( "$pref::Video::killFramesAhead", false ) )
{
// d3dpp.Flags |= D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
}

I success CreateDevice...
#2
03/07/2008 (8:06 am)
Anti aliasing is success but side effect occured....
this is tgea demo

www.myschoollife.co.kr/side.png
#3
03/07/2008 (9:45 am)
As has been mentioned a few times, antialiasing isn't supported in TGEA. The GlowBuffer is one of the features that doesn't work, possibly HDR too.
#4
03/17/2008 (8:25 am)
Ya, it screws a lot of things up. There's been a few threads on this.

This is a very important thing that MUST be fixed somehow. Antialiasing is a core piece that makes any game go from "meh, alright" to "damn, that looks nice."
#5
03/17/2008 (9:20 am)
I totally agree with Chris here. This missing feature is looong overdue, (and so is the Gamma which isnt working)
#6
03/17/2008 (11:03 am)
I would gladly pay extra for FSAA support (at the moment I force it on using the ATI controls) that didn't cause glow to appear through everything and DRL/HDR/Bloom to go funky.
#7
03/17/2008 (1:00 pm)
FSAA is largely a hack. The implementations are vendor specific, and don't have to adhere to any filtering methods or render-target preservation promises. The formats you can use with FSAA are very limited and also, vendor specific.

It's safe to assume that HDR, Depth information, and really anything that doesn't use an R8G8B8A8 render target will be broken by FSAA, and will (to some degree) always be broken and/or inconsistent under FSAA.

Quote:
This is a very important thing that MUST be fixed somehow. Antialiasing is a core piece that makes any game go from "meh, alright" to "damn, that looks nice."
That's really not true at all. Games with crap art and crap textures look like crap with, or without FSAA. The only difference is one has jaggies and one doesn't. Better solutions to the jaggies problem exist, but they require ps2.0+.
#8
03/17/2008 (2:19 pm)
I'm afraid you are wrong. Games, and screenshots without jaggies look ULTIMATELY better than ones with.

What's a "better solution to jaggies" than antialiasing?
#9
03/17/2008 (4:34 pm)
Who cares if it's a hack. TGEA is full of hacks and it doesn't make Anti Aliasing less appealing. So brushing it away like that is just humorous. But what do I know, TGEA was meant to be next-gen a few years ago or so, and it clearly hasn't happened yet. :)
#10
03/17/2008 (4:50 pm)
Kim,

You need to make sure to create your depth buffer with the same FSAA settings as your backbuffer. Since you can't specify AA settings when creating a texture, you need to switch the glowbuffer to use a real render target to fix those artifacts.

The next TGEA release should have support for FSAA with working glow. But as Pat says, FSAA can putz up certain texture formats that some games need to work well.

Hope the render target stuff sends you in the direction of a fix if you need it now.
#11
03/17/2008 (5:35 pm)
^NO WAI! Epic win!
#12
03/17/2008 (6:09 pm)
Good to hear. "Next TGEA release" would be 1.04 correct?
#13
03/17/2008 (11:11 pm)
Thats awesome news!
#14
03/18/2008 (9:15 am)
Quote:
I'm afraid you are wrong. Games, and screenshots without jaggies look ULTIMATELY better than ones with.

What's a "better solution to jaggies" than antialiasing?
1. Never, ever declare me wrong without a damn good reason to back it up.
2. Google search edge detection.
#15
03/18/2008 (9:45 am)
I figured you'd say something like that. KillerBunny and his ultimate wisdom. :)

Doesn't really need a reason; smooth, realistic edges look better than jagged sharp unrealistic ones. It's not an opinion or a point of view, it's a fact.

Edge detection looks interesting.
#16
03/18/2008 (5:22 pm)
I agree with Chris. Games look a whole lot better and more realistic if it doesnt have jagged edges. I dont see why it wasnt added before 1.0 since it was a "next-gen" engine, and current-gen engines already had AA.
#17
03/18/2008 (8:23 pm)
Just so everyone knows, the latest beta (available as of today) has FSAA built in--just use ctrl-o to check out the options dialog.
#18
03/18/2008 (9:38 pm)
Glad to see it in there, performance hit wasn't very large either. Nice work.
#19
03/19/2008 (1:39 am)
(@above post)....having "opinions" is what makes all of our games so different...so beautifully different.[/woot]

Think about your opinion on a grand-er scale: we would all be making the same exact thing and no one would be able to *be* a game-maker because we all would not want to make the same exact game.

- odd example:
if AA = best and bloom = best and robot = best and red = best...we would all make "red robot games with bloom and AA".

Horrid to think about really...so give me my ability to 'have an opinion' back, ok ? :P

//
@GG: brilliant improvements in many many areas. Thank you.
#20
03/19/2008 (1:58 am)
Just to continue the discussion about FSAA in general, now that the TGE-A 1.7 beta is released and folks know it has it built in, here's another reason why FSAA isn't always a great solution:

Take a careful look at the GUI fonts when you use high FSAA (I see it most noticeably at 8 and higher, but it's marginally noticeable at 4 as well)--to my eyes at least, they become incredibly difficult to read as they get more and more blurred.

Moving to a vector font system -may- fix that up some, but even so it's a tradeoff. Other options to avoid "jaggies" are probably in the long run the most flexible solution--as Pat mentions, edge detection/smoothing is a nice option, as well as others.