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

[Impeller] Match position attribute name across runtime effect stages #39552

Merged
merged 1 commit into from
Feb 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}