mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix some minor display issues.
This commit is contained in:
parent
0ed752e087
commit
bfda6da42f
@ -127,9 +127,10 @@ void main() {
|
||||
}
|
||||
vec3 c_norm = cross(f_norm, b_norm);
|
||||
|
||||
float wave00 = wave_height(f_pos);
|
||||
float wave10 = wave_height(f_pos + vec3(0.1, 0, 0));
|
||||
float wave01 = wave_height(f_pos + vec3(0, 0.1, 0));
|
||||
vec3 wave_pos = f_pos + focus_off.xyz;
|
||||
float wave00 = wave_height(wave_pos);
|
||||
float wave10 = wave_height(wave_pos + vec3(0.1, 0, 0));
|
||||
float wave01 = wave_height(wave_pos + vec3(0, 0.1, 0));
|
||||
|
||||
float slope = abs(wave00 - wave10) * abs(wave00 - wave01);
|
||||
vec3 nmap = vec3(
|
||||
|
@ -428,7 +428,8 @@ void main() {
|
||||
f_pos.xyz += abs(voxel_norm) * delta_sides;
|
||||
voxel_norm = voxel_norm == vec3(0.0) ? f_norm : voxel_norm;
|
||||
|
||||
f_col = /*srgb_to_linear*/(f_col + hash(vec4(floor(f_pos * 3.0 - voxel_norm * 0.5), 0)) * 0.01/* - 0.01*/); // Small-scale noise
|
||||
vec3 hash_pos = f_pos + focus_off.xyz;
|
||||
f_col = /*srgb_to_linear*/(f_col + hash(vec4(floor(hash_pos * 3.0 - voxel_norm * 0.5), 0)) * 0.01/* - 0.01*/); // Small-scale noise
|
||||
|
||||
// f_ao = 1.0;
|
||||
// f_ao = dot(f_ao_vec, sqrt(1.0 - delta_sides * delta_sides));
|
||||
|
@ -2246,9 +2246,10 @@ impl Hud {
|
||||
let camera::Dependents {
|
||||
view_mat, proj_mat, ..
|
||||
} = camera.dependents();
|
||||
let focus_off = camera.get_focus_pos().map(f32::trunc);
|
||||
self.ui.maintain(
|
||||
&mut global_state.window.renderer_mut(),
|
||||
Some(proj_mat * view_mat),
|
||||
Some(proj_mat * view_mat * Mat4::translation_3d(-focus_off)),
|
||||
);
|
||||
|
||||
// Check if item images need to be reloaded
|
||||
|
@ -478,9 +478,10 @@ impl FigureMgr {
|
||||
|
||||
// Don't display figures outside the frustum spectrum (this is important to do
|
||||
// for any figure that potentially casts a shadow, since we use this
|
||||
// to estimate bounds for shadow maps). Currently, we don't do this before the update
|
||||
// cull, so it's possible that faraway figures will not shadow correctly until their
|
||||
// next update. For now, we treat this as an acceptable tradeoff.
|
||||
// to estimate bounds for shadow maps). Currently, we don't do this before the
|
||||
// update cull, so it's possible that faraway figures will not
|
||||
// shadow correctly until their next update. For now, we treat this
|
||||
// as an acceptable tradeoff.
|
||||
let radius = scale.unwrap_or(&Scale(1.0)).0 * 2.0;
|
||||
let (in_frustum, lpindex) = if let Some(mut meta) = self.states.get_mut(body, &entity) {
|
||||
let (in_frustum, lpindex) = BoundingSphere::new(pos.0.into_array(), radius)
|
||||
|
Loading…
Reference in New Issue
Block a user