PrismaticGlass
Physically traced prismatic glass: every colour refracts through the front and back faces on its own, light trapped inside escapes as spectral fire, a studio reflects in the surface under a shifting thin-film coat, and the glass can cast a colour-split caustic on what lies behind it
- Shape Effects
- Filter
- Free (MIT-licensed)
- View source
PrismaticGlass
Physically traced prismatic glass: every colour refracts through the front and back faces on its own, light trapped inside escapes as spectral fire, a studio reflects in the surface under a shifting thin-film coat, and the glass can cast a colour-split caustic on what lies behind it
Props
Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.
Center position of the glass shape. Accepts CSS units, see Sizing and units.
Scale of the glass shape (1 = default size)
Rotation of the glass shape in degrees
Index of refraction: 1.33 water, 1.5 window glass, 1.7 flint, 2.4 diamond. Higher bends the layers beneath more and traps more light inside as fire.
How far the glass splits white light into a spectrum: rainbow fringes on every edge it bends, colour in the fire and the caustic. 0 is clear, colourless glass.
How far behind the glass the layers beneath sit. Further bends and inverts them more, like a ball lens, and pushes the cast shadow further away.
Width of the rounded glass edge on flat shapes and logos (3D shapes use their real form)
How gently the glass fades into the layers beneath at its outline: 0 is a crisp, anti-aliased edge, higher melts the rim into the backdrop
The colour the glass body absorbs toward, deeper where the glass is thicker. White is clear glass.
How strongly the tint colours the glass: 0 keeps it clear, higher reads as thick coloured glass (amber, emerald, smoke)
Brightness of the studio the glass reflects: the softbox and strip lights on its surface and in the light bouncing inside it
Light the back faces reflect and send back out through the front: the spectral sparkle inside a gem
A thin-film coat on the surface whose colour shifts with the viewing angle, like a lens coating or a soap skin
Colour of the key softbox the glass reflects and the light it casts
Colour of the strip lights at the sides, which draw the glass rim
Where the key light comes from, in degrees clockwise from the right (225 = upper left). The cast shadow falls the other way.
The soft shadow and the focused, colour-split light the glass casts on the layers behind it. Reads best when those layers look like a lit surface: a wall, paper, a studio sweep. 0 is off and costs nothing.
Speed of the slowly swaying key light and the flowing coat. 0 holds them still.
Shape to render — choose from 11 built-in analytical shapes or supply a custom SDF. See the Shape Effects guide for all available shapes and their options.
URL to a pre-generated SDF `.bin` file — when non-empty, activates SVG mode and triggers a shader recompile. See the Shape Effects guide for how to generate an SDF from an SVG.


