Register for your free account! | Forgot your password?

You last visited: Today at 01:04

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Release]Antialiasing

Discussion on [Release]Antialiasing within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2012
Posts: 1
Received Thanks: 5
[Release]Antialiasing

Hi,
I want to share this with the com.

Open the d3dapp.cpp and find
Code:
hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
It's placed below #else.

Change
Code:
	hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
								m_hWndFocus, behaviorFlags, &m_d3dpp,
								&m_pd3dDevice );
to
Code:
	m_d3dpp.SwapEffect      = D3DSWAPEFFECT_DISCARD;
	m_d3dpp.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE;
	m_d3dpp.MultiSampleQuality = 6;
	m_d3dpp.BackBufferFormat = D3DFMT_R5G6B5;
	m_d3dpp.EnableAutoDepthStencil = TRUE;
	m_d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
	m_d3dpp.Flags = 0;


	hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
								m_hWndFocus, behaviorFlags, &m_d3dpp,
								&m_pd3dDevice );

	m_pd3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);

	m_pd3dDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE);
Finish.

Now the edge render is more detailed.

Mfg. Nubody
Nubody is offline  
Thanks
5 Users
Old 01/19/2012, 21:17   #2
ベトナム警察




 
Lumi's Avatar
 
elite*gold: 0
The Black Market: 517/0/0
Join Date: Jan 2012
Posts: 16,420
Received Thanks: 3,439
Any Screen ?
Lumi is offline  
Old 01/19/2012, 22:49   #3
 
elite*gold: 0
Join Date: Jan 2012
Posts: 6
Received Thanks: 0
Mit

Ohne


An der Laterne sollte man es eig. gut sehen.
Bimsala is offline  
Old 01/20/2012, 10:31   #4
 
Yasunai's Avatar
 
elite*gold: 159
Join Date: Sep 2010
Posts: 3,001
Received Thanks: 595
Für mich sehen die Laternen gleich aus.
Yasunai is offline  
Thanks
1 User
Old 01/20/2012, 10:37   #5
 
dennisdra's Avatar
 
elite*gold: 23
Join Date: Jun 2008
Posts: 949
Received Thanks: 376
Es geht ja auch um die Kanten - bzw. in Flyff eher "Zacken" Glättung.
Man konnte das sehr gut an den alten Zäunen in Flaris erkennen.
dennisdra is offline  
Thanks
1 User
Old 01/20/2012, 10:40   #6
 
Yasunai's Avatar
 
elite*gold: 159
Join Date: Sep 2010
Posts: 3,001
Received Thanks: 595
Stimmt danke, aber an den Laternen sieht man es echt nicht :/
Yasunai is offline  
Old 01/20/2012, 10:41   #7
 
dennisdra's Avatar
 
elite*gold: 23
Join Date: Jun 2008
Posts: 949
Received Thanks: 376
Doch, am Leuchtkegel der Laternen. Dort sind um den Leuchtkörper kleine zacken ^^
Vielleicht siehst du es nicht so extrem, da vllt. dein Bildschirm kleiner ist oder du weniger Kontrast am Bildschirm hast.
dennisdra is offline  
Old 01/20/2012, 10:58   #8
 
elite*gold: 455
Join Date: Jun 2009
Posts: 1,601
Received Thanks: 1,103
Man erkennt es auf Bildern weniger.
Auf Monster Flyff (die haben das schon länger) habe ich das eindeutig erkannt
und bekannte Flyff Models/Obj. sehen eindeutig besser aus.

__

Thanks for this release, very useful.
Flash! is offline  
Old 01/20/2012, 13:58   #9
 
elite*gold: 0
Join Date: Oct 2008
Posts: 275
Received Thanks: 68
MonsterFlyff hat nicht nur das die haben auch AlphaBlending & MSAA ...
Bei denen Ist der Hintergrund weicher und die Character sind viel detailierter ^^

Jedoch hier beim AntiAliasing sieht man auch einen Großen undterschied es is nicht mehr so eklig eckig ^^
guardianangel is offline  
Old 01/20/2012, 17:06   #10
 
elite*gold: 0
Join Date: Aug 2008
Posts: 28
Received Thanks: 134
My neuz is crashing when I put this in.
I did exactly what you said and copied the code.
What am I doing wrong? =3=
svedigekurt is offline  
Old 01/20/2012, 17:32   #11
 
elite*gold: 0
Join Date: Apr 2010
Posts: 2
Received Thanks: 1
i crash, please help
nathan1912 is offline  
Old 01/20/2012, 18:13   #12
 
Shuya83's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 210
Received Thanks: 97
Sollte man nicht einbauen, da sonst viele spieler die kein leistungsstarken PC oder Notebook haben ins game kommen.
Shuya83 is offline  
Old 01/20/2012, 18:30   #13
 
elite*gold: 0
Join Date: Dec 2008
Posts: 204
Received Thanks: 220
The Problem with crashing is, your Graphics card isnt compatible with the multisampling rate you have set in the source.

This means ANY computer that cannot accept 6x MSAA on youre client WILL crash....making this code UTTERLY redundant.

(you can see what i mean if u set the multisamplequality to 0, you wont crash)


You need to have the source detect whether ur graphics card is compatible to MSAA, and if it is, what level it can go to.

To do this you have to add a CheckDeviceMultiSampleType Function.
jcdace is offline  
Thanks
3 Users
Old 01/20/2012, 18:42   #14
 
elite*gold: 0
Join Date: Aug 2008
Posts: 28
Received Thanks: 134
Quote:
Originally Posted by jcdace View Post
The Problem with crashing is, your Graphics card isnt compatible with the multisampling rate you have set in the source.

This means ANY computer that cannot accept 6x MSAA on youre client WILL crash....making this code UTTERLY redundant.

(you can see what i mean if u set the multisamplequality to 0, you wont crash)


You need to have the source detect whether ur graphics card is compatible to MSAA, and if it is, what level it can go to.

To do this you have to add a CheckDeviceMultiSampleType Function.
Thanks.
The funny thing is that I have 2 ATI Radeon HD 5790 graphics cards, 2gb each.
So it's odd that they don't support a simple x6 antialiasing lol.
svedigekurt is offline  
Old 01/20/2012, 19:17   #15
 
elite*gold: 0
Join Date: Dec 2008
Posts: 204
Received Thanks: 220
Yeah my computer is a good one, can run skyrim in ultra settings on 16x MSAA =\ but on flyff only x2 for me.... very strange...

But here is my code to determine the MSAA x

Code:
	DWORD MSQuality = 0;
	m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_NONMASKABLE, &MSQuality);
	int MSQ = MSQuality - 1;

	// --------------------------------------------------------------
	// ... Below Will Display a message box on Start-Up with the AntiAliasing 
	// ... Multisample level Your Graphics card can handle .
	// ---------------------------------------------------------------
	//	char msaaText[128];
	//	sprintf( msaaText, "Multi Sample Quality = x%d", MSQ );
	//	MessageBox( NULL, msaaText, "MSAA AMOUNT", MB_OK );
	// -------------------------------------------------------------------

	m_d3dpp.SwapEffect      = D3DSWAPEFFECT_DISCARD;
	m_d3dpp.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE;
	m_d3dpp.MultiSampleQuality = MSQ;
	m_d3dpp.BackBufferFormat = D3DFMT_X8R8G8B8;
	m_d3dpp.EnableAutoDepthStencil = TRUE;
	m_d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
	m_d3dpp.Flags = 0;
	m_d3dpp.FullScreen_RefreshRateInHz      = D3DPRESENT_RATE_DEFAULT;
	m_d3dpp.PresentationInterval                  = D3DPRESENT_INTERVAL_DEFAULT;

	hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
		m_hWndFocus, behaviorFlags, &m_d3dpp,
		&m_pd3dDevice );
	m_pd3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);

	m_pd3dDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE);
	m_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); 
	m_pd3dDevice->SetRenderState(D3DRS_ALPHAFUNC, D3DCMP_GREATEREQUAL); 
	m_pd3dDevice->SetRenderState(D3DRS_ALPHAREF, (DWORD)8); 
	m_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, TRUE);
jcdace is offline  
Thanks
4 Users
Reply


Similar Threads Similar Threads
[How to] Antialiasing (Kantenglättung) in Crossfire!!!
12/08/2010 - CrossFire - 33 Replies
---> Antialiasing / Kantenglättung <--- Heute zeige ich euch wie man die beliebte Kanteglättung auch in cf verwenden kann obwohl es keine Einstellungsoption dafür in cf gibt! Leider kann ich euch nur zeigen wie es mit nVidia grafikarten geht, da ich keine ATI besitze! Ihr solltet sicherstellen das cf bei euch mit durchschnittlich 70 fps läuft bevor ihr AA aktiviert.



All times are GMT +2. The time now is 01:09.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.