diff options
author | Timm Bäder <mail@baedert.org> | 2020-09-26 08:43:36 +0200 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-10-05 20:35:34 -0400 |
commit | 982ebf1b696f006a5a309b9a45e705c1f74bde2d (patch) | |
tree | 2890ae02404862443223c532d5477b777bb3cb56 /gsk | |
parent | 67c6f0a08ada30580accfc1aab28a3feb9340076 (diff) | |
download | gtk+-982ebf1b696f006a5a309b9a45e705c1f74bde2d.tar.gz |
gradient shaders: Reduce out values as well
We only do 6 color stops here now. Also works around a driver bug.
Fixes #3196
Diffstat (limited to 'gsk')
-rw-r--r-- | gsk/resources/glsl/linear_gradient.glsl | 8 | ||||
-rw-r--r-- | 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; |