Skip to content

Fix for Google Pixel UV #4

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

Open
wants to merge 37 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/hero/liquid-frag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const liquidFragSource = /* glsl */ `#version 300 es
precision mediump float;
precision highp float;

in vec2 vUv;
out vec4 fragColor;
Expand Down Expand Up @@ -140,10 +140,10 @@ void main() {
float thin_strip_2_width = cycle_width * thin_strip_2_ratio;

opacity = 1. - smoothstep(.9 - .5 * u_edgeBlur, 1. - .5 * u_edgeBlur, edge);
opacity *= get_img_frame_alpha(img_uv, 0.);
opacity *= get_img_frame_alpha(img_uv, 1e-4);


float noise = snoise(uv - t);
float noise = snoise(vUv - t + vec2(.0001));

edge += (1. - edge) * u_liquid * noise;

Expand Down