Let's assume that I have a triangle with coordinates x,y,z=0,0,0 x,y,z=1,0,0 x,y,z=0.5,1,0
I would like to achieve efect in which one half of the triangle is ( for example red ) and second blue. I ask for the code (in GLSL) in which I will be able to change
colour of the pixel depending on coordinates of the triangle.



