GLSL rectangle (box) gradient shader
<p>I'm working on gradient shader in GLSL.
I've searched everywhere but didn't have change to find a solution for rectangle gradient that have not "cross" in the middle like this.</p>

<p><a href="https://i.stack.imgur.com/02b13.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/02b13.png" alt="enter image description here"></a></p>

<p>Any suggestions how to overcome this side effect?</p>