From 2afe605069fe28fe0f7e22de787514180700b01c Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 24 Mar 2012 06:04:00 +0100 Subject: D3D11: Disable mipmapping when no mipmap filter is selected. --- Source/Plugins/Plugin_VideoDX11/Src/Render.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Plugins/Plugin_VideoDX11/Src/Render.cpp') diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp index 69f0d0215a..941bcef4ba 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp @@ -1420,9 +1420,10 @@ void Renderer::SetSamplerState(int stage, int texindex) gx_state.sampdc[stage].AddressU = d3dClamps[tm0.wrap_s]; gx_state.sampdc[stage].AddressV = d3dClamps[tm0.wrap_t]; - gx_state.sampdc[stage].MipLODBias = (float)tm0.lod_bias/32.0f; - gx_state.sampdc[stage].MaxLOD = (float)tm1.max_lod/16.f; + // When mipfilter is set to "none", just disable mipmapping altogether + gx_state.sampdc[stage].MaxLOD = (mip == TEXF_NONE) ? 0.0f : (float)tm1.max_lod/16.f; gx_state.sampdc[stage].MinLOD = (float)tm1.min_lod/16.f; + gx_state.sampdc[stage].MipLODBias = (float)tm0.lod_bias/32.0f; } void Renderer::SetInterlacingMode() -- cgit v1.2.3 From 450dcc9d2cd874f6ab40d4a339afc29f55751319 Mon Sep 17 00:00:00 2001 From: rodolfoosvaldobogado Date: Tue, 27 Mar 2012 15:44:58 -0300 Subject: As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible. please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev. please as soon as yo find a bug let me know. --- Source/Plugins/Plugin_VideoDX11/Src/Render.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Plugins/Plugin_VideoDX11/Src/Render.cpp') diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp index 941bcef4ba..1c40d3c3b1 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp @@ -1211,11 +1211,11 @@ void Renderer::RestoreAPIState() BPFunctions::SetScissor(); } -void Renderer::ApplyState(bool bUseDstAlpha) +void Renderer::ApplyState(RenderStateMode mode) { HRESULT hr; - if (bUseDstAlpha) + if (mode == RSM_UseDstAlpha) { // Colors should blend against SRC1_ALPHA if (gx_state.blenddc.RenderTarget[0].SrcBlend == D3D11_BLEND_SRC_ALPHA) @@ -1275,7 +1275,7 @@ void Renderer::ApplyState(bool bUseDstAlpha) D3D::stateman->Apply(); - if (bUseDstAlpha) + if (mode == RSM_UseDstAlpha) { // restore actual state SetBlendMode(false); @@ -1289,7 +1289,7 @@ void Renderer::ApplyState(bool bUseDstAlpha) D3D::context->VSSetShader(VertexShaderCache::GetActiveShader(), NULL, 0); } -void Renderer::RestoreState() +void Renderer::RestoreState(RenderStateMode mode) { ID3D11ShaderResourceView* shader_resources[8] = { NULL }; D3D::context->PSSetShaderResources(0, 8, shader_resources); -- cgit v1.2.3 From 460610ea0e0d5083e261ed9d137048f2a5fc7e59 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Fri, 30 Mar 2012 01:56:24 +0200 Subject: Revert Rodolfo's recent zcomploc commits until they actually work correctly. This reverts commit 402006a83a89bc0f790934096e915f0e8c23f808. This reverts commit 48d8d71391fc2cc40d85732680eb6421164bf87c. This reverts commit 450dcc9d2cd874f6ab40d4a339afc29f55751319. --- Source/Plugins/Plugin_VideoDX11/Src/Render.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Plugins/Plugin_VideoDX11/Src/Render.cpp') diff --git a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp index 1c40d3c3b1..941bcef4ba 100644 --- a/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoDX11/Src/Render.cpp @@ -1211,11 +1211,11 @@ void Renderer::RestoreAPIState() BPFunctions::SetScissor(); } -void Renderer::ApplyState(RenderStateMode mode) +void Renderer::ApplyState(bool bUseDstAlpha) { HRESULT hr; - if (mode == RSM_UseDstAlpha) + if (bUseDstAlpha) { // Colors should blend against SRC1_ALPHA if (gx_state.blenddc.RenderTarget[0].SrcBlend == D3D11_BLEND_SRC_ALPHA) @@ -1275,7 +1275,7 @@ void Renderer::ApplyState(RenderStateMode mode) D3D::stateman->Apply(); - if (mode == RSM_UseDstAlpha) + if (bUseDstAlpha) { // restore actual state SetBlendMode(false); @@ -1289,7 +1289,7 @@ void Renderer::ApplyState(RenderStateMode mode) D3D::context->VSSetShader(VertexShaderCache::GetActiveShader(), NULL, 0); } -void Renderer::RestoreState(RenderStateMode mode) +void Renderer::RestoreState() { ID3D11ShaderResourceView* shader_resources[8] = { NULL }; D3D::context->PSSetShaderResources(0, 8, shader_resources); -- cgit v1.2.3