ERROR: 0:17:'f' : syntax error parse error

I get the follwing error when I tried to compile .vert file.


ERROR: 0:17:'f' : syntax error parse error

The code is shown as follws.


#version 110

uniform mat4 projection_matrix;
uniform mat4 modelview_matrix;
uniform mat3 normal_matrix;

attribute vec3 a_Vertex;
attribute vec2 a_TexCoord0;

varying vec4 color;
varying vec2 texCoord0;

void main(void) 
{
	vec4 pos = modelview_matrix * vec4(a_Vertex, 1.0);
	
	color = vec4(0.8f, 0.8f, 1.0f, 0.95f);
	texCoord0 = a_TexCoord0;
	gl_Position = projection_matrix * pos;	
}

I had worked with it for a long time and still cannot find the solution.
Can someone figure out if there is anything wrong?

f as a suffix isn’t valid in glsl before version 1.2. From version 4.0 onwards, you can also use lf or LF to specify a double.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.