---
title: "sharpGlint"
description: "A highlight whose tightness follows a sharpness slider."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "materials"
categorySlug: "materials"
categoryTitle: "Materials & surfaces"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/materials.ts#L832"
---

# sharpGlint

A highlight whose tightness follows a sharpness slider.

```ts
sharpGlint(ndh: Expr, sharpness: Expr, cfg: Expr): Expr
```

Import `materials` from `shaders/std` and use `materials.sharpGlint`.

`ndh` is the dot of the normal and the key light's `.H`. `sharpness` runs 0–1 and slides the exponent from `cfg.x` to `cfg.y` and the gain from `cfg.z` to `cfg.w`. Pass `cfg` as `vec4(soft exponent, sharp exponent, soft gain, sharp gain)`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `ndh` | `Expr` |  |
| `sharpness` | `Expr` |  |
| `cfg` | `Expr` |  |

## Example

```ts
const spec = sharpGlint(dot(n, key.member('H')), u.sharpness, vec4(60, 900, 0.4, 1.4))
```

## See also

- [`dualLobeGlint`](/docs/primitives/materials/duallobeglint) — A highlight with a tight hot core and a wide dim halo.
- [`anisoSpecular`](/docs/primitives/materials/anisospecular) — A highlight stretched along a grain, as on brushed metal or carbon fibre.
- [`keyLightAt`](/docs/primitives/materials/keylightat) — A key light from an angle: the light direction `.L` and the half vector `.H` for highlights.

## Used by

[LiquidMetal](/docs/components/liquidmetal), [Water](/docs/components/water)