mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -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:
@ -1276,6 +1276,27 @@ void Renderer::RestoreState()
|
||||
D3D::stateman->PopRasterizerState();
|
||||
}
|
||||
|
||||
void Renderer::ApplyCullDisable()
|
||||
{
|
||||
D3D11_RASTERIZER_DESC rastDesc = gx_state.rastdc;
|
||||
rastDesc.CullMode = D3D11_CULL_NONE;
|
||||
|
||||
ID3D11RasterizerState* raststate;
|
||||
HRESULT hr = D3D::device->CreateRasterizerState(&rastDesc, &raststate);
|
||||
if (FAILED(hr)) PanicAlert("Failed to create culling-disabled rasterizer state at %s %d\n", __FILE__, __LINE__);
|
||||
D3D::SetDebugObjectName((ID3D11DeviceChild*)raststate, "rasterizer state (culling disabled) used to emulate the GX pipeline");
|
||||
|
||||
D3D::stateman->PushRasterizerState(raststate);
|
||||
SAFE_RELEASE(raststate);
|
||||
|
||||
D3D::stateman->Apply();
|
||||
}
|
||||
|
||||
void Renderer::RestoreCull()
|
||||
{
|
||||
D3D::stateman->PopRasterizerState();
|
||||
}
|
||||
|
||||
void Renderer::SetGenerationMode()
|
||||
{
|
||||
// rastdc.FrontCounterClockwise must be false for this to work
|
||||
|
Reference in New Issue
Block a user