Unable to use '%' in glsl
<p>While writing a shader program today, I encountered a situation where I have to use <code>%</code> to find the remainder. GLSL gave me an error saying that it is not available in the current version.</p>

<p>I've tried several problems. GLSL doesn't support recursive function and while loops, which is needed if I want to create a function that can give me the result of <code>(a % b)</code>.</p>

<p>So, I'm currently stuck. Can someone help me with this?</p>

<p><strong>Edit</strong>. I was trying to emulate a CRT screen using some shader code from <a href="http://www.gamasutra.com/blogs/SvyatoslavCherkasov/20140531/218753/Shader_tutorial_CRT_emulation.php" rel="noreferrer">this website</a> as reference code. I wanted to modify the color of the pixels at certain row and columns, so I needed to make use of the modulo operator.</p>

<p>At first, I thought that the modulus function was done using the <code>%</code> operator. It didn't work, so I tried using recursive function/while loop as a workaround 
for modulus function, which didn't work either.</p>