mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Refactor high quality texture import
* Only two texture import modes for low/high quality now: * S3TC/BPTC * ETC2/ASTC * Makes sense given this is the general preferred and most compatible combination in most platforms. * Removed lossy_quality from VRAM texture compression options. It was unused everywhere. * Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA). * Changed MacOS export settings so required texture formats depend on the architecture selected. This solves the following problems: * Makes it simpler to import textures as high quality, without having to worry about the specific format used. * As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
This commit is contained in:
@@ -75,12 +75,10 @@
|
||||
<return type="int" enum="Error" />
|
||||
<param index="0" name="mode" type="int" enum="Image.CompressMode" />
|
||||
<param index="1" name="source" type="int" enum="Image.CompressSource" default="0" />
|
||||
<param index="2" name="lossy_quality" type="float" default="0.7" />
|
||||
<param index="3" name="astc_format" type="int" enum="Image.ASTCFormat" default="0" />
|
||||
<param index="2" name="astc_format" type="int" enum="Image.ASTCFormat" default="0" />
|
||||
<description>
|
||||
Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available.
|
||||
The [param mode] parameter helps to pick the best compression method for DXT and ETC2 formats. It is ignored for ASTC compression.
|
||||
The [param lossy_quality] parameter is optional for compressors that support it.
|
||||
For ASTC compression, the [param astc_format] parameter must be supplied.
|
||||
</description>
|
||||
</method>
|
||||
@@ -88,12 +86,10 @@
|
||||
<return type="int" enum="Error" />
|
||||
<param index="0" name="mode" type="int" enum="Image.CompressMode" />
|
||||
<param index="1" name="channels" type="int" enum="Image.UsedChannels" />
|
||||
<param index="2" name="lossy_quality" type="float" default="0.7" />
|
||||
<param index="3" name="astc_format" type="int" enum="Image.ASTCFormat" default="0" />
|
||||
<param index="2" name="astc_format" type="int" enum="Image.ASTCFormat" default="0" />
|
||||
<description>
|
||||
Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available.
|
||||
This is an alternative to [method compress] that lets the user supply the channels used in order for the compressor to pick the best DXT and ETC2 formats. For other formats (non DXT or ETC2), this argument is ignored.
|
||||
The [param lossy_quality] parameter is optional for compressors that support it.
|
||||
For ASTC compression, the [param astc_format] parameter must be supplied.
|
||||
</description>
|
||||
</method>
|
||||
|
||||
Reference in New Issue
Block a user