Shader Learn

04 Textures and noise

Random and noise are not the same

A random value per cell → smooth interpolation between neighbouring cells.

224
01

Runs once per pixelDrag numbers, or edit the code

hash gives each cell a fixed pseudo-random number; noise interpolates smoothly between neighbours. GLSL has neither built in.

Try it

  • Set smoothing to 0 to see the raw random cells
  • Open the pixel debugger and compare blocks with n