mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
- [Grid] Fix uneven gap size on non uniform grid size.
This commit is contained in:
parent
3cd10e6f08
commit
e7881f1bad
1 changed files with 3 additions and 2 deletions
|
@ -261,8 +261,9 @@ void main() { #region
|
|||
vec2 sqSt = floor(_pos * sca) / sca;
|
||||
vec2 _dist = _pos - sqSt;
|
||||
vec2 nPos = abs(_dist * sca - vec2(0.5)) * 2.; //distance in x, y axis
|
||||
float dist = 1. - max(nPos.x, nPos.y);
|
||||
|
||||
float rat = sca.y / sca.x;
|
||||
float dist = 1. - max((nPos.x - 1.) * rat + 1., nPos.y);
|
||||
|
||||
vec4 colr;
|
||||
|
||||
if(mode == 2) {
|
||||
|
|
Loading…
Reference in a new issue