brickTile: Staggered Brick Pattern Tiling
Masonry tiling with alternating row offset
The brick tiling function creates a staggered pattern by applying horizontal offset to alternating rows. Given square tile coordinates where represents fractional position and represents integer indices:
The transformation shifts even rows by half a tile width, creating the characteristic brick masonry pattern.
Tiling Coordinate System
Component | Input Domain | Output Domain | Description |
---|---|---|---|
x | Horizontal fractional position | ||
y | Vertical fractional position | ||
z | Modified horizontal tile index | ||
w | Vertical tile index |
Checkerboard Brick Variation
ライブエディター
const fragment = () => { const tiled = brickTileVec2(uv.mul(6)) const checker = mod(tiled.z.add(tiled.w), 2) const color = mix(vec3(0.8, 0.4, 0.2), vec3(0.6, 0.3, 0.1), checker) return vec4(color, 1) }