mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
DX11: Don't apply culling to lines and points. Fixes Metroid Prime beam-charging effects.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7346 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -26,6 +26,7 @@
|
||||
#include "MainBase.h"
|
||||
#include "PixelShaderManager.h"
|
||||
#include "RenderBase.h"
|
||||
#include "Render.h"
|
||||
#include "Statistics.h"
|
||||
#include "TextureCacheBase.h"
|
||||
#include "VertexShaderManager.h"
|
||||
@ -147,6 +148,9 @@ void VertexManager::Draw(UINT stride)
|
||||
D3D::context->DrawIndexed(IndexGenerator::GetTriangleindexLen(), m_triangleDrawIndex, 0);
|
||||
INCSTAT(stats.thisFrame.numIndexedDrawCalls);
|
||||
}
|
||||
// Disable culling for lines and points
|
||||
if (IndexGenerator::GetNumLines() > 0 || IndexGenerator::GetNumPoints() > 0)
|
||||
((DX11::Renderer*)g_renderer)->ApplyCullDisable();
|
||||
if (IndexGenerator::GetNumLines() > 0)
|
||||
{
|
||||
float lineWidth = float(bpmem.lineptwidth.linesize) / 6.f;
|
||||
@ -175,6 +179,8 @@ void VertexManager::Draw(UINT stride)
|
||||
D3D::context->GSSetShader(NULL, NULL, 0);
|
||||
}
|
||||
}
|
||||
if (IndexGenerator::GetNumLines() > 0 || IndexGenerator::GetNumPoints() > 0)
|
||||
((DX11::Renderer*)g_renderer)->RestoreCull();
|
||||
}
|
||||
|
||||
void VertexManager::vFlush()
|
||||
|
Reference in New Issue
Block a user