mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
[Impeller] Fix names of texture coordinate inputs in color filter fragment shaders (flutter/engine#41131)
[Impeller] Fix names of texture coordinate inputs in color filter fragment shaders
This commit is contained in:
parent
a084108d8b
commit
fc85255c98
@ -16,13 +16,13 @@ uniform FragInfo {
|
||||
}
|
||||
frag_info;
|
||||
|
||||
in highp vec2 texture_coords;
|
||||
in highp vec2 v_texture_coords;
|
||||
|
||||
out f16vec4 frag_color;
|
||||
|
||||
void main() {
|
||||
f16vec4 input_color =
|
||||
texture(input_texture, texture_coords) * frag_info.input_alpha;
|
||||
texture(input_texture, v_texture_coords) * frag_info.input_alpha;
|
||||
|
||||
f16vec4 color = IPHalfUnpremultiply(input_color);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
||||
@ -16,12 +16,12 @@ uniform FragInfo {
|
||||
}
|
||||
frag_info;
|
||||
|
||||
in highp vec2 texture_coords;
|
||||
in highp vec2 v_texture_coords;
|
||||
out vec4 frag_color;
|
||||
|
||||
void main() {
|
||||
vec4 input_color =
|
||||
texture(input_texture, texture_coords) * frag_info.input_alpha;
|
||||
texture(input_texture, v_texture_coords) * frag_info.input_alpha;
|
||||
|
||||
vec4 color = IPUnpremultiply(input_color);
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
||||
@ -20,7 +20,7 @@ uniform FragInfo {
|
||||
}
|
||||
frag_info;
|
||||
|
||||
in highp vec2 texture_coords;
|
||||
in highp vec2 v_texture_coords;
|
||||
|
||||
out f16vec4 frag_color;
|
||||
|
||||
@ -31,7 +31,7 @@ void main() {
|
||||
yuv_offset.x = 16.0hf / 255.0hf;
|
||||
}
|
||||
|
||||
yuv.x = texture(y_texture, texture_coords).r;
|
||||
yuv.yz = texture(uv_texture, texture_coords).rg;
|
||||
yuv.x = texture(y_texture, v_texture_coords).r;
|
||||
yuv.yz = texture(uv_texture, v_texture_coords).rg;
|
||||
frag_color = f16mat4(frag_info.matrix) * f16vec4(yuv - yuv_offset, 1.0hf);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user