hn.today

Tiling Noise – Procedural GPU Patterns

catlikecoding.com3 points0 comments
Screenshot of Tiling Noise – Procedural GPU Patterns

This Godot shader tutorial extends value noise from a plane to a torus and solves the visible seams where UV coordinates meet at 0 and 1. It first adapts the noise settings to use separate horizontal and vertical frequencies and bumpiness, then tests tiling by expanding the plane’s UV range to show neighboring copies of the intended tile. Unlike hash noise, value noise blends between lattice points, so simply taking fractional UV coordinates is not enough: lattice points at tile edges must wrap around and match those on the opposite edge. A helper function adjusts each lattice block’s two coordinates to achieve that match, allowing the same pattern to repeat seamlessly across the target tile and its immediate neighbors.

Tiling is made optional, since many patterns do not need it, and the tutorial spells out its limits: frequencies must be integers for every octave, animated tiling requires even frequencies, and the simple wrapping method supports UV coordinates only from −1 to 2. Once the UV range is restored, the technique produces seamless noise on both planes and a smoother torus. The final section adds animation and UV sliding. Morphing remains tileable when the frequency requirements are met; sliding motion is kept within the supported range by applying only the fractional part of its offset. These constraints matter when choosing frequencies and animation settings for a usable seamless pattern.

Read on catlikecoding.com0 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Four Months of Zig

Four Months of Zig

After four months back with Zig, Anna Liberty built a small-network client library, a typing game, and an N-body simulator, while enjoying Zig’s straightforward development experience. The experience also exposed unfinished tooling, including a built-in fuzzer that did not work, and highlighted the value of local Zig meetups. (gracefulliberty.com)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.