[Impeller] opt all vertex shader position/uvs into highp (flutter/engine#42746)
Fixes https://github.com/flutter/flutter/issues/128605 f16 doesn't have enough resolution at large pixel values to be safely used for positions. Opt all shaders into highp. I think we might be able to get away with mediump for uv since values from 0-1 should have plenty of precisision, but we can worry about that later.
This commit is contained in:
@@ -12,12 +12,12 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 vertices;
|
||||
in vec2 dst_texture_coords;
|
||||
in vec2 src_texture_coords;
|
||||
in highp vec2 vertices;
|
||||
in highp vec2 dst_texture_coords;
|
||||
in highp vec2 src_texture_coords;
|
||||
|
||||
out vec2 v_dst_texture_coords;
|
||||
out vec2 v_src_texture_coords;
|
||||
out highp vec2 v_dst_texture_coords;
|
||||
out highp vec2 v_src_texture_coords;
|
||||
|
||||
void main() {
|
||||
gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0);
|
||||
|
||||
@@ -11,10 +11,10 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 vertices;
|
||||
in vec2 texture_coords;
|
||||
in highp vec2 vertices;
|
||||
in highp vec2 texture_coords;
|
||||
|
||||
out vec2 v_texture_coords;
|
||||
out highp vec2 v_texture_coords;
|
||||
|
||||
void main() {
|
||||
gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0);
|
||||
|
||||
@@ -11,7 +11,7 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
in highp vec2 texture_coords;
|
||||
|
||||
out highp vec2 v_texture_coords;
|
||||
|
||||
@@ -11,7 +11,7 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
|
||||
out highp vec2 v_texture_coords;
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 vertices;
|
||||
in vec2 texture_coords;
|
||||
in vec2 src_texture_coords;
|
||||
in highp vec2 vertices;
|
||||
in highp vec2 texture_coords;
|
||||
in highp vec2 src_texture_coords;
|
||||
|
||||
out vec2 v_texture_coords;
|
||||
out vec2 v_src_texture_coords;
|
||||
out highp vec2 v_texture_coords;
|
||||
out highp vec2 v_src_texture_coords;
|
||||
|
||||
void main() {
|
||||
gl_Position = frame_info.mvp * vec4(vertices, 0.0, 1.0);
|
||||
|
||||
@@ -20,9 +20,9 @@ in vec4 atlas_glyph_bounds;
|
||||
in vec4 glyph_bounds;
|
||||
|
||||
in vec2 unit_position;
|
||||
in vec2 glyph_position;
|
||||
in highp vec2 glyph_position;
|
||||
|
||||
out vec2 v_uv;
|
||||
out highp vec2 v_uv;
|
||||
|
||||
mat4 basis(mat4 m) {
|
||||
return mat4(m[0][0], m[0][1], m[0][2], 0.0, //
|
||||
|
||||
@@ -11,9 +11,9 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
|
||||
out vec2 v_position;
|
||||
out highp vec2 v_position;
|
||||
|
||||
void main() {
|
||||
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
|
||||
|
||||
@@ -11,7 +11,7 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
|
||||
out highp vec2 v_texture_coords;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
in vec4 color;
|
||||
|
||||
out vec4 v_color;
|
||||
|
||||
@@ -9,9 +9,9 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
|
||||
out vec2 v_position;
|
||||
out highp vec2 v_position;
|
||||
|
||||
void main() {
|
||||
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
|
||||
|
||||
@@ -9,7 +9,7 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
|
||||
void main() {
|
||||
gl_Position = frame_info.mvp * vec4(position, 0.0, 1.0);
|
||||
|
||||
@@ -11,7 +11,7 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
|
||||
out highp vec2 v_texture_coords;
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ uniform FrameInfo {
|
||||
}
|
||||
frame_info;
|
||||
|
||||
in vec2 position;
|
||||
in highp vec2 position;
|
||||
|
||||
out highp vec2 v_texture_coords;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user