fuckingtech/public/assets/glsl/lygia/space/sqTile.glsl
Elias Rhouzlane bf76c6b086 fix: code
2025-04-06 17:23:52 +02:00

14 lines
No EOL
587 B
GLSL

/*
contributors: Patricio Gonzalez Vivo
description: make some square tiles. XY provide coords inside of the tile. ZW provides tile coords
use: <vec4> hexTile(<vec2> st [, <float> scale])
license:
- Copyright (c) 2021 Patricio Gonzalez Vivo under Prosperity License - https://prosperitylicense.com/versions/3.0.0
- Copyright (c) 2021 Patricio Gonzalez Vivo under Patron License - https://lygia.xyz/license
*/
#ifndef FNC_SQTILE
#define FNC_SQTILE
vec4 sqTile(vec2 st) { return vec4(fract(st), floor(st)); }
vec4 sqTile(vec2 st, float scale) { return sqTile(st * scale); }
#endif