diff --git a/assets/voxygen/shaders/include/srgb.glsl b/assets/voxygen/shaders/include/srgb.glsl index 6f2fbca6b9..b1abd93811 100644 --- a/assets/voxygen/shaders/include/srgb.glsl +++ b/assets/voxygen/shaders/include/srgb.glsl @@ -43,16 +43,6 @@ vec3 linear_to_srgb(vec3 col) { ); } -vec4 srgba8_to_linear(uint srgba8) { - vec4 nonlinear = vec4(uvec4( - (srgba8 >> 24) & 0xFFu, - (srgba8 >> 16) & 0xFFu, - (srgba8 >> 8) & 0xFFu, - srgba8 & 0xFFu - )) / 255.0; - return vec4(srgb_to_linear(nonlinear.rgb), nonlinear.a); -} - float pow5(float x) { float x2 = x * x; return x2 * x2 * x; diff --git a/assets/voxygen/shaders/ui-frag.glsl b/assets/voxygen/shaders/ui-frag.glsl index a881b2b542..ce2f5d1d02 100644 --- a/assets/voxygen/shaders/ui-frag.glsl +++ b/assets/voxygen/shaders/ui-frag.glsl @@ -13,7 +13,6 @@ uniform u_locals { vec4 w_pos; }; -// TODO: swap with u_locals because that may change more frequently? layout(set = 2, binding = 0) uniform texture2D t_tex; layout(set = 2, binding = 1) @@ -71,7 +70,7 @@ void downscale_params(float pos, float scale, out vec2 weights, out vec2 offsets // 4 pixels (within a single dimension) in the sampled texture. So we can't // perfectly compute the contribution of each covered pixel in the sampled // texture with only 2 samples (along each dimension). Thus, we fallback to - // an imperfect technique of just sampling a 1 pixel length from the center + // an imperfect technique of just sampling 1 pixel length from the center // on each side of the nearest pixel edge. An alternative might be to // pre-compute mipmap levels that could be sampled from, although this // could interact poorly with the atlas. diff --git a/voxygen/src/render/pipelines/ui.rs b/voxygen/src/render/pipelines/ui.rs index ce3e4ef8f4..da00de4555 100644 --- a/voxygen/src/render/pipelines/ui.rs +++ b/voxygen/src/render/pipelines/ui.rs @@ -570,7 +570,8 @@ impl PremultiplyUpload { // TODO: duplicating some code from `Texture` since: // 1. We don't need to create a sampler. // 2. Texture::new accepts &DynamicImage which isn't possible to create from - // &RgbaImage without cloning. + // &RgbaImage without cloning. (this might be addressed on zoomy worldgen + // branch) let image_size = wgpu::Extent3d { width: image.width(), height: image.height(), diff --git a/voxygen/src/ui/graphic/mod.rs b/voxygen/src/ui/graphic/mod.rs index ac2276a45a..5d7b35bac6 100644 --- a/voxygen/src/ui/graphic/mod.rs +++ b/voxygen/src/ui/graphic/mod.rs @@ -325,11 +325,13 @@ impl GraphicCache { self.cache_map.drain_filter(|key, details| { if key.graphic_id == id { match details { - // TODO: if replace_graphic is used continously for small images (i.e. + // NOTE: if replace_graphic is used continously for small images (i.e. // images placed into an atlas) of different sizes, that can use up our // atlas space since spots in the atlas can't be reused. (this scenario is // now possible with scaling being done during sampling rather than placing - // resized version into the atlas) + // resized version into the atlas). This is expected to not occur in all + // pratical cases we plan to support here (i.e. the size of the replacement + // image will always be the same). CachedDetails::Atlas { .. } => {}, CachedDetails::Texture { index, .. } => { self.textures.remove(*index);