-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Detect 3D" is triggered for ShaderMaterial with shader_type canvas_item;
#62087
Comments
It looks like the logic for detect 3D is to call the callback anytime textures are updated and godot/servers/rendering/renderer_rd/storage_rd/material_storage.cpp Lines 1161 to 1163 in 361a401
However,
Looks like maybe we used to handle srgb differently in 2D and then we lost something during a refactoring. Related: #61697 |
I can't reproduce on Beta 2! So I am going to close this issue. At any rate, I am changing the behaviour that I described in my earlier post so this problem should be gone soon for sure. |
Reopening due to reproduction project in #74335 |
Yes 🙂 |
Any news on this, or a workaround? Super nasty issues going on for me |
You can change the Import Defaults for Texture2D/ImageTexture in the Project Settings. Set Detect 3D to Disable so that 3D usage detection never kicks in. |
Godot version
4.0.dev 706dc74
System information
Windows 10, Vulkan
Issue description
ShaderMaterial is treated as 3D for the purpose of "Detect 3D", even if the material is of type canvas_item and used in a 2D node.
Here you can see the problem. Let's take icon.png, a quality piece of artwork whose every pixel is perfectly preserved.
Now we drag it into a 2D canvas_item shader, as opposed to a 2D sprite's texture slot. There could be lots of reasons for this. For example, it might be an auxiliary texture used for outline drawing, or a palette, or something else.
Now see what happened. (The import inspector doesn't refresh, so you select a different file and back.)
It got VRAM Compressed!
Godot also prints the following.
Steps to reproduce
ColorRect
icon.png
. Check the Import tab and make sure that Compress Mode is set to Lossless, and Detect 3D Compress is set to VRAM Compressed.tex
slot in the material.Minimal reproduction project
detect3dcanvas.zip
Editing to add repro project from #74335 in case it helps. To repro in this project, drag
perfect.png
into the material's Evil slot.https://github.com/godotengine/godot/files/10887280/shader.texture.distorted.reproduction.project.zip
The text was updated successfully, but these errors were encountered: