diff --git a/voxygen/src/render/texture.rs b/voxygen/src/render/texture.rs index 59d574a698..d9d166dd4c 100644 --- a/voxygen/src/render/texture.rs +++ b/voxygen/src/render/texture.rs @@ -81,7 +81,7 @@ impl Texture

{ tex, srv, sampler: factory.create_sampler(gfx::texture::SamplerInfo::new( - gfx::texture::FilterMethod::Bilinear, + gfx::texture::FilterMethod::Scale, gfx::texture::WrapMode::Clamp, )), _phantom: PhantomData, diff --git a/voxygen/src/ui/graphic/graphic.rs b/voxygen/src/ui/graphic/graphic.rs index f81e9d2f2f..b42216b36a 100644 --- a/voxygen/src/ui/graphic/graphic.rs +++ b/voxygen/src/ui/graphic/graphic.rs @@ -57,22 +57,21 @@ impl GraphicCache { { match self .rect_map - .get(&(graphic_id, dims, source.map(|e| e.to_bits()))) + .get(&(graphic_id, dims, source.map(|e| e.to_bits()))) //<-------- TODO: Replace this with rounded representation of source { - //<-------- TODO: Replace this with rounded representation of source Some(aabr) => Some(*aabr), None => match self.graphic_map.get(&graphic_id) { Some(graphic) => { // Allocate rectangle let aabr = match self .atlas - .allocate(size2(i32::from(dims.x + 2), i32::from(dims.y + 2))) + .allocate(size2(i32::from(dims.x), i32::from(dims.y))) { Some(Allocation { id, rectangle }) => { let (min, max) = (rectangle.min, rectangle.max); Aabr { - min: Vec2::new(min.x as u16 + 1, min.y as u16 + 1), - max: Vec2::new(max.x as u16 - 1, max.y as u16 - 1), + min: Vec2::new(min.x as u16, min.y as u16), + max: Vec2::new(max.x as u16, max.y as u16), } } // Out of room diff --git a/voxygen/src/ui/mod.rs b/voxygen/src/ui/mod.rs index 39fcbee6dc..f5cf7c4a07 100644 --- a/voxygen/src/ui/mod.rs +++ b/voxygen/src/ui/mod.rs @@ -584,7 +584,7 @@ impl Ui { self.scale.window_resized(new_dims, renderer); let (w, h) = self.scale.scaled_window_size().into_tuple(); self.ui.handle_event(Input::Resize(w, h)); - self.cache.clear_graphic_cache(renderer, new_dims.map(|e| (e * 4.0) as u16)); + self.cache.clear_graphic_cache(renderer, renderer.get_resolution().map(|e| e * 4)); // TODO: probably need to resize glyph cache, see conrod's gfx backend for reference } }