import { useGpuTier } from "@nous-research/ui/hooks/use-gpu-tier"; /** * Replicates the visual layer stack of `` from * `@nous-research/ui` without pulling in its leva / gsap / three peer deps. * * See `design-language/src/ui/components/overlays/index.tsx` for the source of * truth. Defaults match LENS_0 (the Hermes teal dark preset); the deep canvas * and the warm vignette both read theme-switchable CSS custom properties so * `ThemeProvider` can repaint the stack without remounting. * * z-1 bg = `var(--background-base)`, mix-blend-mode: difference * z-2 filler-bg jpeg, inverted, opacity 0.033, difference * z-99 warm top-left vignette (`var(--warm-glow)`), opacity 0.22, lighten * z-101 noise grain (SVG, ~55% opacity × `--noise-opacity-mul`, * color-dodge) — gated on GPU tier * * `useGpuTier` returns 0 when WebGL is unavailable, the renderer is a * software rasterizer (SwiftShader/llvmpipe), or the user has * `prefers-reduced-motion: reduce` set. We skip the animated noise layer * in that case so low-power / accessibility-conscious sessions stay crisp, * mirroring the DS `` component's own opt-out. */ export function Backdrop() { const gpuTier = useGpuTier(); return ( <>
{gpuTier > 0 && (
)} ); }