mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better wind waving, improved sun ambiance
This commit is contained in:
parent
0fcb3a174d
commit
55350d8f5f
@ -5,7 +5,7 @@ const float PI = 3.141592;
|
||||
const vec3 SKY_DAY_TOP = vec3(0.1, 0.2, 0.9);
|
||||
const vec3 SKY_DAY_MID = vec3(0.02, 0.08, 0.8);
|
||||
const vec3 SKY_DAY_BOT = vec3(0.02, 0.01, 0.3);
|
||||
const vec3 DAY_LIGHT = vec3(1.5, 1.0, 1.0);
|
||||
const vec3 DAY_LIGHT = vec3(1.3, 0.9, 1.1);
|
||||
|
||||
const vec3 SKY_DUSK_TOP = vec3(0.06, 0.1, 0.20);
|
||||
const vec3 SKY_DUSK_MID = vec3(0.35, 0.1, 0.15);
|
||||
@ -33,7 +33,7 @@ float get_sun_brightness(vec3 sun_dir) {
|
||||
const float PERSISTENT_AMBIANCE = 0.008;
|
||||
|
||||
vec3 get_sun_diffuse(vec3 norm, float time_of_day) {
|
||||
const float SUN_AMBIANCE = 0.075;
|
||||
const float SUN_AMBIANCE = 0.15;
|
||||
|
||||
vec3 sun_dir = get_sun_dir(time_of_day);
|
||||
|
||||
|
@ -31,10 +31,10 @@ void main() {
|
||||
|
||||
// Wind waving
|
||||
f_pos += inst_wind_sway * vec3(
|
||||
sin(tick.x * 1.7 + f_pos.y * 0.2),
|
||||
sin(tick.x * 1.3 + f_pos.x * 0.2),
|
||||
sin(tick.x * 1.5 + f_pos.y * 0.1) * sin(tick.x * 0.35),
|
||||
sin(tick.x * 1.5 + f_pos.x * 0.1) * sin(tick.x * 0.25),
|
||||
0.0
|
||||
) * sin(v_pos.z * 0.03) * 0.5;
|
||||
) * pow(v_pos.z * SCALE, 1.3) * 0.2;
|
||||
|
||||
f_norm = (inst_mat * vec4(v_norm, 0)).xyz;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user