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:
parent
17a8597355
commit
28f51ba547
30 changed files with 457 additions and 265 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -2285,20 +2285,12 @@
|
|||
<member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false">
|
||||
If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP.
|
||||
</member>
|
||||
<member name="rendering/textures/vram_compression/import_bptc" type="bool" setter="" getter="" default="false">
|
||||
If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer.
|
||||
<member name="rendering/textures/vram_compression/import_etc2_astc" type="bool" setter="" getter="" default="false">
|
||||
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm for lower quality textures and normalmaps and Adaptable Scalable Texture Compression algorithm for high quality textures (in 4x4 block size).
|
||||
[b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
|
||||
</member>
|
||||
<member name="rendering/textures/vram_compression/import_etc" type="bool" setter="" getter="" default="false">
|
||||
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures.
|
||||
[b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
|
||||
</member>
|
||||
<member name="rendering/textures/vram_compression/import_etc2" type="bool" setter="" getter="" default="true">
|
||||
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer.
|
||||
[b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
|
||||
</member>
|
||||
<member name="rendering/textures/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true">
|
||||
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles.
|
||||
<member name="rendering/textures/vram_compression/import_s3tc_bptc" type="bool" setter="" getter="" default="true">
|
||||
If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm (DXT1-5) for lower quality textures and the the BPTC algorithm (BC6H and BC7) for high quality textures. This algorithm is only supported on PC desktop platforms and consoles.
|
||||
[b]Note:[/b] Changing this setting does [i]not[/i] impact textures that were already imported before. To make this setting apply to textures that were already imported, exit the editor, remove the [code].godot/imported/[/code] folder located inside the project folder then restart the editor (see [member application/config/use_hidden_project_data_directory]).
|
||||
</member>
|
||||
<member name="rendering/textures/webp_compression/compression_method" type="int" setter="" getter="" default="2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue