forge
Explore
Log in

Don't you dare go Hollow

Change resize shader geo size to logical pixels

Browse files at this commit

609b1a02d06df7e71f8eb5cf76790469754b2aa2Ivan MolodetskikhParent: 5335ef4
Consistent with the others.
src/render_helpers/resize.rsmodified+1 -4
@@ -78,10 +78,7 @@ impl ResizeRenderElement {
7878 let geo_to_tex_next = Mat3::from_translation(-tex_next_geo_loc / tex_next_geo_size)
7979 * Mat3::from_scale(size_next / tex_next_geo_size * scale);
8080
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);
8582 let clip_to_geometry = if clip_to_geometry { 1. } else { 0. };
8683
8784 // 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) {
2828 // expect and handle coordinates outside the [0, 1] range. The area will be
2929 // large enough to accomodate a crossfade effect.
3030 //
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.
3232 //
3333 // It is homogeneous (the Z component is equal to 1).
3434 //