Shader array declaration, how?
-
I am trying to declare an array but it doesn't work despite I am doing it the same way as in ShaderToy...
Should it be declared differently in Hise?const vec2 wandsSpeed[10] = vec2[10] ( vec2( 0.4657, 0.2149), vec2( 0.5536, 0.1345), vec2( 0.3457, -0.4645), vec2(-0.1473, -0.5532), vec2( 0.3632, 0.2387), vec2( 0.3891, 0.0344), vec2(-0.0321, 0.1032), vec2(-0.1358, -0.3682), vec2( 0.2634, 0.4276), vec2(-0.3541, 0.3025));
Gives me this:
I've also tried different variations of it with no luck, including C++ fashion
-
I might have found a reason, but the proposed alternative doesn't work either
https://stackoverflow.com/questions/28435438/how-to-write-const-array-in-glsl-es@Christoph-Hart what is the GLSL version in Hise?
Console.print(trace(myshader.getOpenGLStatistics())); // returns null
-
Finally got it to work
they have to be declared dynamically inside
main
(even if they are constant values or not) -
@ustk Update the documentation
-
-
@ustk Thanks! I apparently have the power to merge it, I have wielded the power!
-
@d-healey You're too fast, I'm not sure you should have more power
-
@d-healey Strangely the online doc hasn't been updated yet... Server cache refresh time perhaps?
-
@ustk Yeah I think there is some manual intervention required to regenerate the online doc, I do not have that much power... yet
-
This post is deleted! -
This post is deleted!