mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 05:20:45 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user