add sampler state

This commit is contained in:
lightling 2022-03-27 15:04:09 -04:00
parent 0ad45406a2
commit 329299a4b6
Signed by: lightling
GPG key ID: 016F11E0AA296B67

View file

@ -97,6 +97,17 @@ void Game::LoadShaders()
void Game::LoadTextures() void Game::LoadTextures()
{ {
Microsoft::WRL::ComPtr<ID3D11SamplerState> sampler;
D3D11_SAMPLER_DESC sampDesc = {};
sampDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
sampDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
sampDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
sampDesc.Filter = D3D11_FILTER_ANISOTROPIC;
sampDesc.MaxAnisotropy = 16;
sampDesc.MaxLOD = D3D11_FLOAT32_MAX;
device->CreateSamplerState(&sampDesc, sampler.GetAddressOf());
Microsoft::WRL::ComPtr<ID3D11ShaderResourceView> Microsoft::WRL::ComPtr<ID3D11ShaderResourceView>
deepFloorAlbedo, deepFloorAlbedo,
floorAlbedo; floorAlbedo;