You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-03 16:55:53 +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:
@@ -414,7 +414,7 @@
|
||||
<argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1">
|
||||
</argument>
|
||||
<description>
|
||||
Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using [code]interpolation[/code]. See [code]interpolation[/code] constants.
|
||||
Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize_to_po2">
|
||||
@@ -422,8 +422,10 @@
|
||||
</return>
|
||||
<argument index="0" name="square" type="bool" default="false">
|
||||
</argument>
|
||||
<argument index="1" name="interpolation" type="int" enum="Image.Interpolation" default="1">
|
||||
</argument>
|
||||
<description>
|
||||
Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same.
|
||||
Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants.
|
||||
</description>
|
||||
</method>
|
||||
<method name="rgbe_to_srgb">
|
||||
|
||||
Reference in New Issue
Block a user