Crystal
Diamond-like crystal lens with faceted refraction.
Diamond-like crystal lens with faceted refraction.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| center | position | {"x":0.5,"y":0.5} | Center position of the crystal shape |
| scale | range | 1 | Scale of the crystal shape (1 = default size) |
| cutout | checkbox | false | Cut out alpha outside the crystal shape |
| refraction | range | 0.5 | How strongly the crystal refracts content beneath |
| dispersion | range | 0.5 | Prismatic rainbow dispersion - splits light into spectral colors |
| facets | range | 5 | Symmetry order - how many times the facet pattern repeats around the center |
| fresnel | range | 0.05 | Fresnel rim glow intensity around the crystal boundary |
| fresnelSoftness | range | 1 | Fresnel rim width - higher values spread the glow further inward |
| fresnelColor | color | #ffffff | Color of the fresnel rim glow |
| edgeSoftness | range | 0 | Softness of the crystal boundary edge |
| innerZoom | range | 1.5 | Magnification of content seen through the crystal |
| lightAngle | range | 270 | Light direction angle in degrees |
| highlights | range | 0.5 | Additive brightness on light-facing facets - never darkens |
| shadows | range | 0.3 | Darkening on shadow-facing facets - never brightens |
| brightness | range | 1.2 | Overall crystal brightness - higher values push facets toward brilliant white |
| tintColor | color | #e8e0ff | Crystal body tint color |
| tintIntensity | range | 0 | How much tint color is applied to the crystal interior |
| tintPreserveLuminosity | checkbox | true | Preserve original brightness when tinting |
| shape | shape | {"type":"polygonSDF","radius":0.35,"sides":10} | Serialized shape configuration (JSON) |
| shapeSdfUrl | shape-upload | URL to a pre-generated SDF .bin file | |
| shapeType | - | Active SDF shape type |
Usage
vue
<Shader>
<Crystal>
<Circle />
</Crystal>
</Shader>