New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next gen UI #1494
Next gen UI #1494
Conversation
We only have a single screen, and a single shader
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.
No ios directory?
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.
The shaders have unused uniforms which is causing runtime problems with impeller. I'd recommend cleaning those up
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
Co-authored-by: Jonah Williams <jonahwilliams@google.com>
This doesn't currently run on simulators because it has too many bindings. |
I can no longer find the right line of code to comment on, feel free to address after landing. To make this work on iOS simulators: --- a/next-gen-ui/final/assets/shaders/orb_shader.frag
+++ b/next-gen-ui/final/assets/shaders/orb_shader.frag
@@ -13,11 +13,12 @@ precision highp float;
#define RAY_STEPS 30
uniform vec2 uResolution;
-uniform float uTime;
-uniform vec2 uMouse;
-uniform float uExposure;
-uniform float uFov;
-uniform float uRoughness;
+uniform vec4 uPackedData;
+float uTime = uPackedData[0];
+float uExposure = uPackedData[1];
+float uFov = uPackedData[2];
+float uRoughness = uPackedData[3];
+ |
Replace the guts of the litimage with the following, essentially removing the color filter. @override
Widget build(BuildContext context) {
final hsl = HSLColor.fromColor(color);
return Image.asset(imgSrc, color: hsl.withLightness(hsl.lightness * energy).toColor(), colorBlendMode: BlendMode.modulate);
} |
Another issue: almost all of these images are too big when running on a iPhone 13:
|
like waaaay too big |
Images will get shrunk to a width of 2080 |
You could use the resize image API to do it at runtime, but I'd also recommend adding 1x 2x 3x variants if possible? |
PTAL @jonahwilliams, I've added the Android and iOS runners, and turned on Impeller for iOS. It runs in the iPad simulator on my machine, with the modifications you suggested to the orb shader |
PTAL @RedBrogdon @craiglabenz, I'd love an LGTM so I can land this =) |
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.
LGTM
First cut at steps. Some of these steps are massive, but I need help in figuring out sane sub-steps.
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-devrel channel on Discord.