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

GLES3: Fix directional shadow on Metal ANGLE #94556

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

cosformula
Copy link
Contributor

@cosformula cosformula commented Jul 20, 2024

Description

This PR closes #93537 and closes #94515 .

When using textureProj with sampler2DShadow , there is a bug in ANGLE on MacOS browsers(https://issues.angleproject.org/issues/354101888), causing directional shadows to not work. This issue is resolved by replacing textureProj with textureProjLod, which functions correctly.

UPDATE: It was marked as fixed in Chromium 130.0.6697.0.

Test

MRP scene:

Before (shadow seems inverted):
image

After:
image

Complex Scene:

Before (directional shadow seems disappear):
image
After:
image

There appears to be no performance impact.

Export Packages For Test

textureProj.zip

textureProjLOD.zip

Tested on MacOS Safari/Chrome/Firefox

@Calinou Calinou added this to the 4.3 milestone Jul 20, 2024
@Calinou Calinou added the cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release label Jul 20, 2024
@cosformula cosformula marked this pull request as ready for review July 20, 2024 07:58
@cosformula cosformula requested a review from a team as a code owner July 20, 2024 07:58
@akien-mga akien-mga changed the title GLES3: fix directional shadow GLES3: Fix directional shadow on Metal ANGLE Jul 20, 2024
@akien-mga akien-mga requested a review from clayjohn July 22, 2024 15:21
Copy link
Member

@clayjohn clayjohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks amazing! Thank you very much

@akien-mga akien-mga force-pushed the fix-directional-shadow branch from 2b1ae50 to fa8b4d8 Compare July 23, 2024 09:24
@akien-mga akien-mga merged commit 87d498a into godotengine:master Jul 23, 2024
18 checks passed
@akien-mga
Copy link
Member

akien-mga commented Jul 23, 2024

Thanks! And congrats for your first merged Godot contribution 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cherrypick:4.2 Considered for cherry-picking into a future 4.2.x release platform:web topic:rendering topic:3d
Projects
None yet
4 participants