|
You last visited: Today at 11:39
Advertisement
[V19] Skillslot Dollar Symbol and Antialiasing Problem
Discussion on [V19] Skillslot Dollar Symbol and Antialiasing Problem within the Flyff Private Server forum part of the Flyff category.
01/05/2016, 21:15
|
#1
|
elite*gold: 0
Join Date: Dec 2009
Posts: 233
Received Thanks: 64
|
[V19] Skillslot Dollar Symbol and Antialiasing Problem
Hello,
I've noticed that when playing on my server that if i have Multisampling enabled the Gold Dollar Symbol on the action slot fails to render what i assume to be the backbuffer information (where it loads 2 merged images at a time).
However when not using Multisampling at all it works completely fine as intended.
Has anyone come across this problem before and found a fix for it? I have tried several things, including introducing a new backbuffer temporarily to handle just that one bit (no luck) as well as adjusting the Multisampling code, it seems that whenever you have a SampleType or SampleQuality it just fails to render the Dollar Symbol when you're waiting for a cooldown of the action slot.
For those wondering what my current MSAA code looks like (It is dynamic and applys the correct MSAA based on what your computer can handle as shown by the parameter MSQualityNumber)
m_d3dpp.Flags = (D3DPRESENTFLAG_DISCARD_DEPTHSTENCIL)& D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
m_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
m_d3dpp.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE;
m_d3dpp.MultiSampleQuality = MSQualityNumber;
m_d3dsdBackBuffer.MultiSampleType = D3DMULTISAMPLE_NONMASKABLE;
m_d3dsdBackBuffer.MultiSampleQuality = MSQualityNumber;
m_d3dSettings.SetMultisampleType(D3DMULTISAMPLE_NO NMASKABLE);
m_d3dSettings.SetMultisampleQuality(MSQualityNumbe r);
m_d3dpp.PresentationInterval = 0;
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);
|
|
|
01/10/2016, 18:22
|
#2
|
elite*gold: 0
Join Date: Jan 2016
Posts: 81
Received Thanks: 14
|
try adding the taskbar of the released source code v19 from Virtouse by yourself and then it should be solved.
|
|
|
01/10/2016, 19:09
|
#3
|
elite*gold: 0
Join Date: Dec 2009
Posts: 233
Received Thanks: 64
|
Quote:
Originally Posted by KazumiTanuki
try adding the taskbar of the released source code v19 from Virtouse by yourself and then it should be solved.
|
I have looked at that source code for the taskbar system as i have with many others and they are quite similar to mine, but the problem is it works when there is no MSAA turned on (You activate the skill slot and the dollar symbol slowly loads back up from greyed out), but when you turn on MSAA it messes up and doesn't show either symbols.
|
|
|
01/10/2016, 20:13
|
#4
|
elite*gold: 50
Join Date: Feb 2014
Posts: 288
Received Thanks: 245
|
whats your "load" function?
|
|
|
01/11/2016, 05:49
|
#5
|
elite*gold: 0
Join Date: Dec 2009
Posts: 233
Received Thanks: 64
|
Quote:
Originally Posted by Jupsi332
whats your "load" function?
|
Assuming you mean for the textures it is these:
LPDIRECT3DTEXTURE9 C2DRender::RenderMergeTextures( /*CPoint pt, */CTexture *pTop, CTexture *pBottom, int nWidth, int nHeight, float fPercentageTop )
{
if( !pTop || !pBottom )
return NULL;
int nHeightBot = (int)((float)nHeight * (1 - fPercentageTop));
if( nHeightBot == 0 )
{
//RenderTexture( pt, pTop );
return pTop->m_pTexture;
}else if( nHeightBot == nHeight )
{
//RenderTexture( pt, pBottom );
return pBottom->m_pTexture;
}else if( nHeightBot > nHeight || nHeightBot < 0 )
{
Error("C2DRender::RenderMergeTextures() nHeightBot = %d wrong format", nHeightBot );
return NULL;
}
LPDIRECT3DTEXTURE9 pOut, pBot;
LPDIRECT3DSURFACE9 pRenderSurface;
m_pd3dDevice->CreateTexture(nWidth, nHeightBot, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pBot, NULL );
pBot->GetSurfaceLevel( 0, &pRenderSurface );
m_pd3dDevice->SetRenderTarget( 0, pRenderSurface );
RenderTexture_2(CPoint(0, nHeightBot - nHeight) , pBottom );
m_pd3dDevice->CreateTexture(nWidth, nHeight, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pOut, NULL);
pOut->GetSurfaceLevel(0, &pRenderSurface);
m_pd3dDevice->SetRenderTarget( 0, pRenderSurface );
RenderTexture_2(CPoint(0,0), pTop, 160);
RenderTextureNative(CPoint(0,nHeight - nHeightBot), pBot, nHeightBot, nWidth);
m_pd3dDevice->SetRenderTarget(0, m_pBackBuffer);
if (g_Option.m_bMSAAFiltering)
m_pd3dDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, TRUE);
SAFE_RELEASE( pBot );
SAFE_RELEASE( pRenderSurface );
return pOut;
}
void C2DRender::RenderTextureNative( CPoint pt, LPDIRECT3DTEXTURE9 pTexture, int nHeight, int nWidth, BOOL bOrigin )
{
if( !pTexture )
return;
if(bOrigin)
pt += m_ptOrigin;
FLOAT left = (FLOAT)( pt.x );
FLOAT top = (FLOAT)( pt.y );
FLOAT right = (FLOAT)pt.x + ( nWidth );
FLOAT bottom = (FLOAT)pt.y + ( nHeight );
TEXTUREVERTEX vertex[ 4 ];//4
TEXTUREVERTEX* pVertices = vertex;
SetTextureVertex( pVertices, left, top, 0.0f, 0.0f );
pVertices++;
SetTextureVertex( pVertices, right, top, 1.0f, 0.0f);
pVertices++;
SetTextureVertex( pVertices, left, bottom, 0.0f, 1.0f);
pVertices++;
SetTextureVertex( pVertices, right, bottom, 1.0f, 1.0f);
pVertices++;
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_ADDRESSU, 1 );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_ADDRESSV, 1 );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
m_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE );
m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
m_pd3dDevice->SetRenderState( D3DRS_TEXTUREFACTOR, D3DCOLOR_ARGB( 255, 0, 0, 0 ) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
m_pd3dDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_TFACTOR );
m_pd3dDevice->SetVertexShader( NULL );
m_pd3dDevice->SetTexture( 0, pTexture );
m_pd3dDevice->SetFVF( D3DFVF_TEXTUREVERTEX );
m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, vertex, sizeof( TEXTUREVERTEX ) );
m_pd3dDevice->SetTexture( 0, NULL );
}
void C2DRender::RenderTexture_2( CPoint pt, CTexture* pTexture, DWORD dwBlendFactorAlhpa, FLOAT fScaleX , FLOAT fScaleY )
{
if( !pTexture )
return;
CPoint ptCenter = pTexture->m_ptCenter;
ptCenter.x = (LONG)( ptCenter.x * fScaleX );
ptCenter.y = (LONG)( ptCenter.y * fScaleY );
pt -= ptCenter;
FLOAT left = (FLOAT)( pt.x );
FLOAT top = (FLOAT)( pt.y );
FLOAT right = pt.x + ( fScaleX * pTexture->m_size.cx );
FLOAT bottom = pt.y + ( fScaleY * pTexture->m_size.cy );
TEXTUREVERTEX vertex[ 4 ];//4
TEXTUREVERTEX* pVertices = vertex;
SetTextureVertex( pVertices, left, top, pTexture->m_fuLT, pTexture->m_fvLT );
pVertices++;
SetTextureVertex( pVertices, right, top, pTexture->m_fuRT, pTexture->m_fvRT);
pVertices++;
SetTextureVertex( pVertices, left, bottom, pTexture->m_fuLB, pTexture->m_fvLB);
pVertices++;
SetTextureVertex( pVertices, right, bottom, pTexture->m_fuRB, pTexture->m_fvRB);
pVertices++;
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_ADDRESSU, 1 );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_ADDRESSV, 1 );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
m_pd3dDevice->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
m_pd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE );
m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
m_pd3dDevice->SetRenderState( D3DRS_TEXTUREFACTOR, D3DCOLOR_ARGB( dwBlendFactorAlhpa, 0, 0, 0 ) );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );
m_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
m_pd3dDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_TFACTOR );
m_pd3dDevice->SetVertexShader( NULL );
m_pd3dDevice->SetTexture( 0, pTexture->m_pTexture );
m_pd3dDevice->SetFVF( D3DFVF_TEXTUREVERTEX );
m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, vertex, sizeof( TEXTUREVERTEX ) );
m_pd3dDevice->SetTexture( 0, NULL );
}
It is exactly as it shows in Virtous's source for v19 and still doesn't work with MSAA!
|
|
|
04/02/2017, 18:34
|
#6
|
elite*gold: 0
Join Date: May 2015
Posts: 44
Received Thanks: 14
|
Sorry for pushing old threads, but I have the same issue.
Does someone know a workaround or fix?
|
|
|
 |
