mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-18 06:30:55 +00:00
Optimize blending in DXVA2 and D3D11VA renderers
This commit is contained in:
@@ -375,7 +375,6 @@ bool DXVA2Renderer::initializeRenderer()
|
||||
m_Device->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
|
||||
m_Device->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
|
||||
|
||||
m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
m_Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
|
||||
m_Device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
|
||||
|
||||
@@ -951,7 +950,10 @@ void DXVA2Renderer::renderOverlay(Overlay::OverlayType type)
|
||||
return;
|
||||
}
|
||||
|
||||
// Only enable blending when drawing the overlay
|
||||
m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
|
||||
hr = m_Device->DrawPrimitive(D3DPT_TRIANGLEFAN, 0, 2);
|
||||
m_Device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE);
|
||||
if (FAILED(hr)) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"DrawPrimitive() failed: %x",
|
||||
|
||||
Reference in New Issue
Block a user