You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-22 15:06:45 +00:00
Add interpolation parameter to resize_to_po2()
Image::resize_to_po2() now takes an optional p_interpolation parameter that it passes directly to resize() with default value INTERPOLATE_BILINEAR. GLES2: call resize_to_po2() with interpolate argument Call resize_to_po2() in GLES2 rasterizer storage with either INTERPOLATE_BILINEAR or INTERPOLATE_NEAREST depending on TEXTURE_FLAG_FILTER. This avoids filtering issues with non power of two pixel art textures. See #44379
This commit is contained in:
@@ -225,7 +225,7 @@ public:
|
||||
/**
|
||||
* Resize the image, using the preferred interpolation method.
|
||||
*/
|
||||
void resize_to_po2(bool p_square = false);
|
||||
void resize_to_po2(bool p_square = false, Interpolation p_interpolation = INTERPOLATE_BILINEAR);
|
||||
void resize(int p_width, int p_height, Interpolation p_interpolation = INTERPOLATE_BILINEAR);
|
||||
void shrink_x2();
|
||||
void expand_x2_hq2x();
|
||||
|
||||
Reference in New Issue
Block a user