Graphics: Use default white texture if material has empty texture slot

This commit is contained in:
Jérôme Leclercq
2021-10-21 13:00:36 +02:00
parent a18415216b
commit 6bab824e4f
6 changed files with 27 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ namespace Nz
currentShaderBinding = nullptr;
};
const auto& whiteTexture = Graphics::Instance()->GetDefaultTextures().whiteTexture2d;
const auto& whiteTexture = Graphics::Instance()->GetDefaultTextures().whiteTextures[UnderlyingCast(ImageType::E2D)];
const auto& defaultSampler = graphics->GetSamplerCache().Get({});
for (std::size_t i = 0; i < elementCount; ++i)