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

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

PropTypeDefault
originstringcenter

Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.

center{x: number | string, y: number | string}{"x":0.5,"y":0.5}

Center position of the glass shape. Accepts CSS units, see Sizing and units.

scalenumber1

Scale of the glass shape (1 = default size)

rotationnumber0 to 3600

Rotation of the glass shape in degrees

refractionnumber1.6

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.

dispersionnumber0.75

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.

backdropnumber0.3

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.

bevelnumber0.12

Width of the rounded glass edge on flat shapes and logos (3D shapes use their real form)

edgeSoftnessnumber0.25

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

tintColorstring#ffffff

The colour the glass body absorbs toward, deeper where the glass is thicker. White is clear glass.

absorptionnumber1

How strongly the tint colours the glass: 0 keeps it clear, higher reads as thick coloured glass (amber, emerald, smoke)

reflectionsnumber1

Brightness of the studio the glass reflects: the softbox and strip lights on its surface and in the light bouncing inside it

innerFirenumber1.2

Light the back faces reflect and send back out through the front: the spectral sparkle inside a gem

coatingnumber0.3

A thin-film coat on the surface whose colour shifts with the viewing angle, like a lens coating or a soap skin

keyColorstring#fff3e4

Colour of the key softbox the glass reflects and the light it casts

rimColorstring#9ec2ff

Colour of the strip lights at the sides, which draw the glass rim

lightAnglenumber225

Where the key light comes from, in degrees clockwise from the right (225 = upper left). The cast shadow falls the other way.

causticsnumber0

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.

speednumber0 to 41

Speed of the slowly swaying key light and the flowing coat. 0 holds them still.

shapeShapeConfigsphere3D

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.

shapeSdfUrlstring""

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.

Usage

<Shader>
  <PrismaticGlass>
    <Circle />
  </PrismaticGlass>
</Shader>

Let your agent work its magic

Available for Mac, Windows & Linux.

Download for macOS Download for Windows Download for Linux