Fullscreen Antialiasing plugin

Posted By: ChrisB

Fullscreen Antialiasing plugin - 04/27/09 18:22

Hi,
the swollen eyeballs network was able to decipher an extraterrestrial computerinterface we found in a crashed ufo. Our specialists found out that it was heavily using antialiasing for displaying all the onscreen data, and we said "huh, we wan't that in A6/7". So here is it.

This plugin gives you controllable hardware powered fullscreen antialiasing. You can enable/disable it at runtime without restarting the engine. And it even works with postprocess effects (though it may not work with MRTs, as only a few 3d cards support this i was not able to test this).

Because i know somebody will asked:
no it doesn't use shaders, it just the normal hardware antialiasing.
Is it slower then activatin antialiasing in the driver settings?
Well as any plugin it has a small overhead but even on an old PentiumIII 800mhz the difference was way less then 1ms per frame, so i don't think you have to bother, the impact of antialiasing itself is way bigger.

Screenshots:
no fsaa:


4x fsaa:


bloom+4x fsaa:



Download: >> Click here <<

Please if you use it and you think "oh wow i want to give you some money" (doesn't really matter what you really think, just give me your money ;)), make a paypal donation on my website.
The money will be used for (in alphabetic order): beer, games, girls, pc parts

Oh i forgot the license:
You're not allowed to use this plugin for an application which can be of any use for conquering earth.

Expect more alien technology made usefull for game development in the next months.

thx
ChrisB
Posted By: Jaxas

Re: Fullscreen Antialiasing plugin - 04/27/09 18:49

may be very useful, thanks ChrisB wink
Posted By: Dark_samurai

Re: Fullscreen Antialiasing plugin - 04/27/09 19:37

Wow that's a really great contribution!

Thank you very much!

Edit: I like your humor wink
Posted By: HeelX

Re: Fullscreen Antialiasing plugin - 04/27/09 20:31

Spend it for beer to get gamer girls which deal with illegal pc parts laugh

Nice contrib!
Posted By: Cowabanga

Re: Fullscreen Antialiasing plugin - 04/27/09 20:40

It's really great! Keep it up! smile
Posted By: William

Re: Fullscreen Antialiasing plugin - 04/27/09 20:47

Cool plugin, thanks for your work! smile
Posted By: Hitsch

Re: Fullscreen Antialiasing plugin - 04/27/09 21:39

About time that something comes out of Area51... smile I began to believe they're just a teddy bear factory after all...

Great contribution, very useful!
Posted By: KiwiBoy

Re: Fullscreen Antialiasing plugin - 04/27/09 22:48

Dweebly earthling, return my tecnology now!
Thanks...:)
Posted By: Pappenheimer

Re: Fullscreen Antialiasing plugin - 04/27/09 23:47

Fantastic contribution! And that although I bothered you the whole evening with other things! wink
Posted By: Quad

Re: Fullscreen Antialiasing plugin - 04/27/09 23:58

Originally Posted By: ChrisB
Expect more alien technology made usefull for game development in the next months.


you just can't throw away that ufo yet... we re waiting.

so for a7, the advantage of the plugin is that it works with PP effects and can be switched on/off in runtime? any comparison to aa that is set by d3d_antialias variable other this two?
Posted By: Inestical

Re: Fullscreen Antialiasing plugin - 04/28/09 08:05

Quote:
You're not allowed to use this plugin for an application which can be of any use for conquering earth.

Awww.. Damn.

Nice plugin, thanks smile
Posted By: Ganderoleg

Re: Fullscreen Antialiasing plugin - 04/28/09 12:13

This is very, very, very useful contribution. Everything works great even with LiteC PPE.

I do have a small thing to ask: I want to have in my game only two options for user to choose- Max AA & Min AA. Max is taken care of but what about min? Is setting quality to 1 always the minimum?

… and Test app reported the maximum for my card as a 3. Is that real maximum or does it go up to 9 or higher?

Thanx again (and again and again) for this great contribution smile smile smile
Posted By: sPlKe

Re: Fullscreen Antialiasing plugin - 04/28/09 22:22

Originally Posted By: HeelX
Spend it for beer to get gamer girls which deal with illegal pc parts laugh

