Hi,
I have the following fragment shader:
varying vec3 oNormal;
varying vec3 oVertexP;
uniform sampler2D color_texture;
void main()
{
float pi = 3.1415;
float x , y, z;
vec3 viewVec = normalize(oVertexP);
x = viewVec.x;
y = viewVec.y;
z = viewVec.z;
//Latitude-longitude
float u = 1.0 + (1.0/pi) * atan(x,-z); u /= 2.0;
float v = acos(y) / pi;
vec4 color = vec4( texture2D(color_texture, vec2(u,v)) );
gl_FragColor = vec4(pow(color.xyz * 5.0 ,1.0/2.1),1.0); //Tone mapping
//gl_FragColor = vec4(pow(max(gl_Color,0.0)*5.0,1.0/2.1),1.0);
//gl_FragColor = gl_Color;
}
and it works perfectly under windows, but now that I want to run my code under linux it gives me this error:
Error: undefined function 'pow'
Error: undefined function 'pow'
Error: Function 'vec4' not found (check argument types)
linking with uncompiled shader
OpenGL Error: invalid value
OpenGL Error: invalid operation
what do you think have caused the problem?