Hopefully final commit for the LOD branch.

This commit is contained in:
Joshua Yanovski 2020-08-20 15:38:50 +02:00
parent 5e8ea0b1ea
commit ec0aeb18e8
5 changed files with 24 additions and 6 deletions

View File

@ -9,11 +9,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- New level of detail feature, letting you see all the world's terrain at any view distance.
- Point and directional lights now cast realistic shadows, using shadow mapping.
### Changed
- Fixed a bug where leaving the Settings menu by pressing "N" in single player kept the game paused
- The world map has been refactored to support arbitrary sizes and compute horizon maps.
- Veloren's lighting has been completely overhauled.
- The graphics options were made much more flexible and configurable.
- Many shader optimizations.
- Voxel model creation was switched to use greedy meshing, improving performance.
- Animation and terrain math were switched to use SIMD where possible, improving performance.
- The way we cache glyphs was refactored, fixed, and optimized.
- Colors for models and figures were adjusted to account for the saturation hack.
### Removed
- MSAAA has been removed due to incompatibility with greeddy meshing.
- Removed a saturation hack that led to colors being improperly displayed.
## [0.7.0] - 2020-08-15
### Added

View File

@ -1728,7 +1728,7 @@ impl<'a> Widget for SettingsWindow<'a> {
1,
// 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,
25,
// 65,
self.imgs.slider_indicator,
self.imgs.slider,

View File

@ -171,7 +171,7 @@ pub enum FluidMode {
}
impl Default for FluidMode {
fn default() -> Self { FluidMode::Shiny }
fn default() -> Self { FluidMode::Cheap }
}
/// Lighting modes

View File

@ -1,12 +1,15 @@
use rand::thread_rng;
use vek::*;
use veloren_world::site::Settlement;
use veloren_world::{index::Index, site::Settlement, IndexRef};
const W: usize = 640;
const H: usize = 480;
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
fn main() {
let seed = 1337;
let (ref index, ref colors) = Index::new(seed);
let mut win =
minifb::Window::new("Settlement Viewer", W, H, minifb::WindowOptions::default()).unwrap();
@ -14,6 +17,7 @@ fn main() {
let mut focus = Vec2::<f32>::zero();
let mut zoom = 1.0;
let index = IndexRef { colors, index };
while win.is_open() {
let mut buf = vec![0; W * H];
@ -26,7 +30,7 @@ fn main() {
let pos = focus + win_to_pos(Vec2::new(i, j)) * zoom;
let color = settlement
.get_color(pos.map(|e| e.floor() as i32))
.get_color(index, pos.map(|e| e.floor() as i32))
.unwrap_or(Rgb::new(35, 50, 20));
buf[j * W + i] = u32::from_le_bytes([color.b, color.g, color.r, 255]);

View File

@ -20,8 +20,8 @@ pub struct Index {
/// An owned reference to indexed data.
///
/// The data are split out so that we can replace the colors without disturbing
/// the rest of the index, while also keeping all the adta within a single
/// indirection (though possibly not contiguous).
/// the rest of the index, while also keeping all the data within a single
/// indirection.
#[derive(Clone)]
pub struct IndexOwned {
colors: Arc<Colors>,