[gtk/matthiasc/for-master] gradient shaders: Reduce out values as well
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] gradient shaders: Reduce out values as well
- Date: Tue, 6 Oct 2020 00:35:59 +0000 (UTC)
commit 982ebf1b696f006a5a309b9a45e705c1f74bde2d
Author: Timm Bäder <mail baedert org>
Date: Sat Sep 26 08:43:36 2020 +0200
gradient shaders: Reduce out values as well
We only do 6 color stops here now. Also works around a driver bug.
Fixes #3196
gsk/resources/glsl/linear_gradient.glsl | 8 ++++----
gsk/resources/glsl/radial_gradient.glsl | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gsk/resources/glsl/linear_gradient.glsl b/gsk/resources/glsl/linear_gradient.glsl
index 180955ee75..588d9ec744 100644
--- a/gsk/resources/glsl/linear_gradient.glsl
+++ b/gsk/resources/glsl/linear_gradient.glsl
@@ -9,8 +9,8 @@ _OUT_ vec2 endPoint;
_OUT_ float maxDist;
_OUT_ vec2 gradient;
_OUT_ float gradientLength;
-_OUT_ vec4 color_stops[8];
-_OUT_ float color_offsets[8];
+_OUT_ vec4 color_stops[6];
+_OUT_ float color_offsets[6];
void main() {
gl_Position = u_projection * u_modelview * vec4(aPosition, 0.0, 1.0);
@@ -44,8 +44,8 @@ _IN_ vec2 endPoint;
_IN_ float maxDist;
_IN_ vec2 gradient;
_IN_ float gradientLength;
-_IN_ vec4 color_stops[8];
-_IN_ float color_offsets[8];
+_IN_ vec4 color_stops[6];
+_IN_ float color_offsets[6];
void main() {
// Position relative to startPoint
diff --git a/gsk/resources/glsl/radial_gradient.glsl b/gsk/resources/glsl/radial_gradient.glsl
index 97ee2c31f5..178806f83c 100644
--- a/gsk/resources/glsl/radial_gradient.glsl
+++ b/gsk/resources/glsl/radial_gradient.glsl
@@ -7,8 +7,8 @@ uniform vec2 u_radius;
uniform vec2 u_center;
_OUT_ vec2 center;
-_OUT_ vec4 color_stops[8];
-_OUT_ float color_offsets[8];
+_OUT_ vec4 color_stops[6];
+_OUT_ float color_offsets[6];
_OUT_ float start;
_OUT_ float end;
@@ -39,8 +39,8 @@ uniform vec2 u_radius;
uniform float u_end;
_IN_ vec2 center;
-_IN_ vec4 color_stops[8];
-_IN_ float color_offsets[8];
+_IN_ vec4 color_stops[6];
+_IN_ float color_offsets[6];
_IN_ float start;
_IN_ float end;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]