Nice contrib!


did that once... turned out the beer made the gamer girls pretty so i screwed the pc parts and threw the girls away...
...
..
.
wait...
Posted By: Blade280891

Re: Fullscreen Antialiasing plugin - 04/28/09 22:47

rofl
Posted By: Emre

Re: Fullscreen Antialiasing plugin - 04/29/09 13:01

Thanks for the great contribution! (i think, Ichiro will appreciate the most.)
Posted By: mpdeveloper_B

Re: Fullscreen Antialiasing plugin - 05/02/09 00:01

This is a nice plugin....BUT, it has two major issues:

1. when in lower resolutions it just looks like a fullscreen blur, when anti-aliasing doesn't do that. FSAA should only blur edges, even in low resolutions.

2. when changing resolutions it leaves a "screen capture" per-se of the last frame viewed, so if you don't have a skymap running it shows a picture of what you saw last.

Other than that it's a nice plugin, only those two things mean I can't use it frown . You should've also mentioned that you need to reset the FSAA to 0 before changing resolutions, if you don't it crashes the video.

If you could fix those two problems I mentioned it would be complete, but nonetheless, good job laugh

edit: the 1x, 2x, 3x, and 4x actually look like 2x, 4x, 6x, and 8x respectively. They look nice.
Posted By: ChrisB

Re: Fullscreen Antialiasing plugin - 05/02/09 13:34

Hi, thanks everyone.

@Ganderoleg: 1 should be always the minimum and the maximum is the maximum you can set.

@mpdeveloper_B: Thats strange, i've tested it on 3 different machines and never got a crash or a 'ghost image' after changing resolutions. Can you please post your acklog.txt and your pc specifications?

The quality settings doesn't actually correspond with those settings in your driver utility (means quality=1 doesn't means 2x fsaa and etc). Often nvidia and ati gives you some extra features with these settings, so for example quality=2 gives on my nvidia card an extra overall blur, and quality=3 and 4 looks exactly the same.
I can't change this behavior, this is it like in directx world.
The best thing is to give your customers a simple slider from 0 to maxquality.
Posted By: exile

Re: Fullscreen Antialiasing plugin - 05/02/09 18:08

I love the plugin. It's very useful since I am making HD standard games now. There is only one little thing I noticed, when I have the fsaa on any level higher than 0 I hear a buzz in my speakers. Not sure why that happens since audio and video are completely different, but the buzz in my speakers say otherwise.
Posted By: Ganderoleg

Re: Fullscreen Antialiasing plugin - 05/08/09 19:12

Hi,

I had your dll working great with Lite-C and camera.stage but since my game is in C-Script, and I had some troubles with Lite-C and game_load function, I transferred to my old method. Now dll is not working.

Problem solved. Everything works great now smile
Posted By: mpdeveloper_B

Re: Fullscreen Antialiasing plugin - 06/04/09 19:21

@Chris: No problems showed up in the acklog, just normal engine output.

System is:
AMD 1.80Ghz CPU
~800 MB RAM
Nvidia 6100 PCI-E

And the ghost image is only on the background when there is no skymap applied, try having a room with some stuff in it, and load another level which has nothing in it. Make sure you face the stuff when you're in the first level.

I thought the crash was kinda odd too, but It's not an engine output crash, it's a windows crash.
Posted By: Scifi

Re: Fullscreen Antialiasing plugin - 06/13/10 13:57

Great thanks !
Posted By: Razoron

Re: Fullscreen Antialiasing plugin - 06/26/10 15:16

The low-poly models looked really horrible before, thanks. laugh
Posted By: Blink

Re: Fullscreen Antialiasing plugin - 06/30/10 04:06

thanks chrisb, i hope your awesome underwater script gets out of the hands of the aliens and makes its way here, in c-script too,lol?
Posted By: Rondidon

Re: Fullscreen Antialiasing plugin - 02/03/11 16:30

Hello ChrisB,

I`ve got a problem with your plugin. It works great by part, but when I try changing the screen resolution in real time, the engine does some wild stuff. This is not always the case, but true for some special resolution changes.
Changing the resolution works great for the first time, but when I`m trying to switch the resolution once more to a resolution that was already chosen before, the error appears.

Error appers:

