Set NEAREST sampling for textures in GL texture zoo

* This is needed particularly for integer textures which are incomplete if
  sampled (even with a non-sampling instruction) with the default LINEAR
  filtering.
This commit is contained in:
baldurk
2019-12-18 15:28:19 +00:00
parent 2fa73e32fe
commit cde17e9710
+9
View File
@@ -374,6 +374,15 @@ void main()
test.tex = MakeTexture();
glBindTexture(test.target, test.tex);
// MSAA textures don't have sampler state at all
if(!test.isMSAA)
{
// rectangle textures can't have mipmap minification
glTexParameteri(test.target, GL_TEXTURE_MIN_FILTER,
test.isRect ? GL_NEAREST : GL_NEAREST_MIPMAP_NEAREST);
glTexParameteri(test.target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
}
if(test.dim == 1)
{
if(test.isArray)