Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,485 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Full Screen Antialiasing for render targets! #240701
12/11/08 23:57
12/11/08 23:57
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
hey,

Recentley I was working on a project with SSAO and I noticed how much aliasing the scene accumalated due to the lack of full screen Antialiasing. I opened up a new .fx file and began working...

The result: Full Screen Antialiasing for render targets!

This shader file can be included in any HLSL shader and contains a few useful functions for creating "fake" but quality antialiasing. In fact, when set to a high level of antialiasing, this can look even better than the hardware's!

When sampling a single pixel, you can use the tex2DAA(sampler samplemap, float2 texCoord) to call the basic fragment shader.

Basically, the fragment shader (function) samples a few points around the input coordinates and compares the result to the acual point. If the result is very different from the actual sample, the function returns a weighted average; otherwise it returns the true value. This allows the function to only blur the edges of polygons and very harsh pixel discontinuities to prevent the scene from becoming blury.


you can also set the following global variables to control the filtering.

int FSAA_FILTER
Filter kernal. You can choose Linear(0)(default),Bilinear(1),Anisotropic(2),Gaussian(3),or Radial(4) scene filtering!

int FSAA_MIN
Minimum level of antialiasing to be preformed per pixel. 0 means that the filter is allowed to skip parts of the scene that are estimated to not need antialiasing. 1 or higher garuntees antialiasing on all pixels. The higher the number, the more samples are minimally taken. Default = 0

int FSAA_MAX
Maximum level of antialiasing. filter samples will not exceed this number (this means 0 basically turns off FSAA). Default = 5;

float FSAA_REF
Sets the offset constant used for determining the weight of a sampled pixel. range: 0.000 to 3.000 default(0.25)

boolean FSAA_ENABLED
if true, FSAA is enabled. default(false)

boolean FSAA_MULTISAMPLE
if true, FSAA multi sampling is enabled. This can really slow down frame rate but has remarkable preformance. This is an advanced filter and only works with shaders in PS_2_0 or higher.


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Full Screen Antialiasing for render targets! [Re: Foxfire] #240702
12/11/08 23:59
12/11/08 23:59
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
I am still testing the shader so I hope to get it to you by Friday. For some reason, it is much slower on the ATI cards I tested than the Nvidia ones. (?)
Im trying to fix this before I release it.

-Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Full Screen Antialiasing for render targets! [Re: Foxfire] #240716
12/12/08 02:05
12/12/08 02:05
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
nVidia ftw!

good onya,

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Full Screen Antialiasing for render targets! [Re: JibbSmart] #240812
12/12/08 19:08
12/12/08 19:08
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
yeah, I gave up on ATI when my last laptop's graphics card melted (not a joke) while playing Half Life 1 (this was only July)!


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1