godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
88.64k stars 20.1k forks source link

Textures converting to VRAM compression automatically when adding them to a material, even if no VRAM compression algorithms are enabled in the Project Settings #50902

Open everythingandnothingdev opened 3 years ago

everythingandnothingdev commented 3 years ago

Godot version

4.0dev (1f69582)

System information

Windows 10, Vulkan, RTX 2080

Issue description

Textures imported as lossless compression are automatically converting to VRAM compressed when they're added to materials for the first time.

Steps to reproduce

For any new texture I add to my project and import it as lossless:

image

When I try to add it to a BaseMaterial3D, I get this error dialog because I explicitly disabled VRAM compression in the project settings.

image

image

The problem is it shouldn't be trying to compress it in the first place because the texture is set to lossless. If I go back into the texture import settings after adding it to the material, it automatically changed it back to vram compressed.

image

Minimal reproduction project

No response

Calinou commented 3 years ago

Textures imported as lossless compression are automatically converting to VRAM compressed when they're added to materials for the first time.

This is expected behavior, as the default compression format is Lossless. There is no way for the editor to distinguish from you explicitly marking a texture as Lossless then clicking Reimport from the default Lossless state.

However, we should fix the Detect 3D logic to not attempt to use VRAM compression when no compression algorithms are enabled in the Project Settings.

See also https://github.com/godotengine/godot/pull/45587, which could be reimplemented in a better way to always disable VRAM compression on small textures.

everythingandnothingdev commented 3 years ago

There is no way for the editor to distinguish from you explicitly marking a texture as Lossless then clicking Reimport from the default Lossless state.

Maybe there should be? Similar to how the Advanced Import Settings dialog has a "Default" option. Though it would be nice if it also showed what the current default is when this is the case.

image

I know importing in general is one of the things that gets a lot of bug reports in Godot with actual problems as well as users not understanding the expected behavior. I think it would be worth it to iron out those kinks. Making smart decisions for the user is great until you run into scenarios like this where it's actively working against them.