Sksl. How to work with arrays? #939
-
I'm very new at writing shaders, but I wonder how can we define a constant array within a shader? I'm writing a shader that requires a array symbolizing a pascal triangle's row, I can pass this one as a uniform uniform float[7] pascal; But this array will never change, I would like to create a constant array with these values as the ones you could find in glsl uniform float example;
const float[7] pascal = float[7](1.0, 6.0, 15.0, 20.0, 15.0, 6.0, 1.0); When i try to create an array as seen above errors and thrown, the most remarkable |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Arrays are not supported part of the Skia shading language, unfortunately. |
Beta Was this translation helpful? Give feedback.
Arrays are not supported part of the Skia shading language, unfortunately.