diff --git a/common/src/msg/server.rs b/common/src/msg/server.rs index 1d8f0660ad..6b8904d892 100644 --- a/common/src/msg/server.rs +++ b/common/src/msg/server.rs @@ -59,7 +59,7 @@ pub struct CharacterInfo { /// /// TODO: Add information for rivers (currently, we just prerender them on the /// server, but this is not a great solution for LoD. The map rendering code is -/// already set up to be able to take advantage of the rivrer rendering being +/// already set up to be able to take advantage of the river rendering being /// split out, but the format is a little complicated for space reasons and it /// may take some tweaking to get right, so we avoid sending it for now). /// diff --git a/common/src/typed.rs b/common/src/typed.rs index 395ee75548..a5879f0600 100644 --- a/common/src/typed.rs +++ b/common/src/typed.rs @@ -26,7 +26,7 @@ impl, T, S> Typed, S> for T { /// /// `expr` is the expression being matched on, generally of some enum type `Ty`. /// -/// `case` represents the pattenrn match--it will generally be a stsructure with +/// `case` represents the pattern match--it will generally be a structure with /// one field per constructor in `Ty`. The field should contain enough /// information to run the match arm for that constructor, given the information /// contained in the constructor arguments. diff --git a/voxygen/src/hud/settings_window.rs b/voxygen/src/hud/settings_window.rs index 1055664d27..92d4b03cca 100644 --- a/voxygen/src/hud/settings_window.rs +++ b/voxygen/src/hud/settings_window.rs @@ -1726,7 +1726,10 @@ impl<'a> Widget for SettingsWindow<'a> { if let Some(new_val) = ImageSlider::discrete( self.global_state.settings.graphics.view_distance, 1, - 65, + // FIXME: Move back to 64 once we support multiple texture atlases, or figure out a + // way to increase the size of the terrain atlas. + 30, + // 65, self.imgs.slider_indicator, self.imgs.slider, ) @@ -2061,7 +2064,11 @@ impl<'a> Widget for SettingsWindow<'a> { .color(TEXT_COLOR) .set(state.ids.fluid_mode_text, ui); - let mode_list = [FluidMode::Cheap, FluidMode::Shiny]; + // FIXME: Add shiny water back to the UI once we fix the bug on nVidia cards. + let mode_list = [ + FluidMode::Cheap, + // FluidMode::Shiny + ]; let mode_label_list = [ &self .localized_strings diff --git a/voxygen/src/mesh/greedy.rs b/voxygen/src/mesh/greedy.rs index 6d1ee89368..d906ea4d24 100644 --- a/voxygen/src/mesh/greedy.rs +++ b/voxygen/src/mesh/greedy.rs @@ -10,26 +10,6 @@ type TodoRect = ( Vec3, ); -/// `max_size`: -/// -/// `draw_delta`: -/// -/// `greedy_size`: -/// -/// `greedy_size_cross`: -/// -/// `get_light`: -/// -/// `get_color`: -/// -/// -/// `create_shadow`: -/// Create a shadow vertex (used for both shadow and display rendering) -/// given its position, normal, and meta information. Note that the position -/// received here is relative to `draw_delta`--it still needs to be translated -/// to mesh coordinates. -/// -/// `create_opaque`: pub struct GreedyConfig { pub data: D, /// The minimum position to mesh, in the coordinate system used @@ -46,7 +26,7 @@ pub struct GreedyConfig { /// An important exception is during chunk rendering (where vertical faces /// at chunk boundaries would otherwise be rendered twice, and also /// force us to use more than 5 bits to represent x and y - /// positions--though there may be a clever way aruond the latter). + /// positions--though there may be a clever way around the latter). /// Thus, for chunk rendering we set the number of *vertical* planes to /// one less than the chunk size along the x and y dimensions, but keep /// the number of *horizontal* planes large enough to cover the whole @@ -148,7 +128,7 @@ impl<'a> GreedyMesh<'a> { } /// Perform greedy meshing on a model, separately producing "pure" model - /// data (the opaque mesh, ttogether with atlas positions connecting + /// data (the opaque mesh, together with atlas positions connecting /// each rectangle with texture information), and raw light and color /// data ready to be used as a texture (accessible with `finalize`). /// Texture data built up within the same greedy mesh will be inserted diff --git a/voxygen/src/mesh/terrain.rs b/voxygen/src/mesh/terrain.rs index 7baf4858eb..4a7c008550 100644 --- a/voxygen/src/mesh/terrain.rs +++ b/voxygen/src/mesh/terrain.rs @@ -398,7 +398,6 @@ impl<'a, V: RectRasterableVol + ReadVol + Debug> let min_bounds = mesh_delta; let bounds = Aabb { - // NOTE: Casts are safe since lower_bound and upper_bound both fit in a i16. min: min_bounds, max: max_bounds + min_bounds, }; diff --git a/voxygen/src/render/pipelines/figure.rs b/voxygen/src/render/pipelines/figure.rs index 65a1af932f..03e071f667 100644 --- a/voxygen/src/render/pipelines/figure.rs +++ b/voxygen/src/render/pipelines/figure.rs @@ -6,20 +6,11 @@ use crate::mesh::greedy::GreedyMesh; use core::ops::Range; use gfx::{ self, gfx_constant_struct_meta, gfx_defines, gfx_impl_struct_meta, gfx_pipeline, - gfx_pipeline_inner, gfx_vertex_struct_meta, state::ColorMask, + gfx_pipeline_inner, state::ColorMask, }; use vek::*; gfx_defines! { - vertex Vertex { - pos_norm: u32 = "v_pos_norm", - col: u32 = "v_col", - // BBBBBBAA - // B = Bone - // A = AO - ao_bone: u8 = "v_ao_bone", - } - constant Locals { model_mat: [[f32; 4]; 4] = "model_mat", model_col: [f32; 4] = "model_col", @@ -34,7 +25,6 @@ gfx_defines! { } pipeline pipe { - // vbuf: gfx::VertexBuffer = (), vbuf: gfx::VertexBuffer<::Vertex> = (), // abuf: gfx::VertexBuffer<::Vertex> = (), col_lights: gfx::TextureSampler<[f32; 4]> = "t_col_light", @@ -111,7 +101,7 @@ impl Default for BoneData { pub struct FigurePipeline; impl Pipeline for FigurePipeline { - type Vertex = Vertex; + type Vertex = ::Vertex; } pub struct FigureModel { diff --git a/voxygen/src/render/pipelines/terrain.rs b/voxygen/src/render/pipelines/terrain.rs index 7fca8f0dbb..66eaaabf5d 100644 --- a/voxygen/src/render/pipelines/terrain.rs +++ b/voxygen/src/render/pipelines/terrain.rs @@ -48,6 +48,7 @@ gfx_defines! { impl Vertex { #[allow(clippy::identity_op)] // TODO: Pending review in #587 + /// NOTE: meta is true when the terrain vertex is touching water. pub fn new(atlas_pos: Vec2, pos: Vec3, norm: Vec3, meta: bool) -> Self { const EXTRA_NEG_Z: f32 = 32768.0; diff --git a/voxygen/src/render/renderer.rs b/voxygen/src/render/renderer.rs index 1c2cd19685..41ba19f4ea 100644 --- a/voxygen/src/render/renderer.rs +++ b/voxygen/src/render/renderer.rs @@ -601,7 +601,7 @@ impl Renderer { /// default, and 11 definitely does, so I assume it's natively supported /// by DirectX itself), OpenGL 3.2+, and Metal (done by default). While /// there may be some GPUs that don't quite support it correctly, the - /// impact is relatively small, so there is no reaosn not to enable it where + /// impact is relatively small, so there is no reason not to enable it where /// available. #[allow(unsafe_code)] fn enable_seamless_cube_maps(device: &mut gfx_backend::Device) { diff --git a/voxygen/src/scene/figure/cache.rs b/voxygen/src/scene/figure/cache.rs index 0383685b37..4a9526dc58 100644 --- a/voxygen/src/scene/figure/cache.rs +++ b/voxygen/src/scene/figure/cache.rs @@ -213,8 +213,8 @@ impl FigureModelCache { /// NOTE: We deliberately call this function with only the key into the /// cache, to enforce that the cached state only depends on the key. We - /// may end up using different from this cache eventually, in which case - /// this strategy might change. + /// may end up using a mechanism different from this cache eventually, + /// in which case this strategy might change. fn bone_meshes( FigureKey { body, extra }: &FigureKey, manifest_indicator: &mut ReloadIndicator, @@ -1055,7 +1055,7 @@ impl FigureModelCache { // NOTE: Cast to u8 is safe because i <= 16. .filter_map(|(i, bm)| bm.as_ref().map(|bm| (i as u8, bm.clone()))) .for_each(|(i, (_opaque_mesh, (bounds, vertex_range)))| { - // Update the bone index for all vertices that belong ot this + // Update the bone index for all vertices that belong to this // model. opaque .iter_mut(vertex_range) @@ -1088,7 +1088,7 @@ impl FigureModelCache { // able to store data for any figure. So the only reason we would fail // here would be if the user's computer could not store a texture large // enough to fit all the LOD models for the figure, not for fundamental - // reasonS related to fitting in a u32). + // reasons related to fitting in a u32). // // Therefore, these casts are safe. vertex_start as u32..opaque.vertices().len() as u32