mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Compatibility: Set GL_TEXTURE_MAX_LEVEL to the number of mipmaps
This commit is contained in:
parent
a4607f4522
commit
542d805508
1 changed files with 4 additions and 4 deletions
|
|
@ -280,10 +280,10 @@ struct Texture {
|
||||||
max_lod = 0;
|
max_lod = 0;
|
||||||
} else if (config->use_nearest_mip_filter) {
|
} else if (config->use_nearest_mip_filter) {
|
||||||
pmin = GL_NEAREST_MIPMAP_NEAREST;
|
pmin = GL_NEAREST_MIPMAP_NEAREST;
|
||||||
max_lod = 1000;
|
max_lod = mipmaps - 1;
|
||||||
} else {
|
} else {
|
||||||
pmin = GL_NEAREST_MIPMAP_LINEAR;
|
pmin = GL_NEAREST_MIPMAP_LINEAR;
|
||||||
max_lod = 1000;
|
max_lod = mipmaps - 1;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: {
|
case RS::CANVAS_ITEM_TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC: {
|
||||||
|
|
@ -297,10 +297,10 @@ struct Texture {
|
||||||
max_lod = 0;
|
max_lod = 0;
|
||||||
} else if (config->use_nearest_mip_filter) {
|
} else if (config->use_nearest_mip_filter) {
|
||||||
pmin = GL_LINEAR_MIPMAP_NEAREST;
|
pmin = GL_LINEAR_MIPMAP_NEAREST;
|
||||||
max_lod = 1000;
|
max_lod = mipmaps - 1;
|
||||||
} else {
|
} else {
|
||||||
pmin = GL_LINEAR_MIPMAP_LINEAR;
|
pmin = GL_LINEAR_MIPMAP_LINEAR;
|
||||||
max_lod = 1000;
|
max_lod = mipmaps - 1;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue