Skip to content
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

Get strange black shadow on gltf2 mesh when change camera location and rotation (fixed in GLES3) #58789

Closed
Tracked by #63198
D3ZAX opened this issue Mar 5, 2022 · 8 comments

Comments

@D3ZAX
Copy link

D3ZAX commented Mar 5, 2022

Godot version

3.4.3 mono

System information

Windows10 GLES 3.0 GTX 1060 6G

Issue description

Get strange black shadow on gltf2 mesh when change camera location and rotation, both in editor and game running. It worked fine in 3.4.2 mono version.

Correct view:
image

Wrong view:
image

Steps to reproduce

Open the project uploaded, in editor, move or rotator view, the stange shadow will appear and disappear.

Minimal reproduction project

Test.zip

@TokisanGames
Copy link
Contributor

This is likely a duplicate of #58592

@Calinou
Copy link
Member

Calinou commented Mar 5, 2022

I can confirm this on cf970aa, even if the .import/ folder is removed while the editor is closed. Therefore, I'm not sure if this is a duplicate of #58592 (although it may also be related to octahedral compression).

3d_bug.mp4

This issue does not occur on GLES2, but normals on the model's face are messed up:

image

@TokisanGames
Copy link
Contributor

Does the face mesh have blendshapes? If so, try removing the face, saving the scene, reloading and see if it goes away. If so, it most likely is a duplicate of the other bug. If none of the meshes have blendshapes, then it would be a unique issue.

@The-O-King
Copy link
Contributor

The face mesh does have blendshapes, and I was able to test and see that on GLES3 things are fixed with #58808, however the GLES2 issue seen here is new, and probably related to octahedral compression/blend shapes, although I'm not sure how blend shapes are implemented in GLES2, I can look into it though

@Calinou
Copy link
Member

Calinou commented Mar 5, 2022

It might be worth checking if the GLES2 part is a regression from #48480.

@The-O-King
Copy link
Contributor

Thank you for pointing me to the GLES2 CPU blend shapes implementation that helped me find the issue (which was not caused by the original implementation but rather the addition of octahedral compression broke some assumptions made in that original implementation haha)

I just submitted a fix for GLES2 here: #58838

@Calinou
Copy link
Member

Calinou commented Mar 6, 2022

The GLES3 part of the issue was fixed by #58808, which is now merged. I'll keep this open to track the GLES2 issue for now.

@Calinou Calinou changed the title Get strange black shadow on gltf2 mesh when change camera location and rotation Get strange black shadow on gltf2 mesh when change camera location and rotation (fixed in GLES3) Mar 6, 2022
@akien-mga
Copy link
Member

Fixed by #58808 and #58838.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants