mirror of https://github.com/godotengine/godot
Merge pull request #108528 from BlueCube3310/compat-mip-limit
Compatibility: Set `GL_TEXTURE_MAX_LEVEL` to the number of mipmaps
This commit is contained in:
commit
90d407e6ae
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue