forked from AuroraMiddleware/gtk
gradient shaders: Reduce out values as well
We only do 6 color stops here now. Also works around a driver bug. Fixes #3196
This commit is contained in:
parent
67c6f0a08a
commit
982ebf1b69
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user