Fragments/Utilities

  • 04boilerplateFree
  • 02color
  • 06patterns
  • 02sdf
  • 06function
  • 03systemNewFree
  • 04interactivity
  • 01noise
  • 13postprocessingNew
  • 03distortion

Join waitlist ↵

Randomization Helpers

Small JavaScript helpers to randomize and derive values for uniforms when building generative shader systems.

Loading...
Storage Buffers→
←→
Works171
Writing34

Fragments

Learn creative coding with shaders. For design engineers, creative coders and shader artists: techniques, tools, deep dives. Powered by ThreeJS and TSL.

Loading...

2025 Phobon

phobon.ioShadercraft

Pages

HomeTechniquesUtilitiesBreakdownsWorksWriting

Contact

X @thenoumenonhey@fragments.supplyOKAY DEV @phobon
All rights reserved.

Usage

Use these in click handlers or batch randomizers to explore uniform parameter space—pair with Leva, dial kits, or ad hoc buttons.

import { randomInRange, randomizeAround } from '@/utils/generative_randomization'
 
_bands.value = Math.floor(randomizeAround(8, 0.2, 4, 16))
_paletteA.value.x = randomizeAround(0.5, 0.3, 0.2, 0.8)

Implementation Reference

Be the first to know what's next