[gtk+/wip/baedert/gl: 61/90] gl renderer: Fix inset shadow offset calculation
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/baedert/gl: 61/90] gl renderer: Fix inset shadow offset calculation
- Date: Fri, 8 Dec 2017 20:15:00 +0000 (UTC)
commit a337ef1dd93fcd3f1e9a9455df46ce7d69c05142
Author: Timm Bäder <mail baedert org>
Date: Fri Dec 1 08:32:00 2017 +0100
gl renderer: Fix inset shadow offset calculation
gsk/resources/glsl/inset_shadow.fs.glsl | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/resources/glsl/inset_shadow.fs.glsl b/gsk/resources/glsl/inset_shadow.fs.glsl
index 4337dac..b6bb87c 100644
--- a/gsk/resources/glsl/inset_shadow.fs.glsl
+++ b/gsk/resources/glsl/inset_shadow.fs.glsl
@@ -18,10 +18,10 @@ void main() {
RoundedRect inside = rounded_rect_shrink(outline, vec4(u_spread));
-
+ vec2 offset = vec2(u_offset.x, - u_offset.y);
vec4 color = vec4(u_color.rgb * u_color.a, u_color.a);
color = color * clamp (rounded_rect_coverage (outline, f.xy) -
- rounded_rect_coverage (inside, f.xy + u_offset),
+ rounded_rect_coverage (inside, f.xy - offset),
0.0, 1.0);
setOutputColor(color);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]