From 12b8fee0b0f4bd70d5b74585a2049bd9932f671b Mon Sep 17 00:00:00 2001 From: Eric Smith <5d@fifthdread.com> Date: Wed, 20 May 2026 21:41:37 -0400 Subject: [PATCH] fix: sample noise at distorted uv for visible deformation effects --- shaders/vial_fill.gdshader | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/shaders/vial_fill.gdshader b/shaders/vial_fill.gdshader index 395692d..7f5094c 100644 --- a/shaders/vial_fill.gdshader +++ b/shaders/vial_fill.gdshader @@ -112,11 +112,11 @@ void fragment() { // swirl uv = get_swirl_uv(uv, swirl_strength); - // sample the ColorRect texture (water image if assigned, else 1x1 white) - vec4 tex = texture(TEXTURE, uv); - - // hue-shift the base liquid colour, modulated by the texture - vec3 base_rgb = tex.rgb * liquid_color.rgb; + // Sample the noise at the distorted UV for visible liquid variation. + // (ColorRect has no texture, so TEXTURE is always white — this makes + // wave/ripple/swirl deformation visible by sampling noise instead.) + float detail = texture(noise_tex, (uv * noise_module_size / 100.0 * noise_scale + t * 0.03) * 0.5).r; + vec3 base_rgb = liquid_color.rgb * (0.85 + 0.15 * detail); vec3 hsv = rgb2hsv(base_rgb); hsv.x = fract(hsv.x + t * 0.1 * hue_shift_speed); hsv.y = clamp(hsv.y + 0.2 * noise_val, 0.0, 1.0);