Hi everyone,

I’m quite new to GLSL so I don’t know how basic/stupid this question might be:

As I was trying some of the native GLSL functions, I run into what to me seems like a mathematical inconsistency (see the code example below). To be more precise, I’m getting two different results when using the pow() function vs “manually” multiplying the same value. Does this make sense to anyone, or am I missing something?

Thanks in advance,

B

```
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
void main(){
vec2 vUV = gl_FragCoord.xy / u_resolution;
vUV -= 0.5;
vUV *= 5.0;
float y = vUV.y;
vec3 color = vec3(pow(y, 3.0)); // w/ pow()
// color = vec3(y*y*y); // w/out pow()
gl_FragColor = vec4(color, 1.0);
}
```