mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 17:50:10 +00:00
gpu: Don't run long loops in shaders
If the border radius is too big, take bigger steps when computing the shadow. I randomly chose 8 because that looked good and was fast enough.
This commit is contained in:
parent
e216fa3b6d
commit
5e7f227d92
@ -112,7 +112,7 @@ blur_corner (vec2 p,
|
||||
return 0.0;
|
||||
|
||||
float result = 0.0;
|
||||
float step = 1.0;
|
||||
float step = max (1.0, r.y / 8.0);
|
||||
for (float y = 0.5 * step; y <= r.y; y += step)
|
||||
{
|
||||
float x = r.x - ellipse_x (r, r.y - y);
|
||||
|
Loading…
Reference in New Issue
Block a user