Add CreateSamplerDesc helper method
This commit is contained in:
@@ -118,5 +118,15 @@ D3D12_STATIC_SAMPLER_DESC D3D12RootSignature::CreateStaticSampler(uint32_t shade
|
||||
return samplerDesc;
|
||||
}
|
||||
|
||||
D3D12_SAMPLER_DESC D3D12RootSignature::CreateSamplerDesc(FilterMode filter, TextureAddressMode address, float maxLOD) {
|
||||
D3D12_SAMPLER_DESC desc = {};
|
||||
desc.Filter = ToD3D12(filter);
|
||||
desc.AddressU = ToD3D12(address);
|
||||
desc.AddressV = ToD3D12(address);
|
||||
desc.AddressW = ToD3D12(address);
|
||||
desc.MaxLOD = maxLOD;
|
||||
return desc;
|
||||
}
|
||||
|
||||
} // namespace RHI
|
||||
} // namespace XCEngine
|
||||
|
||||
Reference in New Issue
Block a user