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

Commit

Permalink
[Impeller] Match position attribute name across runtime effect stages (
Browse files Browse the repository at this point in the history
  • Loading branch information
bdero authored Feb 16, 2023
1 parent 94e33ae commit bddfc1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions impeller/compiler/shader_lib/flutter/runtime_effect.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#if defined(IMPELLER_GRAPHICS_BACKEND)

// Note: The GLES backend uses name matching for attribute locations. This name
// must match the name of the attribute output in:
// impeller/entity/shaders/runtime_effect.vert
in vec2 _fragCoord;
vec2 FlutterFragCoord() {
return _fragCoord;
Expand Down
7 changes: 5 additions & 2 deletions impeller/entity/shaders/runtime_effect.vert
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ uniform VertInfo {
vert_info;

in vec2 position;
out vec2 v_position;
// Note: The GLES backend uses name matching for attribute locations. This name
// must match the name of the attribute input in:
// impeller/compiler/shader_lib/flutter/runtime_effect.glsl
out vec2 _fragCoord;

void main() {
gl_Position = vert_info.mvp * vec4(position, 0.0, 1.0);
v_position = position;
_fragCoord = position;
}

0 comments on commit bddfc1c

Please sign in to comment.