Open HeGanjie opened 3 years ago
Reverting #591
The automated tests missed this issue.
Ran into the same issue.
Doesn't work:
shader: uniform float myArray[2];
command: "myArray[0]": 0.5,
Works:
shader: uniform vec2 myArray[2];
command: "myArray[0]": [0.5, 0.0],
are there any known work-arounds / proposals? I have a project that uses float arrays, the arrays are unknown lengths so the manual unwrap doesn't work well
I use:
uniform float values[32] // max 32 values
uniform int count //pass in the length, I have logic so it only reads the first count values
and would love to just pass uniforms like:
{
values: [0.0, 1.1, 2.2, 3.3]
count: 4
}
Step
index.html
in chrome.Result
Expected
Correctly handle array uniforms.