gl renderer: Grow unblurred outset shadow outline on the gpu

This commit is contained in:
Timm Bäder 2019-10-11 10:16:39 +02:00
parent 0b999c73d1
commit 2977e91aed
2 changed files with 3 additions and 4 deletions

View File

@ -1391,8 +1391,6 @@ render_unblurred_outset_shadow_node (GskGLRenderer *self,
GskRoundedRect r = *gsk_outset_shadow_node_peek_outline (node);
RenderOp *op;
gsk_rounded_rect_shrink (&r, -spread, -spread, -spread, -spread);
ops_set_program (builder, &self->unblurred_outset_shadow_program);
op = ops_begin (builder, OP_CHANGE_UNBLURRED_OUTSET_SHADOW);
rgba_to_float (gsk_outset_shadow_node_peek_color (node), op->unblurred_outset_shadow.color);

View File

@ -12,9 +12,10 @@ void main() {
f.x += u_viewport.x;
f.y = (u_viewport.y + u_viewport.w) - f.y;
RoundedRect outline = RoundedRect(vec4(u_outline.xy, u_outline.xy + u_outline.zw),
RoundedRect inside = RoundedRect(vec4(u_outline.xy, u_outline.xy + u_outline.zw),
u_corner_widths, u_corner_heights);
RoundedRect inside = rounded_rect_shrink(outline, vec4(u_spread));
RoundedRect outline = rounded_rect_shrink(inside, vec4(- u_spread));
vec2 offset = vec2(u_offset.x, - u_offset.y);
vec4 color = vec4(u_color.rgb * u_color.a, u_color.a);