Graphics: Improve TextureSampler handling
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user