gltf: Add GLTFHandleBinary::HANDLE_BINARY_EMBED_AS_UNCOMPRESSED
This option allows for a safe fallback for embedded gltf textures in cases where VRAM compression is not needed. Add an is_editor_hint guard around GLTFHandleBinary::HANDLE_BINARY_EXTRACT_TEXTURES, to use EMBED_AS_UNCOMPRESSED by default at runtime. This provides an option for pixel art to be stored losslessly. Additionally, respect project importer defaults for texture import settings. Avoid writing and reimporting extracted textures identical to version on disk.
This commit is contained in:
parent
0810ecaafd
commit
bc24d01359
6 changed files with 81 additions and 31 deletions
|
|
@ -264,10 +264,16 @@
|
|||
</members>
|
||||
<constants>
|
||||
<constant name="HANDLE_BINARY_DISCARD_TEXTURES" value="0">
|
||||
Discards all embedded textures and uses untextured materials.
|
||||
</constant>
|
||||
<constant name="HANDLE_BINARY_EXTRACT_TEXTURES" value="1">
|
||||
Extracts embedded textures to be reimported and compressed. Editor only. Acts as uncompressed at runtime.
|
||||
</constant>
|
||||
<constant name="HANDLE_BINARY_EMBED_AS_BASISU" value="2">
|
||||
Embeds textures VRAM compressed with Basis Universal into the generated scene.
|
||||
</constant>
|
||||
<constant name="HANDLE_BINARY_EMBED_AS_UNCOMPRESSED" value="3">
|
||||
Embeds textures compressed losslessly into the generated scene, matching old behavior.
|
||||
</constant>
|
||||
</constants>
|
||||
</class>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue