Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[dart:ui] add documentation to FragmentShader setSampler/setFloat #37503

Merged
merged 2 commits into from
Nov 12, 2022

Conversation

jonahwilliams
Copy link
Contributor

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.

///
/// ```glsl
/// uniform float uScale;
/// uniform int uPitch;
Copy link
Member

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().

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 12, 2022
@auto-submit auto-submit bot merged commit b57e45e into flutter:main Nov 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 12, 2022
jonahwilliams pushed a commit that referenced this pull request Nov 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 12, 2022
auto-submit bot pushed a commit that referenced this pull request Nov 12, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 12, 2022
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 12, 2022
…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)
schwa423 pushed a commit to schwa423/engine that referenced this pull request Nov 16, 2022
…utter#37503)

* [dart:ui] add documentation to FragmentShader setSampler/setFloat

* remove int bool comments
schwa423 pushed a commit to schwa423/engine that referenced this pull request Nov 16, 2022
shogohida pushed a commit to shogohida/flutter that referenced this pull request Dec 7, 2022
…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)
gspencergoog pushed a commit to gspencergoog/flutter that referenced this pull request Jan 19, 2023
…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)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants