Skip to content

Comment on Getting Creative with Perlin Noise Fields

Comments

It turns out that adding noise to gradients is a really useful thing to do - so many new effects can be created with just a few additional parameters. Sadly, CSS and Canvas API gradients (linear, radial, conic) are very basic implementations (and SVG is not much more advanced).

Recently I did some work to add software gradient enhancements to my canvas library. Because these run on the CPU rather than GPU they're computationally intense, but still worth the effort just to see what can be done with different spreads (pad, repeat, reflect, transparent) and noise engine operations inserted while calculating stuff like gradient color selection, and pixel positioning.

Linear gradient demo test - https://scrawl-v8.rikweb.org.uk/demo/canvas-003.html

Speaking of gradients and noise, adding "Interleaved Gradient Noise" to gradients can get rid of the color banding that you'll often see on gradients displayed over a wide area.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.