st-scroll-view-fade: Don't use return in the shader
Returing from main() makes llvmpipe unhappy (produces black output color), so rework the logic to avoid the return. https://bugzilla.gnome.org/show_bug.cgi?id=695607
This commit is contained in:
@ -50,10 +50,12 @@ void main ()
|
|||||||
float y = height * cogl_tex_coord_in[0].y;
|
float y = height * cogl_tex_coord_in[0].y;
|
||||||
float x = width * cogl_tex_coord_in[0].x;
|
float x = width * cogl_tex_coord_in[0].x;
|
||||||
|
|
||||||
if (x < fade_area[0][0] || x > fade_area[1][0] ||
|
/*
|
||||||
y < fade_area[0][1] || y > fade_area[1][1])
|
* We cannot just return here due to a bug in llvmpipe see:
|
||||||
return;
|
* https://bugzilla.freedesktop.org/show_bug.cgi?id=62357
|
||||||
|
*/
|
||||||
|
if (x > fade_area[0][0] && x < fade_area[1][0] &&
|
||||||
|
y > fade_area[0][1] && y < fade_area[1][1]) {
|
||||||
float ratio = 1.0;
|
float ratio = 1.0;
|
||||||
float fade_bottom_start = fade_area[1][1] - vfade_offset;
|
float fade_bottom_start = fade_area[1][1] - vfade_offset;
|
||||||
float fade_right_start = fade_area[1][0] - hfade_offset;
|
float fade_right_start = fade_area[1][0] - hfade_offset;
|
||||||
@ -82,3 +84,4 @@ void main ()
|
|||||||
|
|
||||||
cogl_color_out *= ratio;
|
cogl_color_out *= ratio;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user