I have this defined outside of any functions in a shader.
I get the error Expected initialization of constant
const vec2 rels[4] = {
vec2(-1.0, 0.0),
vec2(1.0, 0.0),
vec2(0.0, -1.0),
vec2(0.0, 1.0)
};
But in the godot documentation I can see it shows initializing an array of vec2
in a function scope and a const array of scalars in the global scope.
Is it possible that initializing an array of vec2
in the global scope is not supported?