mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Various tiny fixes:
Text over lootbags no longer scales with distance due to performance Fixed meshing panic Fixed ambiant lighting default
This commit is contained in:
@ -90,11 +90,14 @@ impl<'a> Widget for Overitem<'a> {
|
|||||||
// | E |
|
// | E |
|
||||||
// ———
|
// ———
|
||||||
|
|
||||||
// scale at max distance is 10, and at min distance is 30
|
// Scale at max distance is 10, and at min distance is 30. Disabled since the
|
||||||
let scale: f64 = ((1.5
|
// scaling ruins glyph caching, causing performance issues near lootbags
|
||||||
- (self.distance_from_player_sqr / common::consts::MAX_PICKUP_RANGE.powi(2)))
|
// let scale: f64 = ((1.5
|
||||||
* 20.0)
|
// - (self.distance_from_player_sqr /
|
||||||
.into();
|
// common::consts::MAX_PICKUP_RANGE.powi(2)))
|
||||||
|
// * 20.0)
|
||||||
|
// .into();
|
||||||
|
let scale = 30.0;
|
||||||
let text_font_size = scale * 1.0;
|
let text_font_size = scale * 1.0;
|
||||||
let text_pos_y = scale * 1.2;
|
let text_pos_y = scale * 1.2;
|
||||||
let btn_rect_size = scale * 0.8;
|
let btn_rect_size = scale * 0.8;
|
||||||
|
@ -46,8 +46,8 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
|
|||||||
const OPAQUE: u8 = 254;
|
const OPAQUE: u8 = 254;
|
||||||
|
|
||||||
let outer = Aabb {
|
let outer = Aabb {
|
||||||
min: bounds.min - Vec3::new(SUNLIGHT as i32 - 1, SUNLIGHT as i32 - 1, 1),
|
min: bounds.min - Vec3::new(SUNLIGHT as i32, SUNLIGHT as i32, 1),
|
||||||
max: bounds.max + Vec3::new(SUNLIGHT as i32 - 1, SUNLIGHT as i32 - 1, 1),
|
max: bounds.max + Vec3::new(SUNLIGHT as i32, SUNLIGHT as i32, 1),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut vol_cached = vol.cached();
|
let mut vol_cached = vol.cached();
|
||||||
|
@ -651,7 +651,7 @@ impl Default for GraphicsSettings {
|
|||||||
fov: 70,
|
fov: 70,
|
||||||
gamma: 1.0,
|
gamma: 1.0,
|
||||||
exposure: 1.0,
|
exposure: 1.0,
|
||||||
ambiance: 0.0,
|
ambiance: 10.0,
|
||||||
render_mode: RenderMode::default(),
|
render_mode: RenderMode::default(),
|
||||||
window_size: [1920, 1080],
|
window_size: [1920, 1080],
|
||||||
fullscreen: FullScreenSettings::default(),
|
fullscreen: FullScreenSettings::default(),
|
||||||
|
Reference in New Issue
Block a user