-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testse: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team
Description
Steps to reproduce
- Write code using getUniformFloat
- Build for vulkan
- Boom
Expected results
Not boom
Actual results
Uniform with the given name not found.
Code sample
Code sample
shader.getUniformFloat("uTime").set(1.0);// shaders/my_gradient.frag
#version 460 core
#include <flutter/runtime_effect.glsl>
uniform vec2 uSize; // The size of the area being drawn
uniform float uTime;
out vec4 fragColor;
uniform vec3 uColor;
void main() {
// FlutterFragCoord() gives the pixel coordinate.
// Divide by uSize to get normalized coordinates (uv) between 0.0 and 1.0.
vec2 uv = FlutterFragCoord().xy / uSize;
// Define two colors for the gradient.
vec4 color1 = vec4(1.0, 0.0, 0.0, 1.0); // Dark Blue
vec4 color2 = vec4(uColor, 1.0); // Orange/Red
fragColor = mix(color1, color2, sin(-uTime));
}Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]Flutter Doctor output
No
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testse: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.team-engineOwned by Engine teamOwned by Engine team