Hi,
As a SpriteKit user, i'm aware that it relies on openGL ES and that there is no mechanism for initializing arrays at declaration time from within a shader.
However, this piece of code compiles and behaves as expected in my fragment shader :
__constant float tiny[8] = {52,48,16,20,6,2,35,39};
void main() {
//Using tiny array
}
1. Is this a documented feature ? Can i use it safely in production code across iOS devices ?
2. If yes, is there a possibility to handle multidimensional array as well ?
Cheers !