-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
TRANSLUCENT display incorrect.(use method in sample-transparent-view) #4087
Comments
What's not right? The background is set to red and visible through the 3D view. What issue are you reporting? |
The face is missing some part. |
Is the face okay when you're NOT setting the view to transparent? |
Could you share the glTF file you are loading please? |
it is here. https://github.com/google/filament/files/6596877/role_boy.glb.zip |
Yes, it is OK when not set transparent. BTW. |
Ah I was able to repro. There's no need to set the swap chain to use
|
@pixelflinger I forgot, is the app supposed to set the |
yes, very smart! |
@pixelflinger I found the bug. It's caused by this line in the post processing material:
I'm not sure why it causes the problem yet. But it's fine when returning just before and it's broken when returning right after. I imagine we have bad values in color.a. |
Alright I found the issue. The problem is the asset. The face uses alpha masking with an alpha value that comes from the face texture. And the alpha channel of said texture looks like this: So what's happening is that in "view transparent" mode the alpha of the alpha masking is used to blend and we correctly interpret it and the model disappears. The bug doesn't appear in opaque mode because we disable blending so all pixels are treated as alpha=1. Please disable alpha masking on the face, it'll fix your issue and improve rendering performance. |
Hi, @romainguy, I also met this issue in version 1.15.0. Does that mean the issue is still not fixed? From your comments above I thought it was a model issue at first, but since the model is correctly rendered in other renderer(https://gltf-viewer.donmccurdy.com/), I concluded that it's still a filament blending issue. Seems filament does not correctly use the alpha masking. Am I right ? |
#4084
use android sample:
sample-gltf-viewer
In
ModelViewer.kt
, use the method insample-transparent-view
,the code changed as blow(no other code change)in
SurfaceCallback
:In MainActivity.kt:
do not use sky box
and I set the view background
#0f0
in layoutIt show as blow
![82A3A8D45C5BDD87B8CE060A81BDA658](https://user-images.githubusercontent.com/8586217/120877357-acf8c080-c5e8-11eb-86fb-9ebdab17c1af.jpg)
not right.
The text was updated successfully, but these errors were encountered: