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.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.