-
Notifications
You must be signed in to change notification settings - Fork 6k
[dart:ui] add documentation to FragmentShader setSampler/setFloat #37503
Conversation
lib/ui/painting.dart
Outdated
/// | ||
/// ```glsl | ||
/// uniform float uScale; | ||
/// uniform int uPitch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not confident that int (or bool?) uniforms are properly supported yet. We'd at least want setInt()
and setBool()
methods, so that folks don't have to set int and bool uniforms using setFloat()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They seem to "work" on skia, I'll dig into this a bit more for impeller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah this doesn't work when setting fields when we compiler for impellerc. I'll update this to leave them out for now.
…115200) * b57e45ea5 [dart:ui] add documentation to FragmentShader setSampler/setFloat (flutter/engine#37503) * 4b559e6d8 Roll Skia from a727f7ac8a98 to b126902e7988 (1 revision) (flutter/engine#37547) * e3b3950f0 Revert "[dart:ui] add documentation to FragmentShader setSampler/setFloat (#37503)" (flutter/engine#37549)
…utter#37503) * [dart:ui] add documentation to FragmentShader setSampler/setFloat * remove int bool comments
…loat (flutter#37503)" (flutter#37549) This reverts commit b57e45e.
…lutter#115200) * b57e45ea5 [dart:ui] add documentation to FragmentShader setSampler/setFloat (flutter/engine#37503) * 4b559e6d8 Roll Skia from a727f7ac8a98 to b126902e7988 (1 revision) (flutter/engine#37547) * e3b3950f0 Revert "[dart:ui] add documentation to FragmentShader setSampler/setFloat (flutter#37503)" (flutter/engine#37549)
…lutter#115200) * b57e45ea5 [dart:ui] add documentation to FragmentShader setSampler/setFloat (flutter/engine#37503) * 4b559e6d8 Roll Skia from a727f7ac8a98 to b126902e7988 (1 revision) (flutter/engine#37547) * e3b3950f0 Revert "[dart:ui] add documentation to FragmentShader setSampler/setFloat (flutter#37503)" (flutter/engine#37549)
Its a bit confusing how the sampler/float index exactly maps to the order of uniforms in the shader program. Add some API docs to attempt to explain this, along with a code snippet.