It looks like you're new here. If you want to get involved, click one of these buttons!
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 use
lowp 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.
1
1.
Thanks it works now
Comments
@Coder - you left out "vec4" on the left hand side in your version
@Igntaz I tried using
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
In the shader code then there's no automatic conversion between floats and ints, so
1
and1.
are different.Thanks it works now