[gtk/wip/baedert/for-master: 9/15] gl: Adjust blur radius_multiplier
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 9/15] gl: Adjust blur radius_multiplier
- Date: Mon, 17 Aug 2020 14:04:36 +0000 (UTC)
commit 9d45967b8f92cc156155447e1e2363ab9b1e8250
Author: Timm Bäder <mail baedert org>
Date: Fri Aug 7 06:43:06 2020 +0200
gl: Adjust blur radius_multiplier
2.0 Looks much closer to what my browser does.
Fixes #2777
gsk/gl/gskglrenderer.c | 6 +++---
gsk/resources/glsl/blur.glsl | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gsk/gl/gskglrenderer.c b/gsk/gl/gskglrenderer.c
index eb503ecdd5..9a4526faab 100644
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@ -1546,7 +1546,7 @@ blur_node (GskGLRenderer *self,
float *out_vertex_data[4]) /* min, max, min, max */
{
const float scale = ops_get_scale (builder);
- const float blur_extra = blur_radius * 3.0 / 2.0;
+ const float blur_extra = blur_radius * 2.0 / 2.0; /* 2.0 = shader radius_multiplier */
float texture_width, texture_height;
gboolean is_offscreen;
TextureRegion region;
@@ -1644,7 +1644,7 @@ render_inset_shadow_node (GskGLRenderer *self,
{
const float scale = ops_get_scale (builder);
const float blur_radius = gsk_inset_shadow_node_get_blur_radius (node);
- const float blur_extra = blur_radius * 3;
+ const float blur_extra = blur_radius * 2.0; /* 2.0 = shader radius_multiplier */
const float dx = gsk_inset_shadow_node_get_dx (node);
const float dy = gsk_inset_shadow_node_get_dy (node);
const GskRoundedRect *node_outline = gsk_inset_shadow_node_peek_outline (node);
@@ -1805,7 +1805,7 @@ render_outset_shadow_node (GskGLRenderer *self,
const GskRoundedRect *outline = gsk_outset_shadow_node_peek_outline (node);
const GdkRGBA *color = gsk_outset_shadow_node_peek_color (node);
const float blur_radius = gsk_outset_shadow_node_get_blur_radius (node);
- const float blur_extra = blur_radius * 3; /* 3 Because we use that in the shader as well */
+ const float blur_extra = blur_radius * 2.0f; /* 2.0 = shader radius_multiplier */
const int extra_blur_pixels = (int) ceilf(blur_extra / 2.0 * scale);
const float spread = gsk_outset_shadow_node_get_spread (node);
const float dx = gsk_outset_shadow_node_get_dx (node);
diff --git a/gsk/resources/glsl/blur.glsl b/gsk/resources/glsl/blur.glsl
index 93a31d6d95..055b95cbf7 100644
--- a/gsk/resources/glsl/blur.glsl
+++ b/gsk/resources/glsl/blur.glsl
@@ -8,7 +8,7 @@ _OUT_ float pixels_per_side;
_OUT_ vec3 initial_gaussian;
const float PI = 3.14159265;
-const float RADIUS_MULTIPLIER = 3.0;
+const float RADIUS_MULTIPLIER = 2.0;
void main() {
gl_Position = u_projection * u_modelview * vec4(aPosition, 0.0, 1.0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]