Change resize shader geo size to logical pixels
Browse files at this commit609b1a02d06df7e71f8eb5cf76790469754b2aa2Parent: 5335ef42 changed files +2 -5
src/render_helpers/resize.rsmodified+1 -4
| @@ -78,10 +78,7 @@ impl ResizeRenderElement { | ||
| 78 | 78 | let geo_to_tex_next = Mat3::from_translation(-tex_next_geo_loc / tex_next_geo_size) |
| 79 | 79 | * Mat3::from_scale(size_next / tex_next_geo_size * scale); |
| 80 | 80 | |
| 81 | - let curr_geo_size = curr_geo_size * scale; | |
| 82 | - let corner_radius = corner_radius | |
| 83 | - .scaled_by(scale.x) | |
| 84 | - .fit_to(curr_geo_size.x, curr_geo_size.y); | |
| 81 | + let corner_radius = corner_radius.fit_to(curr_geo_size.x, curr_geo_size.y); | |
| 85 | 82 | let clip_to_geometry = if clip_to_geometry { 1. } else { 0. }; |
| 86 | 83 | |
| 87 | 84 | // Create the shader. |
wiki/examples/resize_custom_shader.fragmodified+1 -1
| @@ -28,7 +28,7 @@ vec4 resize_color(vec3 coords_curr_geo, vec3 size_curr_geo) { | ||
| 28 | 28 | // expect and handle coordinates outside the [0, 1] range. The area will be |
| 29 | 29 | // large enough to accomodate a crossfade effect. |
| 30 | 30 | // |
| 31 | -// * size_curr_geo: size of the current window geometry in physical pixels. | |
| 31 | +// * size_curr_geo: size of the current window geometry in logical pixels. | |
| 32 | 32 | // |
| 33 | 33 | // It is homogeneous (the Z component is equal to 1). |
| 34 | 34 | // |