Line layer UBO improvements (#1946)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Alex Cristici
2023-12-12 19:32:20 +02:00
committed by GitHub
parent dda4e4043c
commit 9fbcb031f0
22 changed files with 214 additions and 163 deletions

View File

@@ -1,8 +1,7 @@
layout (std140) uniform LineUBO {
highp mat4 u_matrix;
highp vec2 u_units_to_pixels;
mediump float u_ratio;
lowp float pad0;
lowp float pad2, pad3, pad4;
};
layout (std140) uniform LinePropertiesUBO {
@@ -13,8 +12,8 @@ layout (std140) uniform LinePropertiesUBO {
lowp float u_offset;
mediump float u_width;
highp float pad1;
highp vec2 pad2;
highp float pad5;
highp vec2 pad6;
};
layout (std140) uniform LineInterpolationUBO {
@@ -25,7 +24,7 @@ layout (std140) uniform LineInterpolationUBO {
lowp float u_offset_t;
lowp float u_width_t;
highp vec2 pad3;
highp vec2 pad7;
};
in vec2 v_width2;

View File

@@ -9,11 +9,15 @@
layout (location = 0) in vec2 a_pos_normal;
layout (location = 1) in vec4 a_data;
layout (std140) uniform LineDynamicUBO {
highp vec2 u_units_to_pixels;
lowp float pad0, pad1;
};
layout (std140) uniform LineUBO {
highp mat4 u_matrix;
highp vec2 u_units_to_pixels;
mediump float u_ratio;
lowp float pad0;
lowp float pad2, pad3, pad4;
};
layout (std140) uniform LinePropertiesUBO {
@@ -24,8 +28,8 @@ layout (std140) uniform LinePropertiesUBO {
lowp float u_offset;
mediump float u_width;
highp float pad1;
highp vec2 pad2;
highp float pad5;
highp vec2 pad6;
};
layout (std140) uniform LineInterpolationUBO {
@@ -36,7 +40,7 @@ layout (std140) uniform LineInterpolationUBO {
lowp float u_offset_t;
lowp float u_width_t;
highp vec2 pad3;
highp vec2 pad7;
};
out vec2 v_normal;

View File

@@ -1,8 +1,7 @@
layout (std140) uniform LineGradientUBO {
highp mat4 u_matrix;
highp vec2 u_units_to_pixels;
mediump float u_ratio;
lowp float pad0;
lowp float pad2, pad3, pad4;
};
layout (std140) uniform LineGradientPropertiesUBO {
@@ -12,8 +11,8 @@ layout (std140) uniform LineGradientPropertiesUBO {
lowp float u_offset;
mediump float u_width;
highp float pad1;
highp vec2 pad2;
highp float pad5;
highp vec2 pad6;
};
layout (std140) uniform LineGradientInterpolationUBO {
@@ -23,8 +22,8 @@ layout (std140) uniform LineGradientInterpolationUBO {
lowp float u_offset_t;
lowp float u_width_t;
highp float pad3;
highp vec2 pad4;
highp float pad7;
highp vec2 pad8;
};
uniform sampler2D u_image;

View File

@@ -13,11 +13,15 @@
layout (location = 0) in vec2 a_pos_normal;
layout (location = 1) in vec4 a_data;
layout (std140) uniform LineDynamicUBO {
highp vec2 u_units_to_pixels;
lowp float pad0, pad1;
};
layout (std140) uniform LineGradientUBO {
highp mat4 u_matrix;
highp vec2 u_units_to_pixels;
mediump float u_ratio;
lowp float pad0;
lowp float pad2, pad3, pad4;
};
layout (std140) uniform LineGradientPropertiesUBO {
@@ -27,8 +31,8 @@ layout (std140) uniform LineGradientPropertiesUBO {
lowp float u_offset;
mediump float u_width;
highp float pad1;
highp vec2 pad2;
highp float pad5;
highp vec2 pad6;
};
layout (std140) uniform LineGradientInterpolationUBO {
@@ -38,8 +42,8 @@ layout (std140) uniform LineGradientInterpolationUBO {
lowp float u_offset_t;
lowp float u_width_t;
highp float pad3;
highp vec2 pad4;
highp float pad7;
highp vec2 pad8;
};
out vec2 v_normal;

View File

@@ -2,12 +2,8 @@ layout (std140) uniform LinePatternUBO {
highp mat4 u_matrix;
mediump vec4 u_scale;
highp vec2 u_texsize;
highp vec2 u_units_to_pixels;
mediump float u_ratio;
highp float u_fade;
lowp float pad0;
highp float pad1;
};
layout (std140) uniform LinePatternPropertiesUBO {

View File

@@ -13,16 +13,17 @@
layout (location = 0) in vec2 a_pos_normal;
layout (location = 1) in vec4 a_data;
layout (std140) uniform LineDynamicUBO {
highp vec2 u_units_to_pixels;
lowp float pad0, pad1;
};
layout (std140) uniform LinePatternUBO {
highp mat4 u_matrix;
mediump vec4 u_scale;
highp vec2 u_texsize;
highp vec2 u_units_to_pixels;
mediump float u_ratio;
highp float u_fade;
lowp float pad0;
highp float pad1;
};
layout (std140) uniform LinePatternPropertiesUBO {

View File

@@ -1,7 +1,6 @@
layout (std140) uniform LineSDFUBO {
highp mat4 u_matrix;
highp vec2 u_units_to_pixels;
highp vec2 u_patternscale_a;
highp vec2 u_patternscale_b;
mediump float u_ratio;
@@ -10,7 +9,7 @@ layout (std140) uniform LineSDFUBO {
highp float u_sdfgamma;
highp float u_mix;
lowp float pad0;
lowp float pad2, pad3, pad4;
};
layout (std140) uniform LineSDFPropertiesUBO {
@@ -22,7 +21,7 @@ layout (std140) uniform LineSDFPropertiesUBO {
mediump float u_width;
lowp float u_floorwidth;
highp vec2 pad1;
highp vec2 pad5;
};
layout (std140) uniform LineSDFInterpolationUBO {
@@ -34,7 +33,7 @@ layout (std140) uniform LineSDFInterpolationUBO {
lowp float u_width_t;
lowp float u_floorwidth_t;
highp float pad2;
highp float pad6;
};
uniform sampler2D u_image;

View File

@@ -13,9 +13,13 @@
layout (location = 0) in vec2 a_pos_normal;
layout (location = 1) in vec4 a_data;
layout (std140) uniform LineDynamicUBO {
highp vec2 u_units_to_pixels;
lowp float pad0, pad1;
};
layout (std140) uniform LineSDFUBO {
highp mat4 u_matrix;
highp vec2 u_units_to_pixels;
highp vec2 u_patternscale_a;
highp vec2 u_patternscale_b;
mediump float u_ratio;
@@ -23,8 +27,7 @@ layout (std140) uniform LineSDFUBO {
highp float u_tex_y_b;
highp float u_sdfgamma;
highp float u_mix;
lowp float pad0;
lowp float pad2, pad3, pad4;
};
layout (std140) uniform LineSDFPropertiesUBO {
@@ -36,7 +39,7 @@ layout (std140) uniform LineSDFPropertiesUBO {
mediump float u_width;
lowp float u_floorwidth;
highp vec2 pad1;
highp vec2 pad5;
};
layout (std140) uniform LineSDFInterpolationUBO {
@@ -48,7 +51,7 @@ layout (std140) uniform LineSDFInterpolationUBO {
lowp float u_width_t;
lowp float u_floorwidth_t;
highp float pad2;
highp float pad6;
};
out vec2 v_normal;