diff --git a/voxygen/src/ui/graphic/renderer.rs b/voxygen/src/ui/graphic/renderer.rs index 52a3e70989..bb20ebbd11 100644 --- a/voxygen/src/ui/graphic/renderer.rs +++ b/voxygen/src/ui/graphic/renderer.rs @@ -1,6 +1,6 @@ use common::{ figure::Segment, - util::{linear_to_srgba, srgba_to_linear}, + util::{linear_to_srgba, srgb_to_linear}, vol::{IntoFullVolIterator, ReadVol, SizedVol, Vox}, }; use euc::{buffer::Buffer2d, rasterizer, Pipeline}; @@ -97,12 +97,10 @@ impl<'a> Pipeline for Voxel { let ambiance = 0.25; let diffuse = norm.dot(-self.light_dir).max(0.0); let brightness = 2.5; - let light = Rgba::from_opaque(Rgb::from(*ao_level as f32 / 4.0)) - * (diffuse + ambiance) - * brightness; - let color = light * srgba_to_linear(Rgba::from_opaque(*col)); + let light = Rgb::from(*ao_level as f32 / 4.0) * (diffuse + ambiance) * brightness; + let color = light * srgb_to_linear(*col); let position = (self.mvp * Vec4::from_point(*pos)).into_array(); - (position, VsOut(color)) + (position, VsOut(Rgba::from_opaque(color))) } #[inline(always)]