summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/io_plugins/editor_font_import_plugin.cpp4
-rw-r--r--editor/io_plugins/editor_texture_import_plugin.cpp4
-rw-r--r--editor/plugins/baked_light_baker.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/editor/io_plugins/editor_font_import_plugin.cpp b/editor/io_plugins/editor_font_import_plugin.cpp
index 9831e08cf1..25d8a5b7eb 100644
--- a/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/editor/io_plugins/editor_font_import_plugin.cpp
@@ -1536,8 +1536,8 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
Vector<Point2i> res;
Size2i res_size;
EditorAtlas::fit(sizes,res,res_size);
- res_size.x=nearest_power_of_2(res_size.x);
- res_size.y=nearest_power_of_2(res_size.y);
+ res_size.x=next_power_of_2(res_size.x);
+ res_size.y=next_power_of_2(res_size.y);
print_line("Atlas size: "+res_size);
Image atlas(res_size.x,res_size.y,0,Image::FORMAT_RGBA8);
diff --git a/editor/io_plugins/editor_texture_import_plugin.cpp b/editor/io_plugins/editor_texture_import_plugin.cpp
index 095bc02fa0..1dc2641474 100644
--- a/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -1280,8 +1280,8 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
int atlas_w=dst_size.width;
int atlas_h=dst_size.height;
if (blit_to_po2) {
- atlas_w=nearest_power_of_2(dst_size.width);
- atlas_h=nearest_power_of_2(dst_size.height);
+ atlas_w=next_power_of_2(dst_size.width);
+ atlas_h=next_power_of_2(dst_size.height);
}
Image atlas;
atlas.create(atlas_w,atlas_h,0,alpha?Image::FORMAT_RGBA8:Image::FORMAT_RGB8);
diff --git a/editor/plugins/baked_light_baker.cpp b/editor/plugins/baked_light_baker.cpp
index 036229a7af..bef35647d4 100644
--- a/editor/plugins/baked_light_baker.cpp
+++ b/editor/plugins/baked_light_baker.cpp
@@ -1460,7 +1460,7 @@ void BakedLightBaker::_make_octree_texture() {
} else {
baked_light_texture_w=otex_w;
- baked_light_texture_h=nearest_power_of_2(row);
+ baked_light_texture_h=next_power_of_2(row);
print_line("w: "+itos(otex_w));
print_line("h: "+itos(row));
break;
@@ -1558,7 +1558,7 @@ void BakedLightBaker::_make_octree_texture() {
}
- baked_octree_texture_h=nearest_power_of_2(baked_octree_texture_h);
+ baked_octree_texture_h=next_power_of_2(baked_octree_texture_h);
print_line("RESULT! "+itos(baked_octree_texture_w)+","+itos(baked_octree_texture_h));
}