Refactor sampler state parameters for textures.

This commit is contained in:
Alex Szpakowski
2020-02-02 22:26:28 -04:00
parent f24b1aa377
commit f9248d478c
23 changed files with 473 additions and 585 deletions
+2 -1
View File
@@ -588,6 +588,7 @@ void Shader::sendTextures(const UniformInfo *info, Texture **textures, int count
if (tex != nullptr)
{
const SamplerState &sampler = tex->getSamplerState();
if (!tex->isReadable())
{
if (internalUpdate)
@@ -595,7 +596,7 @@ void Shader::sendTextures(const UniformInfo *info, Texture **textures, int count
else
throw love::Exception("Textures with non-readable formats cannot be sampled from in a shader.");
}
else if (info->isDepthSampler != tex->getDepthSampleMode().hasValue)
else if (info->isDepthSampler != sampler.depthSampleMode.hasValue)
{
if (internalUpdate)
continue;