mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Properly account for negative sun_dir.z in pow use in sky shaders
This commit is contained in:
parent
8d4bbed6c9
commit
e8874b18c9
@ -428,7 +428,7 @@ vec3 get_sky_light(vec3 dir, float time_of_day, bool with_stars) {
|
||||
mix(
|
||||
SKY_DUSK_TOP,
|
||||
SKY_NIGHT_TOP,
|
||||
max(pow(sun_dir.z, 0.2), 0)
|
||||
pow(max(sun_dir.z, 0.0), 0.2)
|
||||
) + star,
|
||||
SKY_DAY_TOP,
|
||||
max(-sun_dir.z, 0)
|
||||
@ -437,7 +437,7 @@ vec3 get_sky_light(vec3 dir, float time_of_day, bool with_stars) {
|
||||
vec3 sky_mid = mix(
|
||||
mix( SKY_DUSK_MID,
|
||||
SKY_NIGHT_MID,
|
||||
max(pow(sun_dir.z, 0.1), 0)
|
||||
pow(max(sun_dir.z, 0.0), 0.1)
|
||||
),
|
||||
SKY_DAY_MID,
|
||||
max(-sun_dir.z, 0)
|
||||
@ -447,7 +447,7 @@ vec3 get_sky_light(vec3 dir, float time_of_day, bool with_stars) {
|
||||
mix(
|
||||
SKY_DUSK_BOT,
|
||||
SKY_NIGHT_BOT,
|
||||
max(pow(sun_dir.z, 0.2), 0)
|
||||
pow(max(sun_dir.z, 0.0), 0.2)
|
||||
),
|
||||
SKY_DAY_BOT,
|
||||
max(-sun_dir.z, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user