Register for your free account! | Forgot your password?

You last visited: Today at 19:02

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

Advertisement



[Guide]Option Anti Aliasing

Discussion on [Guide]Option Anti Aliasing within the Flyff PServer Guides & Releases forum part of the Flyff Private Server category.

Reply
 
Old   #1
 
banktakung's Avatar
 
elite*gold: 0
Join Date: Dec 2008
Posts: 306
Received Thanks: 59
Talking [Guide]Option Anti Aliasing

d3dapp.cpp


replace
Code:
	hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
								m_hWndFocus, behaviorFlags, &m_d3dpp,
								&m_pd3dDevice );
with
Code:
#ifdef __ANTI_ALIASING
if( g_Option.m_nAliasing == TRUE )
{
		DWORD MSQuality = 0;
	D3DMULTISAMPLE_TYPE MSType = D3DMULTISAMPLE_NONE;
	if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_8_SAMPLES, &MSQuality) ))
		MSType = D3DMULTISAMPLE_8_SAMPLES;
	else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_4_SAMPLES, &MSQuality) ))
		MSType = D3DMULTISAMPLE_4_SAMPLES;
	else if( SUCCEEDED( m_pD3D->CheckDeviceMultiSampleType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_A8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &MSQuality) ))
		MSType = D3DMULTISAMPLE_2_SAMPLES;
	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 Type = x%d", MSType );
	//	MessageBox( NULL, msaaText, "MSAA AMOUNT", MB_OK );
	// -------------------------------------------------------------------

	m_d3dpp.SwapEffect      = D3DSWAPEFFECT_DISCARD;
	m_d3dpp.MultiSampleType = MSType;
	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_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);
}
else
{
	hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
								m_hWndFocus, behaviorFlags, &m_d3dpp,
								&m_pd3dDevice );
}
#else
	hr = m_pD3D->CreateDevice( m_d3dSettings.AdapterOrdinal(), pDeviceInfo->DevType,
								m_hWndFocus, behaviorFlags, &m_d3dpp,
								&m_pd3dDevice );
#endif





WndOption.cpp

under
Code:
pWndButton[ 0 ]->SetCheck( g_Option.m_bCameraLock );
add
Code:
#ifdef __ANTI_ALIASING
	CWndButton* pWndAliasing = (CWndButton*)GetDlgItem( WIDC_CHECKALIASING );	
	pWndAliasing->SetCheck( g_Option.m_nAliasing );
#endif

under
Code:
#if __VER >= 11 // __ADD_ZOOMOPT
	CWndButton* pWndZoomLimit   = (CWndButton*)GetDlgItem( WIDC_CHECK5 );
#endif

add
Code:
#ifdef __ANTI_ALIASING
	CWndButton* pWndAliasing	= (CWndButton*)GetDlgItem( WIDC_CHECKALIASING );
#endif

under
Code:
#if __VER >= 11 // __ADD_ZOOMOPT
	case WIDC_CHECK5:
		{
			if( pWndZoomLimit->GetCheck() )
				g_Option.m_bZoomLimit = FALSE;
			else
				g_Option.m_bZoomLimit = TRUE;			
		}	
		break;
#endif

add
Code:
#ifdef __ANTI_ALIASING
	case WIDC_CHECKALIASING:
		{
			if( pWndAliasing->GetCheck() )
				g_Option.m_nNightSys = TRUE;
			else
				g_Option.m_nNightSys = FALSE;
		}
#endif

under
Code:
pWndButton[ 0 ]->SetCheck( g_Option.m_bCameraLock );
add
Code:
#ifdef __ANTI_ALIASING
	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_CHECKALIASING );
	if(pWndButton[ 0 ])
	pWndButton[ 0 ]->SetCheck( g_Option.m_nAliasing );
#endif // __ANTI_ALIASING

under
Code:
#if __VER >= 12 // __UPDATE_OPT
	CWndButton* pWndCamearaLock = (CWndButton*)GetDlgItem( WIDC_CHECK5 );
#endif

add
Code:
#ifdef __ANTI_ALIASING
	CWndButton* pWndAliasing = (CWndButton*)GetDlgItem( WIDC_CHECKALIASING );
#endif

under
Code:
	case WIDC_CHECK5:
		{
			if( pWndCamearaLock->GetCheck() )
				g_Option.m_bCameraLock = TRUE;
			else
				g_Option.m_bCameraLock = FALSE;			
		}
		break;
add
Code:
#ifdef __ANTI_ALIASING
	case WIDC_CHECKALIASING:
		{
			if( pWndAliasing->GetCheck() )
				g_Option.m_nAliasing = TRUE;
			else
				g_Option.m_nAliasing = FALSE;
			g_WndMng.OpenMessageBox( prj.GetText(TID_GAME_GAME_RESETTING), MB_OK, this );
		}
#endif


