mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Capped LoD dragging
This commit is contained in:
parent
8aafc559f8
commit
7b42aebd70
@ -25,7 +25,7 @@ void main() {
|
|||||||
float((v_pos_norm >> 16) & 0x1FFFu)
|
float((v_pos_norm >> 16) & 0x1FFFu)
|
||||||
) + model_offs;
|
) + model_offs;
|
||||||
f_pos.z *= min(1.0001 - 0.02 / pow(tick.x - load_time, 10.0), 1.0);
|
f_pos.z *= min(1.0001 - 0.02 / pow(tick.x - load_time, 10.0), 1.0);
|
||||||
f_pos.z -= 25.0 * pow(distance(focus_pos.xy, f_pos.xy) / view_distance.x, 20.0);
|
f_pos.z -= min(32.0, pow(distance(focus_pos.xy, f_pos.xy) / view_distance.x, 20.0));
|
||||||
|
|
||||||
f_col = vec3(
|
f_col = vec3(
|
||||||
float((v_col_light >> 8) & 0xFFu),
|
float((v_col_light >> 8) & 0xFFu),
|
||||||
|
@ -17,7 +17,7 @@ out float f_light;
|
|||||||
void main() {
|
void main() {
|
||||||
f_pos = lod_pos(v_pos + vec2(0, -v_pos.x * 0.5));
|
f_pos = lod_pos(v_pos + vec2(0, -v_pos.x * 0.5));
|
||||||
|
|
||||||
f_pos.z -= 1.0 / pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0);
|
f_pos.z -= min(32.0, 1.0 / pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0));
|
||||||
|
|
||||||
f_light = 1.0;
|
f_light = 1.0;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ void main() {
|
|||||||
vec3 sprite_pos = (inst_mat * vec4(0, 0, 0, 1)).xyz;
|
vec3 sprite_pos = (inst_mat * vec4(0, 0, 0, 1)).xyz;
|
||||||
|
|
||||||
f_pos = (inst_mat * vec4(v_pos * SCALE, 1)).xyz;
|
f_pos = (inst_mat * vec4(v_pos * SCALE, 1)).xyz;
|
||||||
f_pos.z -= 1.0 * pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0);
|
f_pos.z -= min(32.0, pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0));
|
||||||
|
|
||||||
// Wind waving
|
// Wind waving
|
||||||
f_pos += inst_wind_sway * vec3(
|
f_pos += inst_wind_sway * vec3(
|
||||||
|
@ -21,7 +21,7 @@ void main() {
|
|||||||
f_pos = vec3((uvec3(v_pos_norm) >> uvec3(0, 8, 16)) & uvec3(0xFFu, 0xFFu, 0x1FFFu)) + model_offs;
|
f_pos = vec3((uvec3(v_pos_norm) >> uvec3(0, 8, 16)) & uvec3(0xFFu, 0xFFu, 0x1FFFu)) + model_offs;
|
||||||
|
|
||||||
f_pos.z *= min(1.0001 - 0.02 / pow(tick.x - load_time, 10.0), 1.0);
|
f_pos.z *= min(1.0001 - 0.02 / pow(tick.x - load_time, 10.0), 1.0);
|
||||||
f_pos.z -= 1.0 * pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0);
|
f_pos.z -= min(32.0, pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0));
|
||||||
|
|
||||||
f_col = vec3((uvec3(v_col_light) >> uvec3(8, 16, 24)) & uvec3(0xFFu)) / 255.0;
|
f_col = vec3((uvec3(v_col_light) >> uvec3(8, 16, 24)) & uvec3(0xFFu)) / 255.0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user