I'm trying to make a shader which changes the color of every pixel to some fixed color while preserving the alpha value.
It should be as simple as this (to set it to green e.g.):
lowp vec4 col=texture2D(fTexture,fTexCoord);
gl_FragColor = vec4(0.0,1.0,0.0,col.a)
However, the alpha value does not seem to be used, so the whole thing becomes homogenously colored to (0.0,1.0,0.0,1.0).
Is this a bug in gideros or am i doing something wrong? i spent an hour trying to understand what i'm doing wrong, and it seems that maybe nothing.
even the simpler example
gl_FragColor = vec4(0.0,1.0,0.0,0.1)
outputs all pixels (0.0,1.0,0.0,1.0).
i'm tring it on a windows pc. please help.