dither function
±0.5/255 from the integer hash of the screen pixel, against banding in gradients.
import { dither } from '@dioramajs/diorama/kit'With rgb, ±0.5/255 after the sRGB encoding of that linear colour: the dither scaled by the slope of the decoding curve there, so dark gradients get as much as light ones. Add it to the colour.
function dither(): Node<'float'>function dither(rgb: Node<'vec3'>): Node<'vec3'>Parameters
| Name | Type | Description |
|---|
| Name | Type | Description |
|---|---|---|
rgb | Node<'vec3'> |
Also exported from @dioramajs/effects/kit.
Defined in packages/effects/src/kit.ts.