Graphics: Improve TextureSampler handling

This commit is contained in:
Jérôme Leclercq
2021-01-27 18:50:49 +01:00
parent 78c3f57333
commit b9151d8a7a
15 changed files with 181 additions and 27 deletions

View File

@@ -63,7 +63,14 @@ namespace Nz
for (const auto& textureSlot : m_textures)
{
if (textureSlot.texture && textureSlot.sampler)
if (!textureSlot.sampler)
{
TextureSamplerCache& samplerCache = Graphics::Instance()->GetSamplerCache();
textureSlot.sampler = samplerCache.Get(textureSlot.samplerInfo);
}
//TODO: Use "missing" texture
if (textureSlot.texture)
{
bindings.push_back({
bindingIndex,