-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
Wrong lightness of textures with alpha channel and translucent pixels on Android #40541
Comments
I forget: This problems occurs, even if the materials are declared Unshaded (!!!). => This seems a pure texture problem unrelated to the lightning Attached is another screenshot from Android with materials set to "Unshaded". If you look closely you will recognize it is different to the other Android screenshot with shading enabled, but the problem persists, anyway: All textures should have the same lighness. |
@Ralf12358 Double-check that the textures are imported with sRGB enabled. Also, does this occur if you change its compression mode to Uncompressed or Lossless in the Import dock? VRAM compression uses ETC1 when using GLES2. That format doesn't support alpha channels. There's a proposal about adding a hack to make it support alpha channels, but you should be able to do it with a custom shader already. |
@Calinou: That's it! I set the Compress mode manually to "Uncompressed" and the problem is, gone! Thank's. I think you can close the issue. It might be worth considering to automatically import textures with alpha pixels != 1.0 as uncompressed on GLES2, but that's up to you. Thank's again. |
@Ralf12358 Alright, I'll close this as a duplicate of #26211 then. |
Godot version:
Head on Branch 3.2: 89f57ae
Reproduced on 3.2.3beta1, too. Probably older version are affected, too
OS/device including version:
GLES2, Android. Tested with Galaxy S7 Edge and Amazon Fire HD 8
Issue description:
Please read carefully. Issue description may sound strange, but it's an annoying and often subtle bug. Attached is a sample project to easily reproduce the problem on Android.
When adding a textured quad mesh with an alpha channel where at least on pixel has an alpha != 1.0 to a 3D scene. The quads on Android are rendered too dark (see screenshots below).
The "funny" part is:
The problem is probably unrelated to the quad mesh and more related to dealing with textures on Andoird in general.
The screenshots below contain two pngs: One completely opaque, but with alpha channel. One with some transparent pixels.
Android Small (Here the problem is visible):
Linux Small:
Android Large:
Linux Large:
Steps to reproduce:
Best use attached sample project.
Create new 3D scene. Add camera. Add Light. Add two quad meshes. In on mesh use a texture with alpha channel and some transparent pixels in the other mesh us a texture completely opaque with alpha channel, too. Quads have to be the correct size (usually relative small) to reproduce the bug. On Android the two quad will have different lightness. On Linux and browser both quad will have the same lightness.
Minimal reproduction project:
GodotAlphaBug.zip
The text was updated successfully, but these errors were encountered: