| 86 | // ---------------------------------------------------------------------------------------------------------------- |
| 87 | |
| 88 | HRESULT WINAPI CreateSamplerState_hook(ID3D11Device *device, const D3D11_SAMPLER_DESC *pSamplerDesc, |
| 89 | ID3D11SamplerState **ppSamplerState) |
| 90 | { |
| 91 | ZoneScopedN(__FUNCTION__); |
| 92 | |
| 93 | D3D11_SAMPLER_DESC desc = *pSamplerDesc; |
| 94 | |
| 95 | // Only g-buffer pass objects have anisotropy, and those are also the ones that need the bias. |
| 96 | if (desc.MaxAnisotropy > 1.0f) |
| 97 | { |
| 98 | desc.MipLODBias -= 0.5f; |
| 99 | } |
| 100 | |
| 101 | return g_d3dHookOrig.CreateSamplerState(device, &desc, ppSamplerState); |
| 102 | } |
| 103 | |
| 104 | // ---------------------------------------------------------------------------------------------------------------- |
| 105 |
nothing calls this directly
no outgoing calls
no test coverage detected