Vague error (vec3 cannot be assigned to variable of type vec4) in fragment program

When I have an error:

ERROR:GRAPHICS: 0:52(4): error: initializer of type vec3 cannot be assigned to variable of type vec4
0:65(16): error: vector size mismatch for arithmetic operator
0:66(39): warning: `show' used uninitialized

I know is pointing out the some value of type vec3 is involved in operation with value of type vec4 (assignment), but I don’t know which particular line in fragment program it depends and because I have pretty big fp now it’s hard to find it. 0:52(4): is in no way related to lines in fragment program, hence I always have problems finding out the exact reason.

Hence a question - could the message point to a line in fragment program?

1 Like

Yeah that’s a bit broken I’m afraid, since we do a bunch of transformations of the shader code so you might be getting errors that are not matching the input shader. I would suggest looking in the built shader in the build folder

3 Likes