mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Disable visuals that block seeing camera clipping since they cause flickering, raise max zoom cap with camera, fix overflow issue
This commit is contained in:
parent
6e8ede2dda
commit
a77f981b15
@ -185,10 +185,11 @@ void main() {
|
||||
|
||||
// float bright_color = (bright_color0 + bright_color1 + bright_color2 + bright_color3 + bright_color4) / 5.0;
|
||||
|
||||
if (medium.x == 2u) {
|
||||
tgt_color = vec4(0, 0.005, 0.01, 1) * (1 + hash_fast(uvec3(vec3(uv * screen_res.xy / 32.0, 0))));
|
||||
return;
|
||||
}
|
||||
// TODO: this causes flickering when the camera is moving into and out of solid blocks, resolve before uncommenting
|
||||
// if (medium.x == 2u) {
|
||||
// tgt_color = vec4(0, 0.005, 0.01, 1) * (1 + hash_fast(uvec3(vec3(uv * screen_res.xy / 32.0, 0))));
|
||||
// return;
|
||||
// }
|
||||
|
||||
vec4 aa_color = aa_apply(t_src_color, s_src_color, uv * screen_res.xy, screen_res.xy);
|
||||
|
||||
|
@ -655,10 +655,10 @@ impl FigureMgr {
|
||||
const MIN_PERFECT_RATE_DIST: f32 = 100.0;
|
||||
|
||||
if (i as u64 + tick)
|
||||
% (1 + ((pos.0.distance_squared(focus_pos).powf(0.25)
|
||||
- MIN_PERFECT_RATE_DIST.sqrt())
|
||||
% (((pos.0.distance_squared(focus_pos).powf(0.25) - MIN_PERFECT_RATE_DIST.sqrt())
|
||||
.max(0.0)
|
||||
/ 3.0) as u64)
|
||||
.saturating_add(1)
|
||||
!= 0
|
||||
{
|
||||
continue;
|
||||
|
@ -41,6 +41,8 @@ use num::traits::{Float, FloatConst};
|
||||
use specs::{Entity as EcsEntity, Join, WorldExt};
|
||||
use vek::*;
|
||||
|
||||
const ZOOM_CAP: f32 = 10000.0;
|
||||
|
||||
// TODO: Don't hard-code this.
|
||||
const CURSOR_PAN_SCALE: f32 = 0.005;
|
||||
|
||||
@ -357,7 +359,7 @@ impl Scene {
|
||||
// when zooming in the distance the camera travelles should be based on the
|
||||
// final distance. This is to make sure the camera travelles the
|
||||
// same distance when zooming in and out
|
||||
let cap = (!client.is_moderator()).then_some(30.0);
|
||||
let cap = (!client.is_moderator()).then_some(ZOOM_CAP);
|
||||
if delta < 0.0 {
|
||||
self.camera.zoom_switch(
|
||||
// Thank you Imbris for doing the math
|
||||
|
Loading…
Reference in New Issue
Block a user