Similar Threads
|
Antialiasing
03/08/2015 - Flyff Private Server - 0 Replies
Hi/Hello,
NVM
#coded by me
Thanks,
Wharsh
|
skillslot
03/01/2014 - Flyff Private Server - 0 Replies
hello epvp may i ask where in source can i find the size of skill icons on skillslot
ye i know i can see it on wndtaskbar.cpp but more specific please?
|
Gm Symbol und Shining[Problem]
09/01/2013 - Metin2 Private Server - 4 Replies
Hey Leute...
Ehm ich habe jetzt ein Gm Symbol erstellt und mir ein Shining heruntergeladet.
Das problem ist ,dass das GM Symbol zu klein ist und das Shning nur weiß angezeigt wird...
http://www.pic-upload.de/view-20587633/0901_09343 4.jpg.html
weiß einer was das Problem ist?
|
Problem in Symbol HERO, MASTER, LORD
12/23/2011 - Flyff Private Server - 2 Replies
How do I activate the symbol of HERO MASTER and LORD, and on my server????
i need change in client or in server? Thanks.
|
skillslot help???
05/16/2011 - Dekaron - 3 Replies
hi spiele seit neuem dekaron und habe ein problem mit dem skillslot ich habe energy lab lvl1 und setze den skill auf eins und wenn ich die taste drücke dann gehts nicht muss immer rechtsklick machen bitte helft mir
hi play dekaron since new and have a problem with the skill slot I have energy lab LVL1 and set the skill to make one, and when I press the button then it'll not be always right click please help me
thx for help
MfG
lordfist:bandit::bandit:
|
All times are GMT +1. The time now is 11:41.
|
|