fixed setting of texture parameters like lod bias and max and min lod.

as a nice result of this eliminate the nasty glubuild2dmipmaps.
thanks to neobrain and orphis for discovering the error and the right values

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5475 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Rodolfo Osvaldo Bogado
2010-05-25 19:25:31 +00:00
parent 2e12bd5e34
commit 99d0bd7762
2 changed files with 15 additions and 9 deletions

View File

@ -1418,8 +1418,9 @@ void Renderer::SetSamplerState(int stage, int texindex)
D3D::SetSamplerState(stage, D3DSAMP_ADDRESSU, d3dClamps[tm0.wrap_s]);
D3D::SetSamplerState(stage, D3DSAMP_ADDRESSV, d3dClamps[tm0.wrap_t]);
//just a test but it seems to work
D3D::SetSamplerState(stage,D3DSAMP_MIPMAPLODBIAS,tm0.lod_bias/2.0f);
D3D::SetSamplerState(stage,D3DSAMP_MAXMIPLEVEL,tm1.min_lod>>4);
float lodbias = tm0.lod_bias / 32.0f;
D3D::SetSamplerState(stage,D3DSAMP_MIPMAPLODBIAS,*(DWORD*)&lodbias);
D3D::SetSamplerState(stage,D3DSAMP_MAXMIPLEVEL,tm1.min_lod>>5);
}
void Renderer::SetInterlacingMode()