mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 04:38:49 +00: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:
parent
a55e63c697
commit
c83e5ee35b
3 changed files with 30 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue