From 6438d12a32441d1714d71fdb335d4e12b4d20bb4 Mon Sep 17 00:00:00 2001 From: Jonah Williams Date: Tue, 22 Nov 2022 10:27:31 -0800 Subject: [PATCH] [Impeller] opt float/sampler into relaxed precision for gles (flutter/engine#37828) * [Impeller] opt float/sampler into relaxed precision for gles * re-arrange define --- .../compiler/shader_lib/impeller/types.glsl | 15 +++++++++++++++ .../impeller/entity/shaders/atlas_fill.frag | 1 + .../impeller/entity/shaders/atlas_fill.vert | 2 ++ .../entity/shaders/blending/advanced_blend.glsl | 1 + .../entity/shaders/blending/advanced_blend.vert | 2 ++ .../impeller/entity/shaders/blending/blend.frag | 1 + .../impeller/entity/shaders/blending/blend.vert | 2 ++ .../impeller/entity/shaders/border_mask_blur.frag | 1 + .../impeller/entity/shaders/border_mask_blur.vert | 2 ++ .../entity/shaders/color_matrix_color_filter.frag | 1 + .../entity/shaders/color_matrix_color_filter.vert | 2 ++ .../impeller/entity/shaders/gaussian_blur.frag | 1 + .../impeller/entity/shaders/gaussian_blur.vert | 2 ++ .../impeller/entity/shaders/glyph_atlas.frag | 2 ++ .../impeller/entity/shaders/glyph_atlas.vert | 1 + .../impeller/entity/shaders/glyph_atlas_sdf.frag | 2 ++ .../impeller/entity/shaders/glyph_atlas_sdf.vert | 2 ++ .../impeller/entity/shaders/gradient_fill.vert | 1 + .../entity/shaders/linear_gradient_fill.frag | 1 + .../entity/shaders/linear_gradient_ssbo_fill.frag | 1 + .../entity/shaders/linear_to_srgb_filter.frag | 1 + .../entity/shaders/linear_to_srgb_filter.vert | 2 ++ .../entity/shaders/morphology_filter.frag | 1 + .../entity/shaders/morphology_filter.vert | 2 ++ .../flutter/impeller/entity/shaders/position.vert | 1 + .../impeller/entity/shaders/position_color.vert | 1 + .../impeller/entity/shaders/position_uv.vert | 1 + .../entity/shaders/radial_gradient_fill.frag | 1 + .../entity/shaders/radial_gradient_ssbo_fill.frag | 1 + .../impeller/entity/shaders/rrect_blur.frag | 1 + .../impeller/entity/shaders/rrect_blur.vert | 2 ++ .../impeller/entity/shaders/runtime_effect.vert | 2 ++ .../impeller/entity/shaders/solid_fill.frag | 2 ++ .../impeller/entity/shaders/solid_fill.vert | 2 ++ .../entity/shaders/srgb_to_linear_filter.frag | 2 ++ .../entity/shaders/srgb_to_linear_filter.vert | 2 ++ .../entity/shaders/sweep_gradient_fill.frag | 1 + .../entity/shaders/sweep_gradient_ssbo_fill.frag | 1 + .../impeller/entity/shaders/texture_fill.frag | 1 + .../impeller/entity/shaders/texture_fill.vert | 2 ++ .../entity/shaders/tiled_texture_fill.frag | 1 + .../entity/shaders/tiled_texture_fill.vert | 1 + .../flutter/impeller/entity/shaders/vertices.frag | 2 ++ .../entity/shaders/yuv_to_rgb_filter.frag | 1 + .../entity/shaders/yuv_to_rgb_filter.vert | 2 ++ 45 files changed, 79 insertions(+) diff --git a/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl b/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl index d896c5e606..87c7eee666 100644 --- a/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl +++ b/engine/src/flutter/impeller/compiler/shader_lib/impeller/types.glsl @@ -5,6 +5,21 @@ #ifndef TYPES_GLSL_ #define TYPES_GLSL_ +#extension GL_AMD_gpu_shader_half_float : enable + +#ifndef IMPELLER_TARGET_METAL + +precision mediump sampler2D; +precision mediump float; + +#define float16_t float +#define f16vec2 vec2 +#define f16vec3 vec3 +#define f16vec4 vec4 +#define f16mat4 mat4 + +#endif // IMPELLER_TARGET_METAL + #define BoolF float #define BoolV2 vec2 #define BoolV3 vec3 diff --git a/engine/src/flutter/impeller/entity/shaders/atlas_fill.frag b/engine/src/flutter/impeller/entity/shaders/atlas_fill.frag index e211971ca1..4862343926 100644 --- a/engine/src/flutter/impeller/entity/shaders/atlas_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/atlas_fill.frag @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform sampler2D texture_sampler; diff --git a/engine/src/flutter/impeller/entity/shaders/atlas_fill.vert b/engine/src/flutter/impeller/entity/shaders/atlas_fill.vert index 29d3c0a5be..6140ad9878 100644 --- a/engine/src/flutter/impeller/entity/shaders/atlas_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/atlas_fill.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform VertInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl index a2b1650f90..4fd47b059c 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.glsl @@ -5,6 +5,7 @@ #include #include #include +#include uniform BlendInfo { float dst_input_alpha; diff --git a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.vert b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.vert index 715dd3dead..cc72aeae97 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.vert +++ b/engine/src/flutter/impeller/entity/shaders/blending/advanced_blend.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/blending/blend.frag b/engine/src/flutter/impeller/entity/shaders/blending/blend.frag index 468a9bb67f..af401a151d 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/blend.frag +++ b/engine/src/flutter/impeller/entity/shaders/blending/blend.frag @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform sampler2D texture_sampler_src; diff --git a/engine/src/flutter/impeller/entity/shaders/blending/blend.vert b/engine/src/flutter/impeller/entity/shaders/blending/blend.vert index 36bea41e39..3b4a4bd430 100644 --- a/engine/src/flutter/impeller/entity/shaders/blending/blend.vert +++ b/engine/src/flutter/impeller/entity/shaders/blending/blend.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/border_mask_blur.frag b/engine/src/flutter/impeller/entity/shaders/border_mask_blur.frag index 85da0df8cd..a7652e5623 100644 --- a/engine/src/flutter/impeller/entity/shaders/border_mask_blur.frag +++ b/engine/src/flutter/impeller/entity/shaders/border_mask_blur.frag @@ -4,6 +4,7 @@ #include #include +#include // Constant time mask blur for image borders. // diff --git a/engine/src/flutter/impeller/entity/shaders/border_mask_blur.vert b/engine/src/flutter/impeller/entity/shaders/border_mask_blur.vert index 3851a60aeb..47a4d03e59 100644 --- a/engine/src/flutter/impeller/entity/shaders/border_mask_blur.vert +++ b/engine/src/flutter/impeller/entity/shaders/border_mask_blur.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; diff --git a/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.frag b/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.frag index c021a93604..e169f476b7 100644 --- a/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.frag +++ b/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.frag @@ -4,6 +4,7 @@ #include #include +#include // A color filter that transforms colors through a 4x5 color matrix. // diff --git a/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.vert b/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.vert index 29b0128258..27b8ecedbf 100644 --- a/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.vert +++ b/engine/src/flutter/impeller/entity/shaders/color_matrix_color_filter.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/gaussian_blur.frag b/engine/src/flutter/impeller/entity/shaders/gaussian_blur.frag index 06bd0f389f..b831baa6f8 100644 --- a/engine/src/flutter/impeller/entity/shaders/gaussian_blur.frag +++ b/engine/src/flutter/impeller/entity/shaders/gaussian_blur.frag @@ -16,6 +16,7 @@ #include #include #include +#include uniform sampler2D texture_sampler; uniform sampler2D alpha_mask_sampler; diff --git a/engine/src/flutter/impeller/entity/shaders/gaussian_blur.vert b/engine/src/flutter/impeller/entity/shaders/gaussian_blur.vert index 0fd3595a2d..1fac06eb05 100644 --- a/engine/src/flutter/impeller/entity/shaders/gaussian_blur.vert +++ b/engine/src/flutter/impeller/entity/shaders/gaussian_blur.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag index 4c9175bd9b..007748704f 100644 --- a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag +++ b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.frag @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform sampler2D glyph_atlas_sampler; uniform FragInfo { diff --git a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert index 365fc72b13..bd527655c8 100644 --- a/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert +++ b/engine/src/flutter/impeller/entity/shaders/glyph_atlas.vert @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform FrameInfo { mat4 mvp; diff --git a/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.frag b/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.frag index 9947566d15..0ded6865c6 100644 --- a/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.frag +++ b/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.frag @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform sampler2D glyph_atlas_sampler; uniform FragInfo { diff --git a/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.vert b/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.vert index cfbb2d353e..4f6b62d059 100644 --- a/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.vert +++ b/engine/src/flutter/impeller/entity/shaders/glyph_atlas_sdf.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #include uniform FrameInfo { diff --git a/engine/src/flutter/impeller/entity/shaders/gradient_fill.vert b/engine/src/flutter/impeller/entity/shaders/gradient_fill.vert index 86f4d1e228..824f496ea8 100644 --- a/engine/src/flutter/impeller/entity/shaders/gradient_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/gradient_fill.vert @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform FrameInfo { mat4 mvp; diff --git a/engine/src/flutter/impeller/entity/shaders/linear_gradient_fill.frag b/engine/src/flutter/impeller/entity/shaders/linear_gradient_fill.frag index 0986cfa750..008d0a562e 100644 --- a/engine/src/flutter/impeller/entity/shaders/linear_gradient_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/linear_gradient_fill.frag @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform sampler2D texture_sampler; diff --git a/engine/src/flutter/impeller/entity/shaders/linear_gradient_ssbo_fill.frag b/engine/src/flutter/impeller/entity/shaders/linear_gradient_ssbo_fill.frag index 21041d7938..a2443ece8c 100644 --- a/engine/src/flutter/impeller/entity/shaders/linear_gradient_ssbo_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/linear_gradient_ssbo_fill.frag @@ -4,6 +4,7 @@ #include #include +#include readonly buffer ColorData { vec4 colors[]; diff --git a/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.frag b/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.frag index 0b2a68da12..0d6a99263d 100644 --- a/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.frag +++ b/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.frag @@ -4,6 +4,7 @@ #include #include +#include // A color filter that applies the sRGB gamma curve to the color. // diff --git a/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.vert b/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.vert index 29b0128258..27b8ecedbf 100644 --- a/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.vert +++ b/engine/src/flutter/impeller/entity/shaders/linear_to_srgb_filter.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/morphology_filter.frag b/engine/src/flutter/impeller/entity/shaders/morphology_filter.frag index 27fa447bae..dc80727a80 100644 --- a/engine/src/flutter/impeller/entity/shaders/morphology_filter.frag +++ b/engine/src/flutter/impeller/entity/shaders/morphology_filter.frag @@ -4,6 +4,7 @@ #include #include +#include // These values must correspond to the order of the items in the // 'FilterContents::MorphType' enum class. diff --git a/engine/src/flutter/impeller/entity/shaders/morphology_filter.vert b/engine/src/flutter/impeller/entity/shaders/morphology_filter.vert index c76f3b8a57..a504e7a9e2 100644 --- a/engine/src/flutter/impeller/entity/shaders/morphology_filter.vert +++ b/engine/src/flutter/impeller/entity/shaders/morphology_filter.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/position.vert b/engine/src/flutter/impeller/entity/shaders/position.vert index 0b21229bcc..048062f003 100644 --- a/engine/src/flutter/impeller/entity/shaders/position.vert +++ b/engine/src/flutter/impeller/entity/shaders/position.vert @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform VertInfo { mat4 mvp; diff --git a/engine/src/flutter/impeller/entity/shaders/position_color.vert b/engine/src/flutter/impeller/entity/shaders/position_color.vert index 6b4ef7f642..f36ded01e0 100644 --- a/engine/src/flutter/impeller/entity/shaders/position_color.vert +++ b/engine/src/flutter/impeller/entity/shaders/position_color.vert @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform VertInfo { mat4 mvp; diff --git a/engine/src/flutter/impeller/entity/shaders/position_uv.vert b/engine/src/flutter/impeller/entity/shaders/position_uv.vert index f60ec0dd64..e49949a801 100644 --- a/engine/src/flutter/impeller/entity/shaders/position_uv.vert +++ b/engine/src/flutter/impeller/entity/shaders/position_uv.vert @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform VertInfo { mat4 mvp; diff --git a/engine/src/flutter/impeller/entity/shaders/radial_gradient_fill.frag b/engine/src/flutter/impeller/entity/shaders/radial_gradient_fill.frag index 3414e8edc6..9d3a4d64bb 100644 --- a/engine/src/flutter/impeller/entity/shaders/radial_gradient_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/radial_gradient_fill.frag @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform sampler2D texture_sampler; diff --git a/engine/src/flutter/impeller/entity/shaders/radial_gradient_ssbo_fill.frag b/engine/src/flutter/impeller/entity/shaders/radial_gradient_ssbo_fill.frag index 9b129f661f..0b6496c0d7 100644 --- a/engine/src/flutter/impeller/entity/shaders/radial_gradient_ssbo_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/radial_gradient_ssbo_fill.frag @@ -4,6 +4,7 @@ #include #include +#include readonly buffer ColorData { vec4 colors[]; diff --git a/engine/src/flutter/impeller/entity/shaders/rrect_blur.frag b/engine/src/flutter/impeller/entity/shaders/rrect_blur.frag index bc400d0354..7a82a57805 100644 --- a/engine/src/flutter/impeller/entity/shaders/rrect_blur.frag +++ b/engine/src/flutter/impeller/entity/shaders/rrect_blur.frag @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform FragInfo { vec4 color; diff --git a/engine/src/flutter/impeller/entity/shaders/rrect_blur.vert b/engine/src/flutter/impeller/entity/shaders/rrect_blur.vert index 36711c6ede..8ada4365f4 100644 --- a/engine/src/flutter/impeller/entity/shaders/rrect_blur.vert +++ b/engine/src/flutter/impeller/entity/shaders/rrect_blur.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform VertInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/runtime_effect.vert b/engine/src/flutter/impeller/entity/shaders/runtime_effect.vert index 10a3cba465..bf69bf1ed6 100644 --- a/engine/src/flutter/impeller/entity/shaders/runtime_effect.vert +++ b/engine/src/flutter/impeller/entity/shaders/runtime_effect.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform VertInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/solid_fill.frag b/engine/src/flutter/impeller/entity/shaders/solid_fill.frag index 5d9c83604d..28c7776da9 100644 --- a/engine/src/flutter/impeller/entity/shaders/solid_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/solid_fill.frag @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FragInfo { vec4 color; } diff --git a/engine/src/flutter/impeller/entity/shaders/solid_fill.vert b/engine/src/flutter/impeller/entity/shaders/solid_fill.vert index 8fdc5b1ea3..3ced598627 100644 --- a/engine/src/flutter/impeller/entity/shaders/solid_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/solid_fill.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform VertInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.frag b/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.frag index 9e4f90e900..fcef8e99d5 100644 --- a/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.frag +++ b/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.frag @@ -8,6 +8,8 @@ // Creates a color filter that applies the inverse of the sRGB gamma curve // to the RGB channels. +#include + uniform sampler2D input_texture; uniform FragInfo { diff --git a/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.vert b/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.vert index 29b0128258..27b8ecedbf 100644 --- a/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.vert +++ b/engine/src/flutter/impeller/entity/shaders/srgb_to_linear_filter.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/sweep_gradient_fill.frag b/engine/src/flutter/impeller/entity/shaders/sweep_gradient_fill.frag index 30cc3ec8a3..47d70f023a 100644 --- a/engine/src/flutter/impeller/entity/shaders/sweep_gradient_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/sweep_gradient_fill.frag @@ -4,6 +4,7 @@ #include #include +#include uniform sampler2D texture_sampler; diff --git a/engine/src/flutter/impeller/entity/shaders/sweep_gradient_ssbo_fill.frag b/engine/src/flutter/impeller/entity/shaders/sweep_gradient_ssbo_fill.frag index 226a483c81..9fe30f94ad 100644 --- a/engine/src/flutter/impeller/entity/shaders/sweep_gradient_ssbo_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/sweep_gradient_ssbo_fill.frag @@ -5,6 +5,7 @@ #include #include #include +#include readonly buffer ColorData { vec4 colors[]; diff --git a/engine/src/flutter/impeller/entity/shaders/texture_fill.frag b/engine/src/flutter/impeller/entity/shaders/texture_fill.frag index 913cc7e1e8..9b8a8a6bab 100644 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/texture_fill.frag @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform sampler2D texture_sampler; diff --git a/engine/src/flutter/impeller/entity/shaders/texture_fill.vert b/engine/src/flutter/impeller/entity/shaders/texture_fill.vert index c8abc9aaab..212f9e288f 100644 --- a/engine/src/flutter/impeller/entity/shaders/texture_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/texture_fill.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform VertInfo { mat4 mvp; } diff --git a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag index 459742b768..2c3c4ea8ab 100644 --- a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag +++ b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.frag @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform sampler2D texture_sampler; diff --git a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.vert b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.vert index db73769940..dabcdf780b 100644 --- a/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.vert +++ b/engine/src/flutter/impeller/entity/shaders/tiled_texture_fill.vert @@ -3,6 +3,7 @@ // found in the LICENSE file. #include +#include uniform VertInfo { mat4 mvp; diff --git a/engine/src/flutter/impeller/entity/shaders/vertices.frag b/engine/src/flutter/impeller/entity/shaders/vertices.frag index ccad5b7d3e..c42e809ecc 100644 --- a/engine/src/flutter/impeller/entity/shaders/vertices.frag +++ b/engine/src/flutter/impeller/entity/shaders/vertices.frag @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + in vec4 v_color; out vec4 frag_color; diff --git a/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.frag b/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.frag index 73e416ce5b..d33e0d541b 100644 --- a/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.frag +++ b/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.frag @@ -4,6 +4,7 @@ #include #include +#include uniform sampler2D y_texture; uniform sampler2D uv_texture; diff --git a/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.vert b/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.vert index 29b0128258..27b8ecedbf 100644 --- a/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.vert +++ b/engine/src/flutter/impeller/entity/shaders/yuv_to_rgb_filter.vert @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + uniform FrameInfo { mat4 mvp; }