In my shader i am trying to define col but I keep getting syntax errors. Instead of using
lowp vec4 col = texture2D(texture,vTexCoord)* vColor; ``` I want to uselowp col = vec4(1,1,1,1); ``` Or something to the same effect
In my shader i am trying to define col but I keep getting syntax errors. Instead of using
lowp vec4 col = texture2D(texture,vTexCoord)* vColor; ``` I want to uselowp col = vec4(1,1,1,1); ``` Or something to the same effect
@Coder - you left out “vec4” on the left hand side in your version
@Igntaz I tried using
lowp vec4 col = vec4(1,1,1,1); ``` But it just says that col hasn't been declared
@Coder - I assume you remembered the semi-colon on the end of the line?
@Ignatz yes sorry i forgot to put that in my post
Try
lowp vec4 col = vec4(1.,1.,1.,1.);
In the shader code then there’s no automatic conversion between floats and ints, so 1 and 1. are different.
Thanks it works now