Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

dither function

±0.5/255 from the integer hash of the screen pixel, against banding in gradients.

View as Markdown
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

NameTypeDescription
NameTypeDescription
rgbNode<'vec3'>

Also exported from @dioramajs/effects/kit.

Defined in packages/effects/src/kit.ts.