Address imbris feedback.

Temporarily disables shiny water, lowers max VD.

These restrictions will be lifted soon after merging.
This commit is contained in:
Joshua Yanovski 2020-08-20 09:25:41 +02:00
parent 561e25778a
commit e44a1cbf46
9 changed files with 21 additions and 44 deletions

View File

@ -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).
///

View File

@ -26,7 +26,7 @@ impl<Context: SubContext<S>, T, S> Typed<Context, Pure<T>, 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.

View File

@ -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

View File

@ -10,26 +10,6 @@ type TodoRect = (
Vec3<i32>,
);
/// `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<D, FL, FC, FO, FS, FP> {
pub data: D,
/// The minimum position to mesh, in the coordinate system used
@ -46,7 +26,7 @@ pub struct GreedyConfig<D, FL, FC, FO, FS, FP> {
/// 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

View File

@ -398,7 +398,6 @@ impl<'a, V: RectRasterableVol<Vox = Block> + 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,
};

View File

@ -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<Vertex> = (),
vbuf: gfx::VertexBuffer<<TerrainPipeline as Pipeline>::Vertex> = (),
// abuf: gfx::VertexBuffer<<TerrainPipeline as Pipeline>::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 = <TerrainPipeline as Pipeline>::Vertex;
}
pub struct FigureModel {

View File

@ -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<u16>, pos: Vec3<f32>, norm: Vec3<f32>, meta: bool) -> Self {
const EXTRA_NEG_Z: f32 = 32768.0;

View File

@ -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) {

View File

@ -213,8 +213,8 @@ impl<Skel: Skeleton> FigureModelCache<Skel> {
/// 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<Skel: Skeleton> FigureModelCache<Skel> {
// 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<Skel: Skeleton> FigureModelCache<Skel> {
// 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