Compatibility: Set GL_TEXTURE_MAX_LEVEL to the number of mipmaps
This commit is contained in:
@ -280,10 +280,10 @@ struct Texture {
|
||||
max_lod = 0;
|
||||
} else if (config->use_nearest_mip_filter) {
|
||||
pmin = GL_NEAREST_MIPMAP_NEAREST;
|
||||
max_lod = 1000;
|
||||
max_lod = mipmaps - 1;
|
||||
} else {
|
||||
pmin = GL_NEAREST_MIPMAP_LINEAR;
|
||||
max_lod = 1000;
|
||||
max_lod = mipmaps - 1;
|
||||
}
|
||||
} break;
|
||||
case RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: {
|
||||
@ -297,10 +297,10 @@ struct Texture {
|
||||
max_lod = 0;
|
||||
} else if (config->use_nearest_mip_filter) {
|
||||
pmin = GL_LINEAR_MIPMAP_NEAREST;
|
||||
max_lod = 1000;
|
||||
max_lod = mipmaps - 1;
|
||||
} else {
|
||||
pmin = GL_LINEAR_MIPMAP_LINEAR;
|
||||
max_lod = 1000;
|
||||
max_lod = mipmaps - 1;
|
||||
}
|
||||
} break;
|
||||
default: {
|
||||
|
||||
Reference in New Issue
Block a user