Fragment shader doesn't support indexing uniform array with int variable. #148577
Labels
engine
flutter/engine repository. See also e: labels.
P2
Important issues not at the top of the work list
team-engine
Owned by Engine team
triaged-engine
Triaged by Engine team
Steps to reproduce
Bellow is the content of image_processor.frag:
It works as expected. But if I change only a single:
rgb.x = rgb.x * curves[0];
-->rgb.x = rgb.x * curves[idx];
Instead of indexing uniform array with 0, I index it with variable idx, which is equal to 0 too - it fails to load the shader with
"RuntimeEffect error" here:
var program = await FragmentProgram.fromAsset('shaders/image_processor.frag');
So it isn't possible to index uniform array with a variable - while I think this should be possible in GLSL.
Tried setting version 460 - doesn't work too.
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: