mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Hopefully final commit for the LOD branch.
This commit is contained in:
parent
5e8ea0b1ea
commit
ec0aeb18e8
14
CHANGELOG.md
14
CHANGELOG.md
@ -9,11 +9,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
### Added
|
### 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
|
### Changed
|
||||||
- Fixed a bug where leaving the Settings menu by pressing "N" in single player kept the game paused
|
- 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
|
### 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
|
## [0.7.0] - 2020-08-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -1728,7 +1728,7 @@ impl<'a> Widget for SettingsWindow<'a> {
|
|||||||
1,
|
1,
|
||||||
// FIXME: Move back to 64 once we support multiple texture atlases, or figure out a
|
// FIXME: Move back to 64 once we support multiple texture atlases, or figure out a
|
||||||
// way to increase the size of the terrain atlas.
|
// way to increase the size of the terrain atlas.
|
||||||
30,
|
25,
|
||||||
// 65,
|
// 65,
|
||||||
self.imgs.slider_indicator,
|
self.imgs.slider_indicator,
|
||||||
self.imgs.slider,
|
self.imgs.slider,
|
||||||
|
@ -171,7 +171,7 @@ pub enum FluidMode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Default for FluidMode {
|
impl Default for FluidMode {
|
||||||
fn default() -> Self { FluidMode::Shiny }
|
fn default() -> Self { FluidMode::Cheap }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Lighting modes
|
/// Lighting modes
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
use rand::thread_rng;
|
use rand::thread_rng;
|
||||||
use vek::*;
|
use vek::*;
|
||||||
use veloren_world::site::Settlement;
|
use veloren_world::{index::Index, site::Settlement, IndexRef};
|
||||||
|
|
||||||
const W: usize = 640;
|
const W: usize = 640;
|
||||||
const H: usize = 480;
|
const H: usize = 480;
|
||||||
|
|
||||||
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
|
#[allow(clippy::or_fun_call)] // TODO: Pending review in #587
|
||||||
fn main() {
|
fn main() {
|
||||||
|
let seed = 1337;
|
||||||
|
let (ref index, ref colors) = Index::new(seed);
|
||||||
|
|
||||||
let mut win =
|
let mut win =
|
||||||
minifb::Window::new("Settlement Viewer", W, H, minifb::WindowOptions::default()).unwrap();
|
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 focus = Vec2::<f32>::zero();
|
||||||
let mut zoom = 1.0;
|
let mut zoom = 1.0;
|
||||||
|
let index = IndexRef { colors, index };
|
||||||
|
|
||||||
while win.is_open() {
|
while win.is_open() {
|
||||||
let mut buf = vec![0; W * H];
|
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 pos = focus + win_to_pos(Vec2::new(i, j)) * zoom;
|
||||||
|
|
||||||
let color = settlement
|
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));
|
.unwrap_or(Rgb::new(35, 50, 20));
|
||||||
|
|
||||||
buf[j * W + i] = u32::from_le_bytes([color.b, color.g, color.r, 255]);
|
buf[j * W + i] = u32::from_le_bytes([color.b, color.g, color.r, 255]);
|
||||||
|
@ -20,8 +20,8 @@ pub struct Index {
|
|||||||
/// An owned reference to indexed data.
|
/// An owned reference to indexed data.
|
||||||
///
|
///
|
||||||
/// The data are split out so that we can replace the colors without disturbing
|
/// 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
|
/// the rest of the index, while also keeping all the data within a single
|
||||||
/// indirection (though possibly not contiguous).
|
/// indirection.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct IndexOwned {
|
pub struct IndexOwned {
|
||||||
colors: Arc<Colors>,
|
colors: Arc<Colors>,
|
||||||
|
Loading…
Reference in New Issue
Block a user