mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better falloff
This commit is contained in:
parent
be775c9484
commit
3d027aebe8
@ -50,8 +50,8 @@ vec3 lod_norm(vec2 pos) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vec3 lod_col(vec2 pos) {
|
vec3 lod_col(vec2 pos) {
|
||||||
return texture(t_map, pos_to_uv(pos)).rgb;
|
return texture(t_map, pos_to_uv(pos)).rgb
|
||||||
//+ texture(t_noise, pos * 0.02 + texture(t_noise, pos * 1.0).xy * 2.0).x * 0.2;
|
+ texture(t_noise, pos * 0.04 + texture(t_noise, pos * 0.01).xy * 2.0 + texture(t_noise, pos * 0.06).xy * 0.6).x * 0.1;
|
||||||
|
|
||||||
vec3 warmth = mix(
|
vec3 warmth = mix(
|
||||||
vec3(0.05, 0.4, 0.1),
|
vec3(0.05, 0.4, 0.1),
|
||||||
|
@ -17,7 +17,10 @@ out float f_light;
|
|||||||
void main() {
|
void main() {
|
||||||
f_pos = lod_pos(v_pos);
|
f_pos = lod_pos(v_pos);
|
||||||
|
|
||||||
f_pos.z -= 1.0 / pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0);
|
//f_pos.z -= 1.0 / pow(distance(focus_pos.xy, f_pos.xy) / (view_distance.x * 0.95), 20.0);
|
||||||
|
|
||||||
|
//f_pos.z -= 100.0 * pow(1.0 + 0.01 / view_distance.x, -pow(distance(focus_pos.xy, f_pos.xy), 2.0));
|
||||||
|
f_pos.z -= max(view_distance.x - distance(focus_pos.xy, f_pos.xy), 0.0);
|
||||||
|
|
||||||
f_light = 1.0;
|
f_light = 1.0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user