Skip to content

Fix edge case for custom angle on android devices#141

Open
orsenkucher wants to merge 1 commit into
whynotmake-it:mainfrom
orsenkucher:main
Open

Fix edge case for custom angle on android devices#141
orsenkucher wants to merge 1 commit into
whynotmake-it:mainfrom
orsenkucher:main

Conversation

@orsenkucher

Copy link
Copy Markdown

With:

LiquidGlassSettings(
    thickness: 40,
    blur: 3,
    glassColor: context.colors.glassColor,
    chromaticAberration: 0.1,
    lightAngle: -math.pi / 4, // <- causes problem
    ambientStrength: 0.2,
    lightIntensity: 0.6,
)

I was getting black pixels on edge of glass on Android devices (iOS works fine):
image

Now we guard pow() and normalize() against zero inputs that produce NaN.

@orsenkucher

Copy link
Copy Markdown
Author

Also orsenkucher@27448f8 is a good guard to have.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant