liquid-glass-react icon indicating copy to clipboard operation
liquid-glass-react copied to clipboard

Shader mode does not work, although all other modes work fine

Open LaMeredla opened this issue 10 months ago • 1 comments

Can anyone help me understand why all the modes work except the shader? I need it specifically, but for some reason it just creates strange horizontal stripes and there is no distortion, etc. I also tried running the demo, and the story is exactly the same, all the effects work except the shaders.

Image

Here's my code

                    <LiquidGlass
                        className="glass-pill"
                        displacementScale={displacementScale}
                        blurAmount={blurAmount}
                        saturation={saturation}
                        aberrationIntensity={aberrationIntensity}
                        elasticity={elasticity}
                        cornerRadius={cornerRadius}
                        mouseContainer={containerRef}
                        overLight={scrollingOverBrightSection || customerInfoOverLight}
                        mode={customerInfoMode}
                        padding={customerPadding}
                        style={{
                             position: "absolute",
                             top: "50%",
                             left: "50%",
                             width: "fit-content",
                             maxWidth: "562px",
                        }}
                    >
                        <div className="solution-subtitle-pill">
                            <span style={{ position: "relative", zIndex: 2 }}>
                                One place to understand your UK tax position
                            </span>
                        </div>
                    </LiquidGlass>
                </div>

LaMeredla avatar Jan 20 '26 20:01 LaMeredla

Here are the parameters as well

const [displacementScale, setDisplacementScale] = useState(30) const [blurAmount, setBlurAmount] = useState(0) const [saturation, setSaturation] = useState(100) const [aberrationIntensity, setAberrationIntensity] = useState(0) const [elasticity, setElasticity] = useState(0) const [cornerRadius, setCornerRadius] = useState(10) const [customerInfoOverLight, setCustomerInfoOverLight] = useState(false) const [customerInfoMode, setCustomerInfoMode] = useState<"standard" | "polar" | "prominent" | "shader">("shader") const [customerPadding, setCustomerPadding] = useState("var(--space-md) calc(var(--space-sm) + 0.3rem)")

const containerRef = useRef(null)

const [scroll, setScroll] = useState(0)

const scrollingOverBrightSection = scroll > 230 && scroll < 500

LaMeredla avatar Jan 20 '26 20:01 LaMeredla