1650x1050->works->1280x800->works->1440x900->crashes->1680x1050
--
1680x1050->works->1024x768->crashes->1680x1050
--
It seems that it has to do something with resolutions that were already chosen before.


Is this a known problem?


My code:

Code:
function set_graphics()
{
	wait(1);
	fsaa_setQuality(0);
	render_sky=NULL;
	render_entities=NULL;
	laden_an();
	wait(16);
	video_set(aufl_x_i,aufl_y_i,32,0);

	if(monitor_type_i == 1) //16:10 Monitor
	{
		camera.arc=85;
		camera.aspect = 1.1;
	}
	if(monitor_type_i == 0) //4:3 Monitor
	{
		camera.arc=70;
		camera.aspect = 0.9;
	}	

	wait(-1);
	render_sky=fsaa_eventSky;
	render_entities=fsaa_eventEntities;
	wait(1);
	fsaa_setQuality(AA_i);
	wait(16);
	laden_aus();
}



After ALT+TAB I get "Error E2005: Can`t create DirectX texture unnamed"

I`m using A7.86 Commercial. No Shade-C. Just your plugin for testing purposes.

Is there maybe any option to completely reset the plugin after every resolution change?

Thank you very much for helping,
Rondidon

Posted By: Superku

Re: Fullscreen Antialiasing plugin - 08/17/12 23:03

This plugin is fantastic!

@Rondidon: Did you find the reason for the crash, was it the plugin? So far it seems to be stable in A8.

EDIT: Oh no, seems like I have a white "glow" 0-1 pixel in width around my player on a dark background most of the time what sadly makes this great plugin useless. frown
Posted By: Iglarion

Re: Fullscreen Antialiasing plugin - 08/20/12 23:21

I used this plugin in A6 a very long, and i no have problems, now again when i try in A8 i am amazed that even still works perfectly and stable. Does anyone still use this plugin?
Posted By: Iglarion

Re: Fullscreen Antialiasing plugin - 04/18/17 17:29

It would be cool if the autor of this plugin can relase soruce code beacuse i found the script crash error after we lost d3d in fullscreen mode. This only happen in Windows 10 not in Win 7 or XP. The solution is switch to window mode before we exit.
Code:
#include <default.c>

var fsaa_maxQualityNonMaskable(); 
var fsaa_eventSky(); 
var fsaa_eventEntities();
var fsaa_eventLost(); 
var fsaa_setQuality(var);

function change_res_fullscreen(){ video_switch(9,0,1);}
function change_res_window(){ video_switch(7,0,2);}

function main(){
	level_load("");
	
	wait(2);
	render_sky = fsaa_eventSky;
	render_entities = fsaa_eventEntities;
	on_d3d_lost = fsaa_eventLost;
	fsaa_setQuality(fsaa_maxQualityNonMaskable());
	
	while(1){
		on_c = change_res_fullscreen; // script crash after we change to fullscreen and press exit
		on_v = change_res_window; // work when we back from fullscreen and press exit
		if (key_f1) {video_switch(6,0,2); wait(1); sys_exit(""); } // the solution is swich in window mode before exit
		wait(1);	
	}
}


I use this plugin in my game last six year and i planed use in finall relase of my game, so from my expirience the plugin is very stable in A8 and give me the best result i found so far. I see some people report problems in past but i test my game on many diferent system and hardware and i not found any problem for now, so please if someone still have problems with this plugin let me know.
Posted By: FBL

Re: Fullscreen Antialiasing plugin - 12/13/17 23:06

http://www.swollen-eyeballs.org/site/pages/contact.php

But there's a high chance nothing will happen when sending the formular.

You could try whether on_d3d_reset event is triggered when in fullscreen. Maybe it is already enough to also assign the fsaa_eventLost.

Or instead of real fullscreen go for fake fullscreen (window in desktop size without window border) (yikes).

Or... set d3d_antialias = 9
This will only work if no post processing shaders are used, though.
Posted By: Iglarion

Re: Fullscreen Antialiasing plugin - 12/14/17 21:29

Hi Firoball, the solution swiching to window mode one frame before closing engine works just fine for now. The good thing is that it only happens when we exit of the game.
© 2024 lite-C Forums