under
Code:
		if( scan.Token == _T( "CameraLock" ) )
		{
			m_bCameraLock = scan.GetNumber();
		}	
		else
add
Code:
#ifdef __ANTI_ALIASING
		if( scan.Token == _T( "Aliasing" ) )
		{
			m_nAliasing = scan.GetNumber();
		}
		else
#endif

under
Code:
	_ftprintf(fp, _T( "CameraLock %d\n" ), m_bCameraLock );
add
Code:
#ifdef __ANTI_ALIASING
	_ftprintf(fp, _T( "Aliasing %d\n" ), m_nAliasing );
#endif

HwOption.h
under
Code:
	BOOL	m_bCameraLock;

add
Code:
#ifdef __ANTI_ALIASING
	BOOL	m_nAliasing;
#endif






RESDATA.inc

find
Code:
APP_OPTEX_AV12 "." "" 0 496 358 0x410000 26
Code:
    WTYPE_BUTTON WIDC_CHECKALIASING "ButtCheck.bmp" 0 288 265 478 281 0x220018 0 0 0 0 46 112 169
    {
    // Title String
    IDS_RESDATA_ELDER_000008
    }
    {
    // ToolTip
    IDS_RESDATA_ELDER_000009
    }
banktakung is offline  
Old 08/17/2015, 12:13   #2
 
elite*gold: 2
Join Date: Mar 2009
Posts: 338
Received Thanks: 63
Was bringt der Release?
Spraystar is offline  
Old 08/17/2015, 12:51   #3
 
Marc~'s Avatar
 
elite*gold: 0
Join Date: Sep 2011
Posts: 677
Received Thanks: 390
Quote:
Originally Posted by Spraystar View Post
Was bringt der Release?
Anti Aliasing
Dir wird die Funktion gegeben Anti Aliasing ein und auszuschalten.

Marc~ is offline  
Thanks
1 User
Old 08/18/2015, 11:50   #4
 
elite*gold: 0
Join Date: Jul 2013
Posts: 19
Received Thanks: 86
You check multisample type with D3DDEVTYPE_HAL but you create the device with pDeviceInfo->DevType() ? What happens when pDeviceInfo->DevType() != D3DDEVTYPE_HAL ?

Then you force back buffer format to D3DFMT_X8R8G8B8 ? What happens when the current adapter (which is forced to D3DADAPTER_DEFAULT without using m_d3dSettings.AdapterOrdinal()) for current resolution doesn't support it ?

Flyff ALWAYS use D3DPRESENT_INTERVAL_IMMEDIATE and not D3DPRESENT_INTERVAL_DEFAULT, without it you'll get framerate problems sometimes, and disabling frameSkip will not work in windowed mode.

Well, really not professionnal, you'll get many problems on different computers...
Ahoru is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
[Combat Arms]Schlechte Grafik(Render/Anti-Aliasing)
06/21/2012 - Combat Arms - 7 Replies
Hallo Leute, ich kenne mich zwar gut aus, aber ich will einfach mal was fragen. Hab bei Combat Arms natürlich alles auf Maximal(mit Bloom-Effect). Anti-Aliasing auf 8X. Und alles auf High. Mein Bildschirm ist 4:3 also 1400x1050 pixel. Und doch haben die Render/Anti-Aliasing einen sehr auffälligen Treppeneffekt. Jedenfalls ist sie sehr schlecht. Ich glaube das liegt auch bestimmt nicht am Bloom-Effekt. Ich glaube es liegt eher an meiner Auflösung/meinem Bildschirm. Aber ich weiß nicht so...
CoD4 Grafik verbessern : Anti-Aliasing
05/19/2011 - Call of Duty - 0 Replies
Hey Community, da die CoD Section ja sooo unheimlich viel auf MW2 und BO basiert, wollt ich mal ein bischen was für die Gemeinschaft der vierten Generation tuen ;>. Hier mal wie man die Anti-Aliasing Werte über das eigentlich vorgeschriebene Maximum des Games (4 Fach) verändern kann und auch andere Grafikeinstellungen... Also.. ihr wechselt in das CoD4 Verzeichnis : C:\Programme\Activision\Call of Duty 4 - Modern Warfare\players\profiles\deinProfilname\ und dort die 2 Datein config.cfg...
warrock und anti aliasing
12/03/2010 - WarRock - 5 Replies
ich habe es mal hingekrigt mit dem catalyst control center das spiel sah dann viel besser aus doch wie macht man das noch mal weil es bei mir nicht mehr geht habe den ccc 10.10
Graphical Question? Enabling anti-aliasing in game.
05/26/2008 - Dekaron - 1 Replies
Hey all, I am not so much interested in hacking the game as such. Just tweaking it to enable in game AA. Is this at all possible? The jargies in this game really annoy me, and I'd really appreciate any help at all with this question. Thanks. :D



All times are GMT +1. The time now is 19:05.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.