1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-06-06 13:17:46 +00:00

Add hacky workaround for g_SamplerDecal

I'm 100% certain this is another texture, but let's fill it with the
diffuse texture for now.
This commit is contained in:
Joshua Goins 2025-06-03 05:50:10 -04:00
parent fe2e1a83ae
commit 845cede4cf

View file

@ -1338,7 +1338,8 @@ GameRenderer::createDescriptorFor(const DrawObject *object, const CachedPipeline
} else if (strcmp(name, "g_SamplerLightSpecular") == 0) {
Q_ASSERT(material);
info->imageView = m_lightSpecularBuffer.imageView;
} else if (strcmp(name, "g_SamplerDiffuse") == 0 && material->diffuseTexture.has_value()) {
} else if ((strcmp(name, "g_SamplerDiffuse") == 0 || strcmp(name, "g_SamplerDecal") == 0) && material->diffuseTexture.has_value()) {
// NOTE: the g_SamplerDecal is 100% a guess, i'm almost certain it's another texture
Q_ASSERT(material);
info->imageView = material->diffuseTexture->imageView;
} else if (strcmp(name, "g_SamplerSpecular") == 0 && material->specularTexture.has_value()) {