How it works
Crystal Refraction estimates relative—not measured—depth and a semantic foreground mask, removes isolated depth speckles with a 3 × 3 median filter, and locks every model-detected subject pixel plus a narrow anti-bleed boundary to its source RGB coordinate. Only the remaining opaque background is bilinearly sampled through deterministic triangular facets. Intensity scales the real displacement, capped at the smaller of 0.4% of the short side or 8 pixels; it fades to zero at the frame, subject, and transparency boundaries. The main refraction samples one coherent full-RGB coordinate, while only facet seams receive up to 0.35 pixels of spectral dispersion. Restrained convex facet lighting and source-relative channel limits prevent new black or white clipping. The working-frame alpha remains byte-exact and the result is a lossless PNG. Larger uploads can be proportionally resized first: the standard free limit is 800 pixels on the long side, and the depth service defaults to a 2048-pixel long side for remaining larger inputs.

























