mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-15 23:08:51 +00:00
D3D: Add quad-buffer stereoscopy support.
This commit is contained in:
parent
6863abb31d
commit
179602e921
4 changed files with 13 additions and 7 deletions
|
@ -1220,12 +1220,16 @@ void Renderer::BlitScreen(TargetRectangle src, TargetRectangle dst, D3DTexture2D
|
|||
D3D11_VIEWPORT vp = CD3D11_VIEWPORT((float)dst.left, (float)dst.top, (float)dst.GetWidth(),
|
||||
(float)dst.GetHeight());
|
||||
D3D::context->RSSetViewports(1, &vp);
|
||||
D3D::drawShadedTexQuad(src_texture->GetSRV(), src.AsRECT(), src_width, src_height,
|
||||
(g_Config.iStereoMode == STEREO_ANAGLYPH) ?
|
||||
PixelShaderCache::GetAnaglyphProgram() :
|
||||
PixelShaderCache::GetColorCopyProgram(false),
|
||||
|
||||
ID3D11PixelShader* pixelShader = (g_Config.iStereoMode == STEREO_ANAGLYPH) ?
|
||||
PixelShaderCache::GetAnaglyphProgram() :
|
||||
PixelShaderCache::GetColorCopyProgram(false);
|
||||
ID3D11GeometryShader* geomShader = (g_ActiveConfig.iStereoMode == STEREO_QUADBUFFER) ?
|
||||
GeometryShaderCache::GetCopyGeometryShader() :
|
||||
nullptr;
|
||||
D3D::drawShadedTexQuad(src_texture->GetSRV(), src.AsRECT(), src_width, src_height, pixelShader,
|
||||
VertexShaderCache::GetSimpleVertexShader(),
|
||||
VertexShaderCache::GetSimpleInputLayout(), nullptr, Gamma);
|
||||
VertexShaderCache::GetSimpleInputLayout(), geomShader, Gamma);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue