LookLightweight
Refraction & glass
See-through materials that bend the view.
See-through materials that bend what is behind them: glass, water, crystal, the “liquid glass” look. The scene behind gets drawn twice, so it is heavy, and two glass objects overlapping usually break.
- Breaks when
- transmission renders the scene twiceoverlapping glass objects break
- Also called
- MeshTransmissionMaterial, transmission, glass shader, liquid glass
Prompts
Glass logo over a live background
R3F + drei <MeshTransmissionMaterial> on an extruded logo: transmission 1, thickness 0.6, roughness 0.08, ior 1.45, chromaticAberration 0.04, anisotropy 0.2, backside true with backsideThickness 0.3, resolution 512, samples 6. A striped HTML background behind the transparent canvas is what gets refracted (use drei’s <Environment> only for reflections, background off). Pointer parallax ±0.1 units. Fallback on mobile: MeshPhysicalMaterial with transmission and no backside.
Real refraction in a raymarcher
In a fragment shader, render a glass sphere in front of a striped backdrop: refract on entry and exit with per-channel IOR (1.44/1.47/1.50) for dispersion, Fresnel-weighted reflection of a simple environment, and a specular highlight. Show the three channels’ separate hits so the fringe is explained, not faked.
Frosted variant
Turn clear glass into frosted glass: raise roughness to 0.45, lower samples cost with a blurred transmission target (pmndrs MeshTransmissionMaterial’s backside blur or a mip-based blur), and add a subtle normal map (scale 0.15) for surface texture. Keep 60 fps at 1080p; state the cost of each step.
Related
Resources · 2
- drei: R3F helpersMeshTransmissionMaterial, ScrollControls and Text live here.pmndrsGitHub · code · demoAug 10, 2026
- three.js example: physical transmissionmrdoobsite · code · demoJun 15, 2026