Invalid types when documentation says it should be valid

Godot Version

4.7.1(also tested in 4.7.2 and 4.8 beta 1)

Question

Hello!
I’m writing a shader, and I’m getting an error when trying to raise a vec3 to a power of float.
Smallest reproducible is to write this in a shader:
vec3 color = pow(vec3(1.0), 2.0);

This line then throws the error:
“Error at line XX: Invalid arguments for the built-in function: “pow(vec3,float)”.”

However, when I look at the documentation for pow both in the Godot refs and the accompanying GLSL docs, both of them claim that vec3 and float are valid types for both parameters in the pow function. So I’m not sure what’s going on here. Have I misunderstood something, or is this perhaps a bug?

It’s a documentation issue. Built-in functions in GLSL don’t accept mixing different component wise parameters. They have to have the same components. Here’s the issue