Apply suggestions from code review

This commit is contained in:
marauder2k7 2023-07-19 15:41:24 +01:00 committed by GitHub
parent e325902bac
commit 63b2aba467
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 8 deletions

View file

@ -186,10 +186,11 @@ GFXD3D11StateBlock::GFXD3D11StateBlock(const GFXStateBlockDesc& desc)
else
mSamplerDesc[i].Filter = comparison ? D3D11_FILTER_COMPARISON_ANISOTROPIC : D3D11_FILTER_ANISOTROPIC;
mSamplerDesc[i].BorderColor[0] = gfxSamplerState.borderColor.red;
mSamplerDesc[i].BorderColor[1] = gfxSamplerState.borderColor.green;
mSamplerDesc[i].BorderColor[2] = gfxSamplerState.borderColor.blue;
mSamplerDesc[i].BorderColor[3] = gfxSamplerState.borderColor.alpha;
LinearColorF bc = LinearColorF(gfxSamplerState.borderColor);
mSamplerDesc[i].BorderColor[0] = bc.red;
mSamplerDesc[i].BorderColor[1] = bc.green;
mSamplerDesc[i].BorderColor[2] = bc.blue;
mSamplerDesc[i].BorderColor[3] = bc.alpha;
mSamplerDesc[i].ComparisonFunc = GFXD3D11CmpFunc[gfxSamplerState.samplerFunc];
hr = D3D11DEVICE->CreateSamplerState(&mSamplerDesc[i], &mSamplerStates